On Mon, 24 Jan 2022 17:16:50 +0000
Jonathan Cameron <jonathan.came...@huawei.com> wrote:

> From: Ben Widawsky <ben.widaw...@intel.com>
> 
> Implement get and set handlers for the Label Storage Area
> used to hold data describing persistent memory configuration
> so that it can be ensured it is seen in the same configuration
> after reboot.
> 
> Signed-off-by: Ben Widawsky <ben.widaw...@intel.com>
> Signed-off-by: Jonathan Cameron <jonathan.came...@huawei.com>
> ---
>  hw/cxl/cxl-mailbox-utils.c  | 54 +++++++++++++++++++++++++++++++++++
>  hw/mem/cxl_type3.c          | 56 ++++++++++++++++++++++++++++++++++++-
>  include/hw/cxl/cxl_device.h |  5 ++++
>  3 files changed, 114 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c
> index 4009152b7e..0df2a8492a 100644
> --- a/hw/cxl/cxl-mailbox-utils.c
> +++ b/hw/cxl/cxl-mailbox-utils.c
> @@ -55,6 +55,8 @@ enum {
>          #define MEMORY_DEVICE 0x0
>      CCLS        = 0x41,
>          #define GET_PARTITION_INFO     0x0
> +        #define GET_LSA       0x2
> +        #define SET_LSA       0x3
>  };
>  
>  /* 8.2.8.4.5.1 Command Return Codes */
> @@ -136,8 +138,11 @@ declare_mailbox_handler(LOGS_GET_SUPPORTED);
>  declare_mailbox_handler(LOGS_GET_LOG);
>  declare_mailbox_handler(IDENTIFY_MEMORY_DEVICE);
>  declare_mailbox_handler(CCLS_GET_PARTITION_INFO);
> +declare_mailbox_handler(CCLS_GET_LSA);
> +declare_mailbox_handler(CCLS_SET_LSA);
>  
>  #define IMMEDIATE_CONFIG_CHANGE (1 << 1)
> +#define IMMEDIATE_DATA_CHANGE (1 << 1)
Notice whilst reworking this code to drop the macro compexity.
This should be (1 << 2) I think as it is bit 2 in the CEL.

>  #define IMMEDIATE_POLICY_CHANGE (1 << 3)
>  #define IMMEDIATE_LOG_CHANGE (1 << 4)
>  

Reply via email to