public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: linmiaohe <linmiaohe@huawei.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 01/10] KVM: VMX: Use vpid_sync_context() directly when possible
Date: Fri, 21 Feb 2020 06:35:50 +0000	[thread overview]
Message-ID: <8e41f02ef7a54af19848efe572652248@huawei.com> (raw)

Sean Christopherson <sean.j.christopherson@intel.com> writes:
>Use vpid_sync_context() directly for flows that run if and only if enable_vpid=1, or more specifically, nested VMX flows that are gated by
>vmx->nested.msrs.secondary_ctls_high.SECONDARY_EXEC_ENABLE_VPID being
>set, which is allowed if and only if enable_vpid=1.  Because these flows call __vmx_flush_tlb() with @invalidate_gpa=false, the if-statement that decides between INVEPT and >INVVPID will always go down the INVVPID path, i.e. call vpid_sync_context() because "enable_ept && (invalidate_gpa || !enable_vpid)" always evaluates false.
>
>This helps pave the way toward removing @invalidate_gpa and @vpid from
>__vmx_flush_tlb() and its callers.
>
>No functional change intended.
>
>Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>


             reply	other threads:[~2020-02-21  6:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  6:35 linmiaohe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-20 20:43 [PATCH 00/10] KVM: x86: Clean up VMX's TLB flushing code Sean Christopherson
2020-02-20 20:43 ` [PATCH 01/10] KVM: VMX: Use vpid_sync_context() directly when possible Sean Christopherson
2020-02-21 13:17   ` Vitaly Kuznetsov
2020-02-21 15:36     ` Sean Christopherson
2020-02-21 17:26       ` 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=8e41f02ef7a54af19848efe572652248@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.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