On 10/12/26 13:20, Magnus Kulke wrote: > Currently vhost-net is dropped for everything but KVM, this change > enables it also for the MSHV accelerator (HYPERV). > > Signed-off-by: Magnus Kulke <[email protected]> > --- > src/qemu/qemu_interface.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c > index edc53d5..61bcbc6 100644 > --- a/src/qemu/qemu_interface.c > +++ b/src/qemu/qemu_interface.c > @@ -162,9 +162,9 @@ qemuInterfaceOpenVhostNet(virDomainObj *vm, > if (!vhostnet_path) > vhostnet_path = "/dev/vhost-net"; > > - /* If running a plain QEMU guest, or > - * if the config says explicitly to not use vhost, return now */ > - if (vm->def->virtType != VIR_DOMAIN_VIRT_KVM || > + /* Only enable vhost for KVM and MSHV guests, unless explicitly > disabled. */ > + if ((vm->def->virtType != VIR_DOMAIN_VIRT_KVM && > + vm->def->virtType != VIR_DOMAIN_VIRT_HYPERV) || > net->driver.virtio.name == VIR_DOMAIN_NET_DRIVER_TYPE_QEMU) > return 0; >
ACK to this patch. We ought to take the opportunity and wrap the if() body in curly braces per our coding standard. But that's a nit pick. Michal
