From: Jason Wang <jasowang@redhat.com>
To: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Cc: Dmitry Fleytman <dmitry@daynix.com>,
idan.brown@ravellosystems.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/4] vmxnet3: Change offsets of PCI capabilities
Date: Wed, 25 Nov 2015 10:42:34 +0800 [thread overview]
Message-ID: <5655201A.2080207@redhat.com> (raw)
In-Reply-To: <1447930344-17625-3-git-send-email-shmulik.ladkani@ravellosystems.com>
On 11/19/2015 06:52 PM, Shmulik Ladkani wrote:
> Place device reported PCI capabilities at the same offsets as placed by
> the VMware virtual hardware:
> Express Endpoint at [48], MSI at [84], MSI-X at [9c].
>
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
> ---
> hw/net/vmxnet3.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
> index ed286cc..48a8242 100644
> --- a/hw/net/vmxnet3.c
> +++ b/hw/net/vmxnet3.c
> @@ -36,6 +36,10 @@
> #define VMXNET3_MSIX_BAR_SIZE 0x2000
> #define MIN_BUF_SIZE 60
>
> +#define VMXNET3_EXP_EP_OFFSET (0x48)
> +#define VMXNET3_MSI_OFFSET (0x84)
> +#define VMXNET3_MSIX_OFFSET (0x9c)
> +
> #define VMXNET3_BAR0_IDX (0)
> #define VMXNET3_BAR1_IDX (1)
> #define VMXNET3_MSIX_BAR_IDX (2)
> @@ -2103,7 +2107,7 @@ vmxnet3_init_msix(VMXNET3State *s)
> VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE,
> &s->msix_bar,
> VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA,
> - 0);
> + VMXNET3_MSIX_OFFSET);
>
> if (0 > res) {
> VMW_WRPRN("Failed to initialize MSI-X, error %d", res);
> @@ -2131,7 +2135,6 @@ vmxnet3_cleanup_msix(VMXNET3State *s)
> }
> }
>
> -#define VMXNET3_MSI_OFFSET (0x50)
> #define VMXNET3_USE_64BIT (true)
> #define VMXNET3_PER_VECTOR_MASK (false)
>
> @@ -2234,7 +2237,7 @@ static void vmxnet3_pci_realize(PCIDevice *pci_dev, Error **errp)
> }
>
> if (pci_bus_is_express(pci_dev->bus)) {
> - pcie_endpoint_cap_init(pci_dev, 0);
> + pcie_endpoint_cap_init(pci_dev, VMXNET3_EXP_EP_OFFSET);
> }
>
> vmxnet3_net_init(s);
Looks the same issue as patch 1, this changes is guest visible after
migration.
next prev parent reply other threads:[~2015-11-25 2:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 10:52 [Qemu-devel] [PATCH 0/4] vmxnet3: Fine-tune device capabilities Shmulik Ladkani
2015-11-19 10:52 ` [Qemu-devel] [PATCH 1/4] vmxnet3: The vmxnet3 device is a PCIE endpoint Shmulik Ladkani
2015-11-25 2:38 ` Jason Wang
2015-11-25 6:18 ` Shmulik Ladkani
2015-11-25 8:24 ` Jason Wang
2015-11-29 21:07 ` Shmulik Ladkani
2015-11-30 5:40 ` Jason Wang
2015-11-19 10:52 ` [Qemu-devel] [PATCH 2/4] vmxnet3: Change offsets of PCI capabilities Shmulik Ladkani
2015-11-25 2:42 ` Jason Wang [this message]
2015-11-19 10:52 ` [Qemu-devel] [PATCH 3/4] vmxnet3: Change the offset of the MSIX PBA table Shmulik Ladkani
2015-11-25 2:43 ` Jason Wang
2015-11-19 10:52 ` [Qemu-devel] [PATCH 4/4] 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=5655201A.2080207@redhat.com \
--to=jasowang@redhat.com \
--cc=dmitry@daynix.com \
--cc=idan.brown@ravellosystems.com \
--cc=qemu-devel@nongnu.org \
--cc=shmulik.ladkani@ravellosystems.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).