diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-12-11 17:49:19 +0100 |
---|---|---|
committer | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-12-11 17:49:19 +0100 |
commit | 74fa570daea059d84d8533997f79af6544f1124a (patch) | |
tree | d49f7eaf7f84aafd37770df217d5b51c0a53b273 /xen/arch/x86/hvm/svm | |
parent | e2d0f7d8c8b6989488897aa0b01305a43a6eefe7 (diff) | |
download | xen-74fa570daea059d84d8533997f79af6544f1124a.tar.gz xen-74fa570daea059d84d8533997f79af6544f1124a.tar.bz2 xen-74fa570daea059d84d8533997f79af6544f1124a.zip |
x86/IST: Create set_ist() helper function
... to save using open-coded bitwise operations, and update all IST
manipulation sites to use the function.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/arch/x86/hvm/svm')
-rw-r--r-- | xen/arch/x86/hvm/svm/svm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index c3dc048e84..55a5ae5ab5 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -869,9 +869,9 @@ static void svm_ctxt_switch_from(struct vcpu *v) svm_vmload(per_cpu(root_vmcb, cpu)); /* Resume use of ISTs now that the host TR is reinstated. */ - idt_tables[cpu][TRAP_double_fault].a |= IST_DF << 32; - idt_tables[cpu][TRAP_nmi].a |= IST_NMI << 32; - idt_tables[cpu][TRAP_machine_check].a |= IST_MCE << 32; + set_ist(&idt_tables[cpu][TRAP_double_fault], IST_DF); + set_ist(&idt_tables[cpu][TRAP_nmi], IST_NMI); + set_ist(&idt_tables[cpu][TRAP_machine_check], IST_MCE); } static void svm_ctxt_switch_to(struct vcpu *v) @@ -893,9 +893,9 @@ static void svm_ctxt_switch_to(struct vcpu *v) * Cannot use ISTs for NMI/#MC/#DF while we are running with the guest TR. * But this doesn't matter: the IST is only req'd to handle SYSCALL/SYSRET. */ - idt_tables[cpu][TRAP_double_fault].a &= ~(7UL << 32); - idt_tables[cpu][TRAP_nmi].a &= ~(7UL << 32); - idt_tables[cpu][TRAP_machine_check].a &= ~(7UL << 32); + set_ist(&idt_tables[cpu][TRAP_double_fault], IST_NONE); + set_ist(&idt_tables[cpu][TRAP_nmi], IST_NONE); + set_ist(&idt_tables[cpu][TRAP_machine_check], IST_NONE); svm_restore_dr(v); |