[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] ignore writes to GICD_ICACTIVER ... GICD_ICACTIVERN

On 03/12/15 12:47, Jan Beulich wrote:
>>>> On 03.12.15 at 12:41, <julien.grall@xxxxxxxxxx> wrote:
>> On 03/12/15 11:41, Jan Beulich wrote:
>>>>>> On 03.12.15 at 12:02, <stefano.stabellini@xxxxxxxxxxxxx> wrote:
>>>> --- a/xen/arch/arm/vgic-v2.c
>>>> +++ b/xen/arch/arm/vgic-v2.c
>>>> @@ -315,11 +315,10 @@ static int vgic_v2_distr_mmio_write(struct vcpu *v, 
>> mmio_info_t *info)
>>>>          return 0;
>>>> -        if ( dabt.size != DABT_WORD ) goto bad_width;
>>>> -        printk(XENLOG_G_ERR
>>>> +        gdprintk(XENLOG_DEBUG,
>>>>                 "%pv: vGICD: unhandled word write %#"PRIregister" to 
>> ICACTIVER%d\n",
>>>>                 v, *r, gicd_reg - GICD_ICACTIVER);
>>> Do you really mean to print two domain/vcpu ID pairs here, the more
>>> that I suppose v == current?
>> v is not necessarily the current vCPU.
> Okay, that's different then from how MMIO intercepts work on x86.

It really depends of the emulation. This code emulates the state of the
interrupt controller for a given vCPU.

For GICv2, v will always be the current vCPU because the region is
either common or banked.

However for GICv3, each vCPU has its own region (i.e the re-distributor)
and can be accessible by all the other vCPUs.

So the code will look up the vCPU associated to this region and will use
it in the retrieve the correct state (see vgic_v3_rdistr_mmio_{read,write}).


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.