linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND] Atomic switch of MSR_IA32_UMWAIT_CONTROL
@ 2020-01-23 15:45 Sean Christopherson
  2020-01-23 16:16 ` Paolo Bonzini
  2020-01-23 16:16 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Sean Christopherson @ 2020-01-23 15:45 UTC (permalink / raw)
  To: Tao Xu, Jingqi Liu, Paolo Bonzini; +Cc: kvm, linux-kernel

cc'ing KVM and LKML this time...

Why does KVM use the atomic load/store lists to load MSR_IA32_UMWAIT_CONTROL
on VM-Enter/VM-Exit?  Unless the host kernel is doing UWMAIT, which it
really shouldn't and AFAICT doesn't, isn't it better to use the shared MSR
mechanism to load the host value only when returning to userspace, and
reload the guest value on demand?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RESEND] Atomic switch of MSR_IA32_UMWAIT_CONTROL
  2020-01-23 15:45 [RESEND] Atomic switch of MSR_IA32_UMWAIT_CONTROL Sean Christopherson
@ 2020-01-23 16:16 ` Paolo Bonzini
  2020-01-23 16:16 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2020-01-23 16:16 UTC (permalink / raw)
  To: Sean Christopherson, Tao Xu, Jingqi Liu; +Cc: kvm, linux-kernel

On 23/01/20 16:45, Sean Christopherson wrote:
> cc'ing KVM and LKML this time...
> 
> Why does KVM use the atomic load/store lists to load MSR_IA32_UMWAIT_CONTROL
> on VM-Enter/VM-Exit?  Unless the host kernel is doing UWMAIT, which it
> really shouldn't and AFAICT doesn't, isn't it better to use the shared MSR
> mechanism to load the host value only when returning to userspace, and
> reload the guest value on demand?

Just laziness I guess.

Paolo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RESEND] Atomic switch of MSR_IA32_UMWAIT_CONTROL
  2020-01-23 15:45 [RESEND] Atomic switch of MSR_IA32_UMWAIT_CONTROL Sean Christopherson
  2020-01-23 16:16 ` Paolo Bonzini
@ 2020-01-23 16:16 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2020-01-23 16:16 UTC (permalink / raw)
  To: Sean Christopherson, Tao Xu, Jingqi Liu; +Cc: kvm, linux-kernel

On 23/01/20 16:45, Sean Christopherson wrote:
> cc'ing KVM and LKML this time...
> 
> Why does KVM use the atomic load/store lists to load MSR_IA32_UMWAIT_CONTROL
> on VM-Enter/VM-Exit?  Unless the host kernel is doing UWMAIT, which it
> really shouldn't and AFAICT doesn't, isn't it better to use the shared MSR
> mechanism to load the host value only when returning to userspace, and
> reload the guest value on demand?
> 

To clarify, laziness also on part of the reviewer, aka me.

Paolo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-23 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 15:45 [RESEND] Atomic switch of MSR_IA32_UMWAIT_CONTROL Sean Christopherson
2020-01-23 16:16 ` Paolo Bonzini
2020-01-23 16:16 ` Paolo Bonzini

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).