configs: Ensure m5ops base doesn't overlap physical mem in KVM (#875)

Fix #874, in which running se.py with 4GB or more memory (via option
--mem-size=4GB) causes all KVM programs to crash or hang. This occurred
because the m5ops address range (set to 0xFFFF0000-0x100000000)
overlapped with physical memory under such a configuration.

This patch fixes the bug by moving the m5ops address range if phyiscal
memory is >=4GB.

Change-Id: Ic8a004517bc2be2c27860ed314460be749a11dc1
This commit is contained in:
Nicholas Mosier
2024-02-26 10:33:48 -08:00
committed by GitHub
parent bcf455755e
commit 1990186170

View File

@@ -224,7 +224,7 @@ for cpu in system.cpu:
if ObjectList.is_kvm_cpu(CPUClass) or ObjectList.is_kvm_cpu(FutureClass):
if buildEnv["USE_X86_ISA"]:
system.kvm_vm = KvmVM()
system.m5ops_base = 0xFFFF0000
system.m5ops_base = max(0xFFFF0000, Addr(args.mem_size).getValue())
for process in multiprocesses:
process.useArchPT = True
process.kvmInSE = True