Freeze with KVM_CLOCK, undocumented dependency VIRTIO_BLK -> VIRTIO_PCI
Hi,
apologies if those questions have already been answered, I did not find anything specific that should still be visible.
I'm currently testing KVM (kvm-0.70 package from Debian unstable, rebuilt on Ubuntu Hardy) on a Athlon64 in i386 mode and found two small issues while trying to build a small kernel for my guest systems (2.6.26-rc6).
a) when I enable KVM_CLOCK in the kernel configuration the guest system freezes after
PCI: Found IRQ 11 for device 0000:00:04.0
vda: vda1 vda2
TCP cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
Using IPI Shortcut mode
when I disable KVM_CLOCK it mounts the filesystem and boots just fine
Using IPI Shortcut mode
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
b) apparently VIRTIO_BLK works only when VIRTIO_PCI and thus PCI is enabled in the kernel. Otherwise the vda* device is not visible and the guest does not find its root filesystem.
Is this expected? If yes, is it possible to add the appropriate dependency in the kernel configuration or amend the description accordingly?
Thanks,
Bernhard
Quoted 20 lines · Bernhard Schmidt
Hi,
apologies if those questions have already been answered, I did not find anything specific that should still be visible.
I'm currently testing KVM (kvm-0.70 package from Debian unstable, rebuilt on Ubuntu Hardy) on a Athlon64 in i386 mode and found two small issues while trying to build a small kernel for my guest systems (2.6.26-rc6).
a) when I enable
KVM_CLOCKin the kernel configuration the guest system freezes afterPCI: Found IRQ 11 for device 0000:00:04.0
vda: vda1 vda2
TCP cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
Using IPI Shortcut mode
Quoted 6 lines
when I disable
KVM_CLOCKit mounts the filesystem and boots just fineUsing IPI Shortcut mode
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
There are some outstanding patches for KVM_CLOCK that may fix this problem.
Quoted 8 lines
b) apparently
VIRTIO_BLKworks only whenVIRTIO_PCIand thus PCI is enabled in the kernel. Otherwise the vda* device is not visible and the guest does not find its root filesystem.Is this expected? If yes, is it possible to add the appropriate dependency in the kernel configuration or amend the description accordingly?
VIRTIO_BLK doesn't depend on VIRTIO_PCI. VIRTIO_PCI allows you use to virtio devices under KVM.
This is all documented FWIW in the Kconfig and in a number of places on the wiki.
Regards,
Anthony Liguori
Quoted 8 lines
Thanks,
Bernhard--
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
Hi,
Quoted 10 lines
Quoted 9 lines
a) when I enable
KVM_CLOCKin the kernel configuration the guest system freezes afterPCI: Found IRQ 11 for device 0000:00:04.0
vda: vda1 vda2
TCP cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
Using IPI Shortcut modeThere are some outstanding patches for
KVM_CLOCKthat may fix this problem.
Any pointers? I'd love to test and confirm.
Quoted 8 lines
Quoted 7 lines
b) apparently
VIRTIO_BLKworks only whenVIRTIO_PCIand thus PCI is enabled in the kernel. Otherwise the vda* device is not visible and the guest does not find its root filesystem.Is this expected? If yes, is it possible to add the appropriate dependency in the kernel configuration or amend the description accordingly?
VIRTIO_BLKdoesn't depend onVIRTIO_PCI.VIRTIO_PCIallows you use to virtio devices under KVM.
I don't quite understand. VIRTIO_BLK can be selected in the kernel without selecting VIRTIO_PCI, it does not generate any build error but the virtual blockdevice simply does appear. Does VIRTIO_BLK have any use without VIRTIO_PCI?
Quoted 1 line
This is all documented FWIW in the
Kconfigand in a number of places on the wiki.
Where exactly in Kconfig?
VIRTIO_BLK says nothing about VIRTIO_PCI or PCI, same for VIRTIO_NET. Yes, the VIRTIO_PCI Kconfig help says this "provides support for virtio based paravirtual device drivers over PCI". But this is far far away from the virtio drivers themselves, so one might not immediately notice that this is necessary. And if I disabled PCI completely (as a migrating Xen user who does not need PCI in domU at all) I won't even see the VIRTIO_PCI node, but still be able to select VIRTIO_BLK and _NET (which compile just fine but don't work, very confusing).
Bernhard
Quoted 11 lines · Anthony Liguori
Quoted 8 lines · Bernhard Schmidt
b) apparently
VIRTIO_BLKworks only whenVIRTIO_PCIand thus PCI is enabled in the kernel. Otherwise the vda* device is not visible and the guest does not find its root filesystem.Is this expected? If yes, is it possible to add the appropriate dependency in the kernel configuration or amend the description accordingly?
Quoted 5 lines
VIRTIO_BLKdoesn't depend onVIRTIO_PCI.VIRTIO_PCIallows you use to virtio devices under KVM.This is all documented FWIW in the
Kconfigand in a number of places on the wiki.
I wonder would it be useful to default to building in (i.e. not as a module) virtio_pci if building with e.g. KVM_GUEST?
There's two issues here:
1) It's easy to forget about virtio_pci - if we used KVM_GUEST as a general "this kernel may be run on KVM" config, then it would be a good hint that virtio_pci should be built
2) Although we currently build virtio_pci as a module in Fedora, it leads to a pretty strange situation where e.g. mkinitrd and anaconda need to explicitly include the virtio_pci module; I don't think there's analogous situation where bus probing logic is in a module rather than built into the kernel
Cheers,
Mark.
Quoted 10 lines · Mark McLoughlin
I wonder would it be useful to default to building in (i.e. not as a module)
virtio_pciif building with e.g.KVM_GUEST?There's two issues here:
1) It's easy to forget about
virtio_pci- if we usedKVM_GUESTas a general "this kernel may be run on KVM" config, then it would be a good hint thatvirtio_pcishould be built
Yeah.
Quoted 7 lines
2) Although we currently build
virtio_pcias a module in Fedora, it leads to a pretty strange situation where e.g. mkinitrd and anaconda need to explicitly include thevirtio_pcimodule; I don't think there's analogous situation where bus probing logic is in a module rather than built into the kernel
Sounds like an mkinitrd bug. When mkinitrd includes a module, it should also include all of its dependencies.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 10 lines · Avi Kivity
Quoted 7 lines · Mark McLoughlin
2) Although we currently build
virtio_pcias a module in Fedora, it leads to a pretty strange situation where e.g. mkinitrd and anaconda need to explicitly include thevirtio_pcimodule; I don't think there's analogous situation where bus probing logic is in a module rather than built into the kernel
Quoted 2 lines
Sounds like an mkinitrd bug. When mkinitrd includes a module, it should also include all of its dependencies.
It does ... but nothing requires virtio_pci ...
Cheers,
Mark.
Quoted 9 lines · Mark McLoughlin
Quoted 9 lines
Quoted 9 lines
2) Although we currently build
virtio_pcias a module in Fedora, it leads to a pretty strange situation where e.g. mkinitrd and anaconda need to explicitly include thevirtio_pcimodule; I don't think there's analogous situation where bus probing logic is in a module rather than built into the kernel
Quoted 6 lines
Quoted 2 lines
Sounds like an mkinitrd bug. When mkinitrd includes a module, it should also include all of its dependencies.
It does ... but nothing requires
virtio_pci...
Right, of course. Virtio requires *some* virtio bus, not necessarily virtio-pci.
Signature · 1 line
error compiling committee.c: too many arguments to function
Am Montag, 23. Juni 2008 schrieb Bernhard Schmidt:
Quoted 4 lines
I don't quite understand.
VIRTIO_BLKcan be selected in the kernel without selectingVIRTIO_PCI, it does not generate any build error but the virtual blockdevice simply does appear. DoesVIRTIO_BLKhave any use withoutVIRTIO_PCI?
Yes, it does.virtio_pci is just one of currently 3 virtio transports. drivers/lguest/lguest_devices.c (CONFIG_LGUEST_GUEST) and drivers/s390/kvm/kvm_virtio.c are other transports that make virtio_blk usable.
Christian