mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
ppc/xive: add support for the END Event State Buffers
The Event Notification Descriptor (END) XIVE structure also contains two Event State Buffers providing further coalescing of interrupts, one for the notification event (ESn) and one for the escalation events (ESe). A MMIO page is assigned for each to control the EOI through loads only. Stores are not allowed. The END ESBs are modeled through an object resembling the 'XiveSource' It is stateless as the END state bits are backed into the XiveEND structure under the XiveRouter and the MMIO accesses follow the same rules as for the XiveSource ESBs. END ESBs are not supported by the Linux drivers neither on OPAL nor on sPAPR. Nevetherless, it provides a mean to study the question in the future and validates a bit more the XIVE model. Signed-off-by: Cédric Le Goater <clg@kaod.org> [dwg: Fold in a later fix for field access] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
fcfbc18d00
commit
002686be42
2 changed files with 179 additions and 2 deletions
|
@ -336,6 +336,27 @@ int xive_router_get_end(XiveRouter *xrtr, uint8_t end_blk, uint32_t end_idx,
|
|||
int xive_router_write_end(XiveRouter *xrtr, uint8_t end_blk, uint32_t end_idx,
|
||||
XiveEND *end, uint8_t word_number);
|
||||
|
||||
/*
|
||||
* XIVE END ESBs
|
||||
*/
|
||||
|
||||
#define TYPE_XIVE_END_SOURCE "xive-end-source"
|
||||
#define XIVE_END_SOURCE(obj) \
|
||||
OBJECT_CHECK(XiveENDSource, (obj), TYPE_XIVE_END_SOURCE)
|
||||
|
||||
typedef struct XiveENDSource {
|
||||
DeviceState parent;
|
||||
|
||||
uint32_t nr_ends;
|
||||
uint8_t block_id;
|
||||
|
||||
/* ESB memory region */
|
||||
uint32_t esb_shift;
|
||||
MemoryRegion esb_mmio;
|
||||
|
||||
XiveRouter *xrtr;
|
||||
} XiveENDSource;
|
||||
|
||||
/*
|
||||
* For legacy compatibility, the exceptions define up to 256 different
|
||||
* priorities. P9 implements only 9 levels : 8 active levels [0 - 7]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue