On Mon, 25 Sep 2023 17:11:08 +0100
Jonathan Cameron <jonathan.came...@huawei.com> wrote:

> Enables having multiple CCIs per devices. Each CCI (mailbox) has it's own
> state and command list, so they can't share a single structure.
> 
> Signed-off-by: Jonathan Cameron <jonathan.came...@huawei.com>
> ---

I made a mess of reordering patches, so some of Davidlohr's BG ops
patch ended up in this one and the next patch. I'll put that back
where it should be in v2.

>  
> +typedef struct CXLCCI {
> +    const struct cxl_cmd (*cxl_cmd_set)[256];
> +    struct cel_log {
> +        uint16_t opcode;
> +        uint16_t effect;
> +    } cel_log[1 << 16];
> +    size_t cel_size;
> +
> +    /* background command handling (times in ms) */
> +    struct {
> +        uint16_t opcode;
> +        uint16_t complete_pct;
> +        uint16_t ret_code; /* Current value of retcode */
> +        uint64_t starttime;
> +        /* set by each bg cmd, cleared by the bg_timer when complete */
> +        uint64_t runtime;
> +        QEMUTimer *timer;
> +    } bg;
We don't have bg ops yet!

> +    size_t payload_max;
> +    /* Pointer to device hosting the CCI */
> +    DeviceState *d;
> +    /* Pointer to the device hosting the protocol conversion */
> +    DeviceState *intf;
> +} CXLCCI;
> +

Reply via email to