[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/19] accel/kvm: Convert to ram_block_discard_disable()
From: |
David Hildenbrand |
Subject: |
[PATCH v2 03/19] accel/kvm: Convert to ram_block_discard_disable() |
Date: |
Wed, 20 May 2020 14:31:36 +0200 |
Discarding memory does not work as expected. At the time this is called,
we cannot have anyone active that relies on discards to work properly.
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
---
accel/kvm/kvm-all.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index d06cc04079..7a6158fb99 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -40,7 +40,6 @@
#include "trace.h"
#include "hw/irq.h"
#include "sysemu/sev.h"
-#include "sysemu/balloon.h"
#include "qapi/visitor.h"
#include "qapi/qapi-types-common.h"
#include "qapi/qapi-visit-common.h"
@@ -2143,7 +2142,7 @@ static int kvm_init(MachineState *ms)
s->sync_mmu = !!kvm_vm_check_extension(kvm_state, KVM_CAP_SYNC_MMU);
if (!s->sync_mmu) {
- qemu_balloon_inhibit(true);
+ g_assert(ram_block_discard_disable(true));
}
return 0;
--
2.25.4
- [PATCH v2 00/19] virtio-mem: Paravirtualized memory hot(un)plug, David Hildenbrand, 2020/05/20
- [PATCH v2 01/19] exec: Introduce ram_block_discard_(disable|require)(), David Hildenbrand, 2020/05/20
- [PATCH v2 02/19] vfio: Convert to ram_block_discard_disable(), David Hildenbrand, 2020/05/20
- [PATCH v2 03/19] accel/kvm: Convert to ram_block_discard_disable(),
David Hildenbrand <=
- [PATCH v2 04/19] s390x/pv: Convert to ram_block_discard_disable(), David Hildenbrand, 2020/05/20
- [PATCH v2 06/19] target/i386: sev: Use ram_block_discard_disable(), David Hildenbrand, 2020/05/20
- [PATCH v2 07/19] migration/rdma: Use ram_block_discard_disable(), David Hildenbrand, 2020/05/20
- [PATCH v2 05/19] virtio-balloon: Rip out qemu_balloon_inhibit(), David Hildenbrand, 2020/05/20
- [PATCH v2 08/19] migration/colo: Use ram_block_discard_disable(), David Hildenbrand, 2020/05/20
- [PATCH v2 09/19] linux-headers: update to contain virtio-mem, David Hildenbrand, 2020/05/20
- [PATCH v2 10/19] virtio-mem: Paravirtualized memory hot(un)plug, David Hildenbrand, 2020/05/20