qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: Jason Wang <jasowang@redhat.com>,
	Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Subject: [Qemu-devel] [PULL 02/14] vmxnet3: Support reading IMR registers on bar0
Date: Mon, 12 Oct 2015 16:17:04 +0800	[thread overview]
Message-ID: <1444637836-12215-3-git-send-email-jasowang@redhat.com> (raw)
In-Reply-To: <1444637836-12215-1-git-send-email-jasowang@redhat.com>

From: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>

Instead of asserting, return the actual IMR register value.
This is aligned with what's returned on ESXi.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Tested-by: Dana Rubin <dana.rubin@ravellosystems.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 hw/net/vmxnet3.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 48ced71..057f0dc 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -1163,9 +1163,13 @@ vmxnet3_io_bar0_write(void *opaque, hwaddr addr,
 static uint64_t
 vmxnet3_io_bar0_read(void *opaque, hwaddr addr, unsigned size)
 {
+    VMXNET3State *s = opaque;
+
     if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_IMR,
                         VMXNET3_MAX_INTRS, VMXNET3_REG_ALIGN)) {
-        g_assert_not_reached();
+        int l = VMW_MULTIREG_IDX_BY_ADDR(addr, VMXNET3_REG_IMR,
+                                         VMXNET3_REG_ALIGN);
+        return s->interrupt_states[l].is_masked;
     }
 
     VMW_CBPRN("BAR0 unknown read [%" PRIx64 "], size %d", addr, size);
-- 
2.1.4

  parent reply	other threads:[~2015-10-12  8:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12  8:17 [Qemu-devel] [PULL 00/14] Net patches Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 01/14] net/vmxnet3: Refine l2 header validation Jason Wang
2015-10-12  8:17 ` Jason Wang [this message]
2015-10-12  8:17 ` [Qemu-devel] [PULL 03/14] e1000: use alias for default model Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 04/14] vmxnet3: Add support for VMXNET3_CMD_GET_ADAPTIVE_RING_INFO command Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 05/14] vl.c: init delayed object after net_init_clients Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 06/14] init/cleanup of netfilter object Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 07/14] netfilter: hook packets before net queue send Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 08/14] net: merge qemu_deliver_packet and qemu_deliver_packet_iov Jason Wang
2015-10-19 13:25   ` Paolo Bonzini
2015-10-12  8:17 ` [Qemu-devel] [PULL 09/14] net/queue: introduce NetQueueDeliverFunc Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 10/14] netfilter: add an API to pass the packet to next filter Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 11/14] netfilter: print filter info associate with the netdev Jason Wang
2015-10-19 13:25   ` Paolo Bonzini
2015-10-12  8:17 ` [Qemu-devel] [PULL 12/14] net/queue: export qemu_net_queue_append_iov Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 13/14] netfilter: add a netbuffer filter Jason Wang
2015-10-12  8:17 ` [Qemu-devel] [PULL 14/14] tests: add test cases for netfilter object Jason Wang
2015-10-12 14:52 ` [Qemu-devel] [PULL 00/14] Net patches Peter Maydell

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=1444637836-12215-3-git-send-email-jasowang@redhat.com \
    --to=jasowang@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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).