ia64/xen-unstable

changeset 17763:487dc63f95ff

x86 hvm: Fix task-switch operation ordering.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri May 30 16:44:13 2008 +0100 (2008-05-30)
parents 9c14ba60616d
children 6e688d5a936b
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Fri May 30 16:30:40 2008 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Fri May 30 16:44:13 2008 +0100
     1.3 @@ -1402,14 +1402,14 @@ void hvm_task_switch(
     1.4           hvm_load_segment_selector(v, x86_seg_ldtr, tss.ldt) )
     1.5          exn_raised = 1;
     1.6  
     1.7 -    if ( (tss.trace & 1) && !exn_raised )
     1.8 -        hvm_inject_exception(TRAP_debug, tss_sel & 0xfff8, 0);
     1.9 -
    1.10      rc = hvm_copy_to_guest_virt(
    1.11          tr.base, &tss, sizeof(tss), PFEC_page_present);
    1.12      if ( rc == HVMCOPY_bad_gva_to_gfn )
    1.13          exn_raised = 1;
    1.14  
    1.15 +    if ( (tss.trace & 1) && !exn_raised )
    1.16 +        hvm_inject_exception(TRAP_debug, tss_sel & 0xfff8, 0);
    1.17 +
    1.18      tr.attr.fields.type = 0xb; /* busy 32-bit tss */
    1.19      hvm_set_segment_register(v, x86_seg_tr, &tr);
    1.20