Re: [PATCH v2] hw/net/vmxnet3: Do not abort if guest provides bad interrupt numbers
Philippe Mathieu-Daudé <[email protected]> Fri, 31 Jul 2026 15:06:24 +0200
| Newsgroups | org.nongnu.qemu-trivial,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
On 31/7/26 13:33, Thomas Huth wrote: > From: Thomas Huth <[email protected]> > > 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é <[email protected]> > Signed-off-by: Thomas Huth <[email protected]> > --- > 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.