|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 02/10] arm64: Add hook to handle guest GICv3 sysreg accesses
Hi Manish, On 16/01/18 15:42, mjaggi@xxxxxxxxxxxxxxxxxx wrote: From: Manish Jaggi <manish.jaggi@xxxxxxxxxx> In order to start handling guest access to GICv3 system registers, let's add a hook that will get called when we trap a system register access. This handling code is kept independent of other traps. Set CONFIG_VGIC_ERRATA to enable this code. The commit message should explain the rationale behind calling do_fixup_vgic_errata from do_trap_guest_sync.
Can we have a separate file to emulate vgic system registers? We might want to re-use some of the code for 32-bit guests in the future. Also as far as I can tell, this will only cover GICv3 system registers. To be more specific it will only be cpu interface register. So I think you should name vgic_v3_handle_cpuif_access(...). You are returning either -1 or 0. Can we please use bool in that case? You will enter in do_trap_guest_sync for various reasons. So you should check that exception class correspond to a trapped of system instructions (e.g HSR_EC_SYSREG). Otherwise you will emulate sysreg on other encoding by mistake.+ + local_irq_disable(); + switch ( hsr.bits & HSR_SYSREG_REGS_MASK )
Most likely distros will have the errata built in Xen because they want the hypervisor to run on many platforms. And we don't want to affect the on platform that are not affected by the errata. So we want to skip the call. Have a look at CHECK_WORKAROUND_HELPER.
Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |