[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 02/44] kvm: Switch KVM_CAP_READONLY_MEM to a per-VM ioctl(
From: |
isaku . yamahata |
Subject: |
[RFC PATCH v2 02/44] kvm: Switch KVM_CAP_READONLY_MEM to a per-VM ioctl() |
Date: |
Wed, 7 Jul 2021 17:54:32 -0700 |
From: Isaku Yamahata <isaku.yamahata@intel.com>
Switch to making a VM ioctl() call for KVM_CAP_READONLY_MEM, which may
be conditional on VM type in recent versions of KVM, e.g. when TDX is
supported.
kvm_vm_check_extension() has fallback from kvm_vm_ioctl() to
kvm_check_extension(). fallback from VM ioctl to System ioctl for
compatibility for old kernel.
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
---
accel/kvm/kvm-all.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index e5b10dd129..fdbe24bf59 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2531,7 +2531,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_eventfds_allowed =
(kvm_check_extension(s, KVM_CAP_IOEVENTFD) > 0);
--
2.25.1
- [RFC PATCH v2 00/44] TDX support, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 02/44] kvm: Switch KVM_CAP_READONLY_MEM to a per-VM ioctl(),
isaku . yamahata <=
- [RFC PATCH v2 29/44] target/i386: Add machine option to disable PIC/8259, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 30/44] qom: implement property helper for sha384, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 31/44] target/i386/tdx: Allows mrconfigid/mrowner/mrownerconfig for TDX_INIT_VM, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 03/44] i386/kvm: Move architectural CPUID leaf generation to separarte helper, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 01/44] target/i386: Expose x86_cpu_get_supported_feature_word() for TDX, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 13/44] i386/tdx: Frame in tdx_get_supported_cpuid with KVM_TDX_CAPABILITIES, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 33/44] qmp: add query-tdx-capabilities query-tdx command, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 10/44] hw/i386: Initialize TDX via KVM ioctl() when kvm_type is TDX, isaku . yamahata, 2021/07/07