render / rpms / qemu

Forked from rpms/qemu 9 months ago
Clone

Blame 0001-target-i386-the-sgx_epc_get_section-stub-is-reachabl.patch

fb1517
From e54512fe75f85640c0c73e53e6f8bd0b9d193529 Mon Sep 17 00:00:00 2001
Paolo Bonzini 06a96e
From: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini 06a96e
Date: Tue, 1 Feb 2022 20:09:37 +0100
fb1517
Subject: [PATCH 1/5] target/i386: the sgx_epc_get_section stub is reachable
Paolo Bonzini 06a96e
MIME-Version: 1.0
Paolo Bonzini 06a96e
Content-Type: text/plain; charset=UTF-8
Paolo Bonzini 06a96e
Content-Transfer-Encoding: 8bit
Paolo Bonzini 06a96e
Paolo Bonzini 06a96e
The sgx_epc_get_section stub is reachable from cpu_x86_cpuid.  It
Paolo Bonzini 06a96e
should not assert, instead it should just return true just like
Paolo Bonzini 06a96e
the "real" sgx_epc_get_section does when SGX is disabled.
Paolo Bonzini 06a96e
Paolo Bonzini 06a96e
Reported-by: Vladimír Beneš <vbenes@redhat.com>
Paolo Bonzini 06a96e
Cc: qemu-stable@nongnu.org
Paolo Bonzini 06a96e
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
a575c5
---
a575c5
 hw/i386/sgx-stub.c | 2 +-
a575c5
 1 file changed, 1 insertion(+), 1 deletion(-)
Paolo Bonzini 06a96e
Paolo Bonzini 06a96e
diff --git a/hw/i386/sgx-stub.c b/hw/i386/sgx-stub.c
Paolo Bonzini 06a96e
index 26833eb233..16b1dfd90b 100644
Paolo Bonzini 06a96e
--- a/hw/i386/sgx-stub.c
Paolo Bonzini 06a96e
+++ b/hw/i386/sgx-stub.c
Paolo Bonzini 06a96e
@@ -34,5 +34,5 @@ void pc_machine_init_sgx_epc(PCMachineState *pcms)
Paolo Bonzini 06a96e
 
Paolo Bonzini 06a96e
 bool sgx_epc_get_section(int section_nr, uint64_t *addr, uint64_t *size)
Paolo Bonzini 06a96e
 {
Paolo Bonzini 06a96e
-    g_assert_not_reached();
Paolo Bonzini 06a96e
+    return true;
Paolo Bonzini 06a96e
 }
fb1517
-- 
fb1517
2.37.3
fb1517