[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 21/21] i386: Disable SMM mode for X86_SW_PROTECTED_VM
From: |
Xiaoyao Li |
Subject: |
[RFC PATCH v2 21/21] i386: Disable SMM mode for X86_SW_PROTECTED_VM |
Date: |
Wed, 13 Sep 2023 23:51:17 -0400 |
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
target/i386/kvm/sw-protected-vm.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/target/i386/kvm/sw-protected-vm.c
b/target/i386/kvm/sw-protected-vm.c
index f47ac383e1dd..65347067aa03 100644
--- a/target/i386/kvm/sw-protected-vm.c
+++ b/target/i386/kvm/sw-protected-vm.c
@@ -34,10 +34,18 @@ static MemoryListener
kvm_x86_sw_protected_vm_memory_listener = {
int sw_protected_vm_kvm_init(MachineState *ms, Error **errp)
{
SwProtectedVm *spvm = SW_PROTECTED_VM(OBJECT(ms->cgs));
+ X86MachineState *x86ms = X86_MACHINE(ms);
memory_listener_register(&kvm_x86_sw_protected_vm_memory_listener,
&address_space_memory);
+ if (x86ms->smm == ON_OFF_AUTO_AUTO) {
+ x86ms->smm = ON_OFF_AUTO_OFF;
+ } else if (x86ms->smm == ON_OFF_AUTO_ON) {
+ error_setg(errp, "X86_SW_PROTECTED_VM doesn't support SMM");
+ return -EINVAL;
+ }
+
spvm->parent_obj.ready = true;
return 0;
}
--
2.34.1
- [RFC PATCH v2 11/21] kvm: Introduce support for memory_attributes, (continued)
- [RFC PATCH v2 11/21] kvm: Introduce support for memory_attributes, Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 12/21] kvm/memory: Introduce the infrastructure to set the default shared/private value, Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 13/21] i386/kvm: Set memory to default private for KVM_X86_SW_PROTECTED_VM, Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 14/21] physmem: replace function name with __func__ in ram_block_discard_range(), Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 15/21] physmem: extract ram_block_discard_range_fd() from ram_block_discard_range(), Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 17/21] kvm: handle KVM_EXIT_MEMORY_FAULT, Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 16/21] physmem: Introduce ram_block_convert_range(), Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 18/21] trace/kvm: Add trace for page convertion between shared and private, Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 19/21] pci-host/q35: Move PAM initialization above SMRAM initialization, Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 20/21] q35: Introduce smm_ranges property for q35-pci-host, Xiaoyao Li, 2023/09/13
- [RFC PATCH v2 21/21] i386: Disable SMM mode for X86_SW_PROTECTED_VM,
Xiaoyao Li <=
- Re: [RFC PATCH v2 00/21] QEMU gmem implemention, David Hildenbrand, 2023/09/14
- Re: [RFC PATCH v2 00/21] QEMU gmem implemention, Xiaoyao Li, 2023/09/14