summaryrefslogtreecommitdiffstats
path: root/hw/net
diff options
context:
space:
mode:
authorShmulik Ladkani <shmulik.ladkani@ravellosystems.com>2015-12-24 09:17:36 +0200
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:23 -0600
commitd80e6ec79a82379826dd2654f86f17e8bbb00c98 (patch)
tree3a19058d6f01f05cfe3b6865f8846fd24d851898 /hw/net
parentf8fa5802efdc8173465b512f16e16b4be4e0d701 (diff)
downloadhqemu-d80e6ec79a82379826dd2654f86f17e8bbb00c98.zip
hqemu-d80e6ec79a82379826dd2654f86f17e8bbb00c98.tar.gz
vmxnet3: Change the offset of the MSIX PBA table
Place the PBA table at 0x1000, as placed by VMware virtual hardware. Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/vmxnet3.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 0097f4b..4e1534b 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -51,7 +51,8 @@
#define VMXNET3_MSIX_BAR_IDX (2)
#define VMXNET3_OFF_MSIX_TABLE (0x000)
-#define VMXNET3_OFF_MSIX_PBA (0x800)
+#define VMXNET3_OFF_MSIX_PBA(s) \
+ ((s)->compat_flags & VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS ? 0x800 : 0x1000)
/* Link speed in Mbps should be shifted by 16 */
#define VMXNET3_LINK_SPEED (1000 << 16)
@@ -2143,7 +2144,7 @@ vmxnet3_init_msix(VMXNET3State *s)
&s->msix_bar,
VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE,
&s->msix_bar,
- VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA,
+ VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA(s),
VMXNET3_MSIX_OFFSET(s));
if (0 > res) {
OpenPOWER on IntegriCloud