mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
x86/HVM: avoid effectively open-coding xzalloc_flex_struct()
Drop hvm_irq_size(), which exists for just this purpose. There is a difference in generated code: xzalloc_bytes() forces SMP_CACHE_BYTES alignment. I think we not only don't need this here, but actually don't want it. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
4bd1811dca
commit
23eda45f12
2 files changed
+2
-2
No files matched your search
@@ -642,7 +642,8 @@ int hvm_domain_initialise(struct domain *d)
|
||||
d->arch.hvm.params = xzalloc_array(uint64_t, HVM_NR_PARAMS);
|
||||
d->arch.hvm.io_handler = xzalloc_array(struct hvm_io_handler,
|
||||
NR_IO_HANDLERS);
|
||||
d->arch.hvm.irq = xzalloc_bytes(hvm_irq_size(nr_gsis));
|
||||
d->arch.hvm.irq = xzalloc_flex_struct(struct hvm_irq,
|
||||
gsi_assert_count, nr_gsis);
|
||||
|
||||
rc = -ENOMEM;
|
||||
if ( !d->arch.hvm.pl_time || !d->arch.hvm.irq ||
|
||||
|
||||
@@ -98,7 +98,6 @@ struct hvm_irq {
|
||||
#define hvm_pci_intx_link(dev, intx) \
|
||||
(((dev) + (intx)) & 3)
|
||||
#define hvm_domain_irq(d) ((d)->arch.hvm.irq)
|
||||
#define hvm_irq_size(cnt) offsetof(struct hvm_irq, gsi_assert_count[cnt])
|
||||
|
||||
#define hvm_isa_irq_to_gsi(isa_irq) ((isa_irq) ? : 2)
|
||||
|
||||
|
||||