On Mon, 2015-10-05 at 13:51 +0100, Julien Grall wrote:
> Xen is currently directly storing the value of GICD_IPRIORITYR register
> in the rank. This makes emulation of the register access very simple
> but makes the code to get the priority for a given vIRQ more complex.
> 
> While the priority of an vIRQ is retrieved every time an vIRQ is injected
> to the guest, the access to register occurs less often.
> 
> Each GICD_IPRIORITYR register stores 4 priorities associated for 4 vIRQs
> (see 4.3.11 in IHI 0048B). As Xen is using little endian, we can use
> an union to access directly a register or a priority for a given IRQ.
> 
> Note that the field "ipriority" has been renamed to "ipriorityr" to
> match the name of the register in the GIC spec.
> 
> Finally, the implementation of the callback get_irq_priority is exactly
> the same for both vGIC drivers. Consolidate the implementation in the
> common vGIC code and drop the callback.
> 
> Signed-off-by: Julien Grall <julien.gr...@citrix.com>

Acked-by: Ian Campbell <ian.campb...@citrix.com>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to