Skip to contentSkip to conversation

target/i386: the sgx_epc_get_section stub is reachable

PATCH New Paolo Bonzini 1 participant 1 message Feb 1, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/i386: the sgx_epc_get_section stub is reachable

The sgx_epc_get_section stub is reachable from cpu_x86_cpuid. It should not assert, instead it should just return true just like the "real" sgx_epc_get_section does when SGX is disabled.

---
 hw/i386/sgx-stub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/sgx-stub.c +1 -1
index 26833eb233..16b1dfd90b 100644
@@ -34,5 +34,5 @@ void pc_machine_init_sgx_epc(PCMachineState *pcms)
 
 bool sgx_epc_get_section(int section_nr, uint64_t *addr, uint64_t *size)
 {
-    g_assert_not_reached();
+    return true;
 }
Signature · 1 line
2.34.1