]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vmw_pvscsi: Change offset of msi pci capability
authorShmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Sun, 13 Dec 2015 08:08:28 +0000 (10:08 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Dec 2015 14:24:34 +0000 (15:24 +0100)
Place device reported MSI capability at the same offset as placed by
the VMware virtual hardware - at offset 0x7c.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Message-Id: <1449994112-7054-3-git-send-email-shmulik.ladkani@ravellosystems.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/vmw_pvscsi.c

index ce099f98391d39e747967060498f056a6ab06f83..be95cff5e75eaa67d2ea1d16313fe258c0392899 100644 (file)
@@ -32,7 +32,6 @@
 #include "trace.h"
 
 
-#define PVSCSI_MSI_OFFSET        (0x50)
 #define PVSCSI_USE_64BIT         (true)
 #define PVSCSI_PER_VECTOR_MASK   (false)
 
@@ -59,6 +58,8 @@
 
 #define PVSCSI_USE_OLD_PCI_CONFIGURATION(s) \
     ((s)->compat_flags & PVSCSI_COMPAT_OLD_PCI_CONFIGURATION)
+#define PVSCSI_MSI_OFFSET(s) \
+    (PVSCSI_USE_OLD_PCI_CONFIGURATION(s) ? 0x50 : 0x7c)
 
 typedef struct PVSCSIRingInfo {
     uint64_t            rs_pa;
@@ -1029,7 +1030,7 @@ pvscsi_init_msi(PVSCSIState *s)
     int res;
     PCIDevice *d = PCI_DEVICE(s);
 
-    res = msi_init(d, PVSCSI_MSI_OFFSET, PVSCSI_MSIX_NUM_VECTORS,
+    res = msi_init(d, PVSCSI_MSI_OFFSET(s), PVSCSI_MSIX_NUM_VECTORS,
                    PVSCSI_USE_64BIT, PVSCSI_PER_VECTOR_MASK);
     if (res < 0) {
         trace_pvscsi_init_msi_fail(res);