Skip to contentSkip to conversation

vhost_net_init returned -7

DISCUSSION Brian Jackson 4 participants 7 messages Aug 28, 2009 – Sep 7, 2009 KVM

lore
Share & tools
lore
#0 lore raw

I'm trying to tinker with vhost_net. I have a 2.6.31-rc4 host kernel patched to support vhost_net (v5) (along with ksm if it matters). The guest is a debian-5.0.2 (2.6.26) install CD for now. When the guest tries to load the virtio-net drivers, kvm closes and prints "vhost_net_init returned -7". KVM is patched with your patches from 20090817.

I tried looking through the code but without adding some other debug code, it's not obvious where exactly it's failing. Was going to see if anyone (I know, not a lot of users yet) had any ideas before I dig too deep.

--Iggy

#1 lore raw
Quoted 11 lines · Brian Jackson

I'm trying to tinker with vhost_net. I have a 2.6.31-rc4 host kernel patched to support vhost_net (v5) (along with ksm if it matters). The guest is a debian-5.0.2 (2.6.26) install CD for now. When the guest tries to load the virtio-net drivers, kvm closes and prints "vhost_net_init returned -7". KVM is patched with your patches from 20090817.

I tried looking through the code but without adding some other debug code, it's not obvious where exactly it's failing. Was going to see if anyone (I know, not a lot of users yet) had any ideas before I dig too deep.

--Iggy

What I think you miss is eventfd support from kvm module in kernel. Patches for this are in Avi's kvm.git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git

Signature · 1 line
MST
#2 lore raw
In reply to Brian Jackson
Quoted 11 lines · Brian Jackson

I'm trying to tinker with vhost_net. I have a 2.6.31-rc4 host kernel patched to support vhost_net (v5) (along with ksm if it matters). The guest is a debian-5.0.2 (2.6.26) install CD for now. When the guest tries to load the virtio-net drivers, kvm closes and prints "vhost_net_init returned -7". KVM is patched with your patches from 20090817.

I tried looking through the code but without adding some other debug code, it's not obvious where exactly it's failing. Was going to see if anyone (I know, not a lot of users yet) had any ideas before I dig too deep.

--Iggy

Something I forgot to mention is that userspace I posted currently rely on guest MSI support which requires guest v2.6.31 (any rc will do). You don't need kvm.git in guest though: kernel.org kernels should work ok.

Signature · 1 line
MST
#3 lore raw

I'm guessing that's not something the windows virtio drivers support yet. Do you plan on adding support for guests without msi or am I stuck waiting for the windows drivers to add support for msi?

Quoted 24 lines · Michael S. Tsirkin
Quoted 7 lines · Brian Jackson

I'm trying to tinker with vhost_net. I have a 2.6.31-rc4 host kernel patched to support vhost_net (v5) (along with ksm if it matters). The guest is a debian-5.0.2 (2.6.26) install CD for now. When the guest tries to load the virtio-net drivers, kvm closes and prints "vhost_net_init returned -7". KVM is
patched with your patches from 20090817.

Quoted 5 lines

I tried looking through the code but without adding some other debug code, it's not obvious where exactly it's failing. Was going to see if anyone (I know, not a lot of users yet) had any ideas before I dig too deep.

--Iggy

Something I forgot to mention is that userspace I posted currently rely on guest MSI support which requires guest v2.6.31 (any rc will do). You don't need kvm.git in guest though: kernel.org kernels should work ok.

Signature · 5 lines
MST
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
Quoted 4 lines · Brian Jackson

I'm guessing that's not something the windows virtio drivers support yet. Do you plan on adding support for guests without msi or am I stuck waiting for the windows drivers to add support for msi?

I do want to support non-MSI. Host kernel KVM will have to be extended for this, though.

Quoted 35 lines
Quoted 31 lines · Michael S. Tsirkin
Quoted 10 lines · Brian Jackson

I'm trying to tinker with vhost_net. I have a 2.6.31-rc4 host kernel patched
to support vhost_net (v5) (along with ksm if it matters). The guest is a
debian-5.0.2 (2.6.26) install CD for now. When the guest tries to load the
virtio-net drivers, kvm closes and prints "vhost_net_init returned -7". KVM is
patched with your patches from 20090817.

Quoted 7 lines

I tried looking through the code but without adding some other debug code,
it's not obvious where exactly it's failing. Was going to see if anyone (I
know, not a lot of users yet) had any ideas before I dig too deep.

--Iggy

Something I forgot to mention is that userspace I posted currently rely on
guest MSI support which requires guest v2.6.31 (any rc will do). You don't need
kvm.git in guest though: kernel.org kernels should work ok.

Signature · 5 lines
MST
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw
Quoted 11 lines · Michael S. Tsirkin
Quoted 5 lines · Brian Jackson

I'm guessing that's not something the windows virtio drivers support yet. Do you plan on adding support for guests without msi or am I stuck waiting for the windows drivers to add support for msi?

I do want to support non-MSI. Host kernel KVM will have to be extended for this, though.

You can proxy the interrupt in userspace. I don't think we should spend a lot of time optimizing vhost-net pci-intx, just get it to work reasonably well.

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
#6 lore raw
Quoted 5 lines · Avi Kivity
Quoted 4 lines · Michael S. Tsirkin
Quoted 3 lines · Brian Jackson

I'm guessing that's not something the windows virtio drivers support yet. Do you plan on adding support for guests without msi or am I stuck waiting for the windows drivers to add support for msi?

It's work in progress.

Quoted 10 lines
Quoted 4 lines
Quoted 1 line

I do want to support non-MSI. Host kernel KVM will have to be extended for this, though.

You can proxy the interrupt in userspace. I don't think we should spend a lot of time optimizing vhost-net pci-intx, just get it to work reasonably well.