diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-07-17 08:48:24 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-07-17 08:48:24 +0200 |
commit | 27815a123ad898bc4f6dd82c62b16188d6f8eef1 (patch) | |
tree | 820e2f6c5b67f443709717f7e50ca8f85c0d067b /xen/arch/x86/hvm/vmx | |
parent | 303066fdb1e4fe816e48acd665453f58b8399e81 (diff) | |
download | xen-27815a123ad898bc4f6dd82c62b16188d6f8eef1.tar.gz xen-27815a123ad898bc4f6dd82c62b16188d6f8eef1.tar.bz2 xen-27815a123ad898bc4f6dd82c62b16188d6f8eef1.zip |
VMX: suppress pointless indirect calls
Get the other virtual interrupt delivery related actors in sync
with the newly added handle_eoi() one: Clear the respective pointers
(thus avoiding the call from generic code) when the feature is
unavailable instead of checking feature availability in the actors.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Yang Zhang <yang.z.zhang@intel.com>
Diffstat (limited to 'xen/arch/x86/hvm/vmx')
-rw-r--r-- | xen/arch/x86/hvm/vmx/vmx.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 24098e468d..8ed70264c7 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -1414,13 +1414,10 @@ static void vmx_set_info_guest(struct vcpu *v) static void vmx_update_eoi_exit_bitmap(struct vcpu *v, u8 vector, u8 trig) { - if ( cpu_has_vmx_virtual_intr_delivery ) - { - if (trig) - vmx_set_eoi_exit_bitmap(v, vector); - else - vmx_clear_eoi_exit_bitmap(v, vector); - } + if ( trig ) + vmx_set_eoi_exit_bitmap(v, vector); + else + vmx_clear_eoi_exit_bitmap(v, vector); } static int vmx_virtual_intr_delivery_enabled(void) @@ -1433,9 +1430,6 @@ static void vmx_process_isr(int isr, struct vcpu *v) unsigned long status; u8 old; - if ( !cpu_has_vmx_virtual_intr_delivery ) - return; - if ( isr < 0 ) isr = 0; @@ -1595,7 +1589,11 @@ const struct hvm_function_table * __init start_vmx(void) } if ( !cpu_has_vmx_virtual_intr_delivery ) + { + vmx_function_table.update_eoi_exit_bitmap = NULL; + vmx_function_table.process_isr = NULL; vmx_function_table.handle_eoi = NULL; + } if ( cpu_has_vmx_posted_intr_processing ) alloc_direct_apic_vector(&posted_intr_vector, event_check_interrupt); |