From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Wanpeng Li <kernellwp@gmail.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
LKML <linux-kernel@vger.kernel.org>, kvm <kvm@vger.kernel.org>,
Maxim Levitsky <mlevitsk@redhat.com>,
Lai Jiangshan <laijs@linux.alibaba.com>
Subject: Re: [PATCH 0/3] KVM: x86: Fixes for kvm/queue
Date: Thu, 24 Feb 2022 17:50:42 +0000 [thread overview]
Message-ID: <YhfFcqeVzUoFlntf@google.com> (raw)
In-Reply-To: <f9b5c079-ba10-b528-a2fc-efb40cbb5d8f@redhat.com>
On Fri, Feb 11, 2022, Paolo Bonzini wrote:
> On 2/11/22 17:31, Sean Christopherson wrote:
> > > Maybe the patch "Revert "KVM: VMX: Save HOST_CR3 in
> > > vmx_prepare_switch_to_guest()"" is still missing in the latest
> > > kvm/queue, I saw the same warning.
> >
> > It hasn't made it way to Linus either.
>
> This was supposed to fix the buggy patch, too:
>
> commit a9f2705ec84449e3b8d70c804766f8e97e23080d
> Author: Lai Jiangshan <laijs@linux.alibaba.com>
> Date: Thu Dec 16 10:19:36 2021 +0800
>
> KVM: VMX: Save HOST_CR3 in vmx_set_host_fs_gs()
> The host CR3 in the vcpu thread can only be changed when scheduling,
> so commit 15ad9762d69f ("KVM: VMX: Save HOST_CR3 in vmx_prepare_switch_to_guest()")
> changed vmx.c to only save it in vmx_prepare_switch_to_guest().
> However, it also has to be synced in vmx_sync_vmcs_host_state() when switching VMCS.
> vmx_set_host_fs_gs() is called in both places, so rename it to
> vmx_set_vmcs_host_state() and make it update HOST_CR3.
> Fixes: 15ad9762d69f ("KVM: VMX: Save HOST_CR3 in vmx_prepare_switch_to_guest()")
> Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
> Message-Id: <20211216021938.11752-2-jiangshanlai@gmail.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The underlying premise that CR3 can change only when scheduling is wrong, reverts
incoming...
prev parent reply other threads:[~2022-02-24 17:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 2:19 [PATCH 0/3] KVM: x86: Fixes for kvm/queue Lai Jiangshan
2021-12-16 2:19 ` [PATCH V2 1/3] KVM: VMX: Save HOST_CR3 in vmx_prepare_switch_to_guest() Lai Jiangshan
2021-12-16 2:19 ` [PATCH V2 2/3] KVM: x86/mmu: Ensure pae_root to be reconstructed for shadow paging if the guest PDPTEs is changed Lai Jiangshan
2021-12-16 2:19 ` [PATCH 3/3] KVM: VMX: Mark VCPU_EXREG_CR3 dirty when !CR0_PG -> CR0_PG if EPT + !URG Lai Jiangshan
2021-12-20 16:49 ` [PATCH 0/3] KVM: x86: Fixes for kvm/queue Paolo Bonzini
2022-02-11 5:32 ` Wanpeng Li
2022-02-11 16:31 ` Sean Christopherson
2022-02-11 17:04 ` Paolo Bonzini
2022-02-24 17:50 ` Sean Christopherson [this message]
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=YhfFcqeVzUoFlntf@google.com \
--to=seanjc@google.com \
--cc=jiangshanlai@gmail.com \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=laijs@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@redhat.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.