> +typedef struct XHCIPciState {
> +    /*< private >*/
> +    PCIDevice parent_obj;
> +    /*< public >*/
> +    XHCIState *xhci;

Better embed the struct instead of storing a pointer.

>  struct XHCIState {
> -    /*< private >*/
> -    PCIDevice parent_obj;
> -    /*< public >*/
> -
> +    DeviceState parent;

Why do you need this?  XHCIState will not be used standalone, it will be
part of XHCIPciState or XHCISysbusState, which in turn has a DeviceState
already.

> +    void (*intr_update)(void *opaque, int n, bool enable);
> +    void (*intr_raise)(void *opaque, int n, bool level);

Use "struct XHCIState*" instead of "void*" please, then use container_of
to get XHCIPciState or XHCISysbusState.

cheers,
  Gerd


Reply via email to