From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: Gleb Natapov <gleb@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
"oritw@il.ibm.com" <oritw@il.ibm.com>,
kvm-devel <kvm@vger.kernel.org>,
Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: List of unaccessible x86 states
Date: Mon, 26 Oct 2009 11:19:50 +0200 [thread overview]
Message-ID: <4AE569B6.9010101@redhat.com> (raw)
In-Reply-To: <FC527FC7-2D91-4E36-89BB-9E6E2FEE14E5@suse.de>
On 10/26/2009 11:11 AM, Alexander Graf wrote:
>> L1 hsave stores the architected state saved by vmrun, e.g. cs.sel,
>> next_rip, cr0, cr3, etc. The host intercept bitmap is not state
>> since it is calculated from the L1 intercept bitmap and host code.
>> Indeed it can be different from host to host even with the same guest
>> state.
>
>
> Ah, so you'd only save off the cpu state parts of the vmcb.
>
> Currently we save off control parts too, so we can easily swap them in
> on #vmexit.
These can still be saved in a host memory area as an optimization, and
regenerated if needed.
> So if we'd migrate off when inside the nested guest, we'd have to save
> off the resume control state, OR them again with the guest vmcb
> control states and be inside the nested guest.
Right, if the new state bit (guest mode) is set, we look at the control
bits and OR them into the vmcb. That part can be reused with the VMRUN
code.
>
> Wouldn't it be much easier to not migrate / save state when inside a
> nested guest? I'm afraid the code will become overly complex if we do
> allow migration while in a nested context.
I can't really see why but then I don't know the code as well as you
do. The current code won't work for guests which don't intercept
external interrupts (probably only malware). For nested vmx it may be
necessary since vmx has a mode where interrupts are acknowledged during
#VMEXIT and the interrupt vector is saved into a register; you can't
fake an interrupt #VMEXIT since you can't fake the vector. Xen is one
guest which uses this mode.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-10-26 9:19 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 13:01 List of unaccessible x86 states Jan Kiszka
2009-10-20 13:10 ` Alexander Graf
2009-10-20 13:19 ` Jan Kiszka
2009-10-20 13:27 ` Gleb Natapov
2009-10-20 13:29 ` Jan Kiszka
2009-10-20 13:32 ` Gleb Natapov
2009-10-20 13:27 ` Alexander Graf
2009-10-20 13:37 ` Jan Kiszka
2009-10-20 13:41 ` Alexander Graf
2009-10-20 13:48 ` Gleb Natapov
2009-10-20 13:51 ` Alexander Graf
2009-10-20 18:55 ` Gleb Natapov
2009-10-20 18:59 ` Alexander Graf
2009-10-20 19:09 ` Gleb Natapov
2009-10-20 19:23 ` Alexander Graf
2009-10-20 19:31 ` Gleb Natapov
2009-10-25 9:46 ` Avi Kivity
2009-10-25 13:53 ` Alexander Graf
2009-10-25 14:08 ` Avi Kivity
2009-10-25 16:45 ` Alexander Graf
2009-10-26 8:33 ` Avi Kivity
2009-10-26 9:11 ` Alexander Graf
2009-10-26 9:19 ` Avi Kivity [this message]
2009-10-20 13:35 ` Gleb Natapov
2009-10-20 18:45 ` Marcelo Tosatti
2009-10-23 13:08 ` Jan Kiszka
2009-10-23 17:00 ` Marcelo Tosatti
2009-10-23 19:26 ` Jan Kiszka
2009-10-23 19:34 ` Jan Kiszka
2009-10-24 10:35 ` Alexander Graf
2009-10-25 9:49 ` Avi Kivity
2009-10-26 9:17 ` Joerg Roedel
2009-10-26 9:21 ` Avi Kivity
2009-10-26 9:30 ` Joerg Roedel
2009-10-26 9:39 ` Avi Kivity
2009-10-26 9:56 ` Joerg Roedel
2009-10-26 10:09 ` Avi Kivity
2009-10-26 10:45 ` Joerg Roedel
2009-10-26 10:56 ` Avi Kivity
2009-10-26 11:10 ` Joerg Roedel
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=4AE569B6.9010101@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=gleb@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=oritw@il.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).