xen/23724-x86-smpboot-x2apic.patch
Charles Arnold 800917b5a2 - bnc#717650 - Unable to start VM
- Update to Xen 4.1.2_rc2 c/s 23152

- bnc#716695 - domUs using tap devices will not start
  updated multi-xvdp.patch

- Upstream patches from Jan
  23803-intel-pmu-models.patch
  23800-x86_64-guest-addr-range.patch
  23795-intel-ich10-quirk.patch
  23804-x86-IPI-counts.patch 

- bnc#706106 - Inconsistent reporting of VM names during migration
  xend-migration-domname-fix.patch

- bnc#712823 - L3:Xen guest does not start reliable when rebooted
  xend-vcpu-affinity-fix.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=143
2011-09-15 21:43:21 +00:00

108 lines
3.5 KiB
Diff

# HG changeset patch
# User Tim Deegan <Tim.Deegan@citrix.com>
# Date 1311081181 -3600
# Node ID b3434f24b0827c5ef34e4b4a72893288e2ffbe40
# Parent 18653a163b1e8e10b4353272bcb9e8302bfd2e19
x86: Remove timeouts from INIT-SIPI-SIPI sequence when using x2apic.
Some of the timeouts are pointless since they're waiting for the ICR
to ack the IPI delivery and that doesn't happen on x2apic.
The others should be benign (and are suggested in the SDM) but
removing them makes AP bringup much more reliable on some test boxes.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Index: xen-4.1.2-testing/xen/arch/x86/smpboot.c
===================================================================
--- xen-4.1.2-testing.orig/xen/arch/x86/smpboot.c
+++ xen-4.1.2-testing/xen/arch/x86/smpboot.c
@@ -447,29 +447,30 @@ static int wakeup_secondary_cpu(int phys
apic_icr_write(APIC_INT_LEVELTRIG | APIC_INT_ASSERT | APIC_DM_INIT,
phys_apicid);
- Dprintk("Waiting for send to finish...\n");
- timeout = 0;
- do {
- Dprintk("+");
- udelay(100);
- if ( !x2apic_enabled )
+ if ( !x2apic_enabled )
+ {
+ Dprintk("Waiting for send to finish...\n");
+ timeout = 0;
+ do {
+ Dprintk("+");
+ udelay(100);
send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
- } while ( send_status && (timeout++ < 1000) );
+ } while ( send_status && (timeout++ < 1000) );
- mdelay(10);
+ mdelay(10);
- Dprintk("Deasserting INIT.\n");
+ Dprintk("Deasserting INIT.\n");
- apic_icr_write(APIC_INT_LEVELTRIG | APIC_DM_INIT, phys_apicid);
+ apic_icr_write(APIC_INT_LEVELTRIG | APIC_DM_INIT, phys_apicid);
- Dprintk("Waiting for send to finish...\n");
- timeout = 0;
- do {
- Dprintk("+");
- udelay(100);
- if ( !x2apic_enabled )
+ Dprintk("Waiting for send to finish...\n");
+ timeout = 0;
+ do {
+ Dprintk("+");
+ udelay(100);
send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
- } while ( send_status && (timeout++ < 1000) );
+ } while ( send_status && (timeout++ < 1000) );
+ }
/*
* Should we send STARTUP IPIs ?
@@ -498,22 +499,24 @@ static int wakeup_secondary_cpu(int phys
*/
apic_icr_write(APIC_DM_STARTUP | (start_eip >> 12), phys_apicid);
- /* Give the other CPU some time to accept the IPI. */
- udelay(300);
-
- Dprintk("Startup point 1.\n");
-
- Dprintk("Waiting for send to finish...\n");
- timeout = 0;
- do {
- Dprintk("+");
- udelay(100);
- if ( !x2apic_enabled )
- send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
- } while ( send_status && (timeout++ < 1000) );
-
- /* Give the other CPU some time to accept the IPI. */
- udelay(200);
+ if ( !x2apic_enabled )
+ {
+ /* Give the other CPU some time to accept the IPI. */
+ udelay(300);
+
+ Dprintk("Startup point 1.\n");
+
+ Dprintk("Waiting for send to finish...\n");
+ timeout = 0;
+ do {
+ Dprintk("+");
+ udelay(100);
+ send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
+ } while ( send_status && (timeout++ < 1000) );
+
+ /* Give the other CPU some time to accept the IPI. */
+ udelay(200);
+ }
/* Due to the Pentium erratum 3AP. */
if ( maxlvt > 3 )