mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
ppc/xive: introduce a simplified XIVE presenter
The last sub-engine of the XIVE architecture is the Interrupt Virtualization Presentation Engine (IVPE). On HW, the IVRE and the IVPE share elements, the Power Bus interface (CQ), the routing table descriptors, and they can be combined in the same HW logic. We do the same in QEMU and combine both engines in the XiveRouter for simplicity. When the IVRE has completed its job of matching an event source with a Notification Virtual Target (NVT) to notify, it forwards the event notification to the IVPE sub-engine. The IVPE scans the thread interrupt contexts of the Notification Virtual Targets (NVT) dispatched on the HW processor threads and if a match is found, it signals the thread. If not, the IVPE escalates the notification to some other targets and records the notification in a backlog queue. The IVPE maintains the thread interrupt context state for each of its NVTs not dispatched on HW processor threads in the Notification Virtual Target table (NVTT). The model currently only supports single NVT notifications. Signed-off-by: Cédric Le Goater <clg@kaod.org> [dwg: Folded in fix for field accessors] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
207d9fe985
commit
af53dbf622
3 changed files with 228 additions and 0 deletions
|
@ -208,4 +208,28 @@ typedef struct XiveEND {
|
|||
#define xive_end_is_backlog(end) (be32_to_cpu((end)->w0) & END_W0_BACKLOG)
|
||||
#define xive_end_is_escalate(end) (be32_to_cpu((end)->w0) & END_W0_ESCALATE_CTL)
|
||||
|
||||
/* Notification Virtual Target (NVT) */
|
||||
typedef struct XiveNVT {
|
||||
uint32_t w0;
|
||||
#define NVT_W0_VALID PPC_BIT32(0)
|
||||
uint32_t w1;
|
||||
uint32_t w2;
|
||||
uint32_t w3;
|
||||
uint32_t w4;
|
||||
uint32_t w5;
|
||||
uint32_t w6;
|
||||
uint32_t w7;
|
||||
uint32_t w8;
|
||||
#define NVT_W8_GRP_VALID PPC_BIT32(0)
|
||||
uint32_t w9;
|
||||
uint32_t wa;
|
||||
uint32_t wb;
|
||||
uint32_t wc;
|
||||
uint32_t wd;
|
||||
uint32_t we;
|
||||
uint32_t wf;
|
||||
} XiveNVT;
|
||||
|
||||
#define xive_nvt_is_valid(nvt) (be32_to_cpu((nvt)->w0) & NVT_W0_VALID)
|
||||
|
||||
#endif /* PPC_XIVE_REGS_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue