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