[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210625085206.uycvsmpnsryv45y5@linux.intel.com>
Date: Fri, 25 Jun 2021 16:52:06 +0800
From: Yu Zhang <yu.c.zhang@...ux.intel.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Maxim Levitsky <mlevitsk@...hat.com>
Subject: Re: [PATCH 08/54] Revert "KVM: MMU: record maximum physical address
width in kvm_mmu_extended_role"
On Tue, Jun 22, 2021 at 10:56:53AM -0700, Sean Christopherson wrote:
> 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 de3ccd26fafc707b09792d9b633c8b5b48865315.
>
> Cc: Yu Zhang <yu.c.zhang@...ux.intel.com>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> ---
> arch/x86/include/asm/kvm_host.h | 1 -
> arch/x86/kvm/mmu/mmu.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 19c88b445ee0..cdaff399ed94 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -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;
> };
> };
>
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 8d97d21d5241..04cab330c445 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -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;
>
> --
> 2.32.0.288.g62a8d224e6-goog
>
Reviewed-by: Yu Zhang <yu.c.zhang@...ux.intel.com>
Thanks
Yu
Powered by blists - more mailing lists