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 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -1411,13 +1411,10 @@ static void vmx_set_info_guest(struct vc 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) @@ -1430,9 +1427,6 @@ static void vmx_process_isr(int isr, str unsigned long status; u8 old; - if ( !cpu_has_vmx_virtual_intr_delivery ) - return; - if ( isr < 0 ) isr = 0; @@ -1592,7 +1586,11 @@ const struct hvm_function_table * __init } 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);