[xen-unstable] x86 hvm: Fix task-switch operation ordering.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen-unstable] x86 hvm: Fix task-switch operation ordering.

Xen patchbot-unstable
# HG changeset patch
# User Keir Fraser <[hidden email]>
# Date 1212162253 -3600
# Node ID 487dc63f95ff433eabb132253c5ff31cc178c00a
# Parent  9c14ba60616d63ff849067dda9958c798f3f838b
x86 hvm: Fix task-switch operation ordering.
Signed-off-by: Keir Fraser <[hidden email]>
---
 xen/arch/x86/hvm/hvm.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 9c14ba60616d -r 487dc63f95ff xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c Fri May 30 16:30:40 2008 +0100
+++ b/xen/arch/x86/hvm/hvm.c Fri May 30 16:44:13 2008 +0100
@@ -1402,13 +1402,13 @@ void hvm_task_switch(
          hvm_load_segment_selector(v, x86_seg_ldtr, tss.ldt) )
         exn_raised = 1;
 
-    if ( (tss.trace & 1) && !exn_raised )
-        hvm_inject_exception(TRAP_debug, tss_sel & 0xfff8, 0);
-
     rc = hvm_copy_to_guest_virt(
         tr.base, &tss, sizeof(tss), PFEC_page_present);
     if ( rc == HVMCOPY_bad_gva_to_gfn )
         exn_raised = 1;
+
+    if ( (tss.trace & 1) && !exn_raised )
+        hvm_inject_exception(TRAP_debug, tss_sel & 0xfff8, 0);
 
     tr.attr.fields.type = 0xb; /* busy 32-bit tss */
     hvm_set_segment_register(v, x86_seg_tr, &tr);

_______________________________________________
Xen-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog