diff options
author | Ani Sinha <anisinha@redhat.com> | 2023-09-12 17:36:50 +0530 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-10-25 17:35:14 +0200 |
commit | d83005424774fcfb85aec76effac169cadb375fd (patch) | |
tree | 79d6554c01ff60b79a6ce0ee1f68307836f91745 /target | |
parent | e000687f1266d031528758271d0b16e288394ede (diff) | |
download | qemu-d83005424774fcfb85aec76effac169cadb375fd.zip qemu-d83005424774fcfb85aec76effac169cadb375fd.tar.gz qemu-d83005424774fcfb85aec76effac169cadb375fd.tar.bz2 |
target/i386: check CPUID_PAE to determine 36 bit processor address space
PAE mode in x86 supports 36 bit address space. Check the PAE CPUID on the
guest processor and set phys_bits to 36 if PAE feature is set. This is in
addition to checking the presence of PSE36 CPUID feature for setting 36 bit
phys_bits.
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-ID: <20230912120650.371781-1-anisinha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/cpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 070c020..fc8484c 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7377,7 +7377,7 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) return; } - if (env->features[FEAT_1_EDX] & CPUID_PSE36) { + if (env->features[FEAT_1_EDX] & (CPUID_PSE36 | CPUID_PAE)) { cpu->phys_bits = 36; } else { cpu->phys_bits = 32; |