[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAeT=FzLMNr3QtTjchzvr9QStaQPJaQNvaqHGzfsRpp5fOBSEg@mail.gmail.com>
Date: Tue, 18 May 2021 22:34:54 -0700
From: Reiji Watanabe <reijiw@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 22/43] KVM: VMX: Remove direct write to vcpu->arch.cr0
during vCPU RESET/INIT
On Fri, Apr 23, 2021 at 5:51 PM Sean Christopherson <seanjc@...gle.com> wrote:
>
> Remove a bogus write to vcpu->arch.cr0 that immediately precedes
> vmx_set_cr0() during vCPU RESET/INIT. For RESET, this is a nop since
> the "old" CR0 value is meaningless. But for INIT, if the vCPU is coming
> from paging enabled mode, crushing vcpu->arch.cr0 will cause the various
> is_paging() checks in vmx_set_cr0() to get false negatives.
>
> For the exit_lmode() case, the false negative is benign as vmx_set_efer()
> is called immediately after vmx_set_cr0().
>
> For EPT without unrestricted guest, the false negative will cause KVM to
> unnecessarily run with CR3 load/store exiting. But again, this is
> benign, albeit sub-optimal.
>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
Reviewed-by: Reiji Watanabe <reijiw@...gle.com>
Powered by blists - more mailing lists