All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krish Sadhukhan <krish.sadhukhan@oracle.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Jim Mattson <jmattson@google.com>, kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH 1/2 v2] KVM: nVMX: KVM needs to unset "unrestricted guest" VM-execution control in vmcs02 if vmcs12 doesn't set it
Date: Tue, 28 Apr 2020 10:38:54 -0700	[thread overview]
Message-ID: <a5bf92bd-d4df-8d6c-8df2-9c993b31459a@oracle.com> (raw)
In-Reply-To: <11ce961c-d98c-3c4c-06a7-3c0f8336a340@redhat.com>


On 4/28/20 1:14 AM, Paolo Bonzini wrote:
> On 28/04/20 09:25, Krish Sadhukhan wrote:
>>> Absolutely.  Unrestricted guest requires EPT, but EPT is invisible to
>>> the guest.  (Currently EPT requires guest MAXPHYADDR = host MAXPHYADDR,
>>> in the sense that the guest can detect that the host is lying about
>>> MAXPHYADDR; but that is really a bug that I hope will be fixed in 5.8,
>>> relaxing the requirement to guest MAXPHYADDR <= host PHYADDR).
>> Should EPT for the nested guest be set up in the normal way (PML4E ->
>> PDPTE-> PDE -> PTE) when GUEST_CR0.PE is zero ? Or does it have to be a
>> special set up like only the PTEs are needed because no protection and
>> no paging are used ?
> I don't understand.  When EPT is in use, the vmcs02 CR3 is simply set to
> the vmcs12 CR3.


Sorry, I should have framed my question in a better way.

My question is  how should L1 in the test code set up EPTP for L2 when 
L2 is an unrestricted guest with no protection (GUEST_CR0.PE = 0) and no 
paging (GUEST_CR0.PG = 0) ? Should EPTP in test code be set up in the 
same way as when L2 is an unrestricted guest with protection and paging 
enabled ?

Getting confused by legacy 16-bit Real Mode and an unrestricted guest in 
Real Mode. :-)
> Paolo
>

  reply	other threads:[~2020-04-28 17:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15 18:30 [PATCH 0/2 v2] kvm-unit-test: nVMX: Test Selector and Base Address fields of Guest Segment registers Krish Sadhukhan
2020-04-15 18:30 ` [PATCH 1/2 v2] KVM: nVMX: KVM needs to unset "unrestricted guest" VM-execution control in vmcs02 if vmcs12 doesn't set it Krish Sadhukhan
2020-04-15 19:30   ` Sean Christopherson
2020-04-15 20:18     ` Jim Mattson
2020-04-16  9:18       ` Paolo Bonzini
2020-04-18  1:29         ` Krish Sadhukhan
2020-04-18  1:55           ` Sean Christopherson
2020-04-18  9:53             ` Paolo Bonzini
2020-04-20 15:12               ` Sean Christopherson
2020-04-28  7:25               ` Krish Sadhukhan
2020-04-28  8:14                 ` Paolo Bonzini
2020-04-28 17:38                   ` Krish Sadhukhan [this message]
2020-04-28 18:00                     ` Jim Mattson
2020-04-15 18:30 ` [PATCH 2/2 v2] kvm-unit-tests: nVMX: Test Selector and Base Address fields of Guest Segment Registers on vmentry of nested guests Krish Sadhukhan

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=a5bf92bd-d4df-8d6c-8df2-9c993b31459a@oracle.com \
    --to=krish.sadhukhan@oracle.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.