mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/hvm: Use system descriptor type names in hvm_task_switch()
... rather than magic numbers. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
228c881efc
commit
384a4d98f8
1 file changed
+3
-2
@@ -3067,7 +3067,8 @@ void hvm_task_switch(
|
||||
if ( tr.g )
|
||||
tr.limit = (tr.limit << 12) | 0xfffu;
|
||||
|
||||
if ( tr.type != ((taskswitch_reason == TSW_iret) ? 0xb : 0x9) )
|
||||
if ( tr.type != (taskswitch_reason == TSW_iret
|
||||
? SYS_DESC_tss_busy : SYS_DESC_tss_avail) )
|
||||
{
|
||||
hvm_inject_hw_exception(
|
||||
(taskswitch_reason == TSW_iret) ? X86_EXC_TS : X86_EXC_GP,
|
||||
@@ -3193,7 +3194,7 @@ void hvm_task_switch(
|
||||
goto out;
|
||||
}
|
||||
|
||||
tr.type = 0xb; /* busy 32-bit tss */
|
||||
tr.type = SYS_DESC_tss_busy;
|
||||
hvm_set_segment_register(v, x86_seg_tss, &tr);
|
||||
|
||||
v->arch.hvm.guest_cr[0] |= X86_CR0_TS;
|
||||
|
||||