From: Keir Fraser <keir@xen.org>
To: wei.huang2@amd.com, xen-devel@lists.xensource.com
Cc: james.harper@bendigoit.com.au
Subject: Re: [PATCH][SVM] Fix 32bit Windows guest VMs save/restore
Date: Mon, 31 Jan 2011 22:13:28 +0100 [thread overview]
Message-ID: <C96CE488.165C9%keir@xen.org> (raw)
In-Reply-To: <1296495223.2013.8.camel@weilaptop>
On 31/01/2011 18:33, "Wei Huang" <wei.huang2@amd.com> wrote:
> The attached patch fixes the save/restore issue seen with 32bit Windows
> guest VMs. The root cause is that current Xen doesn't intercept
> SYSENTER-related MSRs for 32bit guest VMs. As a result, the
> guest_sysenter_xxx fields contain incorrect values and shouldn't be used
> for save/restore. This patch checks the LMA bit of EFER register in the
> save/restore code path.
>
> Please apply it to both Xen-4.0 and Xen-unstable trees.
>
> Reported-by: James Harper <james.harper@bendigoit.com.au>
> Signed-off-by: Wei Huang <wei.huang2@amd.com>
> Acked-by: Christoph Egger <christoph.egger@amd.com>
Nacked-by: Keir Fraser <keir@xen.org>
This handling of the SYSENTER MSRs is overly complicated. I suggest
reverting a bunch of the original handling of cross-vendor migration as
follows:
* Never intercept the SYSENTER MSRs.
* Remove the vcpu->arch.hvm_svm.guest_sysenter_* fields.
* Always hvm save/restore from/to the values in the vmcb.
* Modify svm_msr_read_intercept(MSR_IA32_SYSENTER_*) to svm_sync_vmcb() and
then read the sysenter msr value from vmcb
* Modify svm_msr_write_intercept(MSR_IA32_SYSENTER_*) to svm_sync_vmcb(),
then modify the sysenter msr in the vmcb, and then svm_vmload().
Result is that we get rid of some redundant fields from the vcpu structure
and have one canonical place we always keep the sysenter msr values, in the
vmcb. The extra cost in the msr read/write functions is totally
inconsequential, and only used after guest migration from an Intel CPU
anyway. Hardly something to optimise for.
-- Keir
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-01-31 21:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 17:33 [PATCH][SVM] Fix 32bit Windows guest VMs save/restore Wei Huang
2011-01-31 21:13 ` Keir Fraser [this message]
2011-01-31 21:17 ` Keir Fraser
2011-01-31 21:43 ` Wei Huang
2011-01-31 21:38 ` Wei Huang
2011-02-01 6:14 ` Keir Fraser
2011-02-01 6:25 ` Wei Huang
2011-02-01 8:14 ` Keir Fraser
2011-02-01 21:06 ` Wei Huang
2011-02-01 22:35 ` Keir Fraser
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=C96CE488.165C9%keir@xen.org \
--to=keir@xen.org \
--cc=james.harper@bendigoit.com.au \
--cc=wei.huang2@amd.com \
--cc=xen-devel@lists.xensource.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.