WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86 hvm: Improve test for wait-for-SIPI s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 hvm: Improve test for wait-for-SIPI state of a target VLAPIC.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Oct 2010 02:05:18 -0700
Delivery-date: Thu, 21 Oct 2010 02:05:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 hvm: Improve test for wait-for-SIPI state of a target VLAPIC., Xen patchbot-unstable <=