Bug 1084576
| Summary: | Nested KVM on AMD doesn't work | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | L.L.Robinson <junk> | ||||||||||||||||||||||
| Component: | libvirt | Assignee: | Libvirt Maintainers <libvirt-maint> | ||||||||||||||||||||||
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||||||||||||||
| Priority: | unspecified | ||||||||||||||||||||||||
| Version: | 20 | CC: | agedosier, berrange, clalancette, crobinso, itamar, jforbes, junk, laine, libvirt-maint, veillard, virt-maint | ||||||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||||||||
| Hardware: | x86_64 | ||||||||||||||||||||||||
| OS: | Linux | ||||||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||||||||
| Last Closed: | 2014-04-17 16:17:36 UTC | Type: | Bug | ||||||||||||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||||||||||||
| Documentation: | --- | CRM: | |||||||||||||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||||||||
| Embargoed: | |||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||
|
Description
L.L.Robinson
2014-04-04 18:13:00 UTC
Created attachment 882838 [details]
output of cat /proc/cpuinfo on L-
Created attachment 882840 [details]
ouput of cpuid on L0
Created attachment 882841 [details]
output of lsmod on L0
Created attachment 882842 [details]
output of virsh dumpxml
Created attachment 882843 [details]
output of cpuid on L1
Created attachment 882844 [details]
output of lsmod on L1
Created attachment 882845 [details]
output of virsh dumpxml
Created attachment 882846 [details]
output of virsh capabilities on L0
Created attachment 882847 [details]
output of cat /proc/cpuinfo on L1
Created attachment 882848 [details]
output of virsh capabilities on L1
the output of cat /sys/module/kvm_amd/parameters/nested is 1 kernel version on host and guest? can you check dmesg | grep kvm for any errors in the guest and host? might need to try and manually trigger a modprobe kvm or modprobe kvm_amd in the guest before checking dmesg output of dmesg | grep kvm on L0 [ 7.597020] kvm: Nested Virtualization enabled [ 7.597039] kvm: Nested Paging enabled Kernel of L0 [root@haystack ~]# uname -a Linux haystack.clarkconnect.lan 3.13.8-200.fc20.x86_64 #1 SMP Tue Apr 1 03:35:46 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux on L1 [root@localhost ~]# dmesg |grep kvm [ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00 [ 0.000000] kvm-clock: cpu 0, msr 0:7ffda001, boot clock [ 0.000000] kvm-clock: cpu 0, msr 0:7ffda001, primary cpu clock [ 0.000000] kvm-stealtime: cpu 0, msr 7fc0e000 [ 0.001000] kvm-clock: cpu 1, msr 0:7ffda041, secondary cpu clock [ 0.033499] kvm-stealtime: cpu 1, msr 7fd0e000 [ 0.176626] Switched to clocksource kvm-clock [ 0.637837] systemd[1]: Detected virtualization 'kvm'. [ 5.968107] kvm: no hardware support [root@localhost ~]# uname -a Linux localhost.localdomain 3.13.8-200.fc20.x86_64 #1 SMP Tue Apr 1 03:35:46 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux ouput of lsmod on L1 [root@localhost ~]# lsmod |grep kvm kvm 444314 0 result of modprobe kvm_amd on L1 [root@localhost ~]# modprobe kvm_amd modprobe: ERROR: could not insert 'kvm_amd': Operation not supported Ok I have a workaround from using information from this site here. http://lost-and-found-narihiro.blogspot.co.uk/2013/08/kvm-nested-how-to-confirm-nested-works.html The issue is that using VirtManager and selecting the "Copy Cpu Configuration" doesn't do what I'd expect it to do. by editing the xml for the L1 guest and changing the cpu section to <cpu mode='host-passthrough'> </cpu> then the output of dmesg on L1 is this [root@localhost ~]# dmesg |grep kvm [ 0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00 [ 0.000000] kvm-clock: cpu 0, msr 0:7ffda001, boot clock [ 0.000000] kvm-clock: cpu 0, msr 0:7ffda001, primary cpu clock [ 0.000000] kvm-stealtime: cpu 0, msr 7fc0e000 [ 0.002000] kvm-clock: cpu 1, msr 0:7ffda041, secondary cpu clock [ 0.035042] kvm-stealtime: cpu 1, msr 7fd0e000 [ 0.177545] Switched to clocksource kvm-clock [ 0.612321] systemd[1]: Detected virtualization 'kvm'. [ 2.685521] kvm: Nested Virtualization enabled [ 2.685529] kvm: Nested Paging enabled [root@localhost ~]# Ah okay. This is just another manifestation of 870071, duping to that. Basically, the 'copy host cpu' feature in virt-manager is the equivalent of mode='host-model' in libvirt, which has issues correctly modeling a CPU. In many cases things work fine (it works for nested SVM for me), but in some cases libvirt gets things quite wrong. However we can't use host-passthrough because it's not generally safe either (in your case it should be fine). This bug sums up some of the remaining issues: https://bugzilla.redhat.com/show_bug.cgi?id=1055002 *** This bug has been marked as a duplicate of bug 870071 *** |