[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max o
From: |
Yang Weijiang |
Subject: |
[Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max option is applied |
Date: |
Wed, 13 Jan 2021 17:04:30 +0800 |
QEMU option -cpu max(max_features) means "Enables all features supported by
the accelerator in the current host", this looks true for all the features
except guest max physical address width, so add this patch to enable it.
Signed-off-by: Yang Weijiang <weijiang.yang@intel.com>
---
target/i386/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 35459a38bb..b5943406f7 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6673,7 +6673,7 @@ static void x86_cpu_realizefn(DeviceState *dev, Error
**errp)
warned = true;
}
- if (cpu->host_phys_bits) {
+ if (cpu->host_phys_bits || cpu->max_features) {
/* The user asked for us to use the host physical bits */
cpu->phys_bits = host_phys_bits;
if (cpu->host_phys_bits_limit &&
--
2.17.2
- [Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max option is applied,
Yang Weijiang <=