path: root/arch/x86
diff options
authorHuacai Chen <>2020-09-10 18:33:51 +0800
committerPaolo Bonzini <>2020-09-11 13:22:52 -0400
commit15e9e35cd1dec2bc138464de6bf8ef828df19235 (patch)
treef3111c1722ecea4875fdd8030a551aeae814c321 /arch/x86
parentf6f6195b888c28a0b59ceb0562daff92a2be86c3 (diff)
KVM: MIPS: Change the definition of kvm type
MIPS defines two kvm types: #define KVM_VM_MIPS_TE 0 #define KVM_VM_MIPS_VZ 1 In Documentation/virt/kvm/api.rst it is said that "You probably want to use 0 as machine type", which implies that type 0 be the "automatic" or "default" type. And, in user-space libvirt use the null-machine (with type 0) to detect the kvm capability, which returns "KVM not supported" on a VZ platform. I try to fix it in QEMU but it is ugly: And Thomas Huth suggests me to change the definition of kvm type: So I define like this: #define KVM_VM_MIPS_AUTO 0 #define KVM_VM_MIPS_VZ 1 #define KVM_VM_MIPS_TE 2 Since VZ and TE cannot co-exists, using type 0 on a TE platform will still return success (so old user-space tools have no problems on new kernels); the advantage is that using type 0 on a VZ platform will not return failure. So, the only problem is "new user-space tools use type 2 on old kernels", but if we treat this as a kernel bug, we can backport this patch to old stable kernels. Signed-off-by: Huacai Chen <> Message-Id: <> Signed-off-by: Paolo Bonzini <>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions