On Fri, Jul 31, 2026 at 01:48:11AM -0700, Anisa Su wrote:
> From: Ira Weiny <[email protected]>
> 
> Dynamic Capacity Devices (DCD) support extent change notifications
> through the event log mechanism.  The interrupt mailbox commands were
> extended in CXL 3.1 to support these notifications.  Firmware can't
> configure DCD events to be FW controlled but can retain control of
> memory events.
> 
> Configure DCD event log interrupts on devices supporting dynamic
> capacity.  Disable DCD if interrupts are not supported.
> 
> Care is taken to preserve the interrupt policy set by the FW if FW first
> has been selected by the BIOS.

Hi Anisa,

I gave one comment in response to a Sashiko comment, wrt 'drain'.
Another below-


> +
> +     /*
> +      * A CXL 3.0+ device can carry dcd_settings field without DCD command
> +      * support, so size the request by the device's policy_size and only
> +      * enable the DCD interrupt when DCD commands are supported.
> +      */
> +     if (cxl_dcd_supported(mds))
> +             policy->dcd_settings = CXL_INT_MSI_MSIX;
>  
>       mbox_cmd = (struct cxl_mbox_cmd) {
>               .opcode = CXL_MBOX_OP_SET_EVT_INT_POLICY,
>               .payload_in = policy,
> -             .size_in = sizeof(*policy),
> +             .size_in = policy_size,
>       };

Can you help me understand what happens if policy_size is only 4 bytes.
dcd_settings is never sent in the Set command. How do we know cxl_irqsetup()
isn't using a value the device never accepted?


>       rc = cxl_internal_send_cmd(cxl_mbox, &mbox_cmd);
> @@ -596,7 +635,7 @@ static int cxl_event_config_msgnums(struct 
> cxl_memdev_state *mds,
>       }
>  
>       /* Retrieve final interrupt settings */
> -     return cxl_event_get_int_policy(mds, policy);
> +     return cxl_event_get_int_policy(mds, policy, NULL);
>  }

snip


Reply via email to