[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190415173513.GF24010@linux.intel.com>
Date: Mon, 15 Apr 2019 10:35:13 -0700
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH] KVM: nVMX: always use early vmcs check when EPT is
disabled
On Mon, Apr 15, 2019 at 04:05:56PM +0200, Paolo Bonzini wrote:
> The remaining failures of vmx.flat when EPT is disabled are caused by
> incorrectly reflecting VMfails to the L1 hypervisor. What happens is
> that nested_vmx_restore_host_state corrupts the guest CR3, reloading it
> with the host's shadow CR3 instead, because it blindly loads GUEST_CR3
> from the vmcs01.
>
> For simplicity let's just always use hardware VMCS checks when EPT is
> disabled. This way, nested_vmx_restore_host_state is not reached at
> all (or at least shouldn't be reached).
At the risk of getting too clever, we can handle this scenario by stashing
L1's CR3 in vmcs01.GUEST_CR3 immediately prior to loading L2's state.
The attached patch passes vmx.flat with ept=0, haven't tested it beyond
that.
Side topic, your patch was missing your SOB.
View attachment "0001-KVM-nVMX-Stash-L1-s-CR3-in-vmcs01.GUEST_CR3-on-neste.patch" of type "text/x-diff" (2658 bytes)
Powered by blists - more mailing lists