All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org,
	Dmitry Fleytman <dmitry.fleytman@gmail.com>
Cc: Jason Wang <jasowangio@gmail.com>,
	qemu-trivial@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [PATCH v2] hw/net/vmxnet3: Do not abort if guest provides bad interrupt numbers
Date: Fri, 31 Jul 2026 15:06:24 +0200	[thread overview]
Message-ID: <aebdcaeb-efa1-4ab2-b48a-e0a183bb53da@oss.qualcomm.com> (raw)
In-Reply-To: <20260731113352.189066-1-thuth@redhat.com>

On 31/7/26 13:33, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> vmxnet3_validate_interrupts() currently aborts via hw_error() if
> the guest provided bad interrupt numbers. This should not happen,
> QEMU should rather refuse to activate the device in this case instead.
> Thus propagate the error to the callers to handle it more gracefully
> there.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/539
> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   v2: Drop the unnecessary vmxnet3_reset()
> 
>   hw/net/vmxnet3.c | 34 ++++++++++++++++++++++++++--------
>   1 file changed, 26 insertions(+), 8 deletions(-)


> @@ -1554,7 +1568,9 @@ static void vmxnet3_activate_device(VMXNET3State *s)
>                  sizeof(s->rxq_descr[i].rxq_stats));
>       }
>   
> -    vmxnet3_validate_interrupts(s);
> +    if (!vmxnet3_validate_interrupts(s)) {
> +        return;
> +    }

Better, thanks.

If nobody queue this patch, I can take it via my hw-misc tree, but
after the release (since this is a very old issue).

Regards,

Phil.


      reply	other threads:[~2026-07-31 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 11:33 [PATCH v2] hw/net/vmxnet3: Do not abort if guest provides bad interrupt numbers Thomas Huth
2026-07-31 13:06 ` Philippe Mathieu-Daudé [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=aebdcaeb-efa1-4ab2-b48a-e0a183bb53da@oss.qualcomm.com \
    --to=philmd@oss.qualcomm.com \
    --cc=dmitry.fleytman@gmail.com \
    --cc=jasowangio@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.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 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.