summaryrefslogtreecommitdiffstats
path: root/hw/scsi
diff options
context:
space:
mode:
authorShmulik Ladkani <shmulik.ladkani@ravellosystems.com>2015-12-13 10:08:28 +0200
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:19 -0600
commit47a242f9dbf477ae5f06f2bfad1a19e16edc1afb (patch)
tree750fc010aad945bd679078056162e7c3410250e6 /hw/scsi
parentbb2ccbe3bfe6b81e9978fa46356a6cee6679f6a5 (diff)
downloadhqemu-47a242f9dbf477ae5f06f2bfad1a19e16edc1afb.zip
hqemu-47a242f9dbf477ae5f06f2bfad1a19e16edc1afb.tar.gz
vmw_pvscsi: Change offset of msi pci capability
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>
Diffstat (limited to 'hw/scsi')
-rw-r--r--hw/scsi/vmw_pvscsi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index ce099f9..be95cff 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -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);
OpenPOWER on IntegriCloud