public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Dong, Eddie" <eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: guest state leak into host
Date: Sun, 13 May 2007 13:51:31 +0300	[thread overview]
Message-ID: <4646EDB3.6030602@qumranet.com> (raw)
In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A016AB9E3-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>

Dong, Eddie wrote:
> 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.
>   

Some exit handlers (even the #PF handler) can sleep sometimes.  They 
call kvm_arch_ops->vcpu_put(), do some sleepy thing, then call 
kvm_arch_ops->vcpu_load().  The changes in the commit make sure that if 
vcpu_put() is called, the lightweight exit is converted to a heavyweight 
exit.  Since such sleeps are rare, this is not expected to impact 
performance.

See for example mmu_topup_memory_caches().


-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
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/

  parent reply	other threads:[~2007-05-13 10:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
     [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

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=4646EDB3.6030602@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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