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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 28, 2020 at 10:39 AM Krish Sadhukhan
<krish.sadhukhan@xxxxxxxxxx> wrote:
>
>
> 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 ?

The EPT maps guest physical addresses to host physical addresses. That
mapping is the same regardless of whether the guest is using paging or
not.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux