qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>,
	qemu-devel@nongnu.org, Dmitry Fleytman <dmitry@daynix.com>
Cc: idan.brown@ravellosystems.com,
	Dana Rubin <dana.rubin@ravellosystems.com>
Subject: Re: [Qemu-devel] [PATCH] vmxnet3: Support reading IMR registers on bar0
Date: Thu, 24 Sep 2015 12:41:25 +0800	[thread overview]
Message-ID: <56037EF5.2000104@redhat.com> (raw)
In-Reply-To: <1442844542-16216-1-git-send-email-shmulik.ladkani@ravellosystems.com>



On 09/21/2015 10:09 PM, Shmulik Ladkani wrote:
> 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>
>
> ---
>  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 04159c8..97f19dc 100644
> --- a/hw/net/vmxnet3.c
> +++ b/hw/net/vmxnet3.c
> @@ -1165,9 +1165,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);

Applied in https://github.com/jasowang/qemu/commits/net

Thanks.

      parent reply	other threads:[~2015-09-24  4:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 14:09 [Qemu-devel] [PATCH] vmxnet3: Support reading IMR registers on bar0 Shmulik Ladkani
2015-09-22  8:16 ` Dmitry Fleytman
2015-09-24  4:41 ` Jason Wang [this message]

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=56037EF5.2000104@redhat.com \
    --to=jasowang@redhat.com \
    --cc=dana.rubin@ravellosystems.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).