From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2 3/5] VMX: suppress pointless indirect calls Date: Thu, 4 Jul 2013 10:10:17 +0100 Message-ID: <51D53BF9.2050201@citrix.com> References: <51C8092A02000078000DFDA0@nat28.tlf.novell.com> <51C80C0102000078000DFDB6@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0997920956163668558==" Return-path: In-Reply-To: <51C80C0102000078000DFDB6@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: Jan Beulich Cc: Keir Fraser , George Dunlap , Eddie Dong , xen-devel , paul.durrant@citrix.com, Jun Nakajima , Yang Z Zhang List-Id: xen-devel@lists.xenproject.org --===============0997920956163668558== Content-Type: multipart/alternative; boundary="------------050006050002030708060800" --------------050006050002030708060800 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 24/06/13 08:06, Jan Beulich wrote: > 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 Reviewed-by: Andrew Cooper > > --- 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); > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel --------------050006050002030708060800 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit
On 24/06/13 08:06, Jan Beulich wrote:
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>


--- 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);





_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

--------------050006050002030708060800-- --===============0997920956163668558== 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 --===============0997920956163668558==--