|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-3.0.4-testing] [HVM][VMX] Save GS_SHADOW MSR only o
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1166700159 0
# Node ID d6ae86aecc372e66110653ed98836a2b4f6d21fb
# Parent 4ee14491c540121abd685d2a86ff46ba80d1ff10
[HVM][VMX] Save GS_SHADOW MSR only on x86/64.
Bug found by Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
Based on xen-unstable changeset 13113:fd1ccd818f2c7da431e1e1ce9cc6ea3392f380c1
---
xen/arch/x86/hvm/vmx/vmx.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff -r 4ee14491c540 -r d6ae86aecc37 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c Thu Dec 21 11:06:37 2006 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c Thu Dec 21 11:22:39 2006 +0000
@@ -276,6 +276,12 @@ static void vmx_restore_host_msrs(void)
}
}
+static void vmx_save_guest_msrs(struct vcpu *v)
+{
+ /* MSR_SHADOW_GS_BASE may have been changed by swapgs instruction. */
+ rdmsrl(MSR_SHADOW_GS_BASE, v->arch.hvm_vmx.msr_state.shadow_gs);
+}
+
static void vmx_restore_guest_msrs(struct vcpu *v)
{
struct vmx_msr_state *guest_msr_state, *host_msr_state;
@@ -307,6 +313,7 @@ static void vmx_restore_guest_msrs(struc
#define vmx_save_host_msrs() ((void)0)
#define vmx_restore_host_msrs() ((void)0)
+#define vmx_save_guest_msrs(v) ((void)0)
#define vmx_restore_guest_msrs(v) ((void)0)
static inline int long_mode_do_msr_read(struct cpu_user_regs *regs)
@@ -374,10 +381,7 @@ static void vmx_ctxt_switch_from(struct
{
hvm_freeze_time(v);
- /* NB. MSR_SHADOW_GS_BASE may be changed by swapgs instrucion in guest,
- * so we must save it. */
- rdmsrl(MSR_SHADOW_GS_BASE, v->arch.hvm_vmx.msr_state.shadow_gs);
-
+ vmx_save_guest_msrs(v);
vmx_restore_host_msrs();
vmx_save_dr(v);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-3.0.4-testing] [HVM][VMX] Save GS_SHADOW MSR only on x86/64.,
Xen patchbot-3.0.4-testing <=
|
|
|
|
|