qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max option is applied
@ 2021-01-13  9:04 Yang Weijiang
  2021-01-13 10:06 ` Paolo Bonzini
  2021-01-24 21:08 ` Nathan Chancellor
  0 siblings, 2 replies; 9+ messages in thread
From: Yang Weijiang @ 2021-01-13  9:04 UTC (permalink / raw)
  To: pbonzini, seanjc, qemu-devel; +Cc: Yang Weijiang

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



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-01-25 18:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13  9:04 [Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max option is applied Yang Weijiang
2021-01-13 10:06 ` Paolo Bonzini
2021-01-13 15:04   ` Yang Weijiang
2021-01-13 15:41     ` Paolo Bonzini
2021-01-24 21:08 ` Nathan Chancellor
2021-01-25  5:41   ` Yang Weijiang
2021-01-25  7:10     ` Nathan Chancellor
2021-01-25 10:42       ` Paolo Bonzini
2021-01-25 18:19         ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).