diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-07-16 18:53:11 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-07-22 13:47:20 +0200 |
commit | 13be929aff804581b21e69087a9caf3698fd5c3c (patch) | |
tree | 64116d1164dc548b5222eb5aa0a356f1579ec253 /tools | |
parent | a7ddb48bd1363c8bcdf42776d320289c42191f01 (diff) |
target/i386: do not crash if microvm guest uses SGX CPUID leaves
sgx_epc_get_section assumes a PC platform is in use:
bool sgx_epc_get_section(int section_nr, uint64_t *addr, uint64_t *size)
{
PCMachineState *pcms = PC_MACHINE(qdev_get_machine());
However, sgx_epc_get_section is called by CPUID regardless of whether
SGX state has been initialized or which platform is in use. Check
whether the machine has the right QOM class and if not behave as if
there are no EPC sections.
Fixes: 1dec2e1f19f ("i386: Update SGX CPUID info according to hardware/KVM/user input", 2021-09-30)
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2142
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions