linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Doug Covelli <doug.covelli@broadcom.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Zack Rusin <zack.rusin@broadcom.com>,  kvm <kvm@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	 Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	 Dave Hansen <dave.hansen@linux.intel.com>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	 "H. Peter Anvin" <hpa@zytor.com>, Shuah Khan <shuah@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	 Arnaldo Carvalho de Melo <acme@redhat.com>,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	 Joel Stanley <joel@jms.id.au>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	linux-kernel@vger.kernel.org,
	 linux-kselftest <linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH 2/3] KVM: x86: Add support for VMware guest specific hypercalls
Date: Tue, 17 Dec 2024 19:43:54 -0800	[thread overview]
Message-ID: <Z2IXvsM0olS5GvbR@google.com> (raw)
In-Reply-To: <CADH9ctB0YSYqC_Vj2nP20vMO_gN--KsqOBOu8sfHDrkZJV6pmw@mail.gmail.com>

On Thu, Dec 12, 2024, Doug Covelli wrote:
> On Thu, Nov 14, 2024 at 10:45 AM Doug Covelli <doug.covelli@broadcom.com> wrote:
> > > For LINT1, it should be less performance critical; if it's possible
> > > to just go through all vCPUs, and do KVM_GET_LAPIC to check who you
> > > should send a KVM_NMI to, then I'd do that.  I'd also accept a patch
> > > that adds a VM-wide KVM_NMI ioctl that does the same in the hypervisor
> > > if it's useful for you.
> >
> > Thanks for the patch - I'll get it a try but it might not be right away.
> >
> > > And since I've been proven wrong already, what do you need INIT/SIPI for?
> >
> > I don't think this one is as critical.  I believe the reason it was
> > added was so that we can synchronize startup of the APs with execution
> > of the BSP for guests that do not do a good job of that (Windows).
> >
> > Doug
> 
> We were able to get the in-kernel APIC working with our code using the split
> IRQ chip option with our virtual EFI FW even w/o the traps for SVR and LVT0
> writes.  Performance of Windows VMs is greatly improved as expected.
> Unfortunately our ancient legacy BIOS will not work with > 1 VCPU due to lack
> of support for IPIs with an archaic delivery mode of remote read which it uses
> to discover APs by attempting to read their APIC ID register.  MSFT WHP supports
> this functionality via an option, WHvPartitionPropertyCodeApicRemoteReadSupport.
> 
> Changing our legacy BIOS is not an option so in order to support Windows VMs
> with the legacy BIOS with decent performance we would either need to add support
> for remote reads of the APIC ID register to KVM or support CR8 accesses w/o
> exiting w/o the in-kernel APIC in order.  Do you have a preference?

I didn't quite follow the CR8 access thing.  If the choice is between emulating
Remote Read IPIs and using a userspace local APIC, then I vote with both hands
for emulating Remote Reads, especially if we can do a half-assed version that
provides only what your crazy BIOS needs :-)

The biggest wrinkle I can think of is that KVM uses the Remote Read IPI encoding
for a paravirt vCPU kick feature, but I doubt that's used by Windows guests and
so can be sacrificed on the Altar of Ancient BIOS.

  reply	other threads:[~2024-12-18  3:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30  3:34 [PATCH 0/3] KVM: x86: Small changes to support VMware guests Zack Rusin
2024-10-30  3:34 ` [PATCH 1/3] KVM: x86: Allow enabling of the vmware backdoor via a cap Zack Rusin
2024-10-30  3:34 ` [PATCH 2/3] KVM: x86: Add support for VMware guest specific hypercalls Zack Rusin
2024-11-04 22:13   ` Paolo Bonzini
2024-11-05  4:59     ` Zack Rusin
2024-11-07 22:32       ` Sean Christopherson
2024-11-08  5:03         ` Zack Rusin
2024-11-09 18:20           ` Paolo Bonzini
2024-11-09 21:11             ` Doug Covelli
2024-11-11 18:49               ` Paolo Bonzini
2024-11-11 20:55                 ` Doug Covelli
2024-11-12 17:44                   ` Paolo Bonzini
2024-11-12 20:44                     ` Doug Covelli
     [not found]                       ` <CABgObfZrTyft-3vqMz5w0ZiAhp-v6c32brgftynZGJO8OafrdA@mail.gmail.com>
2024-11-13 16:04                         ` Sean Christopherson
2024-11-13 16:24                         ` Doug Covelli
2024-11-13 17:59                           ` Paolo Bonzini
2024-11-14 15:45                             ` Doug Covelli
2024-12-12 12:19                               ` Doug Covelli
2024-12-18  3:43                                 ` Sean Christopherson [this message]
2025-01-07 17:09                                   ` Paolo Bonzini
2025-02-03 16:35                                     ` Doug Covelli
2025-02-03 18:21                                       ` Paolo Bonzini
2025-02-03 18:35                                         ` Doug Covelli
2025-02-03 19:41                                           ` Sean Christopherson
2025-02-03 19:46                                             ` Paolo Bonzini
2025-02-03 19:53                                               ` Sean Christopherson
2025-02-03 20:35                                                 ` Doug Covelli
2024-11-09 16:44         ` Paolo Bonzini
2024-10-30  3:34 ` [PATCH 3/3] KVM: selftests: x86: Add a test for KVM_CAP_X86_VMWARE_HYPERCALL Zack Rusin

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=Z2IXvsM0olS5GvbR@google.com \
    --to=seanjc@google.com \
    --cc=acme@redhat.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=doug.covelli@broadcom.com \
    --cc=hpa@zytor.com \
    --cc=isaku.yamahata@intel.com \
    --cc=joel@jms.id.au \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=zack.rusin@broadcom.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;
as well as URLs for NNTP newsgroup(s).