[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.8 18/49] accel/kvm: check for KVM_CAP_READONLY_MEM on VM
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.8 18/49] accel/kvm: check for KVM_CAP_READONLY_MEM on VM |
Date: |
Sat, 9 Nov 2024 13:14:09 +0300 |
From: Tom Dohrmann <erbse.13@gmx.de>
KVM_CAP_READONLY_MEM used to be a global capability, but with the
introduction of AMD SEV-SNP confidential VMs, this extension is not
always available on all VM types [1,2].
Query the extension on the VM level instead of on the KVM level.
[1]
https://patchwork.kernel.org/project/kvm/patch/20240809190319.1710470-2-seanjc@google.com/
[2]
https://patchwork.kernel.org/project/kvm/patch/20240902144219.3716974-1-erbse.13@gmx.de/
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Tom Dohrmann <erbse.13@gmx.de>
Link: https://lore.kernel.org/r/20240903062953.3926498-1-erbse.13@gmx.de
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 64e0e63ea16aa0122dc0c41a0679da0ae4616208)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 6a9d10b1af..a103ae2ae8 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2589,7 +2589,7 @@ static int kvm_init(MachineState *ms)
}
kvm_readonly_mem_allowed =
- (kvm_check_extension(s, KVM_CAP_READONLY_MEM) > 0);
+ (kvm_vm_check_extension(s, KVM_CAP_READONLY_MEM) > 0);
kvm_resamplefds_allowed =
(kvm_check_extension(s, KVM_CAP_IRQFD_RESAMPLE) > 0);
--
2.39.5
- [Stable-8.2.8 05/49] block/reqlist: allow adding overlapping requests, (continued)
- [Stable-8.2.8 05/49] block/reqlist: allow adding overlapping requests, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 17/49] KVM: Dynamic sized kvm memslots array, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 12/49] tcg/ppc: Use TCG_REG_TMP2 for scratch index in prepare_host_addr, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 14/49] hw/intc/arm_gicv3_cpuif: Add cast to match the documentation, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 10/49] linux-user: Fix parse_elf_properties GNU0_MAGIC check, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 19/49] tests: Wait for migration completion on destination QEMU to avoid failures, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 20/49] tests/qemu-iotests/211.out: Update to expect MapEntry 'compressed' field, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 28/49] gitlab: make check-[dco|patch] a little more verbose, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 15/49] hw/audio/hda: free timer on exit, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 16/49] ui/win32: fix potential use-after-free with dbus shared memory, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 18/49] accel/kvm: check for KVM_CAP_READONLY_MEM on VM,
Michael Tokarev <=
- [Stable-8.2.8 33/49] target/arm: Don't assert in regime_is_user() for E10 mmuidx values, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 11/49] tcg/ppc: Use TCG_REG_TMP2 for scratch tcg_out_qemu_st, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 26/49] linux-user/ppc: Fix sigmask endianness issue in sigreturn, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 32/49] net/tap-win32: Fix gcc 14 format truncation errors, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 21/49] raw-format: Fix error message for invalid offset/size, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 22/49] tcg: Reset data_gen_ptr correctly, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 24/49] target/i386: Use probe_access_full_mmu in ptw_translate, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 25/49] linux-user: Emulate /proc/self/maps under mmap_lock, Michael Tokarev, 2024/11/09
- [Stable-8.2.8 27/49] vfio/migration: Report only stop-copy size in vfio_state_pending_exact(), Michael Tokarev, 2024/11/09
- [Stable-8.2.8 38/49] target/riscv: Set vtype.vill on CPU reset, Michael Tokarev, 2024/11/09