On Thu, 2017-11-30 at 15:38 +1100, David Gibson wrote: > On Thu, Nov 23, 2017 at 02:29:43PM +0100, Cédric Le Goater wrote: > > The Event Queue Descriptor (EQD) table, also known as Event Notification > > Descriptor (END), is one of the internal tables the XIVE interrupt > > controller uses to redirect exception from event sources to CPU > > threads. > > > > The EQD specifies on which Event Queue the event data should be posted > > when an exception occurs (later on pulled by the OS) and which server > > (VPD in XIVE terminology) to notify. The Event Queue is a much more > > complex structure but we start with a simple model for the sPAPR > > machine. > > Just to clarify my understanding a server / VPD in XIVE would > typically correspond to a cpu - either real or virtual, yes?
The IVEs and EQs are managed by the virtualization controller. The VPs (aka ENDs) are managed by the presentation controller. There's a VP per real and virtual CPU. You can think of the XIVE as having 3 main component types: - Source controller(s). There are some in the PHBs, one generic in the XIVE itself, and one in the PSI bridge. Those contain the PQ bits and thus the trigger & coalescing logic. They effectively shoot an MMIO to the virtualization controller on events. - Virtualization controller (one per chip). This receives the above MMIOs from the sources, manages the IVEs to get the target queue and remap the number, and manages the queues. When a queue is enabled for notification (or escalation) and such an event occurs, an MMIO goes to the corresponding presentation controller. - Presentation controller (one per chip). This receives the above notifications and sets as a result the IPB bits for one of the 8 priorities. Basically this guy tracks a single pending bit per priority for each VP indicating whether there's something in the queue for that priority and delivers interrupts to the core accordingly. Now this is a simplified view. The PC supports groups but we don't handle that yet, there are escalation interrupts, there are redistribution mechanisms etc... but for now you get the basic idea. Cheers, Ben.