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

Re: [Xen-devel] [PATCH v2 02/15] xen/arm: move vgic rank data to gic header file



On Fri, Apr 4, 2014 at 6:46 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
> Hello Vijay,
>
> Thank you for the patch.
>
> On 04/04/2014 12:56 PM, vijay.kilari@xxxxxxxxx wrote:
>> From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
>>
>> vgic_irq_rank structure contains gic specific
>> data elements. Move this out of domain.h and
>> allocate memory dynamically in vgic driver.
>
> I guess it's because you hit the maximum size of vgic structure, right?
> If so can you specify it in the commit message?
>
   That was one reason. Also it has GIC hw version specific variables.
So I moved it. I will take care in next revision

> [..]
>
>> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
>> index 77b561e..d86bede 100644
>> --- a/xen/arch/arm/vgic.c
>> +++ b/xen/arch/arm/vgic.c
>> @@ -67,7 +67,7 @@ static struct vgic_irq_rank *vgic_irq_rank(struct vcpu *v, 
>> int b, int n)
>>      int rank = REG_RANK_NR(b, n);
>>
>>      if ( rank == 0 )
>> -        return &v->arch.vgic.private_irqs;
>> +        return v->arch.vgic.private_irqs;
>>      else if ( rank <= DOMAIN_NR_RANKS(v->domain) )
>>          return &v->domain->arch.vgic.shared_irqs[rank - 1];
>>      else
>> @@ -121,9 +121,14 @@ void domain_vgic_free(struct domain *d)
>>  int vcpu_vgic_init(struct vcpu *v)
>>  {
>>      int i;
>> +
>> +    v->arch.vgic.private_irqs = xzalloc(struct vgic_irq_rank);
>> +    if ( v->arch.vgic.private_irqs == NULL )
>> +      return -ENOMEM;
>> +
>>      memset(&v->arch.vgic.private_irqs, 0, 
>> sizeof(v->arch.vgic.private_irqs));
>
> You forgot to remove & in front of v->arch.vgic.private_irqs.
OK

> 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®.