All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: Avi Kivity <avi@redhat.com>
Cc: Alexander Graf <agraf@suse.de>, Jan Kiszka <jan.kiszka@web.de>,
	kvm-devel list <kvm@vger.kernel.org>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Gleb Natapov <gleb@redhat.com>
Subject: Re: List of unaccessible x86 states
Date: Mon, 26 Oct 2009 11:45:27 +0100	[thread overview]
Message-ID: <20091026104527.GI5326@amd.com> (raw)
In-Reply-To: <4AE57555.7000602@redhat.com>

On Mon, Oct 26, 2009 at 12:09:25PM +0200, Avi Kivity wrote:
> On 10/26/2009 11:56 AM, Joerg Roedel wrote:
> >On Mon, Oct 26, 2009 at 11:39:46AM +0200, Avi Kivity wrote:
> >>On 10/26/2009 11:30 AM, Joerg Roedel wrote:
> >>>>Which host state?  As far as I can tell, it can all be regenerated.
> >>>The state which is loaded into the vcpu when a #vmexit is emulated. This
> >>>includes segments, control registers and the host rip for example.
> >>All of this state does not change between nested guest and normal
> >>guest mode.
> >I am talking about all the state that is saved in svm->nested.hsave.
> >When we migrate a guest vcpu while it is running in guest mode itself
> >(without forcing a nested #vmexit) this state is required when a #vmexit
> >needs to be emulated on this vcpu after migration.
> >Same is true for the nested intercept conditions.
> 
> The state that is saved by VMRUN can be saved to guest memory and
> migrated.  Extra state (like the intercepts for the previous mode)
> must be saved to host memory and not migrated; host intercepts can
> be regenerated.

Ok, parts of the state can be saved in guest memory. But thats
currently not done. This will need some care to not introduce a security
hole. But it shouldn't be too difficult.
The state thats not reproducible in an sane way is the intercept bitmap
for the l2 guest.
>From the nested state what needs to be exposed to userspace for
migration is:

* guest mode flag (as returned by is_nested)
* nested vmcb address
* nested hsave msr
* nested intercepts
* for nested nested paging: guest nested cr3 value

Another state which needs exposure is the last branch record related
state.

Off-topic question: Will the new migration protocol include some kind
               handshake to find out if migration is possible at all?

	Joerg



  reply	other threads:[~2009-10-26 10:45 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
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 [this message]
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=20091026104527.GI5326@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.