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

Re: [Xen-devel] [PATCH 5/5] x86/vioapic: allow PVHv2 Dom0 to have more than one IO APIC



>>> On 23.02.17 at 12:52, <roger.pau@xxxxxxxxxx> wrote:
>  int vioapic_init(struct domain *d)
>  {
> +    unsigned int i, nr_vioapics = is_hardware_domain(d) ? nr_ioapics : 1;

Considering this ...

> @@ -646,24 +656,41 @@ int vioapic_init(struct domain *d)
>  
>      if ( (d->arch.hvm_domain.vioapic == NULL) &&
>           ((d->arch.hvm_domain.vioapic =
> -           xmalloc(struct hvm_hw_vioapic)) == NULL) )
> +           xzalloc_array(struct hvm_hw_vioapic, nr_vioapics)) == NULL) )
>          return -ENOMEM;
>  
> -    domain_vioapic(d, 0)->redirtbl = xmalloc_array(union vioapic_redir_entry,
> -                                                   VIOAPIC_NUM_PINS);
> -    if ( !domain_vioapic(d, 0)->redirtbl )
> +    if ( !is_hardware_domain(d) )
>      {
> -        xfree(d->arch.hvm_domain.vioapic);
> -        return -ENOMEM;
> +        ASSERT(nr_vioapics == 1);

... this is kind of strange a check.

Everything else looks fine, but this will see some changes due to
the intended data structure adjustments in an earlier patch.

Jan


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

 


Rackspace

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