From: Qian Cai <cai@redhat•com>
To: Paolo Bonzini <pbonzini@redhat•com>,
Mohammed Gamal <mgamal@redhat•com>,
kvm@vger•kernel.org
Cc: linux-kernel@vger•kernel.org, sean.j.christopherson@intel•com,
vkuznets@redhat•com, wanpengli@tencent•com, jmattson@google•com,
joro@8bytes•org, Stephen Rothwell <sfr@canb•auug.org.au>,
linux-next@vger•kernel.org,
Linus Torvalds <torvalds@linux-foundation•org>
Subject: Re: [PATCH] KVM: x86: VMX: Make smaller physical guest address space support user-configurable
Date: Tue, 29 Sep 2020 09:39:46 -0400 [thread overview]
Message-ID: <2063b592f82f680edf61dad575f7c092d11d8ba3.camel@redhat.com> (raw)
In-Reply-To: <ebcd39a5-364f-c4ac-f8c7-41057a3d84be@redhat.com>
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.
next prev parent reply other threads:[~2020-09-29 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200903141122.72908-1-mgamal@redhat.com>
2020-09-28 15:34 ` [PATCH] KVM: x86: VMX: Make smaller physical guest address space support user-configurable Qian Cai
2020-09-29 11:59 ` Qian Cai
2020-09-29 12:26 ` Paolo Bonzini
2020-09-29 13:39 ` Qian Cai [this message]
2020-09-29 14:47 ` Paolo Bonzini
2020-10-02 17:28 ` Naresh Kamboju
2020-10-02 17:30 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2063b592f82f680edf61dad575f7c092d11d8ba3.camel@redhat.com \
--to=cai@redhat$(echo .)com \
--cc=jmattson@google$(echo .)com \
--cc=joro@8bytes$(echo .)org \
--cc=kvm@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mgamal@redhat$(echo .)com \
--cc=pbonzini@redhat$(echo .)com \
--cc=sean.j.christopherson@intel$(echo .)com \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=torvalds@linux-foundation$(echo .)org \
--cc=vkuznets@redhat$(echo .)com \
--cc=wanpengli@tencent$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox