qemu-e2k/include
Greg Kurz 62dd4edaaf kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension()
On a server-class ppc host, this capability depends on the KVM type,
ie, HV or PR. If both KVM are present in the kernel, we will always
get the HV specific value, even if we explicitely requested PR on
the command line.

This can have an impact if we're using hugepages or a balloon device.

Since we've already created the VM at the time any user calls
kvm_has_sync_mmu(), switching to kvm_vm_check_extension() is
enough to fix any potential issue.

It is okay for the other archs that also implement KVM_CAP_SYNC_MMU,
ie, mips, s390, x86 and arm, because they don't depend on the VM being
created or not.

While here, let's cache the state of this extension in a bool variable,
since it has several users in the code, as suggested by Thomas Huth.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <150600965332.30533.14702405809647835716.stgit@bahia.lan>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-10-02 14:38:06 +02:00
..
block block: Fix permissions after bdrv_reopen() 2017-09-26 14:46:23 +02:00
chardev chardev: remove context in chr_update_read_handler 2017-09-22 21:07:27 +02:00
crypto
disas
exec memory: trace FlatView creation and destruction 2017-09-22 01:06:51 +02:00
fpu
hw Migration pull 2017-09-27 2017-09-27 22:44:51 +01:00
io
libdecnumber
migration migration: check pre_save return in vmstate_save_state 2017-09-27 11:36:31 +01:00
monitor
net
qapi
qemu osdep: Fix ROUND_UP(64-bit, 32-bit) 2017-09-26 09:11:22 +03:00
qom Machine/CPU/NUMA queue, 2017-09-19 2017-09-20 17:35:36 +01:00
scsi scsi: add multipath support to qemu-pr-helper 2017-09-22 21:07:27 +02:00
standard-headers linux-headers: sync against v4.14-rc1 2017-09-29 10:58:31 +02:00
sysemu kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension() 2017-10-02 14:38:06 +02:00
ui
elf.h tcg/s390: Use constant pool for movi 2017-09-07 11:57:35 -07:00
glib-compat.h migration: Teach it about G_SOURCE_REMOVE 2017-09-22 14:11:18 +02:00
qemu-common.h
qemu-io.h
trace-tcg.h