[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86 hvm: Improve test for wait-for-SIPI state of a target VLAPIC.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1287564996 -3600
# Node ID ac7f64d5577bccc0d87c6c7b28d7845d0279a670
# Parent  3ae2e9298cb61aacfc0dd276aaaf9395e737d2a4
x86 hvm: Improve test for wait-for-SIPI state of a target VLAPIC.

This fixes a livelock in hvmloader with credit2 scheduler, whereby an
AP can be brought online, do its work, and shut itself down, before
the BSP re-emulates the VLAPIC write that sent the SIPI. BSP then ends
up in an endless re-emulation work where it sees the target vcpu is
down, therefore schedules a tasklet, which does no work because the
vcpu is already initialised. The fix is to check v->is_initialised
rather than VPF_down, before scheduling the tasklet.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/vlapic.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 3ae2e9298cb6 -r ac7f64d5577b xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Wed Oct 20 08:41:58 2010 +0100
+++ b/xen/arch/x86/hvm/vlapic.c Wed Oct 20 09:56:36 2010 +0100
@@ -312,8 +312,8 @@ static int vlapic_accept_irq(struct vcpu
         break;
 
     case APIC_DM_STARTUP:
-        /* Nothing to do if the VCPU is not on its way down. */
-        if ( !test_bit(_VPF_down, &v->pause_flags) )
+        /* Nothing to do if the VCPU is already initialised. */
+        if ( v->is_initialised )
             break;
         rc = vlapic_schedule_init_sipi_tasklet(v, icr_low);
         break;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.