From: "Jan Beulich" Subject: [PATCH v2 3/5] VMX: suppress pointless indirect calls Date: Mon, 24 Jun 2013 08:06:09 +0100 Message-ID: <51C80C0102000078000DFDB6@nat28.tlf.novell.com> References: <51C8092A02000078000DFDA0@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartE0D07BF1.3__=" Return-path: In-Reply-To: <51C8092A02000078000DFDA0@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Keir Fraser , George Dunlap , Eddie Dong , paul.durrant@citrix.com, Jun Nakajima , Yang Z Zhang List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartE0D07BF1.3__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 =20 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); } =20 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; =20 - if ( !cpu_has_vmx_virtual_intr_delivery ) - return; - if ( isr < 0 ) isr =3D 0; =20 @@ -1592,7 +1586,11 @@ const struct hvm_function_table * __init } =20 if ( !cpu_has_vmx_virtual_intr_delivery ) + { + vmx_function_table.update_eoi_exit_bitmap =3D NULL; + vmx_function_table.process_isr =3D NULL; vmx_function_table.handle_eoi =3D NULL; + } =20 if ( cpu_has_vmx_posted_intr_processing ) alloc_direct_apic_vector(&posted_intr_vector, event_check_interrup= t); --=__PartE0D07BF1.3__= Content-Type: text/plain; name="x86-VMX-vINTR-cleanup.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-VMX-vINTR-cleanup.patch" VMX: suppress pointless indirect calls=0A=0AGet the other virtual = interrupt delivery related actors in sync=0Awith the newly added handle_eoi= () one: Clear the respective pointers=0A(thus avoiding the call from = generic code) when the feature is=0Aunavailable instead of checking = feature availability in the actors.=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- a/xen/arch/x86/hvm/vmx/vmx.c=0A+++ b/xen/arch/= x86/hvm/vmx/vmx.c=0A@@ -1411,13 +1411,10 @@ static void vmx_set_info_guest(= struct vc=0A =0A static void vmx_update_eoi_exit_bitmap(struct vcpu *v, u8 = vector, u8 trig)=0A {=0A- if ( cpu_has_vmx_virtual_intr_delivery )=0A- = {=0A- if (trig)=0A- vmx_set_eoi_exit_bitmap(v, = vector);=0A- else=0A- vmx_clear_eoi_exit_bitmap(v, = vector);=0A- }=0A+ if ( trig )=0A+ vmx_set_eoi_exit_bitmap(v, = vector);=0A+ else=0A+ vmx_clear_eoi_exit_bitmap(v, vector);=0A = }=0A =0A static int vmx_virtual_intr_delivery_enabled(void)=0A@@ -1430,9 = +1427,6 @@ static void vmx_process_isr(int isr, str=0A unsigned long = status;=0A u8 old;=0A =0A- if ( !cpu_has_vmx_virtual_intr_delivery = )=0A- return;=0A-=0A if ( isr < 0 )=0A isr =3D 0;=0A = =0A@@ -1592,7 +1586,11 @@ const struct hvm_function_table * __init=0A = }=0A =0A if ( !cpu_has_vmx_virtual_intr_delivery )=0A+ {=0A+ = vmx_function_table.update_eoi_exit_bitmap =3D NULL;=0A+ vmx_function= _table.process_isr =3D NULL;=0A vmx_function_table.handle_eoi =3D = NULL;=0A+ }=0A =0A if ( cpu_has_vmx_posted_intr_processing )=0A = alloc_direct_apic_vector(&posted_intr_vector, event_check_interrupt);= =0A --=__PartE0D07BF1.3__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__PartE0D07BF1.3__=--