]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "KVM: MMU: record maximum physical address width in kvm_mmu_extended_role"
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:56:53 +0000 (10:56 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:36 +0000 (18:00 -0400)
Drop MAXPHYADDR from mmu_role now that all MMUs have their role
invalidated after a CPUID update.  Invalidating the role forces all MMUs
to re-evaluate the guest's MAXPHYADDR, and the guest's MAXPHYADDR can
only be changed only through a CPUID update.

This reverts commit 139d0239ec8b918879aaf730ec46f76e306bebc4.

Cc: Yu Zhang <yu.c.zhang@linux.intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210622175739.3610207-9-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c

index f8faf3efc08d7592dfea84661341ac962a862976..250915da1681df9004409a8e9ff3e019c3b43be2 100644 (file)
@@ -321,7 +321,6 @@ union kvm_mmu_extended_role {
                unsigned int cr4_smap:1;
                unsigned int cr4_smep:1;
                unsigned int cr4_la57:1;
-               unsigned int maxphyaddr:6;
        };
 };
 
index 36201c02a4729196da1ef687a67b5a9f43871566..54514f06714adf9d182db1a41a9d399566480cc0 100644 (file)
@@ -4538,7 +4538,6 @@ static union kvm_mmu_extended_role kvm_calc_mmu_role_ext(struct kvm_vcpu *vcpu)
        ext.cr4_pse = !!is_pse(vcpu);
        ext.cr4_pke = !!kvm_read_cr4_bits(vcpu, X86_CR4_PKE);
        ext.cr4_la57 = !!kvm_read_cr4_bits(vcpu, X86_CR4_LA57);
-       ext.maxphyaddr = cpuid_maxphyaddr(vcpu);
 
        ext.valid = 1;