ia64/xen-unstable

changeset 15990:d4511c625a50

hvm: Fix task switch update of TR state.
Also remove unneeded duplicate paging_update_cr3().
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Wed Sep 26 16:50:28 2007 +0100 (2007-09-26)
parents 69879c7bf4b5
children 0b04a48f65cc
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Wed Sep 26 14:39:56 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Wed Sep 26 16:50:28 2007 +0100
     1.3 @@ -943,9 +943,11 @@ void hvm_task_switch(
     1.4      tr.base = (((tss_desc.b <<  0) & 0xff000000u) |
     1.5                 ((tss_desc.b << 16) & 0x00ff0000u) |
     1.6                 ((tss_desc.a >> 16) & 0x0000ffffu));
     1.7 +    tr.attr.bytes = (((tss_desc.b >>  8) & 0x00ffu) |
     1.8 +                     ((tss_desc.b >> 12) & 0x0f00u));
     1.9      tr.limit = (tss_desc.b & 0x000f0000u) | (tss_desc.a & 0x0000ffffu);
    1.10 -    tr.attr.bytes = (((tss_desc.b >>  8) & 0x00ffu) |
    1.11 -                     ((tss_desc.b >> 20) & 0x0f00u));
    1.12 +    if ( tr.attr.fields.g )
    1.13 +        tr.limit = (tr.limit << 12) | 0xfffu;
    1.14  
    1.15      if ( !tr.attr.fields.p )
    1.16      {
    1.17 @@ -1048,7 +1050,6 @@ void hvm_task_switch(
    1.18  
    1.19      tr.attr.fields.type = 0xb; /* busy 32-bit tss */
    1.20      hvm_set_segment_register(v, x86_seg_tr, &tr);
    1.21 -    paging_update_cr3(v);
    1.22  
    1.23      v->arch.hvm_vcpu.guest_cr[0] |= X86_CR0_TS;
    1.24      hvm_update_guest_cr(v, 0);