alistair23-linux/arch/mips
Huacai Chen 15e9e35cd1 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:
https://lists.nongnu.org/archive/html/qemu-devel/2020-08/msg05629.html

And Thomas Huth suggests me to change the definition of kvm type:
https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03281.html

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 <chenhc@lemote.com>
Message-Id: <1599734031-28746-1-git-send-email-chenhc@lemote.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-11 13:22:52 -04:00
..
alchemy MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
ar7 MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
ath25 MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
ath79 MIPS: ath79: Remove unused include <asm/mips_machine.h> 2020-07-28 10:20:44 +02:00
bcm47xx MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
bcm63xx MIPS: BCM63xx: improve CFE version detection 2020-07-24 12:02:46 +02:00
bmips MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
boot MIPS upates for v5.9 2020-08-06 10:54:07 -07:00
cavium-octeon MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init() 2020-07-24 11:06:58 +02:00
cobalt MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
configs all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
crypto crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit 2020-01-16 15:18:12 +08:00
dec MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
fw mips: Return proper error code from console ->setup() hook 2020-06-25 14:20:13 +02:00
generic MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
include KVM/arm64 fixes for Linux 5.9, take #1 2020-09-11 13:12:11 -04:00
jazz mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
jz4740 MIPS: ingenic: Hardcode mem size for qi,lb60 board 2020-07-31 17:48:57 +02:00
kernel all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
kvm KVM: MIPS: Change the definition of kvm type 2020-09-11 13:22:52 -04:00
lantiq MIPS: lantiq: xway: sysctrl: fix the GPHY clock alias names 2020-06-15 13:14:51 +02:00
lib treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
loongson2ef MIPS: Loongson-2EF: disable fix-loongson3-llsc in compiler 2020-06-22 17:35:31 +02:00
loongson32 MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
loongson64 mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
math-emu MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
mm mm/mips: use general page fault accounting 2020-08-12 10:58:03 -07:00
mti-malta MIPS: Fix exception handler memcpy() 2020-05-24 09:15:54 +02:00
net MIPS: BPF: Use sizeof_field() instead of FIELD_SIZEOF() 2020-01-10 11:33:35 -08:00
netlogic MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
oprofile MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
pci MIPS upates for v5.9 2020-08-06 10:54:07 -07:00
pic32 MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
pistachio MIPS: Fix exception handler memcpy() 2020-05-24 09:15:54 +02:00
pnx833x MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
power mips: check for dsp presence only once before save/restore 2019-10-07 10:58:53 -07:00
ralink This time around we have 4 lines of diff in the core framework, removing a 2020-06-10 11:42:19 -07:00
rb532 MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
sgi-ip22 MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
sgi-ip27 mm/sparse: cleanup the code surrounding memory_present() 2020-08-07 11:33:27 -07:00
sgi-ip30 MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
sgi-ip32 mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
sibyte MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
sni MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
tools MIPS: tools: Fix resource leak in elf-entry.c 2020-05-24 09:29:48 +02:00
txx9 MIPS: Only include the platform file needed 2020-05-13 00:17:18 +02:00
vdso Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
vr41xx MIPS: Fix builds for VR41xx platforms 2020-05-15 09:09:58 +02:00
Kbuild MIPS: Fix "make clean" error due to recent changes 2020-05-13 13:20:22 +02:00
Kbuild.platforms MIPS: Retire kvm paravirt 2020-07-24 10:53:23 +02:00
Kconfig s390: implement diag318 2020-08-06 12:59:31 -07:00
Kconfig.debug mips: Add CPS_NS16550_WIDTH config 2020-05-22 09:12:52 +02:00
Makefile mips: Add MIPS Warrior P5600 support 2020-05-22 09:10:53 +02:00
Makefile.postlink MIPS: fix indentation of the 'RELOCS' message 2020-01-20 15:37:30 -08:00