All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
To: Dmitry Fleytman <dmitry@daynix.com>, Jason Wang <jasowang@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>,
	idan.brown@ravellosystems.com, qemu-devel@nongnu.org,
	Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Subject: [Qemu-devel] [PATCH v2 2/5] vmxnet3: Change the offset of the MSIX PBA table
Date: Wed,  2 Dec 2015 17:26:28 +0200	[thread overview]
Message-ID: <1449069991-6109-3-git-send-email-shmulik.ladkani@ravellosystems.com> (raw)
In-Reply-To: <1449069991-6109-1-git-send-email-shmulik.ladkani@ravellosystems.com>

Place the PBA table at 0x1000, as placed by VMware virtual hardware.

The 'x-old-msi-offsets' property is used for backwards compatability.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
---
 hw/net/vmxnet3.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 1985dcf..b176138 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)
@@ -2115,7 +2116,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) {
-- 
1.9.1

  parent reply	other threads:[~2015-12-02 15:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02 15:26 [Qemu-devel] [PATCH v2 0/5] Fine-tune device capabilities Shmulik Ladkani
2015-12-02 15:26 ` [Qemu-devel] [PATCH v2 1/5] vmxnet3: Change offsets of msi/msix pci capabilities Shmulik Ladkani
2015-12-04  8:49   ` Jason Wang
2015-12-04 19:38     ` Shmulik Ladkani
2015-12-07  2:40       ` Jason Wang
2015-12-02 15:26 ` Shmulik Ladkani [this message]
2015-12-02 15:26 ` [Qemu-devel] [PATCH v2 3/5] vmxnet3: coding: Introduce VMXNET3Class Shmulik Ladkani
2015-12-02 15:26 ` [Qemu-devel] [PATCH v2 4/5] vmxnet3: The vmxnet3 device is a PCIE endpoint Shmulik Ladkani
2015-12-04  8:49   ` Jason Wang
2015-12-04 19:57     ` Shmulik Ladkani
2015-12-07  2:46       ` Jason Wang
2015-12-02 15:26 ` [Qemu-devel] [PATCH v2 5/5] vmxnet3: Report the Device Serial Number capability Shmulik Ladkani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449069991-6109-3-git-send-email-shmulik.ladkani@ravellosystems.com \
    --to=shmulik.ladkani@ravellosystems.com \
    --cc=dmitry@daynix.com \
    --cc=idan.brown@ravellosystems.com \
    --cc=jasowang@redhat.com \
    --cc=marcel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.