Re: MSR access API uses in KVM x86

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22.04.25 16:40, Sean Christopherson wrote:
On Mon, Apr 21, 2025, Xin Li wrote:
It looks to me that MSR access API uses in KVM x86 are NOT consistent;
sometimes {wr,rd}msrl() are used and sometimes native_{wr,rd}msrl() are
used.

Was there a reason that how a generic or native MSR API was chosen?

I doubt anyone knows for sure; that'd likely require a time travelling device
and/or telepathic abilities :-)

In my opinion KVM should use the native MSR APIs, which can streamline
operations and potentially improve performance by avoiding the overhead
associated with generic MSR API indirect calls when CONFIG_XEN_PV=y.

As Jürgen pointed out, they aren't indirect calls.  Though IIUC, there is still
a direct CALL and thus a RET when PARAVIRT_XXL=Y.

I agree that using PV APIs in KVM doesn't make much sense, as running KVM in a
XEN PV guest doesn't seem like something we should optimize for, if it's even
supported.

Shudder. :-D

No, definitely not supported.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux