[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 13/49] [FIXUP] "kvm: handle KVM_EXIT_MEMORY_FAULT": drop qemu_
From: |
Michael Roth |
Subject: |
[PATCH v3 13/49] [FIXUP] "kvm: handle KVM_EXIT_MEMORY_FAULT": drop qemu_host_page_size |
Date: |
Wed, 20 Mar 2024 03:39:09 -0500 |
TODO: squash into "kvm: handle KVM_EXIT_MEMORY_FAULT"
qemu_host_page_size has been superseded by qemu_real_host_page_size()
in newer QEMU, so update the patch accordingly.
Signed-off-by: Michael Roth <michael.roth@amd.com>
---
accel/kvm/kvm-all.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 2fdc07a472..a9c19ab9a1 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2912,8 +2912,8 @@ static int kvm_convert_memory(hwaddr start, hwaddr size,
bool to_private)
void *addr;
int ret = -1;
- if (!QEMU_PTR_IS_ALIGNED(start, qemu_host_page_size) ||
- !QEMU_PTR_IS_ALIGNED(size, qemu_host_page_size)) {
+ if (!QEMU_PTR_IS_ALIGNED(start, qemu_real_host_page_size()) ||
+ !QEMU_PTR_IS_ALIGNED(size, qemu_real_host_page_size())) {
return -1;
}
@@ -2943,7 +2943,7 @@ static int kvm_convert_memory(hwaddr start, hwaddr size,
bool to_private)
rb = qemu_ram_block_from_host(addr, false, &offset);
if (to_private) {
- if (rb->page_size != qemu_host_page_size) {
+ if (rb->page_size != qemu_real_host_page_size()) {
/*
* shared memory is back'ed by hugetlb, which is supposed to be
* pre-allocated and doesn't need to be discarded
--
2.25.1
- [PATCH v3 09/49] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot, (continued)
- [PATCH v3 12/49] kvm: handle KVM_EXIT_MEMORY_FAULT, Michael Roth, 2024/03/20
- [PATCH v3 13/49] [FIXUP] "kvm: handle KVM_EXIT_MEMORY_FAULT": drop qemu_host_page_size,
Michael Roth <=
- [PATCH v3 14/49] trace/kvm: Add trace for page convertion between shared and private, Michael Roth, 2024/03/20
- [PATCH v3 15/49] kvm/memory: Make memory type private by default if it has guest memfd backend, Michael Roth, 2024/03/20
- [PATCH v3 16/49] memory: Introduce memory_region_init_ram_guest_memfd(), Michael Roth, 2024/03/20
- [PATCH v3 17/49] pci-host/q35: Move PAM initialization above SMRAM initialization, Michael Roth, 2024/03/20
- [PATCH v3 18/49] q35: Introduce smm_ranges property for q35-pci-host, Michael Roth, 2024/03/20
- [PATCH v3 19/49] kvm: Make kvm_convert_memory() obey ram_block_discard_is_enabled(), Michael Roth, 2024/03/20
- [PATCH v3 20/49] trace/kvm: Add trace for KVM_EXIT_MEMORY_FAULT, Michael Roth, 2024/03/20