mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@linux.alibaba.com>
To: Lai Jiangshan <jiangshanlai@gmail.com>, linux-kernel@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH 0/2] KVM: X86: Don't reset mmu context when changing PGE or PCID
Date: Fri, 15 Oct 2021 00:03:55 +0800	[thread overview]
Message-ID: <506c12c4-4a56-bcbf-a566-a3e75c0814aa@linux.alibaba.com> (raw)
In-Reply-To: <20210919024246.89230-1-jiangshanlai@gmail.com>

Ping

On 2021/9/19 10:42, Lai Jiangshan wrote:
> From: Lai Jiangshan <laijs@linux.alibaba.com>
> 
> This patchset uses kvm_vcpu_flush_tlb_guest() instead of kvm_mmu_reset_context()
> when X86_CR4_PGE is changed or X86_CR4_PCIDE is changed 1->0.
> 
> Neither X86_CR4_PGE nor X86_CR4_PCIDE participates in kvm_mmu_role, so
> kvm_mmu_reset_context() is not required to be invoked.  Only flushing tlb
> is required as SDM says.
> 
> The patchset has nothing to do with performance, because the overheads of
> kvm_mmu_reset_context() and kvm_vcpu_flush_tlb_guest() are the same.  And
> even in the [near] future, kvm_vcpu_flush_tlb_guest() will be optimized,
> the code is not in the hot path.
> 
> This patchset makes the code more clear when to reset the mmu context.
> And it makes KVM_MMU_CR4_ROLE_BITS consistent with kvm_mmu_role.
> 
> Lai Jiangshan (2):
>    KVM: X86: Don't reset mmu context when X86_CR4_PCIDE 1->0
>    KVM: X86: Don't reset mmu context when toggling X86_CR4_PGE
> 
>   arch/x86/kvm/mmu.h | 5 ++---
>   arch/x86/kvm/x86.c | 7 +++++--
>   2 files changed, 7 insertions(+), 5 deletions(-)
> 

  parent reply	other threads:[~2021-10-14 16:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19  2:42 Lai Jiangshan
2021-09-19  2:42 ` [PATCH 1/2] KVM: X86: Don't reset mmu context when X86_CR4_PCIDE 1->0 Lai Jiangshan
2021-10-14 18:47   ` Sean Christopherson
2021-10-14 18:48     ` Sean Christopherson
2021-09-19  2:42 ` [PATCH 2/2] KVM: X86: Don't reset mmu context when toggling X86_CR4_PGE Lai Jiangshan
2021-10-14 18:50   ` Sean Christopherson
2021-10-14 16:03 ` Lai Jiangshan [this message]
2021-10-15 16:02   ` [PATCH 0/2] KVM: X86: Don't reset mmu context when changing PGE or PCID Paolo Bonzini

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=506c12c4-4a56-bcbf-a566-a3e75c0814aa@linux.alibaba.com \
    --to=laijs@linux.alibaba.com \
    --cc=jiangshanlai@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome