VMX: constrain vmx_intr_assist() debugging code to debug builds
authorJan Beulich <jbeulich@suse.com>
Mon, 8 May 2017 11:36:28 +0000 (13:36 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 8 May 2017 11:36:28 +0000 (13:36 +0200)
This is because that code, added by commit 997382b771 ("y86/vmx: dump
PIR and vIRR before ASSERT()"), was meant to be removed by the time we
finalize 4.9, but the root cause of the ASSERT() wrongly(?) triggering
still wasn't found.

Take the opportunity and also correct the format specifiers, which I
had got wrong when editing said change while committing.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Release-Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/x86/hvm/vmx/intr.c

index 1eb9f386750bcdf16ef07506c064f828e51afc8c..e1d0190ca90afa79e2709b0199b268553241f3e1 100644 (file)
@@ -318,6 +318,7 @@ void vmx_intr_assist(void)
         */
         if ( pt_vector != -1 )
         {
+#ifndef NDEBUG
             /*
              * We assert that intack.vector is the highest priority vector for
              * only an interrupt from vlapic can reach this point and the
@@ -334,7 +335,7 @@ void vmx_intr_assist(void)
                 const uint32_t *word;
                 unsigned int i;
 
-                printk(XENLOG_ERR "%pv: intack: %02x:%u pt: %02x\n",
+                printk(XENLOG_ERR "%pv: intack: %u:%02x pt: %02x\n",
                        current, intack.source, intack.vector, pt_vector);
 
                 vlapic = vcpu_vlapic(v);
@@ -357,6 +358,7 @@ void vmx_intr_assist(void)
                     printk("\n");
                 }
             }
+#endif
             ASSERT(intack.vector >= pt_vector);
             vmx_set_eoi_exit_bitmap(v, intack.vector);
         }