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

Re: [Xen-devel] [PATCH v2 4/7] x86/vioapic: allow the vIO APIC to have a variable number of pins



>>> On 27.03.17 at 12:18, <roger.pau@xxxxxxxxxx> wrote:
> @@ -431,9 +431,8 @@ static int ioapic_save(struct domain *d, 
> hvm_domain_context_t *h)
>      if ( !has_vioapic(d) )
>          return 0;
>  
> -    BUILD_BUG_ON(sizeof(struct hvm_hw_vioapic) !=
> -                 sizeof(struct hvm_vioapic) -
> -                 offsetof(struct hvm_vioapic, base_address));
> +    if ( s->nr_pins != VIOAPIC_NUM_PINS )
> +        return -EOPNOTSUPP;

So now you remove the little bit of guarding you had altogether?

It would also be nice if you #undef-ed VIOAPIC_NUM_PINS in the
__XEN__ case to document that all uses of it were caught. In the
few cases were you really still need the number (like above) you
could easily use ARRAY_SIZE().

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