[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 4/5] xen/arm: add SGI handling for GICv3
On Fri, 2014-07-11 at 15:12 +0100, Julien Grall wrote: > On 07/11/2014 03:08 PM, Ian Campbell wrote: > > On Fri, 2014-07-11 at 14:43 +0100, Julien Grall wrote: > >>> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c > >>> index 3647497..e15d509 100644 > >>> --- a/xen/arch/arm/vgic.c > >>> +++ b/xen/arch/arm/vgic.c > >>> @@ -343,6 +343,13 @@ out: > >>> smp_send_event_check_mask(cpumask_of(v->processor)); > >>> } > >>> > >>> +int vgic_emulate(struct cpu_user_regs *regs, union hsr hsr) > >>> +{ > >>> + struct vcpu *v = current; > >>> + > >>> + return v->domain->arch.vgic.handler->emulate_sysreg(regs, hsr); > >>> +} > >>> + > >> > >> You didn't implement emulate_sysreg for vgic-v2. If the GICv3 is > >> misprogrammed, Xen will segfault... > > > > Which isn't all that different to the BUG_ON(!->emulate_sysreg) which I > > would be in favour of, since misprogramming the GIC is a coding error... > > I expect this function to be called often (everytime the guest is > sending an SGI), so adding BUG_ON(!->emulate_sysreg) will "slow down" > the emulation. Then use ASSERT which are in debug builds only. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |