CXL/cxl_component: Add cxl_get_hb_cstate()
Accessor to get hold of the cxl state for a CXL host bridge without exposing the internals of the implementation. Signed-off-by: Jonathan Cameron <jonathan.cameron@huawei.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220429144110.25167-32-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
aa970ed586
commit
0b4aec2469
@ -72,6 +72,13 @@ static GList *pxb_dev_list;
|
|||||||
|
|
||||||
#define TYPE_PXB_HOST "pxb-host"
|
#define TYPE_PXB_HOST "pxb-host"
|
||||||
|
|
||||||
|
CXLComponentState *cxl_get_hb_cstate(PCIHostState *hb)
|
||||||
|
{
|
||||||
|
CXLHost *host = PXB_CXL_HOST(hb);
|
||||||
|
|
||||||
|
return &host->cxl_cstate;
|
||||||
|
}
|
||||||
|
|
||||||
static int pxb_bus_num(PCIBus *bus)
|
static int pxb_bus_num(PCIBus *bus)
|
||||||
{
|
{
|
||||||
PXBDev *pxb = convert_to_pxb(bus->parent_dev);
|
PXBDev *pxb = convert_to_pxb(bus->parent_dev);
|
||||||
|
@ -218,4 +218,6 @@ static inline hwaddr cxl_decode_ig(int ig)
|
|||||||
return 1 << (ig + 8);
|
return 1 << (ig + 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CXLComponentState *cxl_get_hb_cstate(PCIHostState *hb);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user