All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Gao <chao.gao@intel.com>
To: "Wang,Guangju" <wangguangju@baidu.com>
Cc: Sean Christopherson <seanjc@google.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"vkuznets@redhat.com" <vkuznets@redhat.com>,
	"wanpengli@tencent.com" <wanpengli@tencent.com>,
	"jmattson@google.com" <jmattson@google.com>,
	"joro@8bytes.org" <joro@8bytes.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"dave.hansen@linux.intel.co" <dave.hansen@linux.intel.co>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.orga" <linux-kernel@vger.kernel.orga>
Subject: Re: 答复: [PATCH] KVM: x86: add a bool variable to distinguish whether to use PVIPI
Date: Wed, 15 Jun 2022 13:33:34 +0800	[thread overview]
Message-ID: <20220615053329.GA13836@gao-cwp> (raw)
In-Reply-To: <aa618267a02c4ca9b10d75b5035b92d0@baidu.com>

On Wed, Jun 15, 2022 at 04:21:21AM +0000, Wang,Guangju wrote:
>>On Mon, Jun 13, 2022 at 05:16:48PM +0000, Sean Christopherson wrote:
>>>The shortlog is not at all helpful, it doesn't say anything about what 
>>>actual functional change.
>>>
>>>  KVM: x86: Don't advertise PV IPI to userspace if IPIs are virtualized
>>>
>>>On Mon, Jun 13, 2022, wangguangju wrote:
>>>> Commit d588bb9be1da ("KVM: VMX: enable IPI virtualization") enable 
>>> >IPI virtualization in Intel SPR platform.There is no point in using 
>>> >PVIPI if IPIv is supported, it doesn't work less good with PVIPI than 
>>> >without it.
>>>> 
>>> >So add a bool variable to distinguish whether to use PVIPI.
>>>
>>>Similar complaint with the changelog, it doesn't actually call out why 
>>>PV IPIs are unwanted.
>>>
>>>  Don't advertise PV IPI support to userspace if IPI virtualization is  
>> >supported by the CPU.  Hardware virtualization of IPIs more performant  
>> >as senders do not need to exit.
>
>>PVIPI is mainly [*] for sending multi-cast IPIs. Intel IPI virtualization can virtualize only uni-cast IPIs. Their use cases don't overlap. So, I don't think it makes sense to disable PVIPI if intel IPI virtualization is supported.
>A question, like x2apic mode, guest uses PVIPI with replace apic->send_IPI_mask to kvm_send_ipi_mask. The original function implementation is __x2apic_send_IPI_mask , and it poll each CPU to send IPI. So in this case 
>Intel virtualization can not work? Thanks.

Yes, it can work. But some experiments we conducted based on a modified
kvm-unit-test showed that PVIPI outperforms native ICR writes (w/ IPI
virtualization) in terms of sending multi-cast (i.e., dest vCPUs >=2) IPIs

      reply	other threads:[~2022-06-15  5:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1655124522-42030-1-git-send-email-wangguangju@baidu.com>
2022-06-13 17:16 ` [PATCH] KVM: x86: add a bool variable to distinguish whether to use PVIPI Sean Christopherson
2022-06-14  2:54   ` Chao Gao
2022-06-14 14:41     ` Sean Christopherson
2022-06-14 15:03       ` Chao Gao
2022-06-15  4:21         ` 答复: " Wang,Guangju
2022-06-15  5:33           ` Chao Gao [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=20220615053329.GA13836@gao-cwp \
    --to=chao.gao@intel.com \
    --cc=dave.hansen@linux.intel.co \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.orga \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wangguangju@baidu.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.org \
    /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.