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

Re: [Xen-devel] [PATCH v2 08/15] xen/arm: vgic-v3: Emulate correctly the re-distributor



Hello Vijay,

On 03/02/15 06:47, Vijay Kilari wrote:
> On Thu, Jan 29, 2015 at 11:55 PM, Julien Grall <julien.grall@xxxxxxxxxx> 
> wrote:
>> @@ -909,8 +911,15 @@ static int gicv_v3_init(struct domain *d)
>>
>>          for ( i = 0; i < gicv3.rdist_count; i++ )
>>          {
>> +            paddr_t size = gicv3.rdist_regions[i].size;
>> +
>>              d->arch.vgic.rdist_regions[i].base = 
>> gicv3.rdist_regions[i].base;
>> -            d->arch.vgic.rdist_regions[i].size = 
>> gicv3.rdist_regions[i].size;
>> +            d->arch.vgic.rdist_regions[i].size = size;
>> +
>> +            /* Set the first CPU handled by this region */
>> +            d->arch.vgic.rdist_regions[i].first_cpu = first_cpu;
>> +
>> +            first_cpu += size / d->arch.vgic.rdist_stride;
> 
>   Here you rely on size, The size might not be always map to
> number of cpus in that region. We should rely on GICR_TYPER_LAST
> to know the last cpu in the region.

This is the emulated GIC for DOM0... we don't have to expose the same
re-distributors layout as the hardware. By same layout I mean, the base
address of the redistributor for virtual CPUn is equal to base address
of the re-distributor for physical CPUn.

If your DOM0 rely on having exactly the same layout, that means that
your kernel is clearly buggy...

Regards,

-- 
Julien Grall

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


 


Rackspace

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