|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 09/17] xen/riscv: add helper to check APLIC MSI mode
> This helper can be used outside aplic.c to determine whether MSI mode > is enabled. A follow-up patch uses it to decide whether the guest > IMSIC state should be saved/restored. > > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> > > diff --git a/xen/arch/riscv/aplic.c b/xen/arch/riscv/aplic.c > index 87f2134bc5..1ce844cd21 100644 > --- a/xen/arch/riscv/aplic.c > +++ b/xen/arch/riscv/aplic.c > @@ -93,6 +93,11 @@ void aplic_hw_write_reg(unsigned int offset, uint32_t > value) > spin_unlock_irqrestore(&aplic.lock, flags); > } > > +bool has_msi_support(void) It does a readl() of the physical APLIC on every call. Patch 11 puts it on the vCPU context switch path (vaplic_state_save/restore), so this becomes an uncached MMIO read per switch to read a value that aplic_init_hw_interrupts() sets once and nothing ever changes. Please cache it at init time. -- Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |