[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2063b592f82f680edf61dad575f7c092d11d8ba3.camel@redhat.com>
Date: Tue, 29 Sep 2020 09:39:46 -0400
From: Qian Cai <cai@...hat.com>
To: Paolo Bonzini <pbonzini@...hat.com>,
Mohammed Gamal <mgamal@...hat.com>, kvm@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, sean.j.christopherson@...el.com,
vkuznets@...hat.com, wanpengli@...cent.com, jmattson@...gle.com,
joro@...tes.org, Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] KVM: x86: VMX: Make smaller physical guest address
space support user-configurable
On Tue, 2020-09-29 at 14:26 +0200, Paolo Bonzini wrote:
> On 29/09/20 13:59, Qian Cai wrote:
> > WARN_ON_ONCE(!allow_smaller_maxphyaddr);
> >
> > I noticed the origin patch did not have this WARN_ON_ONCE(), but the
> > mainline
> > commit b96e6506c2ea ("KVM: x86: VMX: Make smaller physical guest address
> > space
> > support user-configurable") does have it for some reasons.
>
> Because that part of the code should not be reached. The exception
> bitmap is set up with
>
> if (!vmx_need_pf_intercept(vcpu))
> eb &= ~(1u << PF_VECTOR);
>
> where
>
> static inline bool vmx_need_pf_intercept(struct kvm_vcpu *vcpu)
> {
> if (!enable_ept)
> return true;
>
> return allow_smaller_maxphyaddr &&
> cpuid_maxphyaddr(vcpu) < boot_cpu_data.x86_phys_bits;
> }
>
> We shouldn't get here if "enable_ept && !allow_smaller_maxphyaddr",
> which implies vmx_need_pf_intercept(vcpu) == false. So the warning is
> genuine; I've sent a patch.
Care to provide a link to the patch? Just curious.
Powered by blists - more mailing lists