diff options
| author | Xiaoyao Li <xiaoyao.li@intel.com> | 2025-07-30 17:52:52 +0800 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-17 19:00:58 +0200 |
| commit | 0516f4b70264b9710a25718d21bd35ef463c875e (patch) | |
| tree | ecb3563e5c3791feea1110d32924543dc0d94443 /system/physmem.c | |
| parent | d99041a20328423bc6819ddd69b60cf98d8d84f1 (diff) | |
| download | focaccia-qemu-0516f4b70264b9710a25718d21bd35ef463c875e.tar.gz focaccia-qemu-0516f4b70264b9710a25718d21bd35ef463c875e.zip | |
i386/cpu: Enable SMM cpu address space under KVM
Kirill Martynov reported assertation in cpu_asidx_from_attrs() being hit when x86_cpu_dump_state() is called to dump the CPU state[*]. It happens when the CPU is in SMM and KVM emulation failure due to misbehaving guest. The root cause is that QEMU i386 never enables the SMM address space for cpu since KVM SMM support has been added. Enable the SMM cpu address space under KVM when the SMM is enabled for the x86machine. [*] https://lore.kernel.org/qemu-devel/20250523154431.506993-1-stdcalllevi@yandex-team.ru/ Reported-by: Kirill Martynov <stdcalllevi@yandex-team.ru> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Tested-by: Kirill Martynov <stdcalllevi@yandex-team.ru> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Link: https://lore.kernel.org/r/20250730095253.1833411-2-xiaoyao.li@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'system/physmem.c')
| -rw-r--r-- | system/physmem.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/system/physmem.c b/system/physmem.c index ddd58e9eb8..ae8ecd50ea 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -793,9 +793,6 @@ void cpu_address_space_init(CPUState *cpu, int asidx, cpu->as = as; } - /* KVM cannot currently support multiple address spaces. */ - assert(asidx == 0 || !kvm_enabled()); - if (!cpu->cpu_ases) { cpu->cpu_ases = g_new0(CPUAddressSpace, cpu->num_ases); cpu->cpu_ases_count = cpu->num_ases; @@ -818,8 +815,6 @@ void cpu_address_space_destroy(CPUState *cpu, int asidx) assert(cpu->cpu_ases); assert(asidx >= 0 && asidx < cpu->num_ases); - /* KVM cannot currently support multiple address spaces. */ - assert(asidx == 0 || !kvm_enabled()); cpuas = &cpu->cpu_ases[asidx]; if (tcg_enabled()) { |