Skip to content

Commit

Permalink
target/i386: check CPUID_PAE to determine 36 bit processor address space
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ani-sinha authored and bonzini committed Oct 25, 2023
1 parent e000687 commit d830054
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/i386/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d830054

Please sign in to comment.