public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* SVM: vmload/vmsave-free VM exits?
@ 2015-04-05  8:31 Jan Kiszka
  2015-04-05 17:12 ` Valentine Sinitsyn
  0 siblings, 1 reply; 20+ messages in thread
From: Jan Kiszka @ 2015-04-05  8:31 UTC (permalink / raw)
  To: kvm, Jailhouse; +Cc: Valentine Sinitsyn

Hi,

studying the VM exit logic of Jailhouse, I was wondering when AMD's
vmload/vmsave can be avoided. Jailhouse as well as KVM currently use
these instructions unconditionally. However, I think both only need
GS.base, i.e. the per-cpu base address, to be saved and restored if no
user space exit or no CPU migration is involved (both is always true for
Jailhouse). Xen avoids vmload/vmsave on lightweight exits but it also
still uses rsp-based per-cpu variables.

So the question boils down to what is generally faster:

A) vmload
   vmrun
   vmsave

B) wrmsrl(MSR_GS_BASE, guest_gs_base)
   vmrun
   rdmsrl(MSR_GS_BASE, guest_gs_base)

Of course, KVM also has to take into account that heavyweight exits
still require vmload/vmsave, thus become more expensive with B) due to
the additional MSR accesses.

Any thoughts or results of previous experiments?

Jan

-- 
You received this message because you are subscribed to the Google Groups "Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

end of thread, other threads:[~2015-04-14  7:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-05  8:31 SVM: vmload/vmsave-free VM exits? Jan Kiszka
2015-04-05 17:12 ` Valentine Sinitsyn
2015-04-07  5:43   ` Jan Kiszka
2015-04-07  6:10     ` Valentine Sinitsyn
2015-04-07  6:13       ` Jan Kiszka
2015-04-07  6:19         ` Valentine Sinitsyn
2015-04-07  6:23           ` Jan Kiszka
2015-04-07  6:29             ` Valentine Sinitsyn
2015-04-07  6:35               ` Jan Kiszka
2015-04-13  7:01     ` Jan Kiszka
2015-04-13 17:29       ` Avi Kivity
2015-04-13 17:35         ` Jan Kiszka
2015-04-13 17:41           ` Avi Kivity
2015-04-13 17:48             ` Avi Kivity
2015-04-13 17:57               ` Jan Kiszka
2015-04-13 18:07                 ` Avi Kivity
2015-04-13 18:14                   ` Jan Kiszka
2015-04-14  6:39             ` Valentine Sinitsyn
2015-04-14  7:02               ` Jan Kiszka
2015-04-14  7:11                 ` Valentine Sinitsyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox