public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* guest state leak into host
@ 2007-05-10  9:29 Dong, Eddie
       [not found] ` <10EA09EFD8728347A513008B6B0DA77A016AB9E3-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Dong, Eddie @ 2007-05-10  9:29 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel


Avi:
	Following commit mentioned guest state leaking into host, Can u
explain a bit?
	In my understanding,  as if control goes to vmx_vcpu_run, CPU
preemption is disabled, i.e. no rescheduling will happen (Guest
resheduling will only happen at IOCTL return to Qemu time or vcpu_put at
kvm_vcpu_ioctl_run). In this case, let machine FPU hold guest state
(Linux Kernel itself will not use FPU), and machine MSRs (SYSCALL_MASK,
LSTAR, K6_STAR, CSTAR, GS_BASE) hold for guest MSRs can avoid
save/restore and thus performance gain. But I might make some mistake.
	BTW, in Xen similar approach is taken. Light weight VM Exit,
which will not trigger domain switch is handled by hypervisor, only
save/restore few MSRs. The heavyweight VM Exit, which trigger domain
switch (similar with return to Qemu in KVM), will do full set of MSR
save/restore.
thx,eddie


commit bc8dcc2107de0ba8f25fc910c4559ebe3df33045
Author: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Date:   Wed May 2 16:54:03 2007 +0300

    KVM: Fix potential guest state leak into host

    The lightweight vmexit path avoids saving and reloading certain host
    state.  However in certain cases lightweight vmexit handling can
schedule()
    which requires reloading the host state.

    So we store the host state in the vcpu structure, and reloaded it if
we
    relinquish the vcpu.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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

end of thread, other threads:[~2007-05-16 15:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-10  9:29 guest state leak into host Dong, Eddie
     [not found] ` <10EA09EFD8728347A513008B6B0DA77A016AB9E3-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-05-13 10:51   ` Avi Kivity
     [not found]     ` <4646EDB3.6030602-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-14 14:57       ` [PATCH] lighweight VM Exit (was:RE: guest state leak into host) Dong, Eddie
     [not found]         ` <10EA09EFD8728347A513008B6B0DA77A016FBD91-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-05-14 15:14           ` [PATCH] lighweight VM Exit Avi Kivity
     [not found]             ` <46487CD7.8070408-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-14 15:34               ` Christoph Hellwig
2007-05-15  6:10               ` Dong, Eddie
     [not found]                 ` <10EA09EFD8728347A513008B6B0DA77A016FC1F2-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-05-15  7:39                   ` Avi Kivity
     [not found]                     ` <464963A3.7090505-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-15 10:12                       ` Dong, Eddie
     [not found]                         ` <10EA09EFD8728347A513008B6B0DA77A016FC3CD-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-05-15 13:48                           ` Dong, Eddie
     [not found]                             ` <10EA09EFD8728347A513008B6B0DA77A016FC419-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-05-16  8:35                               ` Avi Kivity
     [not found]                                 ` <464AC26D.8040901-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-16 15:23                                   ` Dong, Eddie
     [not found]                                     ` <10EA09EFD8728347A513008B6B0DA77A014E8AB2-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-05-16 15:40                                       ` Avi Kivity

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