[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALMp9eR9J7yNcb3rLYjO1pg2AYkmy8j7hFor08u1fm5U0i3a7A@mail.gmail.com>
Date: Mon, 12 Feb 2018 09:37:59 -0800
From: Jim Mattson <jmattson@...gle.com>
To: Wanpeng Li <kernellwp@...il.com>
Cc: kvm list <kvm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Radim Krcmar <rkrcmar@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH] KVM: nVMX: Fix CR4 after VMLAUNCH/VMRESUME failure
On Sun, Feb 11, 2018 at 3:56 AM, Wanpeng Li <kernellwp@...il.com> wrote:
> Writes 0 to cr3 can't be detected during vmentry checks by hardware.
I never suggested otherwise. I was just trying to explain why you
can't assume that the host CR3 field in the VMCS matches the host CR3
at the time of VMLAUNCH.
KVM is set up for failure, because it loads a bunch of guest state
before checking the validity of all of the control fields. If a
control field in the vmcs12 is invalid, but KVM doesn't recognize this
until after it has loaded guest state, all of the host state that has
been overwritten should be restored. "Restored" does not mean "loaded
from the vmcs12." It means reverted to its state at the time of the
failed VMLAUNCH/VMRESUME.
Powered by blists - more mailing lists