mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
ppc/xive: Introduce a XivePresenter interface
When the XIVE IVRE sub-engine (XiveRouter) looks for a Notification Virtual Target (NVT) to notify, it broadcasts a message on the PowerBUS to find an XIVE IVPE sub-engine (Presenter) with the NVT dispatched on one of its HW threads, and then forwards the notification if any response was received. The current XIVE presenter model is sufficient for the pseries machine because it has a single interrupt controller device, but the PowerNV machine can have multiple chips each having its own interrupt controller. In this case, the XIVE presenter model is too simple and the CAM line matching should scan all chips of the system. To start fixing this issue, we first extend the XIVE Router model with a new XivePresenter QOM interface representing the XIVE IVPE sub-engine. This interface exposes a 'match_nvt' handler which the sPAPR and PowerNV XIVE Router models will need to implement to perform the CAM line matching. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20191125065820.927-2-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
e2392d4395
commit
13bee8521c
2 changed files with 49 additions and 9 deletions
|
@ -367,6 +367,38 @@ int xive_router_write_nvt(XiveRouter *xrtr, uint8_t nvt_blk, uint32_t nvt_idx,
|
|||
XiveTCTX *xive_router_get_tctx(XiveRouter *xrtr, CPUState *cs);
|
||||
void xive_router_notify(XiveNotifier *xn, uint32_t lisn);
|
||||
|
||||
/*
|
||||
* XIVE Presenter
|
||||
*/
|
||||
|
||||
typedef struct XiveTCTXMatch {
|
||||
XiveTCTX *tctx;
|
||||
uint8_t ring;
|
||||
} XiveTCTXMatch;
|
||||
|
||||
typedef struct XivePresenter XivePresenter;
|
||||
|
||||
#define TYPE_XIVE_PRESENTER "xive-presenter"
|
||||
#define XIVE_PRESENTER(obj) \
|
||||
INTERFACE_CHECK(XivePresenter, (obj), TYPE_XIVE_PRESENTER)
|
||||
#define XIVE_PRESENTER_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(XivePresenterClass, (klass), TYPE_XIVE_PRESENTER)
|
||||
#define XIVE_PRESENTER_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(XivePresenterClass, (obj), TYPE_XIVE_PRESENTER)
|
||||
|
||||
typedef struct XivePresenterClass {
|
||||
InterfaceClass parent;
|
||||
int (*match_nvt)(XivePresenter *xptr, uint8_t format,
|
||||
uint8_t nvt_blk, uint32_t nvt_idx,
|
||||
bool cam_ignore, uint8_t priority,
|
||||
uint32_t logic_serv, XiveTCTXMatch *match);
|
||||
} XivePresenterClass;
|
||||
|
||||
int xive_presenter_tctx_match(XivePresenter *xptr, XiveTCTX *tctx,
|
||||
uint8_t format,
|
||||
uint8_t nvt_blk, uint32_t nvt_idx,
|
||||
bool cam_ignore, uint32_t logic_serv);
|
||||
|
||||
/*
|
||||
* XIVE END ESBs
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue