diff options
| author | Sean Christopherson <sean.j.christopherson@intel.com> | 2021-07-19 19:21:21 +0800 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-09-30 15:30:24 +0200 |
| commit | 1ed1ccc5a429b3fb35d9756f911eb652a6ab00c5 (patch) | |
| tree | ccd37dfce6693922dc0d468c83d4a092cb2ce9bb | |
| parent | 0cf4ce00d2255ef48d560d36559e7a4cda41748b (diff) | |
| download | focaccia-qemu-1ed1ccc5a429b3fb35d9756f911eb652a6ab00c5.tar.gz focaccia-qemu-1ed1ccc5a429b3fb35d9756f911eb652a6ab00c5.zip | |
i386/pc: Add e820 entry for SGX EPC section(s)
Note that SGX EPC is currently guaranteed to reside in a single contiguous chunk of memory regardless of the number of EPC sections. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Yang Zhong <yang.zhong@intel.com> Message-Id: <20210719112136.57018-19-yang.zhong@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| -rw-r--r-- | hw/i386/pc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e41c002539..df457eceba 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -889,6 +889,10 @@ void pc_memory_init(PCMachineState *pcms, e820_add_entry(0x100000000ULL, x86ms->above_4g_mem_size, E820_RAM); } + if (pcms->sgx_epc.size != 0) { + e820_add_entry(pcms->sgx_epc.base, pcms->sgx_epc.size, E820_RESERVED); + } + if (!pcmc->has_reserved_memory && (machine->ram_slots || (machine->maxram_size > machine->ram_size))) { |