>>> On 27.03.17 at 12:18, <roger....@citrix.com> 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@lists.xen.org https://lists.xen.org/xen-devel