diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2018-08-17 09:27:15 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2018-08-17 09:27:15 -0600 |
commit | f59489423ab79852e98d9b3025b7d99ba8da584f (patch) | |
tree | 39f33f51aba2d7e59d561314c2d8e751b8483a58 /accel/kvm/kvm-all.c | |
parent | 01ccbec7bdf6f89f1b7d46dda05e4c1fd2dd5ade (diff) | |
download | qemu-f59489423ab79852e98d9b3025b7d99ba8da584f.zip qemu-f59489423ab79852e98d9b3025b7d99ba8da584f.tar.gz qemu-f59489423ab79852e98d9b3025b7d99ba8da584f.tar.bz2 |
kvm: Use inhibit to prevent ballooning without synchronous mmu
Remove KVM specific tests in balloon_page(), instead marking
ballooning as inhibited without KVM_CAP_SYNC_MMU support.
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'accel/kvm/kvm-all.c')
-rw-r--r-- | accel/kvm/kvm-all.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index eb7db92..38f468d 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -39,6 +39,7 @@ #include "trace.h" #include "hw/irq.h" #include "sysemu/sev.h" +#include "sysemu/balloon.h" #include "hw/boards.h" @@ -1698,6 +1699,9 @@ static int kvm_init(MachineState *ms) s->many_ioeventfds = kvm_check_many_ioeventfds(); s->sync_mmu = !!kvm_vm_check_extension(kvm_state, KVM_CAP_SYNC_MMU); + if (!s->sync_mmu) { + qemu_balloon_inhibit(true); + } return 0; |