From: Ian Jackson Date: Mon, 4 Jan 2010 17:49:06 +0000 (+0000) Subject: passthrough: Fix MSI-x devices assignment. X-Git-Tag: xen-4.0.0-rc1~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2621a102cd74cd6691bed30f638581639fcb141d;p=qemu-xen-4.4-testing.git passthrough: Fix MSI-x devices assignment. Currenlty, assigned MSI-x devices fails to work due to incorrect table_offset_adjust setting. The last field msix_entryof struct pt_msix_info is a variable-size array, so there shouldn't be any field after it, otherwise they maybe destroyed when access msix_entry. Signed-off-by: Xiantao Zhang --- diff --git a/hw/pass-through.h b/hw/pass-through.h index dc06a4f81..3156897ca 100644 --- a/hw/pass-through.h +++ b/hw/pass-through.h @@ -189,11 +189,11 @@ struct pt_msix_info { int bar_index; uint64_t table_base; uint32_t table_off; + uint32_t table_offset_adjust; /* page align mmap */ uint64_t mmio_base_addr; int mmio_index; void *phys_iomem_base; struct msix_entry_info msix_entry[0]; - uint32_t table_offset_adjust; /* page align mmap */ }; struct pt_pm_info {