|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 06/11] x86/IRQ: avoid over-alignment in alloc_pirq_struct()
In particular in the PV case xzalloc_bytes() forcing SMP_CACHE_BYTES
alignment is counterproductive, as the allocation size there is only 40
bytes.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1313,9 +1313,12 @@ void cleanup_domain_irq_mapping(struct d
struct pirq *alloc_pirq_struct(struct domain *d)
{
- size_t sz = is_hvm_domain(d) ? sizeof(struct pirq) :
- offsetof(struct pirq, arch.hvm);
- struct pirq *pirq = xzalloc_bytes(sz);
+ union pirq_pv {
+ char space[offsetof(struct pirq, arch.hvm)];
+ void *align;
+ };
+ struct pirq *pirq = is_hvm_domain(d) ? xzalloc(struct pirq)
+ : (void *)xzalloc(union pirq_pv);
if ( pirq )
{
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |