From xen-changelog-bounces@lists.xen.org Wed Aug 01 00:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 00:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwMha-0005co-11; Wed, 01 Aug 2012 00:22:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhY-0005cW-OZ
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:12 +0000
Received: from [85.158.138.51:44511] by server-7.bemta-3.messagelabs.com id
	30/B8-21158-3B678105; Wed, 01 Aug 2012 00:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-174.messagelabs.com!1343780530!29750693!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=2.0 required=7.0 tests=SUBJECT_RANDOMQ
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13482 invoked from network); 1 Aug 2012 00:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 00:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhV-0004Ob-Mp
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhV-0000M9-F1
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:09 +0000
Message-Id: <E1SwMhV-0000M9-F1@xenbits.xen.org>
Date: Wed, 01 Aug 2012 00:22:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86: fix off-by-one in
	nr_irqs_gsi calculation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1343651987 -3600
# Node ID 6d7ae840463c5d6d15c710199b3f4b2bb2a33000
# Parent  58516d1a539e166e20472ade13bdef6b4ed016fa
x86: fix off-by-one in nr_irqs_gsi calculation

highest_gsi() returns the last valid GSI, not a count.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Joe Jin <joe.jin@oracle.com>
Acked-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   25688:e6266fc76d08
xen-unstable date:        Fri Jul 27 12:22:13 2012 +0200
---


diff -r 58516d1a539e -r 6d7ae840463c xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c	Mon Jul 30 13:39:31 2012 +0100
+++ b/xen/arch/x86/io_apic.c	Mon Jul 30 13:39:47 2012 +0100
@@ -2589,7 +2589,7 @@ void __init init_ioapic_mappings(void)
         }
     }
 
-    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi());
+    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi() + 1);
 
     if ( !smp_found_config || skip_ioapic_setup || nr_irqs_gsi < 16 )
         nr_irqs_gsi = 16;

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 00:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 00:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwMhZ-0005cj-Um; Wed, 01 Aug 2012 00:22:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhY-0005cU-5b
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:12 +0000
Received: from [85.158.139.83:37931] by server-2.bemta-5.messagelabs.com id
	C5/C2-04598-3B678105; Wed, 01 Aug 2012 00:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-182.messagelabs.com!1343780529!29620200!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24647 invoked from network); 1 Aug 2012 00:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 00:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhV-0004OX-5B
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhV-0000Lt-0M
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:09 +0000
Message-Id: <E1SwMhV-0000Lt-0M@xenbits.xen.org>
Date: Wed, 01 Aug 2012 00:22:08 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] vt-d: fix wrong addr in IOTLB
	invalidation descriptor
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Yang Zhang <yang.z.zhang@Intel.com>
# Date 1343651971 -3600
# Node ID 58516d1a539e166e20472ade13bdef6b4ed016fa
# Parent  79aaaf1e89ba5451374ab7dd3b7ca927282a4bd1
vt-d: fix wrong addr in IOTLB invalidation descriptor

According to vt-d specs, the addr in IOTLB invalidation descriptor
should be 4K page aligned.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Committed-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   25617:75eb78d6cf54
xen-unstable date:        Thu Jul 19 15:46:02 2012 +0100
---


diff -r 79aaaf1e89ba -r 58516d1a539e xen/drivers/passthrough/vtd/qinval.c
--- a/xen/drivers/passthrough/vtd/qinval.c	Mon Jul 30 13:34:57 2012 +0100
+++ b/xen/drivers/passthrough/vtd/qinval.c	Mon Jul 30 13:39:31 2012 +0100
@@ -140,7 +140,7 @@ static int gen_iotlb_inv_dsc(struct iomm
     qinval_entry->q.iotlb_inv_dsc.hi.am = am;
     qinval_entry->q.iotlb_inv_dsc.hi.ih = ih;
     qinval_entry->q.iotlb_inv_dsc.hi.res_1 = 0;
-    qinval_entry->q.iotlb_inv_dsc.hi.addr = addr;
+    qinval_entry->q.iotlb_inv_dsc.hi.addr = addr >> PAGE_SHIFT_4K;
 
     unmap_vtd_domain_page(qinval_entries);
     spin_unlock_irqrestore(&qi_ctrl->qinval_lock, flags);

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 00:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 00:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwMha-0005co-11; Wed, 01 Aug 2012 00:22:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhY-0005cW-OZ
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:12 +0000
Received: from [85.158.138.51:44511] by server-7.bemta-3.messagelabs.com id
	30/B8-21158-3B678105; Wed, 01 Aug 2012 00:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-174.messagelabs.com!1343780530!29750693!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=2.0 required=7.0 tests=SUBJECT_RANDOMQ
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13482 invoked from network); 1 Aug 2012 00:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 00:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhV-0004Ob-Mp
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhV-0000M9-F1
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:09 +0000
Message-Id: <E1SwMhV-0000M9-F1@xenbits.xen.org>
Date: Wed, 01 Aug 2012 00:22:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] x86: fix off-by-one in
	nr_irqs_gsi calculation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1343651987 -3600
# Node ID 6d7ae840463c5d6d15c710199b3f4b2bb2a33000
# Parent  58516d1a539e166e20472ade13bdef6b4ed016fa
x86: fix off-by-one in nr_irqs_gsi calculation

highest_gsi() returns the last valid GSI, not a count.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Joe Jin <joe.jin@oracle.com>
Acked-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   25688:e6266fc76d08
xen-unstable date:        Fri Jul 27 12:22:13 2012 +0200
---


diff -r 58516d1a539e -r 6d7ae840463c xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c	Mon Jul 30 13:39:31 2012 +0100
+++ b/xen/arch/x86/io_apic.c	Mon Jul 30 13:39:47 2012 +0100
@@ -2589,7 +2589,7 @@ void __init init_ioapic_mappings(void)
         }
     }
 
-    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi());
+    nr_irqs_gsi = max(nr_irqs_gsi, highest_gsi() + 1);
 
     if ( !smp_found_config || skip_ioapic_setup || nr_irqs_gsi < 16 )
         nr_irqs_gsi = 16;

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 00:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 00:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwMhZ-0005cj-Um; Wed, 01 Aug 2012 00:22:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhY-0005cU-5b
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:12 +0000
Received: from [85.158.139.83:37931] by server-2.bemta-5.messagelabs.com id
	C5/C2-04598-3B678105; Wed, 01 Aug 2012 00:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-182.messagelabs.com!1343780529!29620200!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24647 invoked from network); 1 Aug 2012 00:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 00:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhV-0004OX-5B
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhV-0000Lt-0M
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:09 +0000
Message-Id: <E1SwMhV-0000Lt-0M@xenbits.xen.org>
Date: Wed, 01 Aug 2012 00:22:08 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] vt-d: fix wrong addr in IOTLB
	invalidation descriptor
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Yang Zhang <yang.z.zhang@Intel.com>
# Date 1343651971 -3600
# Node ID 58516d1a539e166e20472ade13bdef6b4ed016fa
# Parent  79aaaf1e89ba5451374ab7dd3b7ca927282a4bd1
vt-d: fix wrong addr in IOTLB invalidation descriptor

According to vt-d specs, the addr in IOTLB invalidation descriptor
should be 4K page aligned.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Committed-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   25617:75eb78d6cf54
xen-unstable date:        Thu Jul 19 15:46:02 2012 +0100
---


diff -r 79aaaf1e89ba -r 58516d1a539e xen/drivers/passthrough/vtd/qinval.c
--- a/xen/drivers/passthrough/vtd/qinval.c	Mon Jul 30 13:34:57 2012 +0100
+++ b/xen/drivers/passthrough/vtd/qinval.c	Mon Jul 30 13:39:31 2012 +0100
@@ -140,7 +140,7 @@ static int gen_iotlb_inv_dsc(struct iomm
     qinval_entry->q.iotlb_inv_dsc.hi.am = am;
     qinval_entry->q.iotlb_inv_dsc.hi.ih = ih;
     qinval_entry->q.iotlb_inv_dsc.hi.res_1 = 0;
-    qinval_entry->q.iotlb_inv_dsc.hi.addr = addr;
+    qinval_entry->q.iotlb_inv_dsc.hi.addr = addr >> PAGE_SHIFT_4K;
 
     unmap_vtd_domain_page(qinval_entries);
     spin_unlock_irqrestore(&qi_ctrl->qinval_lock, flags);

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 00:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 00:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwMhe-0005d4-3l; Wed, 01 Aug 2012 00:22:18 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhc-0005cS-FZ
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1343780529!1742183!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7912 invoked from network); 1 Aug 2012 00:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 00:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhU-0004OV-Ta
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhU-0000Le-Ds
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:08 +0000
Message-Id: <E1SwMhU-0000Le-Ds@xenbits.xen.org>
Date: Wed, 01 Aug 2012 00:22:07 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Update Xen version to
	4.0.4-rc4-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1343651697 -3600
# Node ID 79aaaf1e89ba5451374ab7dd3b7ca927282a4bd1
# Parent  82fcf3a5dc3aafc5be375d52a901e00ecbe01fa4
Update Xen version to 4.0.4-rc4-pre
---


diff -r 82fcf3a5dc3a -r 79aaaf1e89ba xen/Makefile
--- a/xen/Makefile	Thu Jul 26 16:57:18 2012 +0100
+++ b/xen/Makefile	Mon Jul 30 13:34:57 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 0
-export XEN_EXTRAVERSION ?= .4-rc3$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4-rc4-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 00:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 00:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwMhe-0005d4-3l; Wed, 01 Aug 2012 00:22:18 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhc-0005cS-FZ
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1343780529!1742183!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7912 invoked from network); 1 Aug 2012 00:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 00:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhU-0004OV-Ta
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwMhU-0000Le-Ds
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 00:22:08 +0000
Message-Id: <E1SwMhU-0000Le-Ds@xenbits.xen.org>
Date: Wed, 01 Aug 2012 00:22:07 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Update Xen version to
	4.0.4-rc4-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1343651697 -3600
# Node ID 79aaaf1e89ba5451374ab7dd3b7ca927282a4bd1
# Parent  82fcf3a5dc3aafc5be375d52a901e00ecbe01fa4
Update Xen version to 4.0.4-rc4-pre
---


diff -r 82fcf3a5dc3a -r 79aaaf1e89ba xen/Makefile
--- a/xen/Makefile	Thu Jul 26 16:57:18 2012 +0100
+++ b/xen/Makefile	Mon Jul 30 13:34:57 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 0
-export XEN_EXTRAVERSION ?= .4-rc3$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4-rc4-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCH-0008RD-1U; Wed, 01 Aug 2012 21:11:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0008Qv-QH
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from [85.158.143.99:2561] by server-2.bemta-4.messagelabs.com id
	46/9D-17938-F6B99105; Wed, 01 Aug 2012 21:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1343855469!26461018!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15030 invoked from network); 1 Aug 2012 21:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0004xB-0m
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCC-0000wW-By
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:08 +0000
Message-Id: <E1SwgCC-0000wW-By@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Some automatic NUMA placement
	documentation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1343821606 -3600
# Node ID f4b5a21f93add32ff66494ed2a8605abbabec309
# Parent  cf0e661cb321b1c898c9008dc17ba21db434c976
Some automatic NUMA placement documentation

About rationale, usage and (some small bits of) API.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r cf0e661cb321 -r f4b5a21f93ad docs/misc/xl-numa-placement.markdown
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/misc/xl-numa-placement.markdown	Wed Aug 01 12:46:46 2012 +0100
@@ -0,0 +1,111 @@
+# Guest Automatic NUMA Placement in libxl and xl #
+
+## Rationale ##
+
+NUMA (which stands for Non-Uniform Memory Access) means that the memory
+accessing times of a program running on a CPU depends on the relative
+distance between that CPU and that memory. In fact, most of the NUMA
+systems are built in such a way that each processor has its local memory,
+on which it can operate very fast. On the other hand, getting and storing
+data from and on remote memory (that is, memory local to some other processor)
+is quite more complex and slow. On these machines, a NUMA node is usually
+defined as a set of processor cores (typically a physical CPU package) and
+the memory directly attached to the set of cores.
+
+The Xen hypervisor deals with NUMA machines by assigning to each domain
+a "node affinity", i.e., a set of NUMA nodes of the host from which they
+get their memory allocated.
+
+NUMA awareness becomes very important as soon as many domains start
+running memory-intensive workloads on a shared host. In fact, the cost
+of accessing non node-local memory locations is very high, and the
+performance degradation is likely to be noticeable.
+
+## Guest Placement in xl ##
+
+If using xl for creating and managing guests, it is very easy to ask for
+both manual or automatic placement of them across the host's NUMA nodes.
+
+Note that xm/xend does the very same thing, the only differences residing
+in the details of the heuristics adopted for the placement (see below).
+
+### Manual Guest Placement with xl ###
+
+Thanks to the "cpus=" option, it is possible to specify where a domain
+should be created and scheduled on, directly in its config file. This
+affects NUMA placement and memory accesses as the hypervisor constructs
+the node affinity of a VM basing right on its CPU affinity when it is
+created.
+
+This is very simple and effective, but requires the user/system
+administrator to explicitly specify affinities for each and every domain,
+or Xen won't be able to guarantee the locality for their memory accesses.
+
+It is also possible to deal with NUMA by partitioning the system using
+cpupools. Again, this could be "The Right Answer" for many needs and
+occasions, but has to be carefully considered and setup by hand.
+
+### Automatic Guest Placement with xl ###
+
+If no "cpus=" option is specified in the config file, libxl tries
+to figure out on its own on which node(s) the domain could fit best.
+It is worthwhile noting that optimally fitting a set of VMs on the NUMA
+nodes of an host is an incarnation of the Bin Packing Problem. In fact,
+the various VMs with different memory sizes are the items to be packed,
+and the host nodes are the bins. As such problem is known to be NP-hard,
+we will be using some heuristics.
+
+The first thing to do is find the nodes or the sets of nodes (from now
+on referred to as 'candidates') that have enough free memory and enough
+physical CPUs for accommodating the new domain. The idea is to find a
+spot for the domain with at least as much free memory as it has configured
+to have, and as much pCPUs as it has vCPUs.  After that, the actual
+decision on which candidate to pick happens accordingly to the following
+heuristics:
+
+  *  candidates involving fewer nodes are considered better. In case
+     two (or more) candidates span the same number of nodes,
+  *  candidates with a smaller number of vCPUs runnable on them (due
+     to previous placement and/or plain vCPU pinning) are considered
+     better. In case the same number of vCPUs can run on two (or more)
+     candidates,
+  *  the candidate with with the greatest amount of free memory is
+     considered to be the best one.
+
+Giving preference to candidates with fewer nodes ensures better
+performance for the guest, as it avoid spreading its memory among
+different nodes. Favoring candidates with fewer vCPUs already runnable
+there ensures a good balance of the overall host load. Finally, if more
+candidates fulfil these criteria, prioritizing the nodes that have the
+largest amounts of free memory helps keeping the memory fragmentation
+small, and maximizes the probability of being able to put more domains
+there.
+
+## Guest Placement within libxl ##
+
+xl achieves automatic NUMA placement because that is what libxl does
+by default. No API is provided (yet) for modifying the behaviour of
+the placement algorithm. However, if your program is calling libxl,
+it is possible to set the `numa_placement` build info key to `false`
+(it is `true` by default) with something like the below, to prevent
+any placement from happening:
+
+    libxl_defbool_set(&domain_build_info->numa_placement, false);
+
+Also, if `numa_placement` is set to `true`, the domain must not
+have any cpu affinity (i.e., `domain_build_info->cpumap` must
+have all its bits set, as it is by default), or domain creation
+will fail returning `ERROR_INVAL`.
+
+Besides than that, looking and/or tweaking the placement algorithm
+search "Automatic NUMA placement" in libxl\_internal.h.
+
+Note this may change in future versions of Xen/libxl.
+
+## Limitations ##
+
+Analyzing various possible placement solutions is what makes the
+algorithm flexible and quite effective. However, that also means
+it won't scale well to systems with arbitrary number of nodes.
+For this reason, automatic placement is disabled (with a warning)
+if it is requested on a host with more than 16 NUMA nodes.

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCH-0008RN-75; Wed, 01 Aug 2012 21:11:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0008Qx-GH
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from [85.158.143.99:2591] by server-3.bemta-4.messagelabs.com id
	C3/3D-01511-F6B99105; Wed, 01 Aug 2012 21:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-216.messagelabs.com!1343855470!22787489!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22584 invoked from network); 1 Aug 2012 21:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0004xH-Va
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0000x0-O8
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Message-Id: <E1SwgCD-0000x0-O8@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: call hotplug scripts from xl
	for NetBSD
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Roger Pau Monne <roger.pau@citrix.com>
# Date 1343821607 -3600
# Node ID 84a78045e701ad743bcd369acbae6d0fb258a0f8
# Parent  e20085770cb556940d41b8f6ef8f860787da88bf
libxl: call hotplug scripts from xl for NetBSD

Add the missing NetBSD functions to call hotplug scripts, and disable
xenbackendd if libxl/disable_udev is not set.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r e20085770cb5 -r 84a78045e701 tools/libxl/libxl_netbsd.c
--- a/tools/libxl/libxl_netbsd.c	Wed Aug 01 12:46:47 2012 +0100
+++ b/tools/libxl/libxl_netbsd.c	Wed Aug 01 12:46:47 2012 +0100
@@ -32,10 +32,65 @@ char *libxl__devid_to_localdev(libxl__gc
 }
 
 /* Hotplug scripts caller functions */
+static int libxl__hotplug(libxl__gc *gc, libxl__device *dev, char ***args,
+                          libxl__device_action action)
+{
+    char *be_path = libxl__device_backend_path(gc, dev);
+    char *script;
+    int nr = 0, rc = 0, arraysize = 4;
+
+    script = libxl__xs_read(gc, XBT_NULL,
+                            GCSPRINTF("%s/%s", be_path, "script"));
+    if (!script) {
+        LOGEV(ERROR, errno, "unable to read script from %s", be_path);
+        rc = ERROR_FAIL;
+        goto out;
+    }
+
+    GCNEW_ARRAY(*args, arraysize);
+    (*args)[nr++] = script;
+    (*args)[nr++] = be_path;
+    (*args)[nr++] = GCSPRINTF("%d", action == DEVICE_CONNECT ?
+                                    XenbusStateInitWait : XenbusStateClosed);
+    (*args)[nr++] = NULL;
+    assert(nr == arraysize);
+
+out:
+    return rc;
+}
+
 int libxl__get_hotplug_script_info(libxl__gc *gc, libxl__device *dev,
                                    char ***args, char ***env,
                                    libxl__device_action action,
                                    int num_exec)
 {
-    return 0;
+    char *disable_udev = libxl__xs_read(gc, XBT_NULL, DISABLE_UDEV_PATH);
+    int rc;
+
+    /* Check if we have to run hotplug scripts */
+    if (!disable_udev || num_exec > 0) {
+        rc = 0;
+        goto out;
+    }
+
+    switch (dev->backend_kind) {
+    case LIBXL__DEVICE_KIND_VBD:
+    case LIBXL__DEVICE_KIND_VIF:
+        if (num_exec != 0) {
+            rc = 0;
+            goto out;
+        }
+        rc = libxl__hotplug(gc, dev, args, action);
+        if (!rc) rc = 1;
+        break;
+    default:
+        /* If no need to execute any hotplug scripts,
+         * call the callback manually
+         */
+        rc = 0;
+        break;
+    }
+
+out:
+    return rc;
 }
diff -r e20085770cb5 -r 84a78045e701 tools/xenbackendd/xenbackendd.c
--- a/tools/xenbackendd/xenbackendd.c	Wed Aug 01 12:46:47 2012 +0100
+++ b/tools/xenbackendd/xenbackendd.c	Wed Aug 01 12:46:47 2012 +0100
@@ -33,6 +33,7 @@
 #define DEVTYPE_UNKNOWN 0
 #define DEVTYPE_VIF 1
 #define DEVTYPE_VBD 2
+#define DISABLE_EXEC "libxl/disable_udev"
 
 #define DOMAIN_PATH "/local/domain/0"
 
@@ -149,7 +150,7 @@ main(int argc, char * const argv[])
 	unsigned int num;
 	char *s;
 	int state;
-	char *sstate;
+	char *sstate, *sdisable;
 	char *p;
 	char buf[80];
 	int type;
@@ -245,6 +246,10 @@ main(int argc, char * const argv[])
 			continue;
 		}
 
+		sdisable = xs_read(xs, XBT_NULL, DISABLE_EXEC, 0);
+		if (sdisable)
+			goto next1;
+
 		if (strlen(vec[XS_WATCH_PATH]) < sizeof("state"))
 			goto next1;
 
@@ -314,6 +319,7 @@ next2:
 		free(sstate);
 
 next1:
+		free(sdisable);
 		free(vec);
 	}
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCH-0008RD-1U; Wed, 01 Aug 2012 21:11:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0008Qv-QH
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from [85.158.143.99:2561] by server-2.bemta-4.messagelabs.com id
	46/9D-17938-F6B99105; Wed, 01 Aug 2012 21:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1343855469!26461018!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15030 invoked from network); 1 Aug 2012 21:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0004xB-0m
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCC-0000wW-By
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:08 +0000
Message-Id: <E1SwgCC-0000wW-By@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Some automatic NUMA placement
	documentation
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dario Faggioli <dario.faggioli@citrix.com>
# Date 1343821606 -3600
# Node ID f4b5a21f93add32ff66494ed2a8605abbabec309
# Parent  cf0e661cb321b1c898c9008dc17ba21db434c976
Some automatic NUMA placement documentation

About rationale, usage and (some small bits of) API.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r cf0e661cb321 -r f4b5a21f93ad docs/misc/xl-numa-placement.markdown
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/misc/xl-numa-placement.markdown	Wed Aug 01 12:46:46 2012 +0100
@@ -0,0 +1,111 @@
+# Guest Automatic NUMA Placement in libxl and xl #
+
+## Rationale ##
+
+NUMA (which stands for Non-Uniform Memory Access) means that the memory
+accessing times of a program running on a CPU depends on the relative
+distance between that CPU and that memory. In fact, most of the NUMA
+systems are built in such a way that each processor has its local memory,
+on which it can operate very fast. On the other hand, getting and storing
+data from and on remote memory (that is, memory local to some other processor)
+is quite more complex and slow. On these machines, a NUMA node is usually
+defined as a set of processor cores (typically a physical CPU package) and
+the memory directly attached to the set of cores.
+
+The Xen hypervisor deals with NUMA machines by assigning to each domain
+a "node affinity", i.e., a set of NUMA nodes of the host from which they
+get their memory allocated.
+
+NUMA awareness becomes very important as soon as many domains start
+running memory-intensive workloads on a shared host. In fact, the cost
+of accessing non node-local memory locations is very high, and the
+performance degradation is likely to be noticeable.
+
+## Guest Placement in xl ##
+
+If using xl for creating and managing guests, it is very easy to ask for
+both manual or automatic placement of them across the host's NUMA nodes.
+
+Note that xm/xend does the very same thing, the only differences residing
+in the details of the heuristics adopted for the placement (see below).
+
+### Manual Guest Placement with xl ###
+
+Thanks to the "cpus=" option, it is possible to specify where a domain
+should be created and scheduled on, directly in its config file. This
+affects NUMA placement and memory accesses as the hypervisor constructs
+the node affinity of a VM basing right on its CPU affinity when it is
+created.
+
+This is very simple and effective, but requires the user/system
+administrator to explicitly specify affinities for each and every domain,
+or Xen won't be able to guarantee the locality for their memory accesses.
+
+It is also possible to deal with NUMA by partitioning the system using
+cpupools. Again, this could be "The Right Answer" for many needs and
+occasions, but has to be carefully considered and setup by hand.
+
+### Automatic Guest Placement with xl ###
+
+If no "cpus=" option is specified in the config file, libxl tries
+to figure out on its own on which node(s) the domain could fit best.
+It is worthwhile noting that optimally fitting a set of VMs on the NUMA
+nodes of an host is an incarnation of the Bin Packing Problem. In fact,
+the various VMs with different memory sizes are the items to be packed,
+and the host nodes are the bins. As such problem is known to be NP-hard,
+we will be using some heuristics.
+
+The first thing to do is find the nodes or the sets of nodes (from now
+on referred to as 'candidates') that have enough free memory and enough
+physical CPUs for accommodating the new domain. The idea is to find a
+spot for the domain with at least as much free memory as it has configured
+to have, and as much pCPUs as it has vCPUs.  After that, the actual
+decision on which candidate to pick happens accordingly to the following
+heuristics:
+
+  *  candidates involving fewer nodes are considered better. In case
+     two (or more) candidates span the same number of nodes,
+  *  candidates with a smaller number of vCPUs runnable on them (due
+     to previous placement and/or plain vCPU pinning) are considered
+     better. In case the same number of vCPUs can run on two (or more)
+     candidates,
+  *  the candidate with with the greatest amount of free memory is
+     considered to be the best one.
+
+Giving preference to candidates with fewer nodes ensures better
+performance for the guest, as it avoid spreading its memory among
+different nodes. Favoring candidates with fewer vCPUs already runnable
+there ensures a good balance of the overall host load. Finally, if more
+candidates fulfil these criteria, prioritizing the nodes that have the
+largest amounts of free memory helps keeping the memory fragmentation
+small, and maximizes the probability of being able to put more domains
+there.
+
+## Guest Placement within libxl ##
+
+xl achieves automatic NUMA placement because that is what libxl does
+by default. No API is provided (yet) for modifying the behaviour of
+the placement algorithm. However, if your program is calling libxl,
+it is possible to set the `numa_placement` build info key to `false`
+(it is `true` by default) with something like the below, to prevent
+any placement from happening:
+
+    libxl_defbool_set(&domain_build_info->numa_placement, false);
+
+Also, if `numa_placement` is set to `true`, the domain must not
+have any cpu affinity (i.e., `domain_build_info->cpumap` must
+have all its bits set, as it is by default), or domain creation
+will fail returning `ERROR_INVAL`.
+
+Besides than that, looking and/or tweaking the placement algorithm
+search "Automatic NUMA placement" in libxl\_internal.h.
+
+Note this may change in future versions of Xen/libxl.
+
+## Limitations ##
+
+Analyzing various possible placement solutions is what makes the
+algorithm flexible and quite effective. However, that also means
+it won't scale well to systems with arbitrary number of nodes.
+For this reason, automatic placement is disabled (with a warning)
+if it is requested on a host with more than 16 NUMA nodes.

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCH-0008RN-75; Wed, 01 Aug 2012 21:11:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0008Qx-GH
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from [85.158.143.99:2591] by server-3.bemta-4.messagelabs.com id
	C3/3D-01511-F6B99105; Wed, 01 Aug 2012 21:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-216.messagelabs.com!1343855470!22787489!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22584 invoked from network); 1 Aug 2012 21:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0004xH-Va
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0000x0-O8
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Message-Id: <E1SwgCD-0000x0-O8@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: call hotplug scripts from xl
	for NetBSD
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Roger Pau Monne <roger.pau@citrix.com>
# Date 1343821607 -3600
# Node ID 84a78045e701ad743bcd369acbae6d0fb258a0f8
# Parent  e20085770cb556940d41b8f6ef8f860787da88bf
libxl: call hotplug scripts from xl for NetBSD

Add the missing NetBSD functions to call hotplug scripts, and disable
xenbackendd if libxl/disable_udev is not set.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r e20085770cb5 -r 84a78045e701 tools/libxl/libxl_netbsd.c
--- a/tools/libxl/libxl_netbsd.c	Wed Aug 01 12:46:47 2012 +0100
+++ b/tools/libxl/libxl_netbsd.c	Wed Aug 01 12:46:47 2012 +0100
@@ -32,10 +32,65 @@ char *libxl__devid_to_localdev(libxl__gc
 }
 
 /* Hotplug scripts caller functions */
+static int libxl__hotplug(libxl__gc *gc, libxl__device *dev, char ***args,
+                          libxl__device_action action)
+{
+    char *be_path = libxl__device_backend_path(gc, dev);
+    char *script;
+    int nr = 0, rc = 0, arraysize = 4;
+
+    script = libxl__xs_read(gc, XBT_NULL,
+                            GCSPRINTF("%s/%s", be_path, "script"));
+    if (!script) {
+        LOGEV(ERROR, errno, "unable to read script from %s", be_path);
+        rc = ERROR_FAIL;
+        goto out;
+    }
+
+    GCNEW_ARRAY(*args, arraysize);
+    (*args)[nr++] = script;
+    (*args)[nr++] = be_path;
+    (*args)[nr++] = GCSPRINTF("%d", action == DEVICE_CONNECT ?
+                                    XenbusStateInitWait : XenbusStateClosed);
+    (*args)[nr++] = NULL;
+    assert(nr == arraysize);
+
+out:
+    return rc;
+}
+
 int libxl__get_hotplug_script_info(libxl__gc *gc, libxl__device *dev,
                                    char ***args, char ***env,
                                    libxl__device_action action,
                                    int num_exec)
 {
-    return 0;
+    char *disable_udev = libxl__xs_read(gc, XBT_NULL, DISABLE_UDEV_PATH);
+    int rc;
+
+    /* Check if we have to run hotplug scripts */
+    if (!disable_udev || num_exec > 0) {
+        rc = 0;
+        goto out;
+    }
+
+    switch (dev->backend_kind) {
+    case LIBXL__DEVICE_KIND_VBD:
+    case LIBXL__DEVICE_KIND_VIF:
+        if (num_exec != 0) {
+            rc = 0;
+            goto out;
+        }
+        rc = libxl__hotplug(gc, dev, args, action);
+        if (!rc) rc = 1;
+        break;
+    default:
+        /* If no need to execute any hotplug scripts,
+         * call the callback manually
+         */
+        rc = 0;
+        break;
+    }
+
+out:
+    return rc;
 }
diff -r e20085770cb5 -r 84a78045e701 tools/xenbackendd/xenbackendd.c
--- a/tools/xenbackendd/xenbackendd.c	Wed Aug 01 12:46:47 2012 +0100
+++ b/tools/xenbackendd/xenbackendd.c	Wed Aug 01 12:46:47 2012 +0100
@@ -33,6 +33,7 @@
 #define DEVTYPE_UNKNOWN 0
 #define DEVTYPE_VIF 1
 #define DEVTYPE_VBD 2
+#define DISABLE_EXEC "libxl/disable_udev"
 
 #define DOMAIN_PATH "/local/domain/0"
 
@@ -149,7 +150,7 @@ main(int argc, char * const argv[])
 	unsigned int num;
 	char *s;
 	int state;
-	char *sstate;
+	char *sstate, *sdisable;
 	char *p;
 	char buf[80];
 	int type;
@@ -245,6 +246,10 @@ main(int argc, char * const argv[])
 			continue;
 		}
 
+		sdisable = xs_read(xs, XBT_NULL, DISABLE_EXEC, 0);
+		if (sdisable)
+			goto next1;
+
 		if (strlen(vec[XS_WATCH_PATH]) < sizeof("state"))
 			goto next1;
 
@@ -314,6 +319,7 @@ next2:
 		free(sstate);
 
 next1:
+		free(sdisable);
 		free(vec);
 	}
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCH-0008RI-45; Wed, 01 Aug 2012 21:11:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0008Qw-4T
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from [85.158.139.83:55291] by server-5.bemta-5.messagelabs.com id
	B8/D5-02722-F6B99105; Wed, 01 Aug 2012 21:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-182.messagelabs.com!1343855469!24126228!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7264 invoked from network); 1 Aug 2012 21:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0004xE-Ed
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0000wl-6o
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Message-Id: <E1SwgCD-0000wl-6o@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/build: fix pygrub linking
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Roger Pau Monne <roger.pau@citrix.com>
# Date 1343821607 -3600
# Node ID e20085770cb556940d41b8f6ef8f860787da88bf
# Parent  f4b5a21f93add32ff66494ed2a8605abbabec309
tools/build: fix pygrub linking

Prevent creating a symlink to $(DESTDIR)/$(BINDIR) if it is the same
as $(PRIVATE_BINDIR)

This fixes NetBSD install, where $(DESTDIR)/$(BINDIR) ==
$(PRIVATE_BINDIR).

Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r f4b5a21f93ad -r e20085770cb5 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Wed Aug 01 12:46:46 2012 +0100
+++ b/tools/pygrub/Makefile	Wed Aug 01 12:46:47 2012 +0100
@@ -14,7 +14,10 @@ install: all
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
 		--install-scripts=$(PRIVATE_BINDIR) --force
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-	ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)
+	set -e; if [ `readlink -f $(DESTDIR)/$(BINDIR)` != \
+	             `readlink -f $(PRIVATE_BINDIR)` ]; then \
+	    ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
+	fi
 
 .PHONY: clean
 clean:

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCH-0008RI-45; Wed, 01 Aug 2012 21:11:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0008Qw-4T
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from [85.158.139.83:55291] by server-5.bemta-5.messagelabs.com id
	B8/D5-02722-F6B99105; Wed, 01 Aug 2012 21:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-182.messagelabs.com!1343855469!24126228!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7264 invoked from network); 1 Aug 2012 21:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0004xE-Ed
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCD-0000wl-6o
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:09 +0000
Message-Id: <E1SwgCD-0000wl-6o@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/build: fix pygrub linking
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Roger Pau Monne <roger.pau@citrix.com>
# Date 1343821607 -3600
# Node ID e20085770cb556940d41b8f6ef8f860787da88bf
# Parent  f4b5a21f93add32ff66494ed2a8605abbabec309
tools/build: fix pygrub linking

Prevent creating a symlink to $(DESTDIR)/$(BINDIR) if it is the same
as $(PRIVATE_BINDIR)

This fixes NetBSD install, where $(DESTDIR)/$(BINDIR) ==
$(PRIVATE_BINDIR).

Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r f4b5a21f93ad -r e20085770cb5 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Wed Aug 01 12:46:46 2012 +0100
+++ b/tools/pygrub/Makefile	Wed Aug 01 12:46:47 2012 +0100
@@ -14,7 +14,10 @@ install: all
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
 		--install-scripts=$(PRIVATE_BINDIR) --force
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-	ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)
+	set -e; if [ `readlink -f $(DESTDIR)/$(BINDIR)` != \
+	             `readlink -f $(PRIVATE_BINDIR)` ]; then \
+	    ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
+	fi
 
 .PHONY: clean
 clean:

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCK-0008Rq-CH; Wed, 01 Aug 2012 21:11:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCJ-0008Qv-Ed
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:15 +0000
Received: from [85.158.143.35:41230] by server-2.bemta-4.messagelabs.com id
	2D/9D-17938-37B99105; Wed, 01 Aug 2012 21:11:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-21.messagelabs.com!1343855471!5538307!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32013 invoked from network); 1 Aug 2012 21:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCE-0004xK-KX
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCE-0000xG-Ab
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:10 +0000
Message-Id: <E1SwgCE-0000xG-Ab@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] init/NetBSD: move xenbackendd to
	xend init script
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Roger Pau Monne <roger.pau@citrix.com>
# Date 1343821608 -3600
# Node ID 433624c658af4f3bf21ae53ef090528e870fdf58
# Parent  84a78045e701ad743bcd369acbae6d0fb258a0f8
init/NetBSD: move xenbackendd to xend init script

xenbackendd is not needed by the xl toolstack, so move it's launch to
the xend script.

We have to iterate until we are sure there are no xend processes left,
since doing a single pkill usually leaves xend processes running.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 84a78045e701 -r 433624c658af tools/hotplug/NetBSD/rc.d/xencommons
--- a/tools/hotplug/NetBSD/rc.d/xencommons	Wed Aug 01 12:46:47 2012 +0100
+++ b/tools/hotplug/NetBSD/rc.d/xencommons	Wed Aug 01 12:46:48 2012 +0100
@@ -29,8 +29,6 @@ XENBACKENDD_PIDFILE="/var/run/xenbackend
 
 xen_precmd()
 {
-	mkdir -p /var/run/xend || exit 1
-	mkdir -p /var/run/xend/boot || exit 1
 	mkdir -p /var/run/xenstored || exit 1
 }
 
@@ -46,7 +44,7 @@ xen_startcmd()
 			XENSTORED_ROOTDIR="/var/lib/xenstored"
 		fi
 		rm -f ${XENSTORED_ROOTDIR}/tdb* >/dev/null 2>&1
-		printf "Starting xenservices: xenstored, xenconsoled, xenbackendd."
+		printf "Starting xenservices: xenstored, xenconsoled."
 		XENSTORED_ARGS=" --pid-file ${XENSTORED_PIDFILE}"
 		if [ -n "${XENSTORED_TRACE}" ]; then
 			XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log"
@@ -58,7 +56,7 @@ xen_startcmd()
 			sleep 1
 		done
 	else
-		printf "Starting xenservices: xenconsoled, xenbackendd."
+		printf "Starting xenservices: xenconsoled."
 	fi
 
 	XENCONSOLED_ARGS=""
@@ -68,13 +66,6 @@ xen_startcmd()
 
 	${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS}
 
-	XENBACKENDD_ARGS=""
-	if [ -n "${XENBACKENDD_DEBUG}" ]; then
-		XENBACKENDD_ARGS="${XENBACKENDD_ARGS} -d"
-	fi
-
-	${SBINDIR}/xenbackendd ${XENBACKENDD_ARGS}
-
 	printf "\n"
 
 	printf "Setting domain 0 name.\n"
@@ -87,8 +78,6 @@ xen_stop()
 	printf "Stopping xencommons.\n"
 	printf "WARNING: Not stopping xenstored, as it cannot be restarted.\n"
 
-	rc_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd)
-	pids="$pids $rc_pid"
 	rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
 	pids="$pids $rc_pid"
 
@@ -108,17 +97,12 @@ xen_status()
 		pids="$pids $xenconsoled_pid"
 	fi
 
-	xenbackend_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd)
-	if test -n ${xenbackend_pid}; then
-		pids="$pids $xenbackend_pid"
-	fi
-
-	if test -n "$xenbackend_pid" -a -n "$xenconsoled_pid" -a -n "$xenstored_pid";
+	if test -n "$xenconsoled_pid" -a -n "$xenstored_pid";
 	then
 		echo "xencommons are running as pids $pids."
 		return 0
 	fi
-	if test -z "$xenbackend_pid" -a -z "$xenconsoled_pid" -a -z "$xenstored_pid";
+	if test -z "$xenconsoled_pid" -a -z "$xenstored_pid";
 	then
 		echo "xencommons are not running."
 		return 0
@@ -134,11 +118,6 @@ xen_status()
 	else
 		echo "xenconsoled is not running."
 	fi
-	if test -n $xenbackend_pid; then
-		echo "xenbackendd is running as pid $xenbackend_pid."
-	else
-		echo "xenbackendd is not running."
-	fi
 }
 
 load_rc_config $name
diff -r 84a78045e701 -r 433624c658af tools/hotplug/NetBSD/rc.d/xend
--- a/tools/hotplug/NetBSD/rc.d/xend	Wed Aug 01 12:46:47 2012 +0100
+++ b/tools/hotplug/NetBSD/rc.d/xend	Wed Aug 01 12:46:48 2012 +0100
@@ -15,10 +15,57 @@ export PATH
 
 name="xend"
 rcvar=$name
-command="${SBINDIR}/xend"
-command_args="start"
-command_interpreter=`head -n 1 ${command} | awk '{ print substr($0,3) }'`
-sig_stop="SIGKILL"
+start_precmd="xend_precmd"
+start_cmd="xend_startcmd"
+stop_cmd="xend_stop"
+status_cmd="xend_status"
+extra_commands="status"
+required_files="/kern/xen/privcmd"
+
+XENBACKENDD_PIDFILE="/var/run/xenbackendd.pid"
+#XENBACKENDD_DEBUG=1
+
+xend_precmd()
+{
+	mkdir -p /var/run/xend || exit 1
+	mkdir -p /var/run/xend/boot || exit 1
+}
+
+xend_startcmd()
+{
+	printf "Starting xenbackendd.\n"
+
+	XENBACKENDD_ARGS=""
+	if [ -n "${XENBACKENDD_DEBUG}" ]; then
+		XENBACKENDD_ARGS="${XENBACKENDD_ARGS} -d"
+	fi
+
+	${SBINDIR}/xenbackendd ${XENBACKENDD_ARGS}
+
+	printf "Starting xend.\n"
+	${SBINDIR}/xend start >/dev/null 2>&1
+}
+
+xend_stop()
+{
+	printf "Stopping xenbackendd, xend\n"
+	xb_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd)
+	if test -n "$xb_pid";
+	then
+		kill -${sig_stop:-TERM} $xb_pid
+	fi
+	while pgrep -f ${SBINDIR}/xend >/dev/null 2>&1; do
+		pkill -${sig_stop:-KILL} -f ${SBINDIR}/xend
+	done
+	wait_for_pids $xb_pid
+	rm -f /var/lock/subsys/xend /var/lock/xend /var/run/xenbackendd.pid
+}
+
+xend_status()
+{
+	${SBINDIR}/xend status
+}
 
 load_rc_config $name
 run_rc_command "$1"
+

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCK-0008Rq-CH; Wed, 01 Aug 2012 21:11:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCJ-0008Qv-Ed
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:15 +0000
Received: from [85.158.143.35:41230] by server-2.bemta-4.messagelabs.com id
	2D/9D-17938-37B99105; Wed, 01 Aug 2012 21:11:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-21.messagelabs.com!1343855471!5538307!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32013 invoked from network); 1 Aug 2012 21:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCE-0004xK-KX
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCE-0000xG-Ab
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:10 +0000
Message-Id: <E1SwgCE-0000xG-Ab@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] init/NetBSD: move xenbackendd to
	xend init script
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Roger Pau Monne <roger.pau@citrix.com>
# Date 1343821608 -3600
# Node ID 433624c658af4f3bf21ae53ef090528e870fdf58
# Parent  84a78045e701ad743bcd369acbae6d0fb258a0f8
init/NetBSD: move xenbackendd to xend init script

xenbackendd is not needed by the xl toolstack, so move it's launch to
the xend script.

We have to iterate until we are sure there are no xend processes left,
since doing a single pkill usually leaves xend processes running.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 84a78045e701 -r 433624c658af tools/hotplug/NetBSD/rc.d/xencommons
--- a/tools/hotplug/NetBSD/rc.d/xencommons	Wed Aug 01 12:46:47 2012 +0100
+++ b/tools/hotplug/NetBSD/rc.d/xencommons	Wed Aug 01 12:46:48 2012 +0100
@@ -29,8 +29,6 @@ XENBACKENDD_PIDFILE="/var/run/xenbackend
 
 xen_precmd()
 {
-	mkdir -p /var/run/xend || exit 1
-	mkdir -p /var/run/xend/boot || exit 1
 	mkdir -p /var/run/xenstored || exit 1
 }
 
@@ -46,7 +44,7 @@ xen_startcmd()
 			XENSTORED_ROOTDIR="/var/lib/xenstored"
 		fi
 		rm -f ${XENSTORED_ROOTDIR}/tdb* >/dev/null 2>&1
-		printf "Starting xenservices: xenstored, xenconsoled, xenbackendd."
+		printf "Starting xenservices: xenstored, xenconsoled."
 		XENSTORED_ARGS=" --pid-file ${XENSTORED_PIDFILE}"
 		if [ -n "${XENSTORED_TRACE}" ]; then
 			XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log"
@@ -58,7 +56,7 @@ xen_startcmd()
 			sleep 1
 		done
 	else
-		printf "Starting xenservices: xenconsoled, xenbackendd."
+		printf "Starting xenservices: xenconsoled."
 	fi
 
 	XENCONSOLED_ARGS=""
@@ -68,13 +66,6 @@ xen_startcmd()
 
 	${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS}
 
-	XENBACKENDD_ARGS=""
-	if [ -n "${XENBACKENDD_DEBUG}" ]; then
-		XENBACKENDD_ARGS="${XENBACKENDD_ARGS} -d"
-	fi
-
-	${SBINDIR}/xenbackendd ${XENBACKENDD_ARGS}
-
 	printf "\n"
 
 	printf "Setting domain 0 name.\n"
@@ -87,8 +78,6 @@ xen_stop()
 	printf "Stopping xencommons.\n"
 	printf "WARNING: Not stopping xenstored, as it cannot be restarted.\n"
 
-	rc_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd)
-	pids="$pids $rc_pid"
 	rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
 	pids="$pids $rc_pid"
 
@@ -108,17 +97,12 @@ xen_status()
 		pids="$pids $xenconsoled_pid"
 	fi
 
-	xenbackend_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd)
-	if test -n ${xenbackend_pid}; then
-		pids="$pids $xenbackend_pid"
-	fi
-
-	if test -n "$xenbackend_pid" -a -n "$xenconsoled_pid" -a -n "$xenstored_pid";
+	if test -n "$xenconsoled_pid" -a -n "$xenstored_pid";
 	then
 		echo "xencommons are running as pids $pids."
 		return 0
 	fi
-	if test -z "$xenbackend_pid" -a -z "$xenconsoled_pid" -a -z "$xenstored_pid";
+	if test -z "$xenconsoled_pid" -a -z "$xenstored_pid";
 	then
 		echo "xencommons are not running."
 		return 0
@@ -134,11 +118,6 @@ xen_status()
 	else
 		echo "xenconsoled is not running."
 	fi
-	if test -n $xenbackend_pid; then
-		echo "xenbackendd is running as pid $xenbackend_pid."
-	else
-		echo "xenbackendd is not running."
-	fi
 }
 
 load_rc_config $name
diff -r 84a78045e701 -r 433624c658af tools/hotplug/NetBSD/rc.d/xend
--- a/tools/hotplug/NetBSD/rc.d/xend	Wed Aug 01 12:46:47 2012 +0100
+++ b/tools/hotplug/NetBSD/rc.d/xend	Wed Aug 01 12:46:48 2012 +0100
@@ -15,10 +15,57 @@ export PATH
 
 name="xend"
 rcvar=$name
-command="${SBINDIR}/xend"
-command_args="start"
-command_interpreter=`head -n 1 ${command} | awk '{ print substr($0,3) }'`
-sig_stop="SIGKILL"
+start_precmd="xend_precmd"
+start_cmd="xend_startcmd"
+stop_cmd="xend_stop"
+status_cmd="xend_status"
+extra_commands="status"
+required_files="/kern/xen/privcmd"
+
+XENBACKENDD_PIDFILE="/var/run/xenbackendd.pid"
+#XENBACKENDD_DEBUG=1
+
+xend_precmd()
+{
+	mkdir -p /var/run/xend || exit 1
+	mkdir -p /var/run/xend/boot || exit 1
+}
+
+xend_startcmd()
+{
+	printf "Starting xenbackendd.\n"
+
+	XENBACKENDD_ARGS=""
+	if [ -n "${XENBACKENDD_DEBUG}" ]; then
+		XENBACKENDD_ARGS="${XENBACKENDD_ARGS} -d"
+	fi
+
+	${SBINDIR}/xenbackendd ${XENBACKENDD_ARGS}
+
+	printf "Starting xend.\n"
+	${SBINDIR}/xend start >/dev/null 2>&1
+}
+
+xend_stop()
+{
+	printf "Stopping xenbackendd, xend\n"
+	xb_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd)
+	if test -n "$xb_pid";
+	then
+		kill -${sig_stop:-TERM} $xb_pid
+	fi
+	while pgrep -f ${SBINDIR}/xend >/dev/null 2>&1; do
+		pkill -${sig_stop:-KILL} -f ${SBINDIR}/xend
+	done
+	wait_for_pids $xb_pid
+	rm -f /var/lock/subsys/xend /var/lock/xend /var/run/xenbackendd.pid
+}
+
+xend_status()
+{
+	${SBINDIR}/xend status
+}
 
 load_rc_config $name
 run_rc_command "$1"
+

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCK-0008Rl-9t; Wed, 01 Aug 2012 21:11:16 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCJ-0008RZ-8j
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:15 +0000
Received: from [85.158.138.51:2512] by server-1.bemta-3.messagelabs.com id
	0F/EB-31934-27B99105; Wed, 01 Aug 2012 21:11:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1343855472!29952088!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32462 invoked from network); 1 Aug 2012 21:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0004xT-As
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0000y1-4x
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Message-Id: <E1SwgCG-0000y1-4x@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/config: Allow building of
	components to be controlled from .config
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1343821611 -3600
# Node ID d801c1c1fec8b5d2b27b519d61f884e714405460
# Parent  9d52ee4e4e6f15ba3215c72bee0a58dc0c177379
tools/config: Allow building of components to be controlled from .config

For build systems which build certain Xen components separately, allow certain
components to be conditionally built based on .config, rather than always
building them.

This patch allows qemu and blktap to be configured in this manner.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 9d52ee4e4e6f -r d801c1c1fec8 config/x86_32.mk
--- a/config/x86_32.mk	Wed Aug 01 12:46:50 2012 +0100
+++ b/config/x86_32.mk	Wed Aug 01 12:46:51 2012 +0100
@@ -5,7 +5,7 @@ CONFIG_X86_$(XEN_OS) := y
 CONFIG_HVM := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
-CONFIG_IOEMU := y
+CONFIG_IOEMU ?= y
 
 CFLAGS += -m32 -march=i686
 
diff -r 9d52ee4e4e6f -r d801c1c1fec8 config/x86_64.mk
--- a/config/x86_64.mk	Wed Aug 01 12:46:50 2012 +0100
+++ b/config/x86_64.mk	Wed Aug 01 12:46:51 2012 +0100
@@ -6,7 +6,7 @@ CONFIG_COMPAT := y
 CONFIG_HVM := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
-CONFIG_IOEMU := y
+CONFIG_IOEMU ?= y
 
 CFLAGS += -m64
 
diff -r 9d52ee4e4e6f -r d801c1c1fec8 tools/Rules.mk
--- a/tools/Rules.mk	Wed Aug 01 12:46:50 2012 +0100
+++ b/tools/Rules.mk	Wed Aug 01 12:46:51 2012 +0100
@@ -40,9 +40,9 @@ LDLIBS_libxenvchan = $(SHLIB_libxenctrl)
 SHLIB_libxenvchan  = -Wl,-rpath-link=$(XEN_LIBVCHAN)
 
 ifeq ($(CONFIG_Linux),y)
-LIBXL_BLKTAP = y
+LIBXL_BLKTAP ?= y
 else
-LIBXL_BLKTAP = n
+LIBXL_BLKTAP ?= n
 endif
 
 ifeq ($(LIBXL_BLKTAP),y)

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCK-0008Rl-9t; Wed, 01 Aug 2012 21:11:16 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCJ-0008RZ-8j
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:15 +0000
Received: from [85.158.138.51:2512] by server-1.bemta-3.messagelabs.com id
	0F/EB-31934-27B99105; Wed, 01 Aug 2012 21:11:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1343855472!29952088!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32462 invoked from network); 1 Aug 2012 21:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0004xT-As
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0000y1-4x
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Message-Id: <E1SwgCG-0000y1-4x@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/config: Allow building of
	components to be controlled from .config
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1343821611 -3600
# Node ID d801c1c1fec8b5d2b27b519d61f884e714405460
# Parent  9d52ee4e4e6f15ba3215c72bee0a58dc0c177379
tools/config: Allow building of components to be controlled from .config

For build systems which build certain Xen components separately, allow certain
components to be conditionally built based on .config, rather than always
building them.

This patch allows qemu and blktap to be configured in this manner.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 9d52ee4e4e6f -r d801c1c1fec8 config/x86_32.mk
--- a/config/x86_32.mk	Wed Aug 01 12:46:50 2012 +0100
+++ b/config/x86_32.mk	Wed Aug 01 12:46:51 2012 +0100
@@ -5,7 +5,7 @@ CONFIG_X86_$(XEN_OS) := y
 CONFIG_HVM := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
-CONFIG_IOEMU := y
+CONFIG_IOEMU ?= y
 
 CFLAGS += -m32 -march=i686
 
diff -r 9d52ee4e4e6f -r d801c1c1fec8 config/x86_64.mk
--- a/config/x86_64.mk	Wed Aug 01 12:46:50 2012 +0100
+++ b/config/x86_64.mk	Wed Aug 01 12:46:51 2012 +0100
@@ -6,7 +6,7 @@ CONFIG_COMPAT := y
 CONFIG_HVM := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
-CONFIG_IOEMU := y
+CONFIG_IOEMU ?= y
 
 CFLAGS += -m64
 
diff -r 9d52ee4e4e6f -r d801c1c1fec8 tools/Rules.mk
--- a/tools/Rules.mk	Wed Aug 01 12:46:50 2012 +0100
+++ b/tools/Rules.mk	Wed Aug 01 12:46:51 2012 +0100
@@ -40,9 +40,9 @@ LDLIBS_libxenvchan = $(SHLIB_libxenctrl)
 SHLIB_libxenvchan  = -Wl,-rpath-link=$(XEN_LIBVCHAN)
 
 ifeq ($(CONFIG_Linux),y)
-LIBXL_BLKTAP = y
+LIBXL_BLKTAP ?= y
 else
-LIBXL_BLKTAP = n
+LIBXL_BLKTAP ?= n
 endif
 
 ifeq ($(LIBXL_BLKTAP),y)

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCP-0008Te-Eh; Wed, 01 Aug 2012 21:11:21 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCN-0008RY-J0
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1343855472!1902611!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24887 invoked from network); 1 Aug 2012 21:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0004xQ-Sm
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0000xm-KS
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:11 +0000
Message-Id: <E1SwgCF-0000xm-KS@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/ocaml: ignore and clean .spot
	and .spit files
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1343821610 -3600
# Node ID 9d52ee4e4e6f15ba3215c72bee0a58dc0c177379
# Parent  c379e77870aff938ca941a3acb760831039c19a6
tools/ocaml: ignore and clean .spot and .spit files

Newer ocaml toolchains generate .spot and .spit files which are ocaml metadata
about their respective source files.

Add them to the clean rules as well as the .{hg,git}ignore files.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r c379e77870af -r 9d52ee4e4e6f .gitignore
--- a/.gitignore	Wed Aug 01 12:46:49 2012 +0100
+++ b/.gitignore	Wed Aug 01 12:46:50 2012 +0100
@@ -11,6 +11,8 @@
 *.bin
 *.bak
 *.tmp
+*.spot
+*.spit
 TAGS
 cscope.files
 cscope.in.out
diff -r c379e77870af -r 9d52ee4e4e6f .hgignore
--- a/.hgignore	Wed Aug 01 12:46:49 2012 +0100
+++ b/.hgignore	Wed Aug 01 12:46:50 2012 +0100
@@ -15,6 +15,8 @@
 .*\.flc$
 .*\.orig$
 .*\.rej$
+.*\.spot$
+.*\.spit$
 .*/a\.out$
 .*/Modules\.symvers$
 .*/cscope\..*$
diff -r c379e77870af -r 9d52ee4e4e6f tools/ocaml/Makefile.rules
--- a/tools/ocaml/Makefile.rules	Wed Aug 01 12:46:49 2012 +0100
+++ b/tools/ocaml/Makefile.rules	Wed Aug 01 12:46:50 2012 +0100
@@ -45,7 +45,7 @@ ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $
 	$(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli $o,MLDEP,)
 
 clean: $(CLEAN_HOOKS)
-	$(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make
+	$(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make
 
 quiet-command = $(if $(V),$1,@printf " %-8s %s\n" "$2" "$3" && $1)
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCP-0008Te-Eh; Wed, 01 Aug 2012 21:11:21 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCN-0008RY-J0
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1343855472!1902611!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24887 invoked from network); 1 Aug 2012 21:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0004xQ-Sm
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0000xm-KS
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:11 +0000
Message-Id: <E1SwgCF-0000xm-KS@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/ocaml: ignore and clean .spot
	and .spit files
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1343821610 -3600
# Node ID 9d52ee4e4e6f15ba3215c72bee0a58dc0c177379
# Parent  c379e77870aff938ca941a3acb760831039c19a6
tools/ocaml: ignore and clean .spot and .spit files

Newer ocaml toolchains generate .spot and .spit files which are ocaml metadata
about their respective source files.

Add them to the clean rules as well as the .{hg,git}ignore files.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r c379e77870af -r 9d52ee4e4e6f .gitignore
--- a/.gitignore	Wed Aug 01 12:46:49 2012 +0100
+++ b/.gitignore	Wed Aug 01 12:46:50 2012 +0100
@@ -11,6 +11,8 @@
 *.bin
 *.bak
 *.tmp
+*.spot
+*.spit
 TAGS
 cscope.files
 cscope.in.out
diff -r c379e77870af -r 9d52ee4e4e6f .hgignore
--- a/.hgignore	Wed Aug 01 12:46:49 2012 +0100
+++ b/.hgignore	Wed Aug 01 12:46:50 2012 +0100
@@ -15,6 +15,8 @@
 .*\.flc$
 .*\.orig$
 .*\.rej$
+.*\.spot$
+.*\.spit$
 .*/a\.out$
 .*/Modules\.symvers$
 .*/cscope\..*$
diff -r c379e77870af -r 9d52ee4e4e6f tools/ocaml/Makefile.rules
--- a/tools/ocaml/Makefile.rules	Wed Aug 01 12:46:49 2012 +0100
+++ b/tools/ocaml/Makefile.rules	Wed Aug 01 12:46:50 2012 +0100
@@ -45,7 +45,7 @@ ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $
 	$(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli $o,MLDEP,)
 
 clean: $(CLEAN_HOOKS)
-	$(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make
+	$(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make
 
 quiet-command = $(if $(V),$1,@printf " %-8s %s\n" "$2" "$3" && $1)
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCR-0008UF-KA; Wed, 01 Aug 2012 21:11:23 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCP-0008Rv-W9
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1343855473!10330254!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4098 invoked from network); 1 Aug 2012 21:11:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0004xW-U1
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0000yG-OM
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Message-Id: <E1SwgCG-0000yG-OM@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: enforce prohibitions of
	internal callers
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1343821612 -3600
# Node ID 3d622e2c7cfb15b37498e9bb8f1005516fe99f2f
# Parent  d801c1c1fec8b5d2b27b519d61f884e714405460
libxl: enforce prohibitions of internal callers

libxl_internal.h says:

 * Functions using LIBXL__INIT_EGC may *not* generally be called from
 * within libxl, because libxl__egc_cleanup may call back into the
 * application. ...

and

 *                    ...  [Functions which take an ao_how] MAY NOT
 * be called from inside libxl, because they can cause reentrancy
 * callbacks.

However, this was not enforced.  Particularly the latter restriction
is easy to overlook, especially since during the transition period to
the new event system we have bent this rule a couple of times, and the
bad pattern simply involves passing 0 or NULL for the ao_how.

So use the compiler to enforce this property, as follows:

 - Mark all functions which take a libxl_asyncop_how, or which
   use EGC_INIT or LIBXL__INIT_EGC, with a new annotation
   LIBXL_EXTERNAL_CALLERS_ONLY in the public header.

 - Change the documentation comment for asynch operations and egcs to
   say that this should always be done.

 - Arrange that if libxl.h is included via libxl_internal.h,
   LIBXL_EXTERNAL_CALLERS_ONLY expands to __attribute__((warning(...))),
   which generates a message like this:
      libxl.c:1772: warning: call to 'libxl_device_disk_remove'
             declared with attribute warning:
             may not be called from within libxl
   Otherwise, the annotation expands to nothing, so external
   callers are unaffected.

 - Forbid inclusion of both libxl.h and libxl_internal.h unless
   libxl_internal.h came first, so that the above check doesn't have
   any loopholes.  Files which include libxl_internal.h should not
   include libxl.h as well.

   This is enforced explicitly using #error.  However, in practice
   with the current tree it just changes the error message when this
   mistake is made; otherwise we would carry on to immediately
   following #define which would cause the compiler to complain that
   LIBXL_EXTERNAL_CALLERS_ONLY was redefined.  Then the developer
   might be tempted to add a #ifndef which would be wrong - it would
   leave the affected translation unit unprotected by the new
   enforcement regime.  So let's be explicit.

 - Fix the one source of files which violate the above principle, the
   output from the idl compiler, by removing the redundant inclusion
   of libxl.h from the output.

Also introduce a new script "check-libxl-api-rules" which contains
some ad-hoc regexps to spot and complain when libxl.h contains
functions which mention libxl_asyncop_how but not
LIBXL_EXTERNAL_CALLERS_ONLY.  This isn't a full C parser but is likely
to get the common cases right and err on the side of complaining.

While we are here, the invocation of perl for the bsd queue.h seddery
to $(PERL).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r d801c1c1fec8 -r 3d622e2c7cfb .gitignore
--- a/.gitignore	Wed Aug 01 12:46:51 2012 +0100
+++ b/.gitignore	Wed Aug 01 12:46:52 2012 +0100
@@ -189,6 +189,7 @@ tools/libxl/xl
 tools/libxl/testenum
 tools/libxl/testenum.c
 tools/libxl/tmp.*
+tools/libxl/libxl.api-for-check
 tools/libaio/src/*.ol
 tools/libaio/src/*.os
 tools/misc/cpuperf/cpuperf-perfcntr
diff -r d801c1c1fec8 -r 3d622e2c7cfb .hgignore
--- a/.hgignore	Wed Aug 01 12:46:51 2012 +0100
+++ b/.hgignore	Wed Aug 01 12:46:52 2012 +0100
@@ -187,6 +187,7 @@
 ^tools/libxl/testidl\.c$
 ^tools/libxl/tmp\..*$
 ^tools/libxl/.*\.new$
+^tools/libxl/libxl\.api-for-check
 ^tools/libvchan/vchan-node[12]$
 ^tools/libaio/src/.*\.ol$
 ^tools/libaio/src/.*\.os$
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/Makefile
--- a/tools/libxl/Makefile	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/Makefile	Wed Aug 01 12:46:52 2012 +0100
@@ -74,7 +74,8 @@ LIBXL_OBJS += _libxl_types.o libxl_flask
 $(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl) -include $(XEN_ROOT)/tools/config.h
 
 AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h _paths.h \
-	_libxl_save_msgs_callout.h _libxl_save_msgs_helper.h
+	_libxl_save_msgs_callout.h _libxl_save_msgs_helper.h \
+        libxl.api-ok
 AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
 AUTOSRCS += _libxl_save_msgs_callout.c _libxl_save_msgs_helper.c
 LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o \
@@ -113,13 +114,22 @@ all: $(CLIENTS) libxenlight.so libxenlig
 genpath-target = $(call buildmakevars2file,_paths.h.tmp)
 $(eval $(genpath-target))
 
+libxl.api-ok: check-libxl-api-rules libxl.api-for-check
+	$(PERL) $^
+
+%.api-for-check: %.h
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -c -E $< $(APPEND_CFLAGS) \
+		-DLIBXL_EXTERNAL_CALLERS_ONLY=LIBXL_EXTERNAL_CALLERS_ONLY \
+		>$@.new
+	$(call move-if-changed,$@.new,$@)
+
 _paths.h: genpath
 	sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" $@.tmp >$@.2.tmp
 	rm -f $@.tmp
 	$(call move-if-changed,$@.2.tmp,$@)
 
 _libxl_list.h: $(XEN_INCLUDE)/xen-external/bsd-sys-queue-h-seddery $(XEN_INCLUDE)/xen-external/bsd-sys-queue.h
-	perl $^ --prefix=libxl >$@.new
+	$(PERL) $^ --prefix=libxl >$@.new
 	$(call move-if-changed,$@.new,$@)
 
 _libxl_save_msgs_helper.c _libxl_save_msgs_callout.c \
@@ -200,7 +210,7 @@ install: all
 .PHONY: clean
 clean:
 	$(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS)
-	$(RM) -f _*.c *.pyc _paths.*.tmp
+	$(RM) -f _*.c *.pyc _paths.*.tmp *.api-for-check
 	$(RM) -f testidl.c.new testidl.c
 #	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
 
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/check-libxl-api-rules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/libxl/check-libxl-api-rules	Wed Aug 01 12:46:52 2012 +0100
@@ -0,0 +1,23 @@
+#!/usr/bin/perl -w
+use strict;
+our $needed=0;
+our $speclineoffset=0;
+our $specfile;
+while (<>) {
+    if (m/^\# (\d+) \"(.*)\"$/) {
+        $speclineoffset = $1 - $. -1;
+        $specfile = $2;
+    }
+    my $file = defined($specfile) ? $specfile : $ARGV;
+    my $line = $speclineoffset + $.;
+    if (m/libxl_asyncop_how[^;]/) {
+        $needed=1;
+    }
+    if (m/LIBXL_EXTERNAL_CALLERS_ONLY/) {
+        $needed=0;
+    }
+    next unless $needed;
+    if (m/\;/) {
+        die "$file:$line:missing LIBXL_EXTERNAL_CALLERS_ONLY";
+    }
+}
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/gentypes.py
--- a/tools/libxl/gentypes.py	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/gentypes.py	Wed Aug 01 12:46:52 2012 +0100
@@ -377,7 +377,6 @@ if __name__ == '__main__':
 #include <stdlib.h>
 #include <string.h>
 
-#include "libxl.h"
 #include "libxl_internal.h"
 
 #define LIBXL_DTOR_POISON 0xa5
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/libxl.h	Wed Aug 01 12:46:52 2012 +0100
@@ -266,6 +266,13 @@
 #endif
 #endif
 
+/* Functions annotated with LIBXL_EXTERNAL_CALLERS_ONLY may not be
+ * called from within libxl itself. Callers outside libxl, who
+ * do not #include libxl_internal.h, are fine. */
+#ifndef LIBXL_EXTERNAL_CALLERS_ONLY
+#define LIBXL_EXTERNAL_CALLERS_ONLY /* disappears for callers outside libxl */
+#endif
+
 typedef uint8_t libxl_mac[6];
 #define LIBXL_MAC_FMT "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx"
 #define LIBXL_MAC_FMTLEN ((2*6)+5) /* 6 hex bytes plus 5 colons */
@@ -496,11 +503,13 @@ int libxl_ctx_free(libxl_ctx *ctx /* 0 i
 int libxl_domain_create_new(libxl_ctx *ctx, libxl_domain_config *d_config,
                             uint32_t *domid,
                             const libxl_asyncop_how *ao_how,
-                            const libxl_asyncprogress_how *aop_console_how);
+                            const libxl_asyncprogress_how *aop_console_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_domain_create_restore(libxl_ctx *ctx, libxl_domain_config *d_config,
                                 uint32_t *domid, int restore_fd,
                                 const libxl_asyncop_how *ao_how,
-                                const libxl_asyncprogress_how *aop_console_how);
+                                const libxl_asyncprogress_how *aop_console_how)
+                                LIBXL_EXTERNAL_CALLERS_ONLY;
   /* A progress report will be made via ao_console_how, of type
    * domain_create_console_available, when the domain's primary
    * console is available and can be connected to.
@@ -511,7 +520,8 @@ void libxl_domain_config_dispose(libxl_d
 
 int libxl_domain_suspend(libxl_ctx *ctx, uint32_t domid, int fd,
                          int flags, /* LIBXL_SUSPEND_* */
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 #define LIBXL_SUSPEND_DEBUG 1
 #define LIBXL_SUSPEND_LIVE 2
 
@@ -523,12 +533,14 @@ int libxl_domain_resume(libxl_ctx *ctx, 
 
 int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info,
                              uint32_t domid, int send_fd, int recv_fd,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 int libxl_domain_shutdown(libxl_ctx *ctx, uint32_t domid);
 int libxl_domain_reboot(libxl_ctx *ctx, uint32_t domid);
 int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid,
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_domain_preserve(libxl_ctx *ctx, uint32_t domid, libxl_domain_create_info *info, const char *name_suffix, libxl_uuid new_uuid);
 
 /* get max. number of cpus supported by hypervisor */
@@ -549,7 +561,8 @@ int libxl_domain_unpause(libxl_ctx *ctx,
 
 int libxl_domain_core_dump(libxl_ctx *ctx, uint32_t domid,
                            const char *filename,
-                           const libxl_asyncop_how *ao_how);
+                           const libxl_asyncop_how *ao_how)
+                           LIBXL_EXTERNAL_CALLERS_ONLY;
 
 int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint32_t target_memkb);
 int libxl_set_memory_target(libxl_ctx *ctx, uint32_t domid, int32_t target_memkb, int relative, int enforce);
@@ -677,13 +690,16 @@ void libxl_vcpuinfo_list_free(libxl_vcpu
 /* Disks */
 int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid,
                           libxl_device_disk *disk,
-                          const libxl_asyncop_how *ao_how);
+                          const libxl_asyncop_how *ao_how)
+                          LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_disk_remove(libxl_ctx *ctx, uint32_t domid,
                              libxl_device_disk *disk,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_disk_destroy(libxl_ctx *ctx, uint32_t domid,
                               libxl_device_disk *disk,
-                              const libxl_asyncop_how *ao_how);
+                              const libxl_asyncop_how *ao_how)
+                              LIBXL_EXTERNAL_CALLERS_ONLY;
 
 libxl_device_disk *libxl_device_disk_list(libxl_ctx *ctx, uint32_t domid, int *num);
 int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid,
@@ -694,17 +710,21 @@ int libxl_device_disk_getinfo(libxl_ctx 
  * be attached to the guest.
  */
 int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk,
-                       const libxl_asyncop_how *ao_how);
+                       const libxl_asyncop_how *ao_how)
+                       LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* Network Interfaces */
 int libxl_device_nic_add(libxl_ctx *ctx, uint32_t domid, libxl_device_nic *nic,
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_nic_remove(libxl_ctx *ctx, uint32_t domid,
                             libxl_device_nic *nic,
-                            const libxl_asyncop_how *ao_how);
+                            const libxl_asyncop_how *ao_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_nic_destroy(libxl_ctx *ctx, uint32_t domid,
                              libxl_device_nic *nic,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 libxl_device_nic *libxl_device_nic_list(libxl_ctx *ctx, uint32_t domid, int *num);
 int libxl_device_nic_getinfo(libxl_ctx *ctx, uint32_t domid,
@@ -712,23 +732,29 @@ int libxl_device_nic_getinfo(libxl_ctx *
 
 /* Keyboard */
 int libxl_device_vkb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vkb *vkb,
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_vkb_remove(libxl_ctx *ctx, uint32_t domid,
                             libxl_device_vkb *vkb,
-                            const libxl_asyncop_how *ao_how);
+                            const libxl_asyncop_how *ao_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_vkb_destroy(libxl_ctx *ctx, uint32_t domid,
                              libxl_device_vkb *vkb,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* Framebuffer */
 int libxl_device_vfb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vfb *vfb,
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_vfb_remove(libxl_ctx *ctx, uint32_t domid,
                             libxl_device_vfb *vfb,
-                            const libxl_asyncop_how *ao_how);
+                            const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_vfb_destroy(libxl_ctx *ctx, uint32_t domid,
                              libxl_device_vfb *vfb,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* PCI Passthrough */
 int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/libxl_event.h
--- a/tools/libxl/libxl_event.h	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/libxl_event.h	Wed Aug 01 12:46:52 2012 +0100
@@ -37,7 +37,8 @@ typedef int libxl_event_predicate(const 
 
 int libxl_event_check(libxl_ctx *ctx, libxl_event **event_r,
                       uint64_t typemask,
-                      libxl_event_predicate *predicate, void *predicate_user);
+                      libxl_event_predicate *predicate, void *predicate_user)
+                      LIBXL_EXTERNAL_CALLERS_ONLY;
   /* Searches for an event, already-happened, which matches typemask
    * and predicate.  predicate==0 matches any event.
    * libxl_event_check returns the event, which must then later be
@@ -48,7 +49,8 @@ int libxl_event_check(libxl_ctx *ctx, li
 
 int libxl_event_wait(libxl_ctx *ctx, libxl_event **event_r,
                      uint64_t typemask,
-                     libxl_event_predicate *predicate, void *predicate_user);
+                     libxl_event_predicate *predicate, void *predicate_user)
+                     LIBXL_EXTERNAL_CALLERS_ONLY;
   /* Like libxl_event_check but blocks if no suitable events are
    * available, until some are.  Uses libxl_osevent_beforepoll/
    * _afterpoll so may be inefficient if very many domains are being
@@ -256,7 +258,8 @@ struct pollfd;
  */
 int libxl_osevent_beforepoll(libxl_ctx *ctx, int *nfds_io,
                              struct pollfd *fds, int *timeout_upd,
-                             struct timeval now);
+                             struct timeval now)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* nfds and fds[0..nfds] must be from the most recent call to
  * _beforepoll, as modified by poll.  (It is therefore not possible
@@ -271,7 +274,8 @@ int libxl_osevent_beforepoll(libxl_ctx *
  * libxl_event_check.
  */
 void libxl_osevent_afterpoll(libxl_ctx *ctx, int nfds, const struct pollfd *fds,
-                             struct timeval now);
+                             struct timeval now)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 
 typedef struct libxl_osevent_hooks {
@@ -357,14 +361,16 @@ void libxl_osevent_register_hooks(libxl_
  */
 
 void libxl_osevent_occurred_fd(libxl_ctx *ctx, void *for_libxl,
-                               int fd, short events, short revents);
+                               int fd, short events, short revents)
+                               LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* Implicitly, on entry to this function the timeout has been
  * deregistered.  If _occurred_timeout is called, libxl will not
  * call timeout_deregister; if it wants to requeue the timeout it
  * will call timeout_register again.
  */
-void libxl_osevent_occurred_timeout(libxl_ctx *ctx, void *for_libxl);
+void libxl_osevent_occurred_timeout(libxl_ctx *ctx, void *for_libxl)
+                                    LIBXL_EXTERNAL_CALLERS_ONLY;
 
 
 /*======================================================================*/
@@ -506,7 +512,8 @@ void libxl_childproc_setmode(libxl_ctx *
  * certainly need to use the self-pipe trick (or a working pselect or
  * ppoll) to implement this.
  */
-int libxl_childproc_reaped(libxl_ctx *ctx, pid_t, int status);
+int libxl_childproc_reaped(libxl_ctx *ctx, pid_t, int status)
+                           LIBXL_EXTERNAL_CALLERS_ONLY;
 
 
 /*
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Wed Aug 01 12:46:52 2012 +0100
@@ -52,6 +52,12 @@
 
 #include <xen/io/xenbus.h>
 
+#ifdef LIBXL_H
+# error libxl.h should be included via libxl_internal.h, not separately
+#endif
+#define LIBXL_EXTERNAL_CALLERS_ONLY \
+    __attribute__((warning("may not be called from within libxl")))
+
 #include "libxl.h"
 #include "_paths.h"
 #include "_libxl_save_msgs_callout.h"
@@ -1534,10 +1540,10 @@ int libxl__hotplug_settings(libxl__gc *g
  *
  * Functions using LIBXL__INIT_EGC may *not* generally be called from
  * within libxl, because libxl__egc_cleanup may call back into the
- * application.  This should be documented near the function
- * prototype(s) for callers of LIBXL__INIT_EGC and EGC_INIT.  You
- * should in any case not find it necessary to call egc-creators from
- * within libxl.
+ * application.  This should be enforced by declaring all such
+ * functions in libxl.h or libxl_event.h with
+ * LIBXL_EXTERNAL_CALLERS_ONLY.  You should in any case not find it
+ * necessary to call egc-creators from within libxl.
  *
  * The callbacks must all take place with the ctx unlocked because
  * the application is entitled to reenter libxl from them.  This

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCR-0008UF-KA; Wed, 01 Aug 2012 21:11:23 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCP-0008Rv-W9
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1343855473!10330254!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4098 invoked from network); 1 Aug 2012 21:11:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0004xW-U1
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCG-0000yG-OM
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:12 +0000
Message-Id: <E1SwgCG-0000yG-OM@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: enforce prohibitions of
	internal callers
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1343821612 -3600
# Node ID 3d622e2c7cfb15b37498e9bb8f1005516fe99f2f
# Parent  d801c1c1fec8b5d2b27b519d61f884e714405460
libxl: enforce prohibitions of internal callers

libxl_internal.h says:

 * Functions using LIBXL__INIT_EGC may *not* generally be called from
 * within libxl, because libxl__egc_cleanup may call back into the
 * application. ...

and

 *                    ...  [Functions which take an ao_how] MAY NOT
 * be called from inside libxl, because they can cause reentrancy
 * callbacks.

However, this was not enforced.  Particularly the latter restriction
is easy to overlook, especially since during the transition period to
the new event system we have bent this rule a couple of times, and the
bad pattern simply involves passing 0 or NULL for the ao_how.

So use the compiler to enforce this property, as follows:

 - Mark all functions which take a libxl_asyncop_how, or which
   use EGC_INIT or LIBXL__INIT_EGC, with a new annotation
   LIBXL_EXTERNAL_CALLERS_ONLY in the public header.

 - Change the documentation comment for asynch operations and egcs to
   say that this should always be done.

 - Arrange that if libxl.h is included via libxl_internal.h,
   LIBXL_EXTERNAL_CALLERS_ONLY expands to __attribute__((warning(...))),
   which generates a message like this:
      libxl.c:1772: warning: call to 'libxl_device_disk_remove'
             declared with attribute warning:
             may not be called from within libxl
   Otherwise, the annotation expands to nothing, so external
   callers are unaffected.

 - Forbid inclusion of both libxl.h and libxl_internal.h unless
   libxl_internal.h came first, so that the above check doesn't have
   any loopholes.  Files which include libxl_internal.h should not
   include libxl.h as well.

   This is enforced explicitly using #error.  However, in practice
   with the current tree it just changes the error message when this
   mistake is made; otherwise we would carry on to immediately
   following #define which would cause the compiler to complain that
   LIBXL_EXTERNAL_CALLERS_ONLY was redefined.  Then the developer
   might be tempted to add a #ifndef which would be wrong - it would
   leave the affected translation unit unprotected by the new
   enforcement regime.  So let's be explicit.

 - Fix the one source of files which violate the above principle, the
   output from the idl compiler, by removing the redundant inclusion
   of libxl.h from the output.

Also introduce a new script "check-libxl-api-rules" which contains
some ad-hoc regexps to spot and complain when libxl.h contains
functions which mention libxl_asyncop_how but not
LIBXL_EXTERNAL_CALLERS_ONLY.  This isn't a full C parser but is likely
to get the common cases right and err on the side of complaining.

While we are here, the invocation of perl for the bsd queue.h seddery
to $(PERL).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r d801c1c1fec8 -r 3d622e2c7cfb .gitignore
--- a/.gitignore	Wed Aug 01 12:46:51 2012 +0100
+++ b/.gitignore	Wed Aug 01 12:46:52 2012 +0100
@@ -189,6 +189,7 @@ tools/libxl/xl
 tools/libxl/testenum
 tools/libxl/testenum.c
 tools/libxl/tmp.*
+tools/libxl/libxl.api-for-check
 tools/libaio/src/*.ol
 tools/libaio/src/*.os
 tools/misc/cpuperf/cpuperf-perfcntr
diff -r d801c1c1fec8 -r 3d622e2c7cfb .hgignore
--- a/.hgignore	Wed Aug 01 12:46:51 2012 +0100
+++ b/.hgignore	Wed Aug 01 12:46:52 2012 +0100
@@ -187,6 +187,7 @@
 ^tools/libxl/testidl\.c$
 ^tools/libxl/tmp\..*$
 ^tools/libxl/.*\.new$
+^tools/libxl/libxl\.api-for-check
 ^tools/libvchan/vchan-node[12]$
 ^tools/libaio/src/.*\.ol$
 ^tools/libaio/src/.*\.os$
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/Makefile
--- a/tools/libxl/Makefile	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/Makefile	Wed Aug 01 12:46:52 2012 +0100
@@ -74,7 +74,8 @@ LIBXL_OBJS += _libxl_types.o libxl_flask
 $(LIBXL_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) $(CFLAGS_libblktapctl) -include $(XEN_ROOT)/tools/config.h
 
 AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h _paths.h \
-	_libxl_save_msgs_callout.h _libxl_save_msgs_helper.h
+	_libxl_save_msgs_callout.h _libxl_save_msgs_helper.h \
+        libxl.api-ok
 AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
 AUTOSRCS += _libxl_save_msgs_callout.c _libxl_save_msgs_helper.c
 LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o \
@@ -113,13 +114,22 @@ all: $(CLIENTS) libxenlight.so libxenlig
 genpath-target = $(call buildmakevars2file,_paths.h.tmp)
 $(eval $(genpath-target))
 
+libxl.api-ok: check-libxl-api-rules libxl.api-for-check
+	$(PERL) $^
+
+%.api-for-check: %.h
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -c -E $< $(APPEND_CFLAGS) \
+		-DLIBXL_EXTERNAL_CALLERS_ONLY=LIBXL_EXTERNAL_CALLERS_ONLY \
+		>$@.new
+	$(call move-if-changed,$@.new,$@)
+
 _paths.h: genpath
 	sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" $@.tmp >$@.2.tmp
 	rm -f $@.tmp
 	$(call move-if-changed,$@.2.tmp,$@)
 
 _libxl_list.h: $(XEN_INCLUDE)/xen-external/bsd-sys-queue-h-seddery $(XEN_INCLUDE)/xen-external/bsd-sys-queue.h
-	perl $^ --prefix=libxl >$@.new
+	$(PERL) $^ --prefix=libxl >$@.new
 	$(call move-if-changed,$@.new,$@)
 
 _libxl_save_msgs_helper.c _libxl_save_msgs_callout.c \
@@ -200,7 +210,7 @@ install: all
 .PHONY: clean
 clean:
 	$(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS)
-	$(RM) -f _*.c *.pyc _paths.*.tmp
+	$(RM) -f _*.c *.pyc _paths.*.tmp *.api-for-check
 	$(RM) -f testidl.c.new testidl.c
 #	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
 
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/check-libxl-api-rules
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/libxl/check-libxl-api-rules	Wed Aug 01 12:46:52 2012 +0100
@@ -0,0 +1,23 @@
+#!/usr/bin/perl -w
+use strict;
+our $needed=0;
+our $speclineoffset=0;
+our $specfile;
+while (<>) {
+    if (m/^\# (\d+) \"(.*)\"$/) {
+        $speclineoffset = $1 - $. -1;
+        $specfile = $2;
+    }
+    my $file = defined($specfile) ? $specfile : $ARGV;
+    my $line = $speclineoffset + $.;
+    if (m/libxl_asyncop_how[^;]/) {
+        $needed=1;
+    }
+    if (m/LIBXL_EXTERNAL_CALLERS_ONLY/) {
+        $needed=0;
+    }
+    next unless $needed;
+    if (m/\;/) {
+        die "$file:$line:missing LIBXL_EXTERNAL_CALLERS_ONLY";
+    }
+}
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/gentypes.py
--- a/tools/libxl/gentypes.py	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/gentypes.py	Wed Aug 01 12:46:52 2012 +0100
@@ -377,7 +377,6 @@ if __name__ == '__main__':
 #include <stdlib.h>
 #include <string.h>
 
-#include "libxl.h"
 #include "libxl_internal.h"
 
 #define LIBXL_DTOR_POISON 0xa5
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/libxl.h	Wed Aug 01 12:46:52 2012 +0100
@@ -266,6 +266,13 @@
 #endif
 #endif
 
+/* Functions annotated with LIBXL_EXTERNAL_CALLERS_ONLY may not be
+ * called from within libxl itself. Callers outside libxl, who
+ * do not #include libxl_internal.h, are fine. */
+#ifndef LIBXL_EXTERNAL_CALLERS_ONLY
+#define LIBXL_EXTERNAL_CALLERS_ONLY /* disappears for callers outside libxl */
+#endif
+
 typedef uint8_t libxl_mac[6];
 #define LIBXL_MAC_FMT "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx"
 #define LIBXL_MAC_FMTLEN ((2*6)+5) /* 6 hex bytes plus 5 colons */
@@ -496,11 +503,13 @@ int libxl_ctx_free(libxl_ctx *ctx /* 0 i
 int libxl_domain_create_new(libxl_ctx *ctx, libxl_domain_config *d_config,
                             uint32_t *domid,
                             const libxl_asyncop_how *ao_how,
-                            const libxl_asyncprogress_how *aop_console_how);
+                            const libxl_asyncprogress_how *aop_console_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_domain_create_restore(libxl_ctx *ctx, libxl_domain_config *d_config,
                                 uint32_t *domid, int restore_fd,
                                 const libxl_asyncop_how *ao_how,
-                                const libxl_asyncprogress_how *aop_console_how);
+                                const libxl_asyncprogress_how *aop_console_how)
+                                LIBXL_EXTERNAL_CALLERS_ONLY;
   /* A progress report will be made via ao_console_how, of type
    * domain_create_console_available, when the domain's primary
    * console is available and can be connected to.
@@ -511,7 +520,8 @@ void libxl_domain_config_dispose(libxl_d
 
 int libxl_domain_suspend(libxl_ctx *ctx, uint32_t domid, int fd,
                          int flags, /* LIBXL_SUSPEND_* */
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 #define LIBXL_SUSPEND_DEBUG 1
 #define LIBXL_SUSPEND_LIVE 2
 
@@ -523,12 +533,14 @@ int libxl_domain_resume(libxl_ctx *ctx, 
 
 int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info,
                              uint32_t domid, int send_fd, int recv_fd,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 int libxl_domain_shutdown(libxl_ctx *ctx, uint32_t domid);
 int libxl_domain_reboot(libxl_ctx *ctx, uint32_t domid);
 int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid,
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_domain_preserve(libxl_ctx *ctx, uint32_t domid, libxl_domain_create_info *info, const char *name_suffix, libxl_uuid new_uuid);
 
 /* get max. number of cpus supported by hypervisor */
@@ -549,7 +561,8 @@ int libxl_domain_unpause(libxl_ctx *ctx,
 
 int libxl_domain_core_dump(libxl_ctx *ctx, uint32_t domid,
                            const char *filename,
-                           const libxl_asyncop_how *ao_how);
+                           const libxl_asyncop_how *ao_how)
+                           LIBXL_EXTERNAL_CALLERS_ONLY;
 
 int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint32_t target_memkb);
 int libxl_set_memory_target(libxl_ctx *ctx, uint32_t domid, int32_t target_memkb, int relative, int enforce);
@@ -677,13 +690,16 @@ void libxl_vcpuinfo_list_free(libxl_vcpu
 /* Disks */
 int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid,
                           libxl_device_disk *disk,
-                          const libxl_asyncop_how *ao_how);
+                          const libxl_asyncop_how *ao_how)
+                          LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_disk_remove(libxl_ctx *ctx, uint32_t domid,
                              libxl_device_disk *disk,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_disk_destroy(libxl_ctx *ctx, uint32_t domid,
                               libxl_device_disk *disk,
-                              const libxl_asyncop_how *ao_how);
+                              const libxl_asyncop_how *ao_how)
+                              LIBXL_EXTERNAL_CALLERS_ONLY;
 
 libxl_device_disk *libxl_device_disk_list(libxl_ctx *ctx, uint32_t domid, int *num);
 int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid,
@@ -694,17 +710,21 @@ int libxl_device_disk_getinfo(libxl_ctx 
  * be attached to the guest.
  */
 int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk,
-                       const libxl_asyncop_how *ao_how);
+                       const libxl_asyncop_how *ao_how)
+                       LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* Network Interfaces */
 int libxl_device_nic_add(libxl_ctx *ctx, uint32_t domid, libxl_device_nic *nic,
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_nic_remove(libxl_ctx *ctx, uint32_t domid,
                             libxl_device_nic *nic,
-                            const libxl_asyncop_how *ao_how);
+                            const libxl_asyncop_how *ao_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_nic_destroy(libxl_ctx *ctx, uint32_t domid,
                              libxl_device_nic *nic,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 libxl_device_nic *libxl_device_nic_list(libxl_ctx *ctx, uint32_t domid, int *num);
 int libxl_device_nic_getinfo(libxl_ctx *ctx, uint32_t domid,
@@ -712,23 +732,29 @@ int libxl_device_nic_getinfo(libxl_ctx *
 
 /* Keyboard */
 int libxl_device_vkb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vkb *vkb,
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_vkb_remove(libxl_ctx *ctx, uint32_t domid,
                             libxl_device_vkb *vkb,
-                            const libxl_asyncop_how *ao_how);
+                            const libxl_asyncop_how *ao_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_vkb_destroy(libxl_ctx *ctx, uint32_t domid,
                              libxl_device_vkb *vkb,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* Framebuffer */
 int libxl_device_vfb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_vfb *vfb,
-                         const libxl_asyncop_how *ao_how);
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_vfb_remove(libxl_ctx *ctx, uint32_t domid,
                             libxl_device_vfb *vfb,
-                            const libxl_asyncop_how *ao_how);
+                            const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 int libxl_device_vfb_destroy(libxl_ctx *ctx, uint32_t domid,
                              libxl_device_vfb *vfb,
-                             const libxl_asyncop_how *ao_how);
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* PCI Passthrough */
 int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/libxl_event.h
--- a/tools/libxl/libxl_event.h	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/libxl_event.h	Wed Aug 01 12:46:52 2012 +0100
@@ -37,7 +37,8 @@ typedef int libxl_event_predicate(const 
 
 int libxl_event_check(libxl_ctx *ctx, libxl_event **event_r,
                       uint64_t typemask,
-                      libxl_event_predicate *predicate, void *predicate_user);
+                      libxl_event_predicate *predicate, void *predicate_user)
+                      LIBXL_EXTERNAL_CALLERS_ONLY;
   /* Searches for an event, already-happened, which matches typemask
    * and predicate.  predicate==0 matches any event.
    * libxl_event_check returns the event, which must then later be
@@ -48,7 +49,8 @@ int libxl_event_check(libxl_ctx *ctx, li
 
 int libxl_event_wait(libxl_ctx *ctx, libxl_event **event_r,
                      uint64_t typemask,
-                     libxl_event_predicate *predicate, void *predicate_user);
+                     libxl_event_predicate *predicate, void *predicate_user)
+                     LIBXL_EXTERNAL_CALLERS_ONLY;
   /* Like libxl_event_check but blocks if no suitable events are
    * available, until some are.  Uses libxl_osevent_beforepoll/
    * _afterpoll so may be inefficient if very many domains are being
@@ -256,7 +258,8 @@ struct pollfd;
  */
 int libxl_osevent_beforepoll(libxl_ctx *ctx, int *nfds_io,
                              struct pollfd *fds, int *timeout_upd,
-                             struct timeval now);
+                             struct timeval now)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* nfds and fds[0..nfds] must be from the most recent call to
  * _beforepoll, as modified by poll.  (It is therefore not possible
@@ -271,7 +274,8 @@ int libxl_osevent_beforepoll(libxl_ctx *
  * libxl_event_check.
  */
 void libxl_osevent_afterpoll(libxl_ctx *ctx, int nfds, const struct pollfd *fds,
-                             struct timeval now);
+                             struct timeval now)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
 
 
 typedef struct libxl_osevent_hooks {
@@ -357,14 +361,16 @@ void libxl_osevent_register_hooks(libxl_
  */
 
 void libxl_osevent_occurred_fd(libxl_ctx *ctx, void *for_libxl,
-                               int fd, short events, short revents);
+                               int fd, short events, short revents)
+                               LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* Implicitly, on entry to this function the timeout has been
  * deregistered.  If _occurred_timeout is called, libxl will not
  * call timeout_deregister; if it wants to requeue the timeout it
  * will call timeout_register again.
  */
-void libxl_osevent_occurred_timeout(libxl_ctx *ctx, void *for_libxl);
+void libxl_osevent_occurred_timeout(libxl_ctx *ctx, void *for_libxl)
+                                    LIBXL_EXTERNAL_CALLERS_ONLY;
 
 
 /*======================================================================*/
@@ -506,7 +512,8 @@ void libxl_childproc_setmode(libxl_ctx *
  * certainly need to use the self-pipe trick (or a working pselect or
  * ppoll) to implement this.
  */
-int libxl_childproc_reaped(libxl_ctx *ctx, pid_t, int status);
+int libxl_childproc_reaped(libxl_ctx *ctx, pid_t, int status)
+                           LIBXL_EXTERNAL_CALLERS_ONLY;
 
 
 /*
diff -r d801c1c1fec8 -r 3d622e2c7cfb tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Wed Aug 01 12:46:51 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Wed Aug 01 12:46:52 2012 +0100
@@ -52,6 +52,12 @@
 
 #include <xen/io/xenbus.h>
 
+#ifdef LIBXL_H
+# error libxl.h should be included via libxl_internal.h, not separately
+#endif
+#define LIBXL_EXTERNAL_CALLERS_ONLY \
+    __attribute__((warning("may not be called from within libxl")))
+
 #include "libxl.h"
 #include "_paths.h"
 #include "_libxl_save_msgs_callout.h"
@@ -1534,10 +1540,10 @@ int libxl__hotplug_settings(libxl__gc *g
  *
  * Functions using LIBXL__INIT_EGC may *not* generally be called from
  * within libxl, because libxl__egc_cleanup may call back into the
- * application.  This should be documented near the function
- * prototype(s) for callers of LIBXL__INIT_EGC and EGC_INIT.  You
- * should in any case not find it necessary to call egc-creators from
- * within libxl.
+ * application.  This should be enforced by declaring all such
+ * functions in libxl.h or libxl_event.h with
+ * LIBXL_EXTERNAL_CALLERS_ONLY.  You should in any case not find it
+ * necessary to call egc-creators from within libxl.
  *
  * The callbacks must all take place with the ctx unlocked because
  * the application is entitled to reenter libxl from them.  This

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:55 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCu-00009T-O1; Wed, 01 Aug 2012 21:11:52 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCs-00009B-VJ
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:51 +0000
Received: from [85.158.143.35:42400] by server-3.bemta-4.messagelabs.com id
	D3/8D-01511-69B99105; Wed, 01 Aug 2012 21:11:50 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1343855471!13028039!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17900 invoked from network); 1 Aug 2012 21:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0004xN-4b
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0000xX-1Q
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:11 +0000
Message-Id: <E1SwgCF-0000xX-1Q@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix unitialized variables in
	libxl__primary_console_find
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1343821609 -3600
# Node ID c379e77870aff938ca941a3acb760831039c19a6
# Parent  433624c658af4f3bf21ae53ef090528e870fdf58
libxl: fix unitialized variables in libxl__primary_console_find

gcc 4.5 as shipped with openSuSE 11.4 does not recognize the case of
LIBXL_DOMAIN_TYPE_INVALID properly:

cc1: warnings being treated as errors
libxl.c: In function 'libxl_primary_console_exec':
libxl.c:1408:14: error: 'domid' may be used uninitialized in this function
libxl.c:1409:9: error: 'cons_num' may be used uninitialized in this function
libxl.c:1410:24: error: 'type' may be used uninitialized in this function
libxl.c: In function 'libxl_primary_console_get_tty':
libxl.c:1421:14: error: 'domid' may be used uninitialized in this function
libxl.c:1422:9: error: 'cons_num' may be used uninitialized in this function
libxl.c:1423:24: error: 'type' may be used uninitialized in this function
make[3]: *** [libxl.o] Error 1

Fix this by adding a default case.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 433624c658af -r c379e77870af tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Wed Aug 01 12:46:48 2012 +0100
+++ b/tools/libxl/libxl.c	Wed Aug 01 12:46:49 2012 +0100
@@ -1590,6 +1590,7 @@ static int libxl__primary_console_find(l
         case LIBXL_DOMAIN_TYPE_INVALID:
             rc = ERROR_INVAL;
             goto out;
+        default: abort();
         }
     }
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 01 21:11:55 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 01 Aug 2012 21:11:55 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwgCu-00009T-O1; Wed, 01 Aug 2012 21:11:52 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCs-00009B-VJ
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:51 +0000
Received: from [85.158.143.35:42400] by server-3.bemta-4.messagelabs.com id
	D3/8D-01511-69B99105; Wed, 01 Aug 2012 21:11:50 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1343855471!13028039!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17900 invoked from network); 1 Aug 2012 21:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Aug 2012 21:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0004xN-4b
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwgCF-0000xX-1Q
	for xen-changelog@lists.xensource.com; Wed, 01 Aug 2012 21:11:11 +0000
Message-Id: <E1SwgCF-0000xX-1Q@xenbits.xen.org>
Date: Wed, 01 Aug 2012 21:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix unitialized variables in
	libxl__primary_console_find
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1343821609 -3600
# Node ID c379e77870aff938ca941a3acb760831039c19a6
# Parent  433624c658af4f3bf21ae53ef090528e870fdf58
libxl: fix unitialized variables in libxl__primary_console_find

gcc 4.5 as shipped with openSuSE 11.4 does not recognize the case of
LIBXL_DOMAIN_TYPE_INVALID properly:

cc1: warnings being treated as errors
libxl.c: In function 'libxl_primary_console_exec':
libxl.c:1408:14: error: 'domid' may be used uninitialized in this function
libxl.c:1409:9: error: 'cons_num' may be used uninitialized in this function
libxl.c:1410:24: error: 'type' may be used uninitialized in this function
libxl.c: In function 'libxl_primary_console_get_tty':
libxl.c:1421:14: error: 'domid' may be used uninitialized in this function
libxl.c:1422:9: error: 'cons_num' may be used uninitialized in this function
libxl.c:1423:24: error: 'type' may be used uninitialized in this function
make[3]: *** [libxl.o] Error 1

Fix this by adding a default case.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 433624c658af -r c379e77870af tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Wed Aug 01 12:46:48 2012 +0100
+++ b/tools/libxl/libxl.c	Wed Aug 01 12:46:49 2012 +0100
@@ -1590,6 +1590,7 @@ static int libxl__primary_console_find(l
         case LIBXL_DOMAIN_TYPE_INVALID:
             rc = ERROR_INVAL;
             goto out;
+        default: abort();
         }
     }
 

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

From xen-changelog-bounces@lists.xen.org Thu Aug 02 16:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 02 Aug 2012 16:44:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwyVP-0006fM-4H; Thu, 02 Aug 2012 16:44:11 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVO-0006f6-6E
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:10 +0000
Received: from [85.158.143.99:42058] by server-3.bemta-4.messagelabs.com id
	53/E6-01511-95EAA105; Thu, 02 Aug 2012 16:44:09 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-216.messagelabs.com!1343925848!29373480!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3082 invoked from network); 2 Aug 2012 16:44:08 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Aug 2012 16:44:08 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVL-00055y-P1
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVL-0004Tp-JS
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:07 +0000
Message-Id: <E1SwyVL-0004Tp-JS@xenbits.xen.org>
Date: Thu, 02 Aug 2012 16:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] pygrub: add quoting to install
	receipe
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1343900762 -3600
# Node ID 619c4298f055f4e4b4c82b5d703acaf344f8bc62
# Parent  3d622e2c7cfb15b37498e9bb8f1005516fe99f2f
pygrub: add quoting to install receipe

The changeset 25694:e20085770cb5 causes a syntax error if readline
returns nothing due to non-existant path:

[  148s] set -e; if [ `readlink -f /home/abuild/rpmbuild/BUILD/xen-4.2.25700/non-dbg/dist/install//usr/bin` != \
[  148s]              `readlink -f /usr/lib64/xen/bin` ]; then \
[  148s]     ln -sf /usr/lib64/xen/bin/pygrub /home/abuild/rpmbuild/BUILD/xen-4.2.25700/non-dbg/dist/install//usr/bin; \
[  148s] fi
[  148s] /bin/sh: line 0: [: /home/abuild/rpmbuild/BUILD/xen-4.2.25700/non-dbg/dist/install/usr/bin: unary operator expected

Add quoting to fix the error.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 3d622e2c7cfb -r 619c4298f055 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Wed Aug 01 12:46:52 2012 +0100
+++ b/tools/pygrub/Makefile	Thu Aug 02 10:46:02 2012 +0100
@@ -14,8 +14,8 @@ install: all
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
 		--install-scripts=$(PRIVATE_BINDIR) --force
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-	set -e; if [ `readlink -f $(DESTDIR)/$(BINDIR)` != \
-	             `readlink -f $(PRIVATE_BINDIR)` ]; then \
+	set -e; if [ "`readlink -f $(DESTDIR)/$(BINDIR)`" != \
+	             "`readlink -f $(PRIVATE_BINDIR)`" ]; then \
 	    ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
 	fi
 

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

From xen-changelog-bounces@lists.xen.org Thu Aug 02 16:44:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 02 Aug 2012 16:44:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwyVP-0006fM-4H; Thu, 02 Aug 2012 16:44:11 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVO-0006f6-6E
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:10 +0000
Received: from [85.158.143.99:42058] by server-3.bemta-4.messagelabs.com id
	53/E6-01511-95EAA105; Thu, 02 Aug 2012 16:44:09 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-216.messagelabs.com!1343925848!29373480!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3082 invoked from network); 2 Aug 2012 16:44:08 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Aug 2012 16:44:08 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVL-00055y-P1
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:07 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVL-0004Tp-JS
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:07 +0000
Message-Id: <E1SwyVL-0004Tp-JS@xenbits.xen.org>
Date: Thu, 02 Aug 2012 16:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] pygrub: add quoting to install
	receipe
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1343900762 -3600
# Node ID 619c4298f055f4e4b4c82b5d703acaf344f8bc62
# Parent  3d622e2c7cfb15b37498e9bb8f1005516fe99f2f
pygrub: add quoting to install receipe

The changeset 25694:e20085770cb5 causes a syntax error if readline
returns nothing due to non-existant path:

[  148s] set -e; if [ `readlink -f /home/abuild/rpmbuild/BUILD/xen-4.2.25700/non-dbg/dist/install//usr/bin` != \
[  148s]              `readlink -f /usr/lib64/xen/bin` ]; then \
[  148s]     ln -sf /usr/lib64/xen/bin/pygrub /home/abuild/rpmbuild/BUILD/xen-4.2.25700/non-dbg/dist/install//usr/bin; \
[  148s] fi
[  148s] /bin/sh: line 0: [: /home/abuild/rpmbuild/BUILD/xen-4.2.25700/non-dbg/dist/install/usr/bin: unary operator expected

Add quoting to fix the error.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 3d622e2c7cfb -r 619c4298f055 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile	Wed Aug 01 12:46:52 2012 +0100
+++ b/tools/pygrub/Makefile	Thu Aug 02 10:46:02 2012 +0100
@@ -14,8 +14,8 @@ install: all
 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
 		--install-scripts=$(PRIVATE_BINDIR) --force
 	$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-	set -e; if [ `readlink -f $(DESTDIR)/$(BINDIR)` != \
-	             `readlink -f $(PRIVATE_BINDIR)` ]; then \
+	set -e; if [ "`readlink -f $(DESTDIR)/$(BINDIR)`" != \
+	             "`readlink -f $(PRIVATE_BINDIR)`" ]; then \
 	    ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
 	fi
 

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

From xen-changelog-bounces@lists.xen.org Thu Aug 02 16:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 02 Aug 2012 16:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwyVR-0006ff-7H; Thu, 02 Aug 2012 16:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVP-0006fK-IF
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:11 +0000
Received: from [85.158.138.51:28957] by server-8.bemta-3.messagelabs.com id
	0A/FE-10412-A5EAA105; Thu, 02 Aug 2012 16:44:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1343925849!26074246!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10398 invoked from network); 2 Aug 2012 16:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Aug 2012 16:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVM-000561-KR
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVM-0004U4-6h
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:08 +0000
Message-Id: <E1SwyVM-0004U4-6h@xenbits.xen.org>
Date: Thu, 02 Aug 2012 16:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: also allow disabling LAPIC NMI
	watchdog on newer CPUs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1343900977 -7200
# Node ID 3d17148e465ce87ddd8f555a001280348d848419
# Parent  619c4298f055f4e4b4c82b5d703acaf344f8bc62
x86: also allow disabling LAPIC NMI watchdog on newer CPUs

This complements c/s 9146:941897e98591, and also replaces a literal
zero with a proper manifest constant.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 619c4298f055 -r 3d17148e465c xen/arch/x86/nmi.c
--- a/xen/arch/x86/nmi.c	Thu Aug 02 10:46:02 2012 +0100
+++ b/xen/arch/x86/nmi.c	Thu Aug 02 11:49:37 2012 +0200
@@ -175,15 +175,9 @@ static void disable_lapic_nmi_watchdog(v
     case X86_VENDOR_INTEL:
         switch (boot_cpu_data.x86) {
         case 6:
-            if (boot_cpu_data.x86_model > 0xd)
-                break;
-
             wrmsr(MSR_P6_EVNTSEL0, 0, 0);
             break;
         case 15:
-            if (boot_cpu_data.x86_model > 0x4)
-                break;
-
             wrmsr(MSR_P4_IQ_CCCR0, 0, 0);
             wrmsr(MSR_P4_CRU_ESCR0, 0, 0);
             break;
@@ -192,7 +186,7 @@ static void disable_lapic_nmi_watchdog(v
     }
     nmi_active = -1;
     /* tell do_nmi() and others that we're not active any more */
-    nmi_watchdog = 0;
+    nmi_watchdog = NMI_NONE;
 }
 
 static void enable_lapic_nmi_watchdog(void)

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

From xen-changelog-bounces@lists.xen.org Thu Aug 02 16:44:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 02 Aug 2012 16:44:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SwyVR-0006ff-7H; Thu, 02 Aug 2012 16:44:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVP-0006fK-IF
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:11 +0000
Received: from [85.158.138.51:28957] by server-8.bemta-3.messagelabs.com id
	0A/FE-10412-A5EAA105; Thu, 02 Aug 2012 16:44:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1343925849!26074246!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10398 invoked from network); 2 Aug 2012 16:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Aug 2012 16:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVM-000561-KR
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SwyVM-0004U4-6h
	for xen-changelog@lists.xensource.com; Thu, 02 Aug 2012 16:44:08 +0000
Message-Id: <E1SwyVM-0004U4-6h@xenbits.xen.org>
Date: Thu, 02 Aug 2012 16:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: also allow disabling LAPIC NMI
	watchdog on newer CPUs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1343900977 -7200
# Node ID 3d17148e465ce87ddd8f555a001280348d848419
# Parent  619c4298f055f4e4b4c82b5d703acaf344f8bc62
x86: also allow disabling LAPIC NMI watchdog on newer CPUs

This complements c/s 9146:941897e98591, and also replaces a literal
zero with a proper manifest constant.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 619c4298f055 -r 3d17148e465c xen/arch/x86/nmi.c
--- a/xen/arch/x86/nmi.c	Thu Aug 02 10:46:02 2012 +0100
+++ b/xen/arch/x86/nmi.c	Thu Aug 02 11:49:37 2012 +0200
@@ -175,15 +175,9 @@ static void disable_lapic_nmi_watchdog(v
     case X86_VENDOR_INTEL:
         switch (boot_cpu_data.x86) {
         case 6:
-            if (boot_cpu_data.x86_model > 0xd)
-                break;
-
             wrmsr(MSR_P6_EVNTSEL0, 0, 0);
             break;
         case 15:
-            if (boot_cpu_data.x86_model > 0x4)
-                break;
-
             wrmsr(MSR_P4_IQ_CCCR0, 0, 0);
             wrmsr(MSR_P4_CRU_ESCR0, 0, 0);
             break;
@@ -192,7 +186,7 @@ static void disable_lapic_nmi_watchdog(v
     }
     nmi_active = -1;
     /* tell do_nmi() and others that we're not active any more */
-    nmi_watchdog = 0;
+    nmi_watchdog = NMI_NONE;
 }
 
 static void enable_lapic_nmi_watchdog(void)

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 06:22:16 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 06:22:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SydBC-0005B3-2o; Tue, 07 Aug 2012 06:22:10 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydBA-0005AV-3P
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:08 +0000
Received: from [85.158.139.83:16003] by server-7.bemta-5.messagelabs.com id
	26/CC-00857-F04B0205; Tue, 07 Aug 2012 06:22:07 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-182.messagelabs.com!1344320525!30565548!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20640 invoked from network); 7 Aug 2012 06:22:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 06:22:06 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB6-0001rQ-V6
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB6-0007bq-E7
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:04 +0000
Message-Id: <E1SydB6-0007bq-E7@xenbits.xen.org>
Date: Tue, 07 Aug 2012 06:22:04 +0000
From: Xen patchbot-linux-2.6.18-xen <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [linux-2.6.18-xen] mm: properly frame Xen additions
	with CONFIG_XEN conditionals
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344319692 -7200
# Node ID 2d3239c1550132c77c2c306f294b2cd01d57ec81
# Parent  f628814a279a118f4b1b7c121ccc1b8be4d44f9d
mm: properly frame Xen additions with CONFIG_XEN conditionals

There's no need and no good reason to affect native kernels built from
the same sources.

Also eliminate a compiler warning triggered by various versions, and
adjust some white space.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---


diff -r f628814a279a -r 2d3239c15501 include/linux/mm.h
--- a/include/linux/mm.h	Tue Aug 07 08:07:12 2012 +0200
+++ b/include/linux/mm.h	Tue Aug 07 08:08:12 2012 +0200
@@ -209,14 +209,15 @@ struct vm_operations_struct {
 	/* notification that a previously read-only page is about to become
 	 * writable, if an error is returned it will cause a SIGBUS */
 	int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
+#ifdef CONFIG_XEN
 	/* Area-specific function for clearing the PTE at @ptep. Returns the
 	 * original value of @ptep. */
-	pte_t (*zap_pte)(struct vm_area_struct *vma, 
+	pte_t (*zap_pte)(struct vm_area_struct *vma,
 			 unsigned long addr, pte_t *ptep, int is_fullmm);
 
-        /* called before close() to indicate no more pages should be mapped */
-        void (*unmap)(struct vm_area_struct *area);
-
+	/* called before close() to indicate no more pages should be mapped */
+	void (*unmap)(struct vm_area_struct *area);
+#endif
 #ifdef CONFIG_NUMA
 	int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new);
 	struct mempolicy *(*get_policy)(struct vm_area_struct *vma,
diff -r f628814a279a -r 2d3239c15501 mm/memory.c
--- a/mm/memory.c	Tue Aug 07 08:07:12 2012 +0200
+++ b/mm/memory.c	Tue Aug 07 08:08:12 2012 +0200
@@ -409,7 +409,9 @@ struct page *vm_normal_page(struct vm_ar
 	 * and that the resulting page looks ok.
 	 */
 	if (unlikely(!pfn_valid(pfn))) {
+#ifdef CONFIG_XEN
 		if (!(vma->vm_flags & VM_RESERVED))
+#endif
 			print_bad_pte(vma, pte, addr);
 		return NULL;
 	}
@@ -665,10 +667,12 @@ static unsigned long zap_pte_range(struc
 				     page->index > details->last_index))
 					continue;
 			}
+#ifdef CONFIG_XEN
 			if (unlikely(vma->vm_ops && vma->vm_ops->zap_pte))
 				ptent = vma->vm_ops->zap_pte(vma, addr, pte,
 							     tlb->fullmm);
 			else
+#endif
 				ptent = ptep_get_and_clear_full(mm, addr, pte,
 								tlb->fullmm);
 			tlb_remove_tlb_entry(tlb, pte, addr);
@@ -1425,7 +1429,7 @@ static inline int apply_to_pte_range(str
 	spinlock_t *ptl;
 
 	pte = (mm == &init_mm) ?
-		pte_alloc_kernel(pmd, addr) :
+		ptl = NULL, pte_alloc_kernel(pmd, addr) :
 		pte_alloc_map_lock(mm, pmd, addr, &ptl);
 	if (!pte)
 		return -ENOMEM;
diff -r f628814a279a -r 2d3239c15501 mm/mmap.c
--- a/mm/mmap.c	Tue Aug 07 08:07:12 2012 +0200
+++ b/mm/mmap.c	Tue Aug 07 08:08:12 2012 +0200
@@ -1689,8 +1689,10 @@ static void unmap_region(struct mm_struc
 
 static inline void unmap_vma(struct vm_area_struct *vma)
 {
+#ifdef CONFIG_XEN
 	if (unlikely(vma->vm_ops && vma->vm_ops->unmap))
 		vma->vm_ops->unmap(vma);
+#endif
 }
 
 /*
@@ -1966,7 +1968,7 @@ EXPORT_SYMBOL(do_brk);
 void exit_mmap(struct mm_struct *mm)
 {
 	struct mmu_gather *tlb;
-	struct vm_area_struct *vma_tmp, *vma = mm->mmap;
+	struct vm_area_struct *vma = mm->mmap;
 	unsigned long nr_accounted = 0;
 	unsigned long end;
 
@@ -1974,8 +1976,11 @@ void exit_mmap(struct mm_struct *mm)
 	arch_exit_mmap(mm);
 #endif
 
-	for (vma_tmp = mm->mmap; vma_tmp; vma_tmp = vma_tmp->vm_next)
-		unmap_vma(vma_tmp);
+#ifdef CONFIG_XEN
+	for (; vma; vma = vma->vm_next)
+		unmap_vma(vma);
+	vma = mm->mmap;
+#endif
 
 	lru_add_drain();
 	flush_cache_mm(mm);

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 06:22:16 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 06:22:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SydBC-0005B3-2o; Tue, 07 Aug 2012 06:22:10 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydBA-0005AV-3P
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:08 +0000
Received: from [85.158.139.83:16003] by server-7.bemta-5.messagelabs.com id
	26/CC-00857-F04B0205; Tue, 07 Aug 2012 06:22:07 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-182.messagelabs.com!1344320525!30565548!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20640 invoked from network); 7 Aug 2012 06:22:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 06:22:06 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB6-0001rQ-V6
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB6-0007bq-E7
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:04 +0000
Message-Id: <E1SydB6-0007bq-E7@xenbits.xen.org>
Date: Tue, 07 Aug 2012 06:22:04 +0000
From: Xen patchbot-linux-2.6.18-xen <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [linux-2.6.18-xen] mm: properly frame Xen additions
	with CONFIG_XEN conditionals
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344319692 -7200
# Node ID 2d3239c1550132c77c2c306f294b2cd01d57ec81
# Parent  f628814a279a118f4b1b7c121ccc1b8be4d44f9d
mm: properly frame Xen additions with CONFIG_XEN conditionals

There's no need and no good reason to affect native kernels built from
the same sources.

Also eliminate a compiler warning triggered by various versions, and
adjust some white space.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---


diff -r f628814a279a -r 2d3239c15501 include/linux/mm.h
--- a/include/linux/mm.h	Tue Aug 07 08:07:12 2012 +0200
+++ b/include/linux/mm.h	Tue Aug 07 08:08:12 2012 +0200
@@ -209,14 +209,15 @@ struct vm_operations_struct {
 	/* notification that a previously read-only page is about to become
 	 * writable, if an error is returned it will cause a SIGBUS */
 	int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
+#ifdef CONFIG_XEN
 	/* Area-specific function for clearing the PTE at @ptep. Returns the
 	 * original value of @ptep. */
-	pte_t (*zap_pte)(struct vm_area_struct *vma, 
+	pte_t (*zap_pte)(struct vm_area_struct *vma,
 			 unsigned long addr, pte_t *ptep, int is_fullmm);
 
-        /* called before close() to indicate no more pages should be mapped */
-        void (*unmap)(struct vm_area_struct *area);
-
+	/* called before close() to indicate no more pages should be mapped */
+	void (*unmap)(struct vm_area_struct *area);
+#endif
 #ifdef CONFIG_NUMA
 	int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new);
 	struct mempolicy *(*get_policy)(struct vm_area_struct *vma,
diff -r f628814a279a -r 2d3239c15501 mm/memory.c
--- a/mm/memory.c	Tue Aug 07 08:07:12 2012 +0200
+++ b/mm/memory.c	Tue Aug 07 08:08:12 2012 +0200
@@ -409,7 +409,9 @@ struct page *vm_normal_page(struct vm_ar
 	 * and that the resulting page looks ok.
 	 */
 	if (unlikely(!pfn_valid(pfn))) {
+#ifdef CONFIG_XEN
 		if (!(vma->vm_flags & VM_RESERVED))
+#endif
 			print_bad_pte(vma, pte, addr);
 		return NULL;
 	}
@@ -665,10 +667,12 @@ static unsigned long zap_pte_range(struc
 				     page->index > details->last_index))
 					continue;
 			}
+#ifdef CONFIG_XEN
 			if (unlikely(vma->vm_ops && vma->vm_ops->zap_pte))
 				ptent = vma->vm_ops->zap_pte(vma, addr, pte,
 							     tlb->fullmm);
 			else
+#endif
 				ptent = ptep_get_and_clear_full(mm, addr, pte,
 								tlb->fullmm);
 			tlb_remove_tlb_entry(tlb, pte, addr);
@@ -1425,7 +1429,7 @@ static inline int apply_to_pte_range(str
 	spinlock_t *ptl;
 
 	pte = (mm == &init_mm) ?
-		pte_alloc_kernel(pmd, addr) :
+		ptl = NULL, pte_alloc_kernel(pmd, addr) :
 		pte_alloc_map_lock(mm, pmd, addr, &ptl);
 	if (!pte)
 		return -ENOMEM;
diff -r f628814a279a -r 2d3239c15501 mm/mmap.c
--- a/mm/mmap.c	Tue Aug 07 08:07:12 2012 +0200
+++ b/mm/mmap.c	Tue Aug 07 08:08:12 2012 +0200
@@ -1689,8 +1689,10 @@ static void unmap_region(struct mm_struc
 
 static inline void unmap_vma(struct vm_area_struct *vma)
 {
+#ifdef CONFIG_XEN
 	if (unlikely(vma->vm_ops && vma->vm_ops->unmap))
 		vma->vm_ops->unmap(vma);
+#endif
 }
 
 /*
@@ -1966,7 +1968,7 @@ EXPORT_SYMBOL(do_brk);
 void exit_mmap(struct mm_struct *mm)
 {
 	struct mmu_gather *tlb;
-	struct vm_area_struct *vma_tmp, *vma = mm->mmap;
+	struct vm_area_struct *vma = mm->mmap;
 	unsigned long nr_accounted = 0;
 	unsigned long end;
 
@@ -1974,8 +1976,11 @@ void exit_mmap(struct mm_struct *mm)
 	arch_exit_mmap(mm);
 #endif
 
-	for (vma_tmp = mm->mmap; vma_tmp; vma_tmp = vma_tmp->vm_next)
-		unmap_vma(vma_tmp);
+#ifdef CONFIG_XEN
+	for (; vma; vma = vma->vm_next)
+		unmap_vma(vma);
+	vma = mm->mmap;
+#endif
 
 	lru_add_drain();
 	flush_cache_mm(mm);

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 06:22:16 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 06:22:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SydBB-0005Af-0S; Tue, 07 Aug 2012 06:22:09 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB9-0005AU-Id
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:07 +0000
Received: from [85.158.138.51:41373] by server-12.bemta-3.messagelabs.com id
	B9/7F-21301-E04B0205; Tue, 07 Aug 2012 06:22:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1344320525!26701272!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7359 invoked from network); 7 Aug 2012 06:22:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 06:22:06 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB6-0001rN-GR
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB5-0007bb-MS
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:04 +0000
Message-Id: <E1SydB5-0007bb-MS@xenbits.xen.org>
Date: Tue, 07 Aug 2012 06:22:03 +0000
From: Xen patchbot-linux-2.6.18-xen <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [linux-2.6.18-xen] x86: fix context switch on debug
	hypervisor after 1183:5e3c342a325e
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344319632 -7200
# Node ID f628814a279a118f4b1b7c121ccc1b8be4d44f9d
# Parent  d5afea2ab44ff42e3a12e3952efa35a60ca2d1de
x86: fix context switch on debug hypervisor after 1183:5e3c342a325e

Looking at anything but the result field of a multicall structure after
issuing the multicall is invalid - the debug hypervisor intentionally
clobbers all other fields.

On i386 also remove some left over, unused debugging code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---


diff -r d5afea2ab44f -r f628814a279a arch/i386/kernel/process-xen.c
--- a/arch/i386/kernel/process-xen.c	Tue Jul 03 11:07:47 2012 +0200
+++ b/arch/i386/kernel/process-xen.c	Tue Aug 07 08:07:12 2012 +0200
@@ -548,7 +548,7 @@ struct task_struct fastcall * __switch_t
 {
 	struct thread_struct *prev = &prev_p->thread,
 				 *next = &next_p->thread;
-	int cpu = smp_processor_id();
+	int cpu = smp_processor_id(), cr0_ts;
 #ifndef CONFIG_X86_NO_TSS
 	struct tss_struct *tss = &per_cpu(init_tss, cpu);
 #endif
@@ -575,9 +575,6 @@ struct task_struct fastcall * __switch_t
 		mcl->args[0] = 1;
 		mcl++;
 	}
-#if 0 /* lazy fpu sanity check */
-	else BUG_ON(!(read_cr0() & 8));
-#endif
 
 	/*
 	 * Reload esp0.
@@ -639,11 +636,14 @@ struct task_struct fastcall * __switch_t
 	BUG_ON(pdo > _pdo + ARRAY_SIZE(_pdo));
 #endif
 	BUG_ON(mcl > _mcl + ARRAY_SIZE(_mcl));
-	if (_mcl->op == __HYPERVISOR_fpu_taskswitch)
+	if (_mcl->op == __HYPERVISOR_fpu_taskswitch) {
 		__get_cpu_var(xen_x86_cr0_upd) = X86_CR0_TS;
+		cr0_ts = 1;
+	} else
+		cr0_ts = 0;
 	if (unlikely(HYPERVISOR_multicall_check(_mcl, mcl - _mcl, NULL)))
 		BUG();
-	if (_mcl->op == __HYPERVISOR_fpu_taskswitch) {
+	if (cr0_ts) {
 		__get_cpu_var(xen_x86_cr0) |= X86_CR0_TS;
 		xen_clear_cr0_upd();
 	}
diff -r d5afea2ab44f -r f628814a279a arch/x86_64/kernel/process-xen.c
--- a/arch/x86_64/kernel/process-xen.c	Tue Jul 03 11:07:47 2012 +0200
+++ b/arch/x86_64/kernel/process-xen.c	Tue Aug 07 08:07:12 2012 +0200
@@ -486,7 +486,7 @@ __switch_to(struct task_struct *prev_p, 
 {
 	struct thread_struct *prev = &prev_p->thread,
 				 *next = &next_p->thread;
-	int cpu = smp_processor_id();  
+	int cpu = smp_processor_id(), cr0_ts;
 #ifndef CONFIG_X86_NO_TSS
 	struct tss_struct *tss = &per_cpu(init_tss, cpu);
 #endif
@@ -572,11 +572,14 @@ __switch_to(struct task_struct *prev_p, 
 	BUG_ON(pdo > _pdo + ARRAY_SIZE(_pdo));
 #endif
 	BUG_ON(mcl > _mcl + ARRAY_SIZE(_mcl));
-	if (_mcl->op == __HYPERVISOR_fpu_taskswitch)
+	if (_mcl->op == __HYPERVISOR_fpu_taskswitch) {
 		__get_cpu_var(xen_x86_cr0_upd) = X86_CR0_TS;
+		cr0_ts = 1;
+	} else
+		cr0_ts = 0;
 	if (unlikely(HYPERVISOR_multicall_check(_mcl, mcl - _mcl, NULL)))
 		BUG();
-	if (_mcl->op == __HYPERVISOR_fpu_taskswitch) {
+	if (cr0_ts) {
 		__get_cpu_var(xen_x86_cr0) |= X86_CR0_TS;
 		xen_clear_cr0_upd();
 	}

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 06:22:16 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 06:22:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SydBB-0005Af-0S; Tue, 07 Aug 2012 06:22:09 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB9-0005AU-Id
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:07 +0000
Received: from [85.158.138.51:41373] by server-12.bemta-3.messagelabs.com id
	B9/7F-21301-E04B0205; Tue, 07 Aug 2012 06:22:06 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1344320525!26701272!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7359 invoked from network); 7 Aug 2012 06:22:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 06:22:06 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB6-0001rN-GR
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SydB5-0007bb-MS
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 06:22:04 +0000
Message-Id: <E1SydB5-0007bb-MS@xenbits.xen.org>
Date: Tue, 07 Aug 2012 06:22:03 +0000
From: Xen patchbot-linux-2.6.18-xen <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [linux-2.6.18-xen] x86: fix context switch on debug
	hypervisor after 1183:5e3c342a325e
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344319632 -7200
# Node ID f628814a279a118f4b1b7c121ccc1b8be4d44f9d
# Parent  d5afea2ab44ff42e3a12e3952efa35a60ca2d1de
x86: fix context switch on debug hypervisor after 1183:5e3c342a325e

Looking at anything but the result field of a multicall structure after
issuing the multicall is invalid - the debug hypervisor intentionally
clobbers all other fields.

On i386 also remove some left over, unused debugging code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---


diff -r d5afea2ab44f -r f628814a279a arch/i386/kernel/process-xen.c
--- a/arch/i386/kernel/process-xen.c	Tue Jul 03 11:07:47 2012 +0200
+++ b/arch/i386/kernel/process-xen.c	Tue Aug 07 08:07:12 2012 +0200
@@ -548,7 +548,7 @@ struct task_struct fastcall * __switch_t
 {
 	struct thread_struct *prev = &prev_p->thread,
 				 *next = &next_p->thread;
-	int cpu = smp_processor_id();
+	int cpu = smp_processor_id(), cr0_ts;
 #ifndef CONFIG_X86_NO_TSS
 	struct tss_struct *tss = &per_cpu(init_tss, cpu);
 #endif
@@ -575,9 +575,6 @@ struct task_struct fastcall * __switch_t
 		mcl->args[0] = 1;
 		mcl++;
 	}
-#if 0 /* lazy fpu sanity check */
-	else BUG_ON(!(read_cr0() & 8));
-#endif
 
 	/*
 	 * Reload esp0.
@@ -639,11 +636,14 @@ struct task_struct fastcall * __switch_t
 	BUG_ON(pdo > _pdo + ARRAY_SIZE(_pdo));
 #endif
 	BUG_ON(mcl > _mcl + ARRAY_SIZE(_mcl));
-	if (_mcl->op == __HYPERVISOR_fpu_taskswitch)
+	if (_mcl->op == __HYPERVISOR_fpu_taskswitch) {
 		__get_cpu_var(xen_x86_cr0_upd) = X86_CR0_TS;
+		cr0_ts = 1;
+	} else
+		cr0_ts = 0;
 	if (unlikely(HYPERVISOR_multicall_check(_mcl, mcl - _mcl, NULL)))
 		BUG();
-	if (_mcl->op == __HYPERVISOR_fpu_taskswitch) {
+	if (cr0_ts) {
 		__get_cpu_var(xen_x86_cr0) |= X86_CR0_TS;
 		xen_clear_cr0_upd();
 	}
diff -r d5afea2ab44f -r f628814a279a arch/x86_64/kernel/process-xen.c
--- a/arch/x86_64/kernel/process-xen.c	Tue Jul 03 11:07:47 2012 +0200
+++ b/arch/x86_64/kernel/process-xen.c	Tue Aug 07 08:07:12 2012 +0200
@@ -486,7 +486,7 @@ __switch_to(struct task_struct *prev_p, 
 {
 	struct thread_struct *prev = &prev_p->thread,
 				 *next = &next_p->thread;
-	int cpu = smp_processor_id();  
+	int cpu = smp_processor_id(), cr0_ts;
 #ifndef CONFIG_X86_NO_TSS
 	struct tss_struct *tss = &per_cpu(init_tss, cpu);
 #endif
@@ -572,11 +572,14 @@ __switch_to(struct task_struct *prev_p, 
 	BUG_ON(pdo > _pdo + ARRAY_SIZE(_pdo));
 #endif
 	BUG_ON(mcl > _mcl + ARRAY_SIZE(_mcl));
-	if (_mcl->op == __HYPERVISOR_fpu_taskswitch)
+	if (_mcl->op == __HYPERVISOR_fpu_taskswitch) {
 		__get_cpu_var(xen_x86_cr0_upd) = X86_CR0_TS;
+		cr0_ts = 1;
+	} else
+		cr0_ts = 0;
 	if (unlikely(HYPERVISOR_multicall_check(_mcl, mcl - _mcl, NULL)))
 		BUG();
-	if (_mcl->op == __HYPERVISOR_fpu_taskswitch) {
+	if (cr0_ts) {
 		__get_cpu_var(xen_x86_cr0) |= X86_CR0_TS;
 		xen_clear_cr0_upd();
 	}

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 15:01:36 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 15:01:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SylHm-0003ew-Ir; Tue, 07 Aug 2012 15:01:30 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylHl-0003en-B1
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:01:29 +0000
Received: from [85.158.139.83:54406] by server-3.bemta-5.messagelabs.com id
	E7/8D-31899-8CD21205; Tue, 07 Aug 2012 15:01:28 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-182.messagelabs.com!1344351686!23492080!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23508 invoked from network); 7 Aug 2012 15:01:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 15:01:27 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylHh-0008Ba-T4
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:01:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylHh-0003kY-HH
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:01:25 +0000
Message-Id: <E1SylHh-0003kY-HH@xenbits.xen.org>
Date: Tue, 07 Aug 2012 15:01:24 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] nestedhvm: fix nested page fault
	build error on 32-bit
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343987004 -3600
# Node ID f8f8912b3de00ba4451894c29419ca95e13af38e
# Parent  5a65d6a1aab79b80e4b4cd7bf2621707e507a546
nestedhvm: fix nested page fault build error on 32-bit

    cc1: warnings being treated as errors
    hvm.c: In function ?hvm_hap_nested_page_fault?:
    hvm.c:1282: error: passing argument 2 of
    ?nestedhvm_hap_nested_page_fault? from incompatible pointer type
    /local/scratch/ianc/devel/xen-unstable.hg/xen/include/asm/hvm/nestedhvm.h:55:
    note: expected ?paddr_t *? but argument is of type ?long unsigned
    int *?

hvm_hap_nested_page_fault takes an unsigned long gpa and passes &gpa
to nestedhvm_hap_nested_page_fault which takes a paddr_t *. Since both
of the callers of hvm_hap_nested_page_fault (svm_do_nested_pgfault and
ept_handle_violation) actually have the gpa which they pass to
hvm_hap_nested_page_fault as a paddr_t I think it makes sense to
change the argument to hvm_hap_nested_page_fault.

The other user of gpa in hvm_hap_nested_page_fault is a call to
p2m_mem_access_check, which currently also takes a paddr_t gpa but I
think a paddr_t is appropriate there too.

Jan points out that this is also an issue for >4GB guests on the 32
bit hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen-unstable changeset:   25724:612898732e66
xen-unstable date:        Fri Aug 03 09:54:17 2012 +0100
Backported-by: Keir Fraser <keir@xen.org>
---


diff -r 5a65d6a1aab7 -r f8f8912b3de0 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Fri Aug 03 10:39:13 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Fri Aug 03 10:43:24 2012 +0100
@@ -1109,7 +1109,7 @@ void hvm_triple_fault(void)
     domain_shutdown(v->domain, SHUTDOWN_reboot);
 }
 
-bool_t hvm_hap_nested_page_fault(unsigned long gpa,
+bool_t hvm_hap_nested_page_fault(paddr_t gpa,
                                  bool_t gla_valid,
                                  unsigned long gla,
                                  bool_t access_valid,
diff -r 5a65d6a1aab7 -r f8f8912b3de0 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Fri Aug 03 10:39:13 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Fri Aug 03 10:43:24 2012 +0100
@@ -3032,7 +3032,7 @@ void p2m_mem_paging_resume(struct p2m_do
     mem_event_unpause_vcpus(d);
 }
 
-void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 
+void p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, 
                           bool_t access_r, bool_t access_w, bool_t access_x)
 {
     struct vcpu *v = current;
diff -r 5a65d6a1aab7 -r f8f8912b3de0 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h	Fri Aug 03 10:39:13 2012 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h	Fri Aug 03 10:43:24 2012 +0100
@@ -368,7 +368,7 @@ static inline void hvm_set_info_guest(st
 
 int hvm_debug_op(struct vcpu *v, int32_t op);
 
-bool_t hvm_hap_nested_page_fault(unsigned long gpa,
+bool_t hvm_hap_nested_page_fault(paddr_t gpa,
                                  bool_t gla_valid, unsigned long gla,
                                  bool_t access_valid, 
                                  bool_t access_r,
diff -r 5a65d6a1aab7 -r f8f8912b3de0 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h	Fri Aug 03 10:39:13 2012 +0100
+++ b/xen/include/asm-x86/p2m.h	Fri Aug 03 10:43:24 2012 +0100
@@ -539,12 +539,12 @@ static inline void p2m_mem_paging_popula
 #ifdef __x86_64__
 /* Send mem event based on the access (gla is -1ull if not available).  Handles
  * the rw2rx conversion */
-void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 
+void p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, 
                           bool_t access_r, bool_t access_w, bool_t access_x);
 /* Resumes the running of the VCPU, restarting the last instruction */
 void p2m_mem_access_resume(struct p2m_domain *p2m);
 #else
-static inline void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, 
+static inline void p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, 
                                         unsigned long gla, bool_t access_r, 
                                         bool_t access_w, bool_t access_x)
 { }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 15:01:36 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 15:01:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SylHm-0003ew-Ir; Tue, 07 Aug 2012 15:01:30 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylHl-0003en-B1
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:01:29 +0000
Received: from [85.158.139.83:54406] by server-3.bemta-5.messagelabs.com id
	E7/8D-31899-8CD21205; Tue, 07 Aug 2012 15:01:28 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-182.messagelabs.com!1344351686!23492080!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23508 invoked from network); 7 Aug 2012 15:01:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 15:01:27 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylHh-0008Ba-T4
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:01:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylHh-0003kY-HH
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:01:25 +0000
Message-Id: <E1SylHh-0003kY-HH@xenbits.xen.org>
Date: Tue, 07 Aug 2012 15:01:24 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] nestedhvm: fix nested page fault
	build error on 32-bit
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343987004 -3600
# Node ID f8f8912b3de00ba4451894c29419ca95e13af38e
# Parent  5a65d6a1aab79b80e4b4cd7bf2621707e507a546
nestedhvm: fix nested page fault build error on 32-bit

    cc1: warnings being treated as errors
    hvm.c: In function ?hvm_hap_nested_page_fault?:
    hvm.c:1282: error: passing argument 2 of
    ?nestedhvm_hap_nested_page_fault? from incompatible pointer type
    /local/scratch/ianc/devel/xen-unstable.hg/xen/include/asm/hvm/nestedhvm.h:55:
    note: expected ?paddr_t *? but argument is of type ?long unsigned
    int *?

hvm_hap_nested_page_fault takes an unsigned long gpa and passes &gpa
to nestedhvm_hap_nested_page_fault which takes a paddr_t *. Since both
of the callers of hvm_hap_nested_page_fault (svm_do_nested_pgfault and
ept_handle_violation) actually have the gpa which they pass to
hvm_hap_nested_page_fault as a paddr_t I think it makes sense to
change the argument to hvm_hap_nested_page_fault.

The other user of gpa in hvm_hap_nested_page_fault is a call to
p2m_mem_access_check, which currently also takes a paddr_t gpa but I
think a paddr_t is appropriate there too.

Jan points out that this is also an issue for >4GB guests on the 32
bit hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen-unstable changeset:   25724:612898732e66
xen-unstable date:        Fri Aug 03 09:54:17 2012 +0100
Backported-by: Keir Fraser <keir@xen.org>
---


diff -r 5a65d6a1aab7 -r f8f8912b3de0 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Fri Aug 03 10:39:13 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Fri Aug 03 10:43:24 2012 +0100
@@ -1109,7 +1109,7 @@ void hvm_triple_fault(void)
     domain_shutdown(v->domain, SHUTDOWN_reboot);
 }
 
-bool_t hvm_hap_nested_page_fault(unsigned long gpa,
+bool_t hvm_hap_nested_page_fault(paddr_t gpa,
                                  bool_t gla_valid,
                                  unsigned long gla,
                                  bool_t access_valid,
diff -r 5a65d6a1aab7 -r f8f8912b3de0 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Fri Aug 03 10:39:13 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Fri Aug 03 10:43:24 2012 +0100
@@ -3032,7 +3032,7 @@ void p2m_mem_paging_resume(struct p2m_do
     mem_event_unpause_vcpus(d);
 }
 
-void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 
+void p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, 
                           bool_t access_r, bool_t access_w, bool_t access_x)
 {
     struct vcpu *v = current;
diff -r 5a65d6a1aab7 -r f8f8912b3de0 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h	Fri Aug 03 10:39:13 2012 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h	Fri Aug 03 10:43:24 2012 +0100
@@ -368,7 +368,7 @@ static inline void hvm_set_info_guest(st
 
 int hvm_debug_op(struct vcpu *v, int32_t op);
 
-bool_t hvm_hap_nested_page_fault(unsigned long gpa,
+bool_t hvm_hap_nested_page_fault(paddr_t gpa,
                                  bool_t gla_valid, unsigned long gla,
                                  bool_t access_valid, 
                                  bool_t access_r,
diff -r 5a65d6a1aab7 -r f8f8912b3de0 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h	Fri Aug 03 10:39:13 2012 +0100
+++ b/xen/include/asm-x86/p2m.h	Fri Aug 03 10:43:24 2012 +0100
@@ -539,12 +539,12 @@ static inline void p2m_mem_paging_popula
 #ifdef __x86_64__
 /* Send mem event based on the access (gla is -1ull if not available).  Handles
  * the rw2rx conversion */
-void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 
+void p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, 
                           bool_t access_r, bool_t access_w, bool_t access_x);
 /* Resumes the running of the VCPU, restarting the last instruction */
 void p2m_mem_access_resume(struct p2m_domain *p2m);
 #else
-static inline void p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, 
+static inline void p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, 
                                         unsigned long gla, bool_t access_r, 
                                         bool_t access_w, bool_t access_x)
 { }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 15:02:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 15:02:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SylIU-0003hj-N6; Tue, 07 Aug 2012 15:02:14 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylIU-0003hI-2p
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:02:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-27.messagelabs.com!1344351685!4275518!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27250 invoked from network); 7 Aug 2012 15:01:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 15:01:27 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylHh-0008BX-Ak
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:01:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylGe-0003hf-18
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:00:26 +0000
Message-Id: <E1SylGe-0003hf-18@xenbits.xen.org>
Date: Tue, 07 Aug 2012 15:00:18 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Intel VT-d: Dump IOMMU supported
	page sizes
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Santosh Jodh <santosh.jodh@citrix.com>
# Date 1343986753 -3600
# Node ID 5a65d6a1aab79b80e4b4cd7bf2621707e507a546
# Parent  fa34499e8f6c579d20d18b308c51fc8640b7e0b3
Intel VT-d: Dump IOMMU supported page sizes

Signed-off-by: Santosh Jodh <santosh.jodh@citrix.com>
xen-unstable changeset:   25725:9ad379939b78
xen-unstable date:        Fri Aug 03 10:38:04 2012 +0100
---


diff -r fa34499e8f6c -r 5a65d6a1aab7 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c	Mon Jul 30 13:38:58 2012 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c	Fri Aug 03 10:39:13 2012 +0100
@@ -2158,6 +2158,15 @@ int __init intel_vtd_setup(void)
     {
         iommu = drhd->iommu;
 
+        printk("Intel VT-d supported page sizes: 4kB");
+        if (cap_sps_2mb(iommu->cap))
+            printk(", 2MB");
+
+        if (cap_sps_1gb(iommu->cap))
+            printk(", 1GB");
+
+        printk(".\n");
+
         if ( iommu_snoop && !ecap_snp_ctl(iommu->ecap) )
             iommu_snoop = 0;
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 15:02:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 15:02:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SylIU-0003hj-N6; Tue, 07 Aug 2012 15:02:14 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylIU-0003hI-2p
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:02:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-27.messagelabs.com!1344351685!4275518!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27250 invoked from network); 7 Aug 2012 15:01:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 15:01:27 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylHh-0008BX-Ak
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:01:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SylGe-0003hf-18
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 15:00:26 +0000
Message-Id: <E1SylGe-0003hf-18@xenbits.xen.org>
Date: Tue, 07 Aug 2012 15:00:18 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Intel VT-d: Dump IOMMU supported
	page sizes
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Santosh Jodh <santosh.jodh@citrix.com>
# Date 1343986753 -3600
# Node ID 5a65d6a1aab79b80e4b4cd7bf2621707e507a546
# Parent  fa34499e8f6c579d20d18b308c51fc8640b7e0b3
Intel VT-d: Dump IOMMU supported page sizes

Signed-off-by: Santosh Jodh <santosh.jodh@citrix.com>
xen-unstable changeset:   25725:9ad379939b78
xen-unstable date:        Fri Aug 03 10:38:04 2012 +0100
---


diff -r fa34499e8f6c -r 5a65d6a1aab7 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c	Mon Jul 30 13:38:58 2012 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c	Fri Aug 03 10:39:13 2012 +0100
@@ -2158,6 +2158,15 @@ int __init intel_vtd_setup(void)
     {
         iommu = drhd->iommu;
 
+        printk("Intel VT-d supported page sizes: 4kB");
+        if (cap_sps_2mb(iommu->cap))
+            printk(", 2MB");
+
+        if (cap_sps_1gb(iommu->cap))
+            printk(", 1GB");
+
+        printk(".\n");
+
         if ( iommu_snoop && !ecap_snp_ctl(iommu->ecap) )
             iommu_snoop = 0;
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 17:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 17:33:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Synea-00084z-Qn; Tue, 07 Aug 2012 17:33:12 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SyneZ-00084S-NO
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 17:33:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1344360783!11986385!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5222 invoked from network); 7 Aug 2012 17:33:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 17:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SyneR-0001mm-GV
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 17:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SyneR-0007NM-5v
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 17:33:03 +0000
Date: Tue, 07 Aug 2012 17:33:03 +0000
Message-Id: <E1SyneR-0007NM-5v@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] mapcache: Fix invalidate if
	memory requested was not bucket aligned
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit d94efd9aa814f17f3243dae91476dc42b5ad052e
Author: Frediano Ziglio <frediano.ziglio@citrix.com>
Date:   Tue Aug 7 18:17:27 2012 +0100

    mapcache: Fix invalidate if memory requested was not bucket aligned
    
    When memory is mapped in qemu_map_cache with lock != 0 a reverse mapping
    is created pointing to the virtual address of location requested.
    The cached mapped entry is saved in last_address_vaddr with the memory
    location of the base virtual address (without bucket offset).
    However when this entry is invalidated the virtual address saved in the
    reverse mapping is used. This cause that the mapping is freed but the
    last_address_vaddr is not reset.
    
    Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 hw/xen_machine_fv.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/xen_machine_fv.c b/hw/xen_machine_fv.c
index fdad42a..b385d6a 100644
--- a/hw/xen_machine_fv.c
+++ b/hw/xen_machine_fv.c
@@ -181,9 +181,6 @@ void qemu_invalidate_entry(uint8_t *buffer)
     unsigned long paddr_index;
     int found = 0;
     
-    if (last_address_vaddr == buffer)
-        last_address_page =  ~0UL;
-
     TAILQ_FOREACH(reventry, &locked_entries, next) {
         if (reventry->vaddr_req == buffer) {
             paddr_index = reventry->paddr_index;
@@ -201,6 +198,10 @@ void qemu_invalidate_entry(uint8_t *buffer)
     TAILQ_REMOVE(&locked_entries, reventry, next);
     qemu_free(reventry);
 
+    if (last_address_page >> (MCACHE_BUCKET_SHIFT - XC_PAGE_SHIFT) == paddr_index) {
+        last_address_page =  ~0UL;
+    }
+
     entry = &mapcache_entry[paddr_index % nr_buckets];
     while (entry && entry->paddr_index != paddr_index) {
         pentry = entry;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 17:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 17:33:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Synea-00084z-Qn; Tue, 07 Aug 2012 17:33:12 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SyneZ-00084S-NO
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 17:33:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1344360783!11986385!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5222 invoked from network); 7 Aug 2012 17:33:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 17:33:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SyneR-0001mm-GV
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 17:33:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1SyneR-0007NM-5v
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 17:33:03 +0000
Date: Tue, 07 Aug 2012 17:33:03 +0000
Message-Id: <E1SyneR-0007NM-5v@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] mapcache: Fix invalidate if
	memory requested was not bucket aligned
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit d94efd9aa814f17f3243dae91476dc42b5ad052e
Author: Frediano Ziglio <frediano.ziglio@citrix.com>
Date:   Tue Aug 7 18:17:27 2012 +0100

    mapcache: Fix invalidate if memory requested was not bucket aligned
    
    When memory is mapped in qemu_map_cache with lock != 0 a reverse mapping
    is created pointing to the virtual address of location requested.
    The cached mapped entry is saved in last_address_vaddr with the memory
    location of the base virtual address (without bucket offset).
    However when this entry is invalidated the virtual address saved in the
    reverse mapping is used. This cause that the mapping is freed but the
    last_address_vaddr is not reset.
    
    Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 hw/xen_machine_fv.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/xen_machine_fv.c b/hw/xen_machine_fv.c
index fdad42a..b385d6a 100644
--- a/hw/xen_machine_fv.c
+++ b/hw/xen_machine_fv.c
@@ -181,9 +181,6 @@ void qemu_invalidate_entry(uint8_t *buffer)
     unsigned long paddr_index;
     int found = 0;
     
-    if (last_address_vaddr == buffer)
-        last_address_page =  ~0UL;
-
     TAILQ_FOREACH(reventry, &locked_entries, next) {
         if (reventry->vaddr_req == buffer) {
             paddr_index = reventry->paddr_index;
@@ -201,6 +198,10 @@ void qemu_invalidate_entry(uint8_t *buffer)
     TAILQ_REMOVE(&locked_entries, reventry, next);
     qemu_free(reventry);
 
+    if (last_address_page >> (MCACHE_BUCKET_SHIFT - XC_PAGE_SHIFT) == paddr_index) {
+        last_address_page =  ~0UL;
+    }
+
     entry = &mapcache_entry[paddr_index % nr_buckets];
     while (entry && entry->paddr_index != paddr_index) {
         pentry = entry;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSq-0005RQ-B7; Tue, 07 Aug 2012 20:33:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-0005RB-2U
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Received: from [85.158.143.35:5388] by server-3.bemta-4.messagelabs.com id
	06/C5-01511-A8B71205; Tue, 07 Aug 2012 20:33:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1344371592!13940765!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4539 invoked from network); 7 Aug 2012 20:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-00040m-0R
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSl-0003H6-Rp
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:11 +0000
Message-Id: <E1SyqSl-0003H6-Rp@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: prefix *.for-check with _ to
	mark it as a generated file.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984045 -3600
# Node ID a3cfa3666857ada79c3fad002a41e382568332b6
# Parent  1de861eb86540eae6fbd84fb903875573d8907ae
libxl: prefix *.for-check with _ to mark it as a generated file.

Keeps it out of my greps etc.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 1de861eb8654 -r a3cfa3666857 .hgignore
--- a/.hgignore	Fri Aug 03 09:54:04 2012 +0100
+++ b/.hgignore	Fri Aug 03 09:54:05 2012 +0100
@@ -187,7 +187,7 @@
 ^tools/libxl/testidl\.c$
 ^tools/libxl/tmp\..*$
 ^tools/libxl/.*\.new$
-^tools/libxl/libxl\.api-for-check
+^tools/libxl/_libxl\.api-for-check
 ^tools/libvchan/vchan-node[12]$
 ^tools/libaio/src/.*\.ol$
 ^tools/libaio/src/.*\.os$
diff -r 1de861eb8654 -r a3cfa3666857 tools/libxl/Makefile
--- a/tools/libxl/Makefile	Fri Aug 03 09:54:04 2012 +0100
+++ b/tools/libxl/Makefile	Fri Aug 03 09:54:05 2012 +0100
@@ -114,10 +114,10 @@ all: $(CLIENTS) libxenlight.so libxenlig
 genpath-target = $(call buildmakevars2file,_paths.h.tmp)
 $(eval $(genpath-target))
 
-libxl.api-ok: check-libxl-api-rules libxl.api-for-check
+libxl.api-ok: check-libxl-api-rules _libxl.api-for-check
 	$(PERL) $^
 
-%.api-for-check: %.h
+_%.api-for-check: %.h
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -c -E $< $(APPEND_CFLAGS) \
 		-DLIBXL_EXTERNAL_CALLERS_ONLY=LIBXL_EXTERNAL_CALLERS_ONLY \
 		>$@.new
@@ -210,7 +210,7 @@ install: all
 .PHONY: clean
 clean:
 	$(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS)
-	$(RM) -f _*.c *.pyc _paths.*.tmp *.api-for-check
+	$(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
 	$(RM) -f testidl.c.new testidl.c
 #	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSq-0005RQ-B7; Tue, 07 Aug 2012 20:33:16 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-0005RB-2U
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Received: from [85.158.143.35:5388] by server-3.bemta-4.messagelabs.com id
	06/C5-01511-A8B71205; Tue, 07 Aug 2012 20:33:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1344371592!13940765!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4539 invoked from network); 7 Aug 2012 20:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-00040m-0R
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSl-0003H6-Rp
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:11 +0000
Message-Id: <E1SyqSl-0003H6-Rp@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: prefix *.for-check with _ to
	mark it as a generated file.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984045 -3600
# Node ID a3cfa3666857ada79c3fad002a41e382568332b6
# Parent  1de861eb86540eae6fbd84fb903875573d8907ae
libxl: prefix *.for-check with _ to mark it as a generated file.

Keeps it out of my greps etc.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 1de861eb8654 -r a3cfa3666857 .hgignore
--- a/.hgignore	Fri Aug 03 09:54:04 2012 +0100
+++ b/.hgignore	Fri Aug 03 09:54:05 2012 +0100
@@ -187,7 +187,7 @@
 ^tools/libxl/testidl\.c$
 ^tools/libxl/tmp\..*$
 ^tools/libxl/.*\.new$
-^tools/libxl/libxl\.api-for-check
+^tools/libxl/_libxl\.api-for-check
 ^tools/libvchan/vchan-node[12]$
 ^tools/libaio/src/.*\.ol$
 ^tools/libaio/src/.*\.os$
diff -r 1de861eb8654 -r a3cfa3666857 tools/libxl/Makefile
--- a/tools/libxl/Makefile	Fri Aug 03 09:54:04 2012 +0100
+++ b/tools/libxl/Makefile	Fri Aug 03 09:54:05 2012 +0100
@@ -114,10 +114,10 @@ all: $(CLIENTS) libxenlight.so libxenlig
 genpath-target = $(call buildmakevars2file,_paths.h.tmp)
 $(eval $(genpath-target))
 
-libxl.api-ok: check-libxl-api-rules libxl.api-for-check
+libxl.api-ok: check-libxl-api-rules _libxl.api-for-check
 	$(PERL) $^
 
-%.api-for-check: %.h
+_%.api-for-check: %.h
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_$*.o) -c -E $< $(APPEND_CFLAGS) \
 		-DLIBXL_EXTERNAL_CALLERS_ONLY=LIBXL_EXTERNAL_CALLERS_ONLY \
 		>$@.new
@@ -210,7 +210,7 @@ install: all
 .PHONY: clean
 clean:
 	$(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS)
-	$(RM) -f _*.c *.pyc _paths.*.tmp *.api-for-check
+	$(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
 	$(RM) -f testidl.c.new testidl.c
 #	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSr-0005Ru-Fe; Tue, 07 Aug 2012 20:33:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-0005Qw-HC
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Received: from [85.158.143.99:37184] by server-2.bemta-4.messagelabs.com id
	81/16-17938-C8B71205; Tue, 07 Aug 2012 20:33:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-216.messagelabs.com!1344371594!20959384!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22578 invoked from network); 7 Aug 2012 20:33:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSo-00040y-5j
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSn-0003I5-Ud
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:13 +0000
Message-Id: <E1SyqSn-0003I5-Ud@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: react correctly to bootloader
	pty master POLLHUP
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984048 -3600
# Node ID ba32a6202e64a59d1ae9622e740d73faf54c77ba
# Parent  e661d09c5117fa271291a1780521344a345426e5
libxl: react correctly to bootloader pty master POLLHUP

Receive POLLHUP on the bootloader master pty is not an error.
Hopefully it means that the bootloader has exited and therefore the
pty slave side has no process group any more.  (At least NetBSD
indicates POLLHUP on the master in this case.)

So send the bootloader SIGTERM; if it has already exited then this has
no effect (except that on some versions of NetBSD it erroneously
returns ESRCH and we print a harmless warning) and we will then
collect the bootloader's exit status and be satisfied.

However, we remember that we have done this so that if we got POLLHUP
for some other reason than that the bootloader exited we report
something resembling a useful message.

In order to implement this we need to provide a way for users of
datacopier to handle POLLHUP rather than treating it as fatal.

We rename bootloader_abort to bootloader_stop since it now no longer
only applies to error situations.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r e661d09c5117 -r ba32a6202e64 tools/libxl/libxl_aoutils.c
--- a/tools/libxl/libxl_aoutils.c	Fri Aug 03 09:54:07 2012 +0100
+++ b/tools/libxl/libxl_aoutils.c	Fri Aug 03 09:54:08 2012 +0100
@@ -97,11 +97,31 @@ void libxl__datacopier_prefixdata(libxl_
     LIBXL_TAILQ_INSERT_TAIL(&dc->bufs, buf, entry);
 }
 
+static int datacopier_pollhup_handled(libxl__egc *egc,
+                                      libxl__datacopier_state *dc,
+                                      short revents, int onwrite)
+{
+    STATE_AO_GC(dc->ao);
+
+    if (dc->callback_pollhup && (revents & POLLHUP)) {
+        LOG(DEBUG, "received POLLHUP on %s during copy of %s",
+            onwrite ? dc->writewhat : dc->readwhat,
+            dc->copywhat);
+        libxl__datacopier_kill(dc);
+        dc->callback_pollhup(egc, dc, onwrite, -1);
+        return 1;
+    }
+    return 0;
+}
+
 static void datacopier_readable(libxl__egc *egc, libxl__ev_fd *ev,
                                 int fd, short events, short revents) {
     libxl__datacopier_state *dc = CONTAINER_OF(ev, *dc, toread);
     STATE_AO_GC(dc->ao);
 
+    if (datacopier_pollhup_handled(egc, dc, revents, 0))
+        return;
+
     if (revents & ~POLLIN) {
         LOG(ERROR, "unexpected poll event 0x%x (should be POLLIN)"
             " on %s during copy of %s", revents, dc->readwhat, dc->copywhat);
@@ -163,6 +183,9 @@ static void datacopier_writable(libxl__e
     libxl__datacopier_state *dc = CONTAINER_OF(ev, *dc, towrite);
     STATE_AO_GC(dc->ao);
 
+    if (datacopier_pollhup_handled(egc, dc, revents, 1))
+        return;
+
     if (revents & ~POLLOUT) {
         LOG(ERROR, "unexpected poll event 0x%x (should be POLLOUT)"
             " on %s during copy of %s", revents, dc->writewhat, dc->copywhat);
diff -r e661d09c5117 -r ba32a6202e64 tools/libxl/libxl_bootloader.c
--- a/tools/libxl/libxl_bootloader.c	Fri Aug 03 09:54:07 2012 +0100
+++ b/tools/libxl/libxl_bootloader.c	Fri Aug 03 09:54:08 2012 +0100
@@ -215,6 +215,7 @@ void libxl__bootloader_init(libxl__bootl
     libxl__domaindeathcheck_init(&bl->deathcheck);
     bl->keystrokes.ao = bl->ao;  libxl__datacopier_init(&bl->keystrokes);
     bl->display.ao = bl->ao;     libxl__datacopier_init(&bl->display);
+    bl->got_pollhup = 0;
 }
 
 static void bootloader_cleanup(libxl__egc *egc, libxl__bootloader_state *bl)
@@ -275,7 +276,7 @@ static void bootloader_local_detached_cb
 }
 
 /* might be called at any time, provided it's init'd */
-static void bootloader_abort(libxl__egc *egc,
+static void bootloader_stop(libxl__egc *egc,
                              libxl__bootloader_state *bl, int rc)
 {
     STATE_AO_GC(bl->ao);
@@ -285,8 +286,8 @@ static void bootloader_abort(libxl__egc 
     libxl__datacopier_kill(&bl->display);
     if (libxl__ev_child_inuse(&bl->child)) {
         r = kill(bl->child.pid, SIGTERM);
-        if (r) LOGE(WARN, "after failure, failed to kill bootloader [%lu]",
-                    (unsigned long)bl->child.pid);
+        if (r) LOGE(WARN, "%sfailed to kill bootloader [%lu]",
+                    rc ? "after failure, " : "", (unsigned long)bl->child.pid);
     }
     bl->rc = rc;
 }
@@ -508,7 +509,10 @@ static void bootloader_gotptys(libxl__eg
     bl->keystrokes.maxsz = BOOTLOADER_BUF_OUT;
     bl->keystrokes.copywhat =
         GCSPRINTF("bootloader input for domain %"PRIu32, bl->domid);
-    bl->keystrokes.callback = bootloader_keystrokes_copyfail;
+    bl->keystrokes.callback =         bootloader_keystrokes_copyfail;
+    bl->keystrokes.callback_pollhup = bootloader_keystrokes_copyfail;
+        /* pollhup gets called with errnoval==-1 which is not otherwise
+         * possible since errnos are nonnegative, so it's unambiguous */
     rc = libxl__datacopier_start(&bl->keystrokes);
     if (rc) goto out;
 
@@ -516,7 +520,8 @@ static void bootloader_gotptys(libxl__eg
     bl->display.maxsz = BOOTLOADER_BUF_IN;
     bl->display.copywhat =
         GCSPRINTF("bootloader output for domain %"PRIu32, bl->domid);
-    bl->display.callback = bootloader_display_copyfail;
+    bl->display.callback =         bootloader_display_copyfail;
+    bl->display.callback_pollhup = bootloader_display_copyfail;
     rc = libxl__datacopier_start(&bl->display);
     if (rc) goto out;
 
@@ -562,30 +567,42 @@ static void bootloader_gotptys(libxl__eg
 
 /* perhaps one of these will be called, but perhaps not */
 static void bootloader_copyfail(libxl__egc *egc, const char *which,
-       libxl__bootloader_state *bl, int onwrite, int errnoval)
+        libxl__bootloader_state *bl, int ondisplay, int onwrite, int errnoval)
 {
     STATE_AO_GC(bl->ao);
+    int rc = ERROR_FAIL;
+
+    if (errnoval==-1) {
+        /* POLLHUP */
+        if (!!ondisplay != !!onwrite) {
+            rc = 0;
+            bl->got_pollhup = 1;
+        } else {
+            LOG(ERROR, "unexpected POLLHUP on %s", which);
+        }
+    }
     if (!onwrite && !errnoval)
         LOG(ERROR, "unexpected eof copying %s", which);
-    bootloader_abort(egc, bl, ERROR_FAIL);
+
+    bootloader_stop(egc, bl, rc);
 }
 static void bootloader_keystrokes_copyfail(libxl__egc *egc,
        libxl__datacopier_state *dc, int onwrite, int errnoval)
 {
     libxl__bootloader_state *bl = CONTAINER_OF(dc, *bl, keystrokes);
-    bootloader_copyfail(egc, "bootloader input", bl, onwrite, errnoval);
+    bootloader_copyfail(egc, "bootloader input", bl, 0, onwrite, errnoval);
 }
 static void bootloader_display_copyfail(libxl__egc *egc,
        libxl__datacopier_state *dc, int onwrite, int errnoval)
 {
     libxl__bootloader_state *bl = CONTAINER_OF(dc, *bl, display);
-    bootloader_copyfail(egc, "bootloader output", bl, onwrite, errnoval);
+    bootloader_copyfail(egc, "bootloader output", bl, 1, onwrite, errnoval);
 }
 
 static void bootloader_domaindeath(libxl__egc *egc, libxl__domaindeathcheck *dc)
 {
     libxl__bootloader_state *bl = CONTAINER_OF(dc, *bl, deathcheck);
-    bootloader_abort(egc, bl, ERROR_FAIL);
+    bootloader_stop(egc, bl, ERROR_FAIL);
 }
 
 static void bootloader_finished(libxl__egc *egc, libxl__ev_child *child,
@@ -599,6 +616,8 @@ static void bootloader_finished(libxl__e
     libxl__datacopier_kill(&bl->display);
 
     if (status) {
+        if (bl->got_pollhup && WIFSIGNALED(status) && WTERMSIG(status)==SIGTERM)
+            LOG(ERROR, "got POLLHUP, sent SIGTERM");
         LOG(ERROR, "bootloader failed - consult logfile %s", bl->logfile);
         libxl_report_child_exitstatus(CTX, XTL_ERROR, "bootloader",
                                       pid, status);
diff -r e661d09c5117 -r ba32a6202e64 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:07 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:08 2012 +0100
@@ -2076,7 +2076,9 @@ typedef struct libxl__datacopier_buf lib
  *     errnoval==0 means we got eof and all data was written
  *     errnoval!=0 means we had a read error, logged
  * onwrite==-1 means some other internal failure, errnoval not valid, logged
- * in all cases copier is killed before calling this callback */
+ * If we get POLLHUP, we call callback_pollhup(..., onwrite, -1);
+ * or if callback_pollhup==0 this is an internal failure, as above.
+ * In all cases copier is killed before calling this callback */
 typedef void libxl__datacopier_callback(libxl__egc *egc,
      libxl__datacopier_state *dc, int onwrite, int errnoval);
 
@@ -2095,6 +2097,7 @@ struct libxl__datacopier_state {
     const char *copywhat, *readwhat, *writewhat; /* for error msgs */
     FILE *log; /* gets a copy of everything */
     libxl__datacopier_callback *callback;
+    libxl__datacopier_callback *callback_pollhup;
     /* remaining fields are private to datacopier */
     libxl__ev_fd toread, towrite;
     ssize_t used;
@@ -2279,7 +2282,7 @@ struct libxl__bootloader_state {
     int nargs, argsspace;
     const char **args;
     libxl__datacopier_state keystrokes, display;
-    int rc;
+    int rc, got_pollhup;
 };
 
 _hidden void libxl__bootloader_init(libxl__bootloader_state *bl);

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSr-0005Ru-Fe; Tue, 07 Aug 2012 20:33:17 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-0005Qw-HC
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Received: from [85.158.143.99:37184] by server-2.bemta-4.messagelabs.com id
	81/16-17938-C8B71205; Tue, 07 Aug 2012 20:33:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-216.messagelabs.com!1344371594!20959384!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22578 invoked from network); 7 Aug 2012 20:33:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSo-00040y-5j
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSn-0003I5-Ud
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:13 +0000
Message-Id: <E1SyqSn-0003I5-Ud@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: react correctly to bootloader
	pty master POLLHUP
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984048 -3600
# Node ID ba32a6202e64a59d1ae9622e740d73faf54c77ba
# Parent  e661d09c5117fa271291a1780521344a345426e5
libxl: react correctly to bootloader pty master POLLHUP

Receive POLLHUP on the bootloader master pty is not an error.
Hopefully it means that the bootloader has exited and therefore the
pty slave side has no process group any more.  (At least NetBSD
indicates POLLHUP on the master in this case.)

So send the bootloader SIGTERM; if it has already exited then this has
no effect (except that on some versions of NetBSD it erroneously
returns ESRCH and we print a harmless warning) and we will then
collect the bootloader's exit status and be satisfied.

However, we remember that we have done this so that if we got POLLHUP
for some other reason than that the bootloader exited we report
something resembling a useful message.

In order to implement this we need to provide a way for users of
datacopier to handle POLLHUP rather than treating it as fatal.

We rename bootloader_abort to bootloader_stop since it now no longer
only applies to error situations.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r e661d09c5117 -r ba32a6202e64 tools/libxl/libxl_aoutils.c
--- a/tools/libxl/libxl_aoutils.c	Fri Aug 03 09:54:07 2012 +0100
+++ b/tools/libxl/libxl_aoutils.c	Fri Aug 03 09:54:08 2012 +0100
@@ -97,11 +97,31 @@ void libxl__datacopier_prefixdata(libxl_
     LIBXL_TAILQ_INSERT_TAIL(&dc->bufs, buf, entry);
 }
 
+static int datacopier_pollhup_handled(libxl__egc *egc,
+                                      libxl__datacopier_state *dc,
+                                      short revents, int onwrite)
+{
+    STATE_AO_GC(dc->ao);
+
+    if (dc->callback_pollhup && (revents & POLLHUP)) {
+        LOG(DEBUG, "received POLLHUP on %s during copy of %s",
+            onwrite ? dc->writewhat : dc->readwhat,
+            dc->copywhat);
+        libxl__datacopier_kill(dc);
+        dc->callback_pollhup(egc, dc, onwrite, -1);
+        return 1;
+    }
+    return 0;
+}
+
 static void datacopier_readable(libxl__egc *egc, libxl__ev_fd *ev,
                                 int fd, short events, short revents) {
     libxl__datacopier_state *dc = CONTAINER_OF(ev, *dc, toread);
     STATE_AO_GC(dc->ao);
 
+    if (datacopier_pollhup_handled(egc, dc, revents, 0))
+        return;
+
     if (revents & ~POLLIN) {
         LOG(ERROR, "unexpected poll event 0x%x (should be POLLIN)"
             " on %s during copy of %s", revents, dc->readwhat, dc->copywhat);
@@ -163,6 +183,9 @@ static void datacopier_writable(libxl__e
     libxl__datacopier_state *dc = CONTAINER_OF(ev, *dc, towrite);
     STATE_AO_GC(dc->ao);
 
+    if (datacopier_pollhup_handled(egc, dc, revents, 1))
+        return;
+
     if (revents & ~POLLOUT) {
         LOG(ERROR, "unexpected poll event 0x%x (should be POLLOUT)"
             " on %s during copy of %s", revents, dc->writewhat, dc->copywhat);
diff -r e661d09c5117 -r ba32a6202e64 tools/libxl/libxl_bootloader.c
--- a/tools/libxl/libxl_bootloader.c	Fri Aug 03 09:54:07 2012 +0100
+++ b/tools/libxl/libxl_bootloader.c	Fri Aug 03 09:54:08 2012 +0100
@@ -215,6 +215,7 @@ void libxl__bootloader_init(libxl__bootl
     libxl__domaindeathcheck_init(&bl->deathcheck);
     bl->keystrokes.ao = bl->ao;  libxl__datacopier_init(&bl->keystrokes);
     bl->display.ao = bl->ao;     libxl__datacopier_init(&bl->display);
+    bl->got_pollhup = 0;
 }
 
 static void bootloader_cleanup(libxl__egc *egc, libxl__bootloader_state *bl)
@@ -275,7 +276,7 @@ static void bootloader_local_detached_cb
 }
 
 /* might be called at any time, provided it's init'd */
-static void bootloader_abort(libxl__egc *egc,
+static void bootloader_stop(libxl__egc *egc,
                              libxl__bootloader_state *bl, int rc)
 {
     STATE_AO_GC(bl->ao);
@@ -285,8 +286,8 @@ static void bootloader_abort(libxl__egc 
     libxl__datacopier_kill(&bl->display);
     if (libxl__ev_child_inuse(&bl->child)) {
         r = kill(bl->child.pid, SIGTERM);
-        if (r) LOGE(WARN, "after failure, failed to kill bootloader [%lu]",
-                    (unsigned long)bl->child.pid);
+        if (r) LOGE(WARN, "%sfailed to kill bootloader [%lu]",
+                    rc ? "after failure, " : "", (unsigned long)bl->child.pid);
     }
     bl->rc = rc;
 }
@@ -508,7 +509,10 @@ static void bootloader_gotptys(libxl__eg
     bl->keystrokes.maxsz = BOOTLOADER_BUF_OUT;
     bl->keystrokes.copywhat =
         GCSPRINTF("bootloader input for domain %"PRIu32, bl->domid);
-    bl->keystrokes.callback = bootloader_keystrokes_copyfail;
+    bl->keystrokes.callback =         bootloader_keystrokes_copyfail;
+    bl->keystrokes.callback_pollhup = bootloader_keystrokes_copyfail;
+        /* pollhup gets called with errnoval==-1 which is not otherwise
+         * possible since errnos are nonnegative, so it's unambiguous */
     rc = libxl__datacopier_start(&bl->keystrokes);
     if (rc) goto out;
 
@@ -516,7 +520,8 @@ static void bootloader_gotptys(libxl__eg
     bl->display.maxsz = BOOTLOADER_BUF_IN;
     bl->display.copywhat =
         GCSPRINTF("bootloader output for domain %"PRIu32, bl->domid);
-    bl->display.callback = bootloader_display_copyfail;
+    bl->display.callback =         bootloader_display_copyfail;
+    bl->display.callback_pollhup = bootloader_display_copyfail;
     rc = libxl__datacopier_start(&bl->display);
     if (rc) goto out;
 
@@ -562,30 +567,42 @@ static void bootloader_gotptys(libxl__eg
 
 /* perhaps one of these will be called, but perhaps not */
 static void bootloader_copyfail(libxl__egc *egc, const char *which,
-       libxl__bootloader_state *bl, int onwrite, int errnoval)
+        libxl__bootloader_state *bl, int ondisplay, int onwrite, int errnoval)
 {
     STATE_AO_GC(bl->ao);
+    int rc = ERROR_FAIL;
+
+    if (errnoval==-1) {
+        /* POLLHUP */
+        if (!!ondisplay != !!onwrite) {
+            rc = 0;
+            bl->got_pollhup = 1;
+        } else {
+            LOG(ERROR, "unexpected POLLHUP on %s", which);
+        }
+    }
     if (!onwrite && !errnoval)
         LOG(ERROR, "unexpected eof copying %s", which);
-    bootloader_abort(egc, bl, ERROR_FAIL);
+
+    bootloader_stop(egc, bl, rc);
 }
 static void bootloader_keystrokes_copyfail(libxl__egc *egc,
        libxl__datacopier_state *dc, int onwrite, int errnoval)
 {
     libxl__bootloader_state *bl = CONTAINER_OF(dc, *bl, keystrokes);
-    bootloader_copyfail(egc, "bootloader input", bl, onwrite, errnoval);
+    bootloader_copyfail(egc, "bootloader input", bl, 0, onwrite, errnoval);
 }
 static void bootloader_display_copyfail(libxl__egc *egc,
        libxl__datacopier_state *dc, int onwrite, int errnoval)
 {
     libxl__bootloader_state *bl = CONTAINER_OF(dc, *bl, display);
-    bootloader_copyfail(egc, "bootloader output", bl, onwrite, errnoval);
+    bootloader_copyfail(egc, "bootloader output", bl, 1, onwrite, errnoval);
 }
 
 static void bootloader_domaindeath(libxl__egc *egc, libxl__domaindeathcheck *dc)
 {
     libxl__bootloader_state *bl = CONTAINER_OF(dc, *bl, deathcheck);
-    bootloader_abort(egc, bl, ERROR_FAIL);
+    bootloader_stop(egc, bl, ERROR_FAIL);
 }
 
 static void bootloader_finished(libxl__egc *egc, libxl__ev_child *child,
@@ -599,6 +616,8 @@ static void bootloader_finished(libxl__e
     libxl__datacopier_kill(&bl->display);
 
     if (status) {
+        if (bl->got_pollhup && WIFSIGNALED(status) && WTERMSIG(status)==SIGTERM)
+            LOG(ERROR, "got POLLHUP, sent SIGTERM");
         LOG(ERROR, "bootloader failed - consult logfile %s", bl->logfile);
         libxl_report_child_exitstatus(CTX, XTL_ERROR, "bootloader",
                                       pid, status);
diff -r e661d09c5117 -r ba32a6202e64 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:07 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:08 2012 +0100
@@ -2076,7 +2076,9 @@ typedef struct libxl__datacopier_buf lib
  *     errnoval==0 means we got eof and all data was written
  *     errnoval!=0 means we had a read error, logged
  * onwrite==-1 means some other internal failure, errnoval not valid, logged
- * in all cases copier is killed before calling this callback */
+ * If we get POLLHUP, we call callback_pollhup(..., onwrite, -1);
+ * or if callback_pollhup==0 this is an internal failure, as above.
+ * In all cases copier is killed before calling this callback */
 typedef void libxl__datacopier_callback(libxl__egc *egc,
      libxl__datacopier_state *dc, int onwrite, int errnoval);
 
@@ -2095,6 +2097,7 @@ struct libxl__datacopier_state {
     const char *copywhat, *readwhat, *writewhat; /* for error msgs */
     FILE *log; /* gets a copy of everything */
     libxl__datacopier_callback *callback;
+    libxl__datacopier_callback *callback_pollhup;
     /* remaining fields are private to datacopier */
     libxl__ev_fd toread, towrite;
     ssize_t used;
@@ -2279,7 +2282,7 @@ struct libxl__bootloader_state {
     int nargs, argsspace;
     const char **args;
     libxl__datacopier_state keystrokes, display;
-    int rc;
+    int rc, got_pollhup;
 };
 
 _hidden void libxl__bootloader_init(libxl__bootloader_state *bl);

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSs-0005SR-MR; Tue, 07 Aug 2012 20:33:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-0005Rk-HR
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Received: from [85.158.143.99:39372] by server-1.bemta-4.messagelabs.com id
	00/CB-24392-C8B71205; Tue, 07 Aug 2012 20:33:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-216.messagelabs.com!1344371595!30375980!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21883 invoked from network); 7 Aug 2012 20:33:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-000414-2p
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-0003IZ-0y
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Message-Id: <E1SyqSp-0003IZ-0y@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix formatting of
	DEFINE_DEVICES_ADD
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984050 -3600
# Node ID 8897bc3d8a3029d6a6e6cba9dfcdc08f94016bd7
# Parent  7697fc6ff332b9d4be4b54a959352fe509573bfb
libxl: fix formatting of DEFINE_DEVICES_ADD

These lines were exactly 80 columns wide, which produces hideous wrap
damage in an 80 column emacs.  Reformat using emacs's C-c \,
which puts the \ in column 72 (by default) where possible.

Whitespace change only.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 7697fc6ff332 -r 8897bc3d8a30 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:09 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:10 2012 +0100
@@ -483,19 +483,19 @@ void libxl__multidev_prepared(libxl__egc
  * libxl__add_nics
  */
 
-#define DEFINE_DEVICES_ADD(type)                                               \
-    void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid,  \
-                              int start, libxl_domain_config *d_config,        \
-                              libxl__ao_devices *aodevs)                       \
-    {                                                                          \
-        AO_GC;                                                                 \
-        int i;                                                                 \
-        int end = start + d_config->num_##type##s;                             \
-        for (i = start; i < end; i++) {                                        \
-            libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);         \
-            libxl__device_##type##_add(egc, domid, &d_config->type##s[i-start],\
-                                       aodev);                                 \
-        }                                                                      \
+#define DEFINE_DEVICES_ADD(type)                                        \
+    void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid, \
+                              int start, libxl_domain_config *d_config, \
+                              libxl__ao_devices *aodevs)                \
+    {                                                                   \
+        AO_GC;                                                          \
+        int i;                                                          \
+        int end = start + d_config->num_##type##s;                      \
+        for (i = start; i < end; i++) {                                 \
+            libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);  \
+            libxl__device_##type##_add(egc, domid, &d_config->type##s[i-start], \
+                                       aodev);                          \
+        }                                                               \
     }
 
 DEFINE_DEVICES_ADD(disk)

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSs-0005SR-MR; Tue, 07 Aug 2012 20:33:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-0005Rk-HR
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Received: from [85.158.143.99:39372] by server-1.bemta-4.messagelabs.com id
	00/CB-24392-C8B71205; Tue, 07 Aug 2012 20:33:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-216.messagelabs.com!1344371595!30375980!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21883 invoked from network); 7 Aug 2012 20:33:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:16 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-000414-2p
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-0003IZ-0y
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Message-Id: <E1SyqSp-0003IZ-0y@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:14 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix formatting of
	DEFINE_DEVICES_ADD
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984050 -3600
# Node ID 8897bc3d8a3029d6a6e6cba9dfcdc08f94016bd7
# Parent  7697fc6ff332b9d4be4b54a959352fe509573bfb
libxl: fix formatting of DEFINE_DEVICES_ADD

These lines were exactly 80 columns wide, which produces hideous wrap
damage in an 80 column emacs.  Reformat using emacs's C-c \,
which puts the \ in column 72 (by default) where possible.

Whitespace change only.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 7697fc6ff332 -r 8897bc3d8a30 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:09 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:10 2012 +0100
@@ -483,19 +483,19 @@ void libxl__multidev_prepared(libxl__egc
  * libxl__add_nics
  */
 
-#define DEFINE_DEVICES_ADD(type)                                               \
-    void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid,  \
-                              int start, libxl_domain_config *d_config,        \
-                              libxl__ao_devices *aodevs)                       \
-    {                                                                          \
-        AO_GC;                                                                 \
-        int i;                                                                 \
-        int end = start + d_config->num_##type##s;                             \
-        for (i = start; i < end; i++) {                                        \
-            libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);         \
-            libxl__device_##type##_add(egc, domid, &d_config->type##s[i-start],\
-                                       aodev);                                 \
-        }                                                                      \
+#define DEFINE_DEVICES_ADD(type)                                        \
+    void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid, \
+                              int start, libxl_domain_config *d_config, \
+                              libxl__ao_devices *aodevs)                \
+    {                                                                   \
+        AO_GC;                                                          \
+        int i;                                                          \
+        int end = start + d_config->num_##type##s;                      \
+        for (i = start; i < end; i++) {                                 \
+            libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);  \
+            libxl__device_##type##_add(egc, domid, &d_config->type##s[i-start], \
+                                       aodev);                          \
+        }                                                               \
     }
 
 DEFINE_DEVICES_ADD(disk)

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSp-0005RC-8A; Tue, 07 Aug 2012 20:33:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSo-0005R1-Ei
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:14 +0000
Received: from [85.158.138.51:58321] by server-8.bemta-3.messagelabs.com id
	32/CE-25919-98B71205; Tue, 07 Aug 2012 20:33:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1344371591!21375495!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8034 invoked from network); 7 Aug 2012 20:33:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSl-00040j-CX
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSl-0003Gp-BH
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:11 +0000
Message-Id: <E1SyqSl-0003Gp-BH@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: fix gic_init_secondary_cpu.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984044 -3600
# Node ID 1de861eb86540eae6fbd84fb903875573d8907ae
# Parent  65ae31da1c536b2551c6465d796642ba42e594a2
arm: fix gic_init_secondary_cpu.

Using spin_lock_irq here is unnecessary (interrupts are not yet enabled) and
wrong (since they will get unexpectedly renabled by spin_unlock_irq).

We can just use spin_lock/spin_unlock.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 65ae31da1c53 -r 1de861eb8654 xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Fri Aug 03 09:54:03 2012 +0100
+++ b/xen/arch/arm/gic.c	Fri Aug 03 09:54:04 2012 +0100
@@ -323,10 +323,10 @@ int __init gic_init(void)
 /* Set up the per-CPU parts of the GIC for a secondary CPU */
 void __cpuinit gic_init_secondary_cpu(void)
 {
-    spin_lock_irq(&gic.lock);
+    spin_lock(&gic.lock);
     gic_cpu_init();
     gic_hyp_init();
-    spin_unlock_irq(&gic.lock);
+    spin_unlock(&gic.lock);
 }
 
 /* Shut down the per-CPU GIC interface */

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSp-0005RC-8A; Tue, 07 Aug 2012 20:33:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSo-0005R1-Ei
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:14 +0000
Received: from [85.158.138.51:58321] by server-8.bemta-3.messagelabs.com id
	32/CE-25919-98B71205; Tue, 07 Aug 2012 20:33:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-174.messagelabs.com!1344371591!21375495!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8034 invoked from network); 7 Aug 2012 20:33:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSl-00040j-CX
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSl-0003Gp-BH
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:11 +0000
Message-Id: <E1SyqSl-0003Gp-BH@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] arm: fix gic_init_secondary_cpu.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984044 -3600
# Node ID 1de861eb86540eae6fbd84fb903875573d8907ae
# Parent  65ae31da1c536b2551c6465d796642ba42e594a2
arm: fix gic_init_secondary_cpu.

Using spin_lock_irq here is unnecessary (interrupts are not yet enabled) and
wrong (since they will get unexpectedly renabled by spin_unlock_irq).

We can just use spin_lock/spin_unlock.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 65ae31da1c53 -r 1de861eb8654 xen/arch/arm/gic.c
--- a/xen/arch/arm/gic.c	Fri Aug 03 09:54:03 2012 +0100
+++ b/xen/arch/arm/gic.c	Fri Aug 03 09:54:04 2012 +0100
@@ -323,10 +323,10 @@ int __init gic_init(void)
 /* Set up the per-CPU parts of the GIC for a secondary CPU */
 void __cpuinit gic_init_secondary_cpu(void)
 {
-    spin_lock_irq(&gic.lock);
+    spin_lock(&gic.lock);
     gic_cpu_init();
     gic_hyp_init();
-    spin_unlock_irq(&gic.lock);
+    spin_unlock(&gic.lock);
 }
 
 /* Shut down the per-CPU GIC interface */

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSo-0005R2-5c; Tue, 07 Aug 2012 20:33:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSn-0005Qw-6P
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:13 +0000
Received: from [85.158.143.99:39201] by server-2.bemta-4.messagelabs.com id
	B6/06-17938-88B71205; Tue, 07 Aug 2012 20:33:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-216.messagelabs.com!1344371590!30375971!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21666 invoked from network); 7 Aug 2012 20:33:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSk-00040d-Jr
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSk-0003GL-3e
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:10 +0000
Message-Id: <E1SyqSk-0003GL-3e@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] cpufreq: P state stats aren't
	available if there is no cpufreq driver
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User David Vrabel <david.vrabel@citrix.com>
# Date 1343980228 -7200
# Node ID 7fd5facb608427b7e5890ff10cee8ed0da6a7703
# Parent  983ea7521badb3e05d3379044fb283732ef558d6
cpufreq: P state stats aren't available if there is no cpufreq driver

If there is no cpufreq driver (e.g., with an AMD Opteron 8212) then
reading the P state statistics causes a deadlock as an uninitialized
spinlock is locked in do_get_pm_info(). The spinlock is initialized in
cpufreq_statistic_init() which is not called if cpufreq_driver == NULL.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 983ea7521bad -r 7fd5facb6084 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Thu Aug 02 14:44:53 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c	Fri Aug 03 09:50:28 2012 +0200
@@ -66,6 +66,8 @@ int do_get_pm_info(struct xen_sysctl_get
     case PMSTAT_PX:
         if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
             return -ENODEV;
+        if ( !cpufreq_driver )
+            return -ENODEV;
         if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
             return -EINVAL;
         break;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSo-0005R2-5c; Tue, 07 Aug 2012 20:33:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSn-0005Qw-6P
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:13 +0000
Received: from [85.158.143.99:39201] by server-2.bemta-4.messagelabs.com id
	B6/06-17938-88B71205; Tue, 07 Aug 2012 20:33:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-216.messagelabs.com!1344371590!30375971!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21666 invoked from network); 7 Aug 2012 20:33:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSk-00040d-Jr
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSk-0003GL-3e
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:10 +0000
Message-Id: <E1SyqSk-0003GL-3e@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] cpufreq: P state stats aren't
	available if there is no cpufreq driver
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User David Vrabel <david.vrabel@citrix.com>
# Date 1343980228 -7200
# Node ID 7fd5facb608427b7e5890ff10cee8ed0da6a7703
# Parent  983ea7521badb3e05d3379044fb283732ef558d6
cpufreq: P state stats aren't available if there is no cpufreq driver

If there is no cpufreq driver (e.g., with an AMD Opteron 8212) then
reading the P state statistics causes a deadlock as an uninitialized
spinlock is locked in do_get_pm_info(). The spinlock is initialized in
cpufreq_statistic_init() which is not called if cpufreq_driver == NULL.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 983ea7521bad -r 7fd5facb6084 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Thu Aug 02 14:44:53 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c	Fri Aug 03 09:50:28 2012 +0200
@@ -66,6 +66,8 @@ int do_get_pm_info(struct xen_sysctl_get
     case PMSTAT_PX:
         if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
             return -ENODEV;
+        if ( !cpufreq_driver )
+            return -ENODEV;
         if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
             return -EINVAL;
         break;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSr-0005Rp-DP; Tue, 07 Aug 2012 20:33:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-0005RP-EX
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Received: from [85.158.139.83:59395] by server-6.bemta-5.messagelabs.com id
	52/88-27759-B8B71205; Tue, 07 Aug 2012 20:33:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-182.messagelabs.com!1344371593!26010736!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32735 invoked from network); 7 Aug 2012 20:33:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSn-00040v-Ed
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSn-0003Hq-DE
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:13 +0000
Message-Id: <E1SyqSn-0003Hq-DE@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: unify libxl__device_destroy
	and device_hotplug_done
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984047 -3600
# Node ID e661d09c5117fa271291a1780521344a345426e5
# Parent  d153e1abe5b665b88737fed35ca46be6555a27e0
libxl: unify libxl__device_destroy and device_hotplug_done

device_hotplug_done contains an open-coded but improved version of
libxl__device_destroy.  So move the contents of device_hotplug_done
into libxl__device_destroy, deleting the old code, and replace it at
its old location with a function call.

Add the missing call to libxl__xs_transaction_abort (which was present
in neither version and technically speaking is always a no-op with
this code as it stands at the moment because no-one does "goto out"
other than after libxl__xs_transaction_start or _commit).

Also fix the error handling: the rc from the destroy should be
propagated into the aodev.

Reported-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r d153e1abe5b6 -r e661d09c5117 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:07 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:07 2012 +0100
@@ -513,22 +513,24 @@ int libxl__device_destroy(libxl__gc *gc,
     char *be_path = libxl__device_backend_path(gc, dev);
     char *fe_path = libxl__device_frontend_path(gc, dev);
     xs_transaction_t t = 0;
-    int rc = 0;
+    int rc;
 
-    do {
-        t = xs_transaction_start(CTX->xsh);
+    for (;;) {
+        rc = libxl__xs_transaction_start(gc, &t);
+        if (rc) goto out;
+
         libxl__xs_path_cleanup(gc, t, fe_path);
         libxl__xs_path_cleanup(gc, t, be_path);
-        rc = !xs_transaction_end(CTX->xsh, t, 0);
-    } while (rc && errno == EAGAIN);
-    if (rc) {
-        LOGE(ERROR, "unable to finish transaction");
-        goto out;
+
+        rc = libxl__xs_transaction_commit(gc, &t);
+        if (!rc) break;
+        if (rc < 0) goto out;
     }
 
     libxl__device_destroy_tapdisk(gc, be_path);
 
 out:
+    libxl__xs_transaction_abort(gc, &t);
     return rc;
 }
 
@@ -993,29 +995,17 @@ error:
 static void device_hotplug_done(libxl__egc *egc, libxl__ao_device *aodev)
 {
     STATE_AO_GC(aodev->ao);
-    char *be_path = libxl__device_backend_path(gc, aodev->dev);
-    char *fe_path = libxl__device_frontend_path(gc, aodev->dev);
-    xs_transaction_t t = 0;
     int rc;
 
     device_hotplug_clean(gc, aodev);
 
     /* Clean xenstore if it's a disconnection */
     if (aodev->action == DEVICE_DISCONNECT) {
-        for (;;) {
-            rc = libxl__xs_transaction_start(gc, &t);
-            if (rc) goto out;
-
-            libxl__xs_path_cleanup(gc, t, fe_path);
-            libxl__xs_path_cleanup(gc, t, be_path);
-
-            rc = libxl__xs_transaction_commit(gc, &t);
-            if (!rc) break;
-            if (rc < 0) goto out;
-        }
+        rc = libxl__device_destroy(gc, aodev->dev);
+        if (!aodev->rc)
+            aodev->rc = rc;
     }
 
-out:
     aodev->callback(egc, aodev);
     return;
 }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSr-0005Rp-DP; Tue, 07 Aug 2012 20:33:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-0005RP-EX
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Received: from [85.158.139.83:59395] by server-6.bemta-5.messagelabs.com id
	52/88-27759-B8B71205; Tue, 07 Aug 2012 20:33:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-182.messagelabs.com!1344371593!26010736!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32735 invoked from network); 7 Aug 2012 20:33:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSn-00040v-Ed
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSn-0003Hq-DE
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:13 +0000
Message-Id: <E1SyqSn-0003Hq-DE@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: unify libxl__device_destroy
	and device_hotplug_done
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984047 -3600
# Node ID e661d09c5117fa271291a1780521344a345426e5
# Parent  d153e1abe5b665b88737fed35ca46be6555a27e0
libxl: unify libxl__device_destroy and device_hotplug_done

device_hotplug_done contains an open-coded but improved version of
libxl__device_destroy.  So move the contents of device_hotplug_done
into libxl__device_destroy, deleting the old code, and replace it at
its old location with a function call.

Add the missing call to libxl__xs_transaction_abort (which was present
in neither version and technically speaking is always a no-op with
this code as it stands at the moment because no-one does "goto out"
other than after libxl__xs_transaction_start or _commit).

Also fix the error handling: the rc from the destroy should be
propagated into the aodev.

Reported-by: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r d153e1abe5b6 -r e661d09c5117 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:07 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:07 2012 +0100
@@ -513,22 +513,24 @@ int libxl__device_destroy(libxl__gc *gc,
     char *be_path = libxl__device_backend_path(gc, dev);
     char *fe_path = libxl__device_frontend_path(gc, dev);
     xs_transaction_t t = 0;
-    int rc = 0;
+    int rc;
 
-    do {
-        t = xs_transaction_start(CTX->xsh);
+    for (;;) {
+        rc = libxl__xs_transaction_start(gc, &t);
+        if (rc) goto out;
+
         libxl__xs_path_cleanup(gc, t, fe_path);
         libxl__xs_path_cleanup(gc, t, be_path);
-        rc = !xs_transaction_end(CTX->xsh, t, 0);
-    } while (rc && errno == EAGAIN);
-    if (rc) {
-        LOGE(ERROR, "unable to finish transaction");
-        goto out;
+
+        rc = libxl__xs_transaction_commit(gc, &t);
+        if (!rc) break;
+        if (rc < 0) goto out;
     }
 
     libxl__device_destroy_tapdisk(gc, be_path);
 
 out:
+    libxl__xs_transaction_abort(gc, &t);
     return rc;
 }
 
@@ -993,29 +995,17 @@ error:
 static void device_hotplug_done(libxl__egc *egc, libxl__ao_device *aodev)
 {
     STATE_AO_GC(aodev->ao);
-    char *be_path = libxl__device_backend_path(gc, aodev->dev);
-    char *fe_path = libxl__device_frontend_path(gc, aodev->dev);
-    xs_transaction_t t = 0;
     int rc;
 
     device_hotplug_clean(gc, aodev);
 
     /* Clean xenstore if it's a disconnection */
     if (aodev->action == DEVICE_DISCONNECT) {
-        for (;;) {
-            rc = libxl__xs_transaction_start(gc, &t);
-            if (rc) goto out;
-
-            libxl__xs_path_cleanup(gc, t, fe_path);
-            libxl__xs_path_cleanup(gc, t, be_path);
-
-            rc = libxl__xs_transaction_commit(gc, &t);
-            if (!rc) break;
-            if (rc < 0) goto out;
-        }
+        rc = libxl__device_destroy(gc, aodev->dev);
+        if (!aodev->rc)
+            aodev->rc = rc;
     }
 
-out:
     aodev->callback(egc, aodev);
     return;
 }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSs-0005SL-KB; Tue, 07 Aug 2012 20:33:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-0005RB-3T
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Received: from [85.158.143.35:5451] by server-3.bemta-4.messagelabs.com id
	7D/C5-01511-C8B71205; Tue, 07 Aug 2012 20:33:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-21.messagelabs.com!1344371594!19145420!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27862 invoked from network); 7 Aug 2012 20:33:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-00040s-UB
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-0003Ha-Sq
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Message-Id: <E1SyqSm-0003Ha-Sq@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/vtpm: fix tpm_version.h error
	during parallel build
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1343984047 -3600
# Node ID d153e1abe5b665b88737fed35ca46be6555a27e0
# Parent  428014e272914d21cb2fc63a651a556543242a7d
tools/vtpm: fix tpm_version.h error during parallel build

Generating the tpm_version.h is not make -j safe:

In file included from ../tpm/tpm_emulator.h:25:0,
                 from ../tpm/tpm_startup.c:18:
../tpm/tpm_version.h:1:0: error: unterminated #ifndef
make[5]: *** [tpm_startup.o] Error 1

This happens because make can not know that 'all-recursive' depends on
'version'. Fix this by calling the individual make targets. Doing it
this way avoids adding yet another patch to the downloaded source.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 428014e27291 -r d153e1abe5b6 tools/vtpm/Makefile
--- a/tools/vtpm/Makefile	Fri Aug 03 09:54:06 2012 +0100
+++ b/tools/vtpm/Makefile	Fri Aug 03 09:54:07 2012 +0100
@@ -23,7 +23,7 @@ build: build_sub
 
 .PHONY: install
 install: build
-	$(MAKE) -C $(VTPM_DIR) $@
+	$(MAKE) -C $(VTPM_DIR) install-recursive
 
 .PHONY: clean
 clean:
@@ -66,7 +66,8 @@ updatepatches: clean orig
 .PHONY: build_sub
 build_sub: $(VTPM_DIR)/tpmd/tpmd
 	set -e; if [ -e $(GMP_HEADER) ]; then \
-		$(MAKE) -C $(VTPM_DIR); \
+		$(MAKE) -C $(VTPM_DIR) version; \
+		$(MAKE) -C $(VTPM_DIR) all-recursive; \
 	else \
 		echo "=== Unable to build VTPMs. libgmp could not be found."; \
 	fi

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSs-0005SL-KB; Tue, 07 Aug 2012 20:33:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-0005RB-3T
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Received: from [85.158.143.35:5451] by server-3.bemta-4.messagelabs.com id
	7D/C5-01511-C8B71205; Tue, 07 Aug 2012 20:33:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-21.messagelabs.com!1344371594!19145420!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27862 invoked from network); 7 Aug 2012 20:33:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-00040s-UB
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-0003Ha-Sq
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Message-Id: <E1SyqSm-0003Ha-Sq@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:12 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/vtpm: fix tpm_version.h error
	during parallel build
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1343984047 -3600
# Node ID d153e1abe5b665b88737fed35ca46be6555a27e0
# Parent  428014e272914d21cb2fc63a651a556543242a7d
tools/vtpm: fix tpm_version.h error during parallel build

Generating the tpm_version.h is not make -j safe:

In file included from ../tpm/tpm_emulator.h:25:0,
                 from ../tpm/tpm_startup.c:18:
../tpm/tpm_version.h:1:0: error: unterminated #ifndef
make[5]: *** [tpm_startup.o] Error 1

This happens because make can not know that 'all-recursive' depends on
'version'. Fix this by calling the individual make targets. Doing it
this way avoids adding yet another patch to the downloaded source.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 428014e27291 -r d153e1abe5b6 tools/vtpm/Makefile
--- a/tools/vtpm/Makefile	Fri Aug 03 09:54:06 2012 +0100
+++ b/tools/vtpm/Makefile	Fri Aug 03 09:54:07 2012 +0100
@@ -23,7 +23,7 @@ build: build_sub
 
 .PHONY: install
 install: build
-	$(MAKE) -C $(VTPM_DIR) $@
+	$(MAKE) -C $(VTPM_DIR) install-recursive
 
 .PHONY: clean
 clean:
@@ -66,7 +66,8 @@ updatepatches: clean orig
 .PHONY: build_sub
 build_sub: $(VTPM_DIR)/tpmd/tpmd
 	set -e; if [ -e $(GMP_HEADER) ]; then \
-		$(MAKE) -C $(VTPM_DIR); \
+		$(MAKE) -C $(VTPM_DIR) version; \
+		$(MAKE) -C $(VTPM_DIR) all-recursive; \
 	else \
 		echo "=== Unable to build VTPMs. libgmp could not be found."; \
 	fi

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSu-0005T9-Ox; Tue, 07 Aug 2012 20:33:20 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-0005Qw-RT
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Received: from [85.158.143.35:33971] by server-2.bemta-4.messagelabs.com id
	B9/16-17938-F8B71205; Tue, 07 Aug 2012 20:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1344371597!16620142!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11428 invoked from network); 7 Aug 2012 20:33:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-00041J-OL
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-0003Jn-N6
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Message-Id: <E1SyqSr-0003Jn-N6@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: remove an unused numainfo
	parameter
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984054 -3600
# Node ID aa93fe2d5a60770c697a44fc9635918417b1f5b5
# Parent  646a1deabd189fca948385fc0c0c1d28a7c63664
libxl: remove an unused numainfo parameter

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 646a1deabd18 -r aa93fe2d5a60 tools/libxl/libxl_numa.c
--- a/tools/libxl/libxl_numa.c	Fri Aug 03 09:54:13 2012 +0100
+++ b/tools/libxl/libxl_numa.c	Fri Aug 03 09:54:14 2012 +0100
@@ -231,7 +231,7 @@ static int nodemap_to_nr_vcpus(libxl__gc
  * candidates with just one node).
  */
 static int count_cpus_per_node(libxl_cputopology *tinfo, int nr_cpus,
-                               libxl_numainfo *ninfo, int nr_nodes)
+                               int nr_nodes)
 {
     int cpus_per_node = 0;
     int j, i;
@@ -340,7 +340,7 @@ int libxl__get_numa_candidate(libxl__gc 
     if (!min_nodes) {
         int cpus_per_node;
 
-        cpus_per_node = count_cpus_per_node(tinfo, nr_cpus, ninfo, nr_nodes);
+        cpus_per_node = count_cpus_per_node(tinfo, nr_cpus, nr_nodes);
         if (cpus_per_node == 0)
             min_nodes = 1;
         else

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSu-0005T9-Ox; Tue, 07 Aug 2012 20:33:20 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-0005Qw-RT
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Received: from [85.158.143.35:33971] by server-2.bemta-4.messagelabs.com id
	B9/16-17938-F8B71205; Tue, 07 Aug 2012 20:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1344371597!16620142!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11428 invoked from network); 7 Aug 2012 20:33:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-00041J-OL
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-0003Jn-N6
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Message-Id: <E1SyqSr-0003Jn-N6@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: remove an unused numainfo
	parameter
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984054 -3600
# Node ID aa93fe2d5a60770c697a44fc9635918417b1f5b5
# Parent  646a1deabd189fca948385fc0c0c1d28a7c63664
libxl: remove an unused numainfo parameter

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 646a1deabd18 -r aa93fe2d5a60 tools/libxl/libxl_numa.c
--- a/tools/libxl/libxl_numa.c	Fri Aug 03 09:54:13 2012 +0100
+++ b/tools/libxl/libxl_numa.c	Fri Aug 03 09:54:14 2012 +0100
@@ -231,7 +231,7 @@ static int nodemap_to_nr_vcpus(libxl__gc
  * candidates with just one node).
  */
 static int count_cpus_per_node(libxl_cputopology *tinfo, int nr_cpus,
-                               libxl_numainfo *ninfo, int nr_nodes)
+                               int nr_nodes)
 {
     int cpus_per_node = 0;
     int j, i;
@@ -340,7 +340,7 @@ int libxl__get_numa_candidate(libxl__gc 
     if (!min_nodes) {
         int cpus_per_node;
 
-        cpus_per_node = count_cpus_per_node(tinfo, nr_cpus, ninfo, nr_nodes);
+        cpus_per_node = count_cpus_per_node(tinfo, nr_cpus, nr_nodes);
         if (cpus_per_node == 0)
             min_nodes = 1;
         else

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSv-0005V8-W7; Tue, 07 Aug 2012 20:33:21 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-0005Rk-F1
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Received: from [85.158.143.99:37320] by server-1.bemta-4.messagelabs.com id
	26/CB-24392-09B71205; Tue, 07 Aug 2012 20:33:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-216.messagelabs.com!1344371596!20959391!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22643 invoked from network); 7 Aug 2012 20:33:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-00041A-6Q
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-0003J4-59
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Message-Id: <E1SyqSq-0003J4-59@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: rename aodevs to multidev
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984051 -3600
# Node ID a1b583ffbcb0503ad3907253c41986bd65f56ac7
# Parent  ee32ae1631266f0f6cce3d8c95ba15a68ec258a4
libxl: rename aodevs to multidev

To be consistent with the new function naming, rename
libxl__ao_devices to libxl__multidev and all variables aodevs to
multidev.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ee32ae163126 -r a1b583ffbcb0 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_create.c	Fri Aug 03 09:54:11 2012 +0100
@@ -599,10 +599,10 @@ static void domcreate_bootloader_done(li
                                       libxl__bootloader_state *bl,
                                       int rc);
 
-static void domcreate_launch_dm(libxl__egc *egc, libxl__ao_devices *aodevs,
+static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *aodevs,
                                 int ret);
 
-static void domcreate_attach_pci(libxl__egc *egc, libxl__ao_devices *aodevs,
+static void domcreate_attach_pci(libxl__egc *egc, libxl__multidev *aodevs,
                                  int ret);
 
 static void domcreate_console_available(libxl__egc *egc,
@@ -909,10 +909,10 @@ static void domcreate_rebuild_done(libxl
 
     store_libxl_entry(gc, domid, &d_config->b_info);
 
-    libxl__multidev_begin(ao, &dcs->aodevs);
-    dcs->aodevs.callback = domcreate_launch_dm;
-    libxl__add_disks(egc, ao, domid, d_config, &dcs->aodevs);
-    libxl__multidev_prepared(egc, &dcs->aodevs, 0);
+    libxl__multidev_begin(ao, &dcs->multidev);
+    dcs->multidev.callback = domcreate_launch_dm;
+    libxl__add_disks(egc, ao, domid, d_config, &dcs->multidev);
+    libxl__multidev_prepared(egc, &dcs->multidev, 0);
 
     return;
 
@@ -921,10 +921,10 @@ static void domcreate_rebuild_done(libxl
     domcreate_complete(egc, dcs, ret);
 }
 
-static void domcreate_launch_dm(libxl__egc *egc, libxl__ao_devices *aodevs,
+static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
                                 int ret)
 {
-    libxl__domain_create_state *dcs = CONTAINER_OF(aodevs, *dcs, aodevs);
+    libxl__domain_create_state *dcs = CONTAINER_OF(multidev, *dcs, multidev);
     STATE_AO_GC(dcs->ao);
     int i;
 
@@ -1039,14 +1039,14 @@ static void domcreate_devmodel_started(l
     /* Plug nic interfaces */
     if (d_config->num_nics > 0) {
         /* Attach nics */
-        libxl__multidev_begin(ao, &dcs->aodevs);
-        dcs->aodevs.callback = domcreate_attach_pci;
-        libxl__add_nics(egc, ao, domid, d_config, &dcs->aodevs);
-        libxl__multidev_prepared(egc, &dcs->aodevs, 0);
+        libxl__multidev_begin(ao, &dcs->multidev);
+        dcs->multidev.callback = domcreate_attach_pci;
+        libxl__add_nics(egc, ao, domid, d_config, &dcs->multidev);
+        libxl__multidev_prepared(egc, &dcs->multidev, 0);
         return;
     }
 
-    domcreate_attach_pci(egc, &dcs->aodevs, 0);
+    domcreate_attach_pci(egc, &dcs->multidev, 0);
     return;
 
 error_out:
@@ -1054,10 +1054,10 @@ error_out:
     domcreate_complete(egc, dcs, ret);
 }
 
-static void domcreate_attach_pci(libxl__egc *egc, libxl__ao_devices *aodevs,
+static void domcreate_attach_pci(libxl__egc *egc, libxl__multidev *multidev,
                                  int ret)
 {
-    libxl__domain_create_state *dcs = CONTAINER_OF(aodevs, *dcs, aodevs);
+    libxl__domain_create_state *dcs = CONTAINER_OF(multidev, *dcs, multidev);
     STATE_AO_GC(dcs->ao);
     int i;
     libxl_ctx *ctx = CTX;
diff -r ee32ae163126 -r a1b583ffbcb0 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:11 2012 +0100
@@ -403,13 +403,13 @@ void libxl__prepare_ao_device(libxl__ao 
 
 /* multidev */
 
-void libxl__multidev_begin(libxl__ao *ao, libxl__ao_devices *aodevs)
+void libxl__multidev_begin(libxl__ao *ao, libxl__multidev *multidev)
 {
     AO_GC;
 
-    aodevs->ao = ao;
-    aodevs->array = 0;
-    aodevs->used = aodevs->allocd = 0;
+    multidev->ao = ao;
+    multidev->array = 0;
+    multidev->used = multidev->allocd = 0;
 
     /* We allocate an aodev to represent the operation of preparing
      * all of the other operations.  This operation is completed when
@@ -422,25 +422,25 @@ void libxl__multidev_begin(libxl__ao *ao
      *  (iii) we have a nice consistent way to deal with any
      *      error that might occur while deciding what to initiate
      */
-    aodevs->preparation = libxl__multidev_prepare(aodevs);
+    multidev->preparation = libxl__multidev_prepare(multidev);
 }
 
 static void multidev_one_callback(libxl__egc *egc, libxl__ao_device *aodev);
 
-libxl__ao_device *libxl__multidev_prepare(libxl__ao_devices *aodevs) {
-    STATE_AO_GC(aodevs->ao);
+libxl__ao_device *libxl__multidev_prepare(libxl__multidev *multidev) {
+    STATE_AO_GC(multidev->ao);
     libxl__ao_device *aodev;
 
     GCNEW(aodev);
-    aodev->aodevs = aodevs;
+    aodev->multidev = multidev;
     aodev->callback = multidev_one_callback;
     libxl__prepare_ao_device(ao, aodev);
 
-    if (aodevs->used >= aodevs->allocd) {
-        aodevs->allocd = aodevs->used * 2 + 5;
-        GCREALLOC_ARRAY(aodevs->array, aodevs->allocd);
+    if (multidev->used >= multidev->allocd) {
+        multidev->allocd = multidev->used * 2 + 5;
+        GCREALLOC_ARRAY(multidev->array, multidev->allocd);
     }
-    aodevs->array[aodevs->used++] = aodev;
+    multidev->array[multidev->used++] = aodev;
 
     return aodev;
 }
@@ -448,28 +448,28 @@ libxl__ao_device *libxl__multidev_prepar
 static void multidev_one_callback(libxl__egc *egc, libxl__ao_device *aodev)
 {
     STATE_AO_GC(aodev->ao);
-    libxl__ao_devices *aodevs = aodev->aodevs;
+    libxl__multidev *multidev = aodev->multidev;
     int i, error = 0;
 
     aodev->active = 0;
 
-    for (i = 0; i < aodevs->used; i++) {
-        if (aodevs->array[i]->active)
+    for (i = 0; i < multidev->used; i++) {
+        if (multidev->array[i]->active)
             return;
 
-        if (aodevs->array[i]->rc)
-            error = aodevs->array[i]->rc;
+        if (multidev->array[i]->rc)
+            error = multidev->array[i]->rc;
     }
 
-    aodevs->callback(egc, aodevs, error);
+    multidev->callback(egc, multidev, error);
     return;
 }
 
-void libxl__multidev_prepared(libxl__egc *egc, libxl__ao_devices *aodevs,
-                              int rc)
+void libxl__multidev_prepared(libxl__egc *egc,
+                              libxl__multidev *multidev, int rc)
 {
-    aodevs->preparation->rc = rc;
-    multidev_one_callback(egc, aodevs->preparation);
+    multidev->preparation->rc = rc;
+    multidev_one_callback(egc, multidev->preparation);
 }
 
 /******************************************************************************/
@@ -486,12 +486,12 @@ void libxl__multidev_prepared(libxl__egc
 #define DEFINE_DEVICES_ADD(type)                                        \
     void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid, \
                               libxl_domain_config *d_config,            \
-                              libxl__ao_devices *aodevs)                \
+                              libxl__multidev *multidev)                \
     {                                                                   \
         AO_GC;                                                          \
         int i;                                                          \
         for (i = 0; i < d_config->num_##type##s; i++) {                 \
-            libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);  \
+            libxl__ao_device *aodev = libxl__multidev_prepare(multidev);  \
             libxl__device_##type##_add(egc, domid, &d_config->type##s[i], \
                                        aodev);                          \
         }                                                               \
@@ -532,8 +532,8 @@ out:
 
 /* Callback for device destruction */
 
-static void devices_remove_callback(libxl__egc *egc, libxl__ao_devices *aodevs,
-                                    int rc);
+static void devices_remove_callback(libxl__egc *egc,
+                                    libxl__multidev *multidev, int rc);
 
 void libxl__devices_destroy(libxl__egc *egc, libxl__devices_remove_state *drs)
 {
@@ -545,12 +545,12 @@ void libxl__devices_destroy(libxl__egc *
     char **kinds = NULL, **devs = NULL;
     int i, j, rc = 0;
     libxl__device *dev;
-    libxl__ao_devices *aodevs = &drs->aodevs;
+    libxl__multidev *multidev = &drs->multidev;
     libxl__ao_device *aodev;
     libxl__device_kind kind;
 
-    libxl__multidev_begin(ao, aodevs);
-    aodevs->callback = devices_remove_callback;
+    libxl__multidev_begin(ao, multidev);
+    multidev->callback = devices_remove_callback;
 
     path = libxl__sprintf(gc, "/local/domain/%d/device", domid);
     kinds = libxl__xs_directory(gc, XBT_NULL, path, &num_kinds);
@@ -587,7 +587,7 @@ void libxl__devices_destroy(libxl__egc *
                     libxl__device_destroy(gc, dev);
                     continue;
                 }
-                aodev = libxl__multidev_prepare(aodevs);
+                aodev = libxl__multidev_prepare(multidev);
                 aodev->action = DEVICE_DISCONNECT;
                 aodev->dev = dev;
                 aodev->force = drs->force;
@@ -613,7 +613,7 @@ void libxl__devices_destroy(libxl__egc *
     }
 
 out:
-    libxl__multidev_prepared(egc, aodevs, rc);
+    libxl__multidev_prepared(egc, multidev, rc);
 }
 
 /* Callbacks for device related operations */
@@ -1003,10 +1003,10 @@ static void device_hotplug_clean(libxl__
     assert(!libxl__ev_child_inuse(&aodev->child));
 }
 
-static void devices_remove_callback(libxl__egc *egc, libxl__ao_devices *aodevs,
-                                    int rc)
+static void devices_remove_callback(libxl__egc *egc,
+                                    libxl__multidev *multidev, int rc)
 {
-    libxl__devices_remove_state *drs = CONTAINER_OF(aodevs, *drs, aodevs);
+    libxl__devices_remove_state *drs = CONTAINER_OF(multidev, *drs, multidev);
     STATE_AO_GC(drs->ao);
 
     drs->callback(egc, drs, rc);
diff -r ee32ae163126 -r a1b583ffbcb0 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:11 2012 +0100
@@ -714,10 +714,10 @@ static void spawn_stubdom_pvqemu_cb(libx
                                 int rc);
 
 static void spawn_stub_launch_dm(libxl__egc *egc,
-                                 libxl__ao_devices *aodevs, int ret);
+                                 libxl__multidev *aodevs, int ret);
 
 static void stubdom_pvqemu_cb(libxl__egc *egc,
-                              libxl__ao_devices *aodevs,
+                              libxl__multidev *aodevs,
                               int rc);
 
 static void spaw_stubdom_pvqemu_destroy_cb(libxl__egc *egc,
@@ -856,10 +856,10 @@ retry_transaction:
         if (errno == EAGAIN)
             goto retry_transaction;
 
-    libxl__multidev_begin(ao, &sdss->aodevs);
-    sdss->aodevs.callback = spawn_stub_launch_dm;
-    libxl__add_disks(egc, ao, dm_domid, dm_config, &sdss->aodevs);
-    libxl__multidev_prepared(egc, &sdss->aodevs, 0);
+    libxl__multidev_begin(ao, &sdss->multidev);
+    sdss->multidev.callback = spawn_stub_launch_dm;
+    libxl__add_disks(egc, ao, dm_domid, dm_config, &sdss->multidev);
+    libxl__multidev_prepared(egc, &sdss->multidev, 0);
 
     free(args);
     return;
@@ -872,9 +872,9 @@ out:
 }
 
 static void spawn_stub_launch_dm(libxl__egc *egc,
-                                 libxl__ao_devices *aodevs, int ret)
+                                 libxl__multidev *multidev, int ret)
 {
-    libxl__stub_dm_spawn_state *sdss = CONTAINER_OF(aodevs, *sdss, aodevs);
+    libxl__stub_dm_spawn_state *sdss = CONTAINER_OF(multidev, *sdss, multidev);
     STATE_AO_GC(sdss->dm.spawn.ao);
     libxl_ctx *ctx = libxl__gc_owner(gc);
     int i, num_console = STUBDOM_SPECIAL_CONSOLES;
@@ -982,22 +982,22 @@ static void spawn_stubdom_pvqemu_cb(libx
     if (rc) goto out;
 
     if (d_config->num_nics > 0) {
-        libxl__multidev_begin(ao, &sdss->aodevs);
-        sdss->aodevs.callback = stubdom_pvqemu_cb;
-        libxl__add_nics(egc, ao, dm_domid, d_config, &sdss->aodevs);
-        libxl__multidev_prepared(egc, &sdss->aodevs, 0);
+        libxl__multidev_begin(ao, &sdss->multidev);
+        sdss->multidev.callback = stubdom_pvqemu_cb;
+        libxl__add_nics(egc, ao, dm_domid, d_config, &sdss->multidev);
+        libxl__multidev_prepared(egc, &sdss->multidev, 0);
         return;
     }
 
 out:
-    stubdom_pvqemu_cb(egc, &sdss->aodevs, rc);
+    stubdom_pvqemu_cb(egc, &sdss->multidev, rc);
 }
 
 static void stubdom_pvqemu_cb(libxl__egc *egc,
-                              libxl__ao_devices *aodevs,
+                              libxl__multidev *multidev,
                               int rc)
 {
-    libxl__stub_dm_spawn_state *sdss = CONTAINER_OF(aodevs, *sdss, aodevs);
+    libxl__stub_dm_spawn_state *sdss = CONTAINER_OF(multidev, *sdss, multidev);
     STATE_AO_GC(sdss->dm.spawn.ao);
     uint32_t dm_domid = sdss->pvqemu.guest_domid;
 
diff -r ee32ae163126 -r a1b583ffbcb0 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:11 2012 +0100
@@ -1797,7 +1797,7 @@ typedef enum {
 } libxl__device_action;
 
 typedef struct libxl__ao_device libxl__ao_device;
-typedef struct libxl__ao_devices libxl__ao_devices;
+typedef struct libxl__multidev libxl__multidev;
 typedef void libxl__device_callback(libxl__egc*, libxl__ao_device*);
 
 /* This functions sets the necessary libxl__ao_device struct values to use
@@ -1827,7 +1827,7 @@ struct libxl__ao_device {
     int rc;
     /* private for multidev */
     int active;
-    libxl__ao_devices *aodevs; /* reference to the containing multidev */
+    libxl__multidev *multidev; /* reference to the containing multidev */
     /* private for add/remove implementation */
     libxl__ev_devstate backend_ds;
     /* Bodge for Qemu devices, also used for timeout of hotplug execution */
@@ -1853,12 +1853,12 @@ struct libxl__ao_device {
  */
 
 /* Starts preparing to add/remove a bunch of devices. */
-_hidden void libxl__multidev_begin(libxl__ao *ao, libxl__ao_devices*);
+_hidden void libxl__multidev_begin(libxl__ao *ao, libxl__multidev*);
 
 /* Prepares to add/remove one of many devices.  Returns a libxl__ao_device
  * which has had libxl__prepare_ao_device called, and which has also
  * had ->callback set.  The user should not mess with aodev->callback. */
-_hidden libxl__ao_device *libxl__multidev_prepare(libxl__ao_devices*);
+_hidden libxl__ao_device *libxl__multidev_prepare(libxl__multidev*);
 
 /* Notifies the multidev machinery that we have now finished preparing
  * and initiating devices.  multidev->callback may then be called as
@@ -1866,10 +1866,10 @@ _hidden libxl__ao_device *libxl__multide
  * outstanding, perhaps reentrantly.  If rc!=0 (error should have been
  * logged) multidev->callback will get a non-zero rc.
  * callback may be set by the user at any point before prepared. */
-_hidden void libxl__multidev_prepared(libxl__egc*, libxl__ao_devices*, int rc);
-
-typedef void libxl__devices_callback(libxl__egc*, libxl__ao_devices*, int rc);
-struct libxl__ao_devices {
+_hidden void libxl__multidev_prepared(libxl__egc*, libxl__multidev*, int rc);
+
+typedef void libxl__devices_callback(libxl__egc*, libxl__multidev*, int rc);
+struct libxl__multidev {
     /* set by user: */
     libxl__devices_callback *callback;
     /* for private use by libxl__...ao_devices... machinery: */
@@ -2342,7 +2342,7 @@ struct libxl__devices_remove_state {
     libxl__devices_remove_callback *callback;
     int force; /* libxl_device_TYPE_destroy rather than _remove */
     /* private */
-    libxl__ao_devices aodevs;
+    libxl__multidev multidev;
     int num_devices;
 };
 
@@ -2386,7 +2386,7 @@ _hidden void libxl__devices_destroy(libx
                                     libxl__devices_remove_state *drs);
 
 /* Helper function to add a bunch of disks. This should be used when
- * the caller is inside an async op. "devices" will NOT be prepared by
+ * the caller is inside an async op. "multidev" will NOT be prepared by
  * this function, so the caller must make sure to call
  * libxl__multidev_begin before calling this function.
  *
@@ -2395,11 +2395,11 @@ _hidden void libxl__devices_destroy(libx
  */
 _hidden void libxl__add_disks(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
                               libxl_domain_config *d_config,
-                              libxl__ao_devices *aodevs);
+                              libxl__multidev *multidev);
 
 _hidden void libxl__add_nics(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
                              libxl_domain_config *d_config,
-                             libxl__ao_devices *aodevs);
+                             libxl__multidev *multidev);
 
 /*----- device model creation -----*/
 
@@ -2435,7 +2435,7 @@ typedef struct {
     libxl__domain_build_state dm_state;
     libxl__dm_spawn_state pvqemu;
     libxl__destroy_domid_state dis;
-    libxl__ao_devices aodevs;
+    libxl__multidev multidev;
 } libxl__stub_dm_spawn_state;
 
 _hidden void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state*);
@@ -2467,7 +2467,7 @@ struct libxl__domain_create_state {
     libxl__save_helper_state shs;
     /* necessary if the domain creation failed and we have to destroy it */
     libxl__domain_destroy_state dds;
-    libxl__ao_devices aodevs;
+    libxl__multidev multidev;
 };
 
 /*----- Domain suspend (save) functions -----*/

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSv-0005V8-W7; Tue, 07 Aug 2012 20:33:21 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-0005Rk-F1
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Received: from [85.158.143.99:37320] by server-1.bemta-4.messagelabs.com id
	26/CB-24392-09B71205; Tue, 07 Aug 2012 20:33:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-216.messagelabs.com!1344371596!20959391!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22643 invoked from network); 7 Aug 2012 20:33:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-00041A-6Q
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-0003J4-59
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Message-Id: <E1SyqSq-0003J4-59@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: rename aodevs to multidev
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984051 -3600
# Node ID a1b583ffbcb0503ad3907253c41986bd65f56ac7
# Parent  ee32ae1631266f0f6cce3d8c95ba15a68ec258a4
libxl: rename aodevs to multidev

To be consistent with the new function naming, rename
libxl__ao_devices to libxl__multidev and all variables aodevs to
multidev.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ee32ae163126 -r a1b583ffbcb0 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_create.c	Fri Aug 03 09:54:11 2012 +0100
@@ -599,10 +599,10 @@ static void domcreate_bootloader_done(li
                                       libxl__bootloader_state *bl,
                                       int rc);
 
-static void domcreate_launch_dm(libxl__egc *egc, libxl__ao_devices *aodevs,
+static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *aodevs,
                                 int ret);
 
-static void domcreate_attach_pci(libxl__egc *egc, libxl__ao_devices *aodevs,
+static void domcreate_attach_pci(libxl__egc *egc, libxl__multidev *aodevs,
                                  int ret);
 
 static void domcreate_console_available(libxl__egc *egc,
@@ -909,10 +909,10 @@ static void domcreate_rebuild_done(libxl
 
     store_libxl_entry(gc, domid, &d_config->b_info);
 
-    libxl__multidev_begin(ao, &dcs->aodevs);
-    dcs->aodevs.callback = domcreate_launch_dm;
-    libxl__add_disks(egc, ao, domid, d_config, &dcs->aodevs);
-    libxl__multidev_prepared(egc, &dcs->aodevs, 0);
+    libxl__multidev_begin(ao, &dcs->multidev);
+    dcs->multidev.callback = domcreate_launch_dm;
+    libxl__add_disks(egc, ao, domid, d_config, &dcs->multidev);
+    libxl__multidev_prepared(egc, &dcs->multidev, 0);
 
     return;
 
@@ -921,10 +921,10 @@ static void domcreate_rebuild_done(libxl
     domcreate_complete(egc, dcs, ret);
 }
 
-static void domcreate_launch_dm(libxl__egc *egc, libxl__ao_devices *aodevs,
+static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
                                 int ret)
 {
-    libxl__domain_create_state *dcs = CONTAINER_OF(aodevs, *dcs, aodevs);
+    libxl__domain_create_state *dcs = CONTAINER_OF(multidev, *dcs, multidev);
     STATE_AO_GC(dcs->ao);
     int i;
 
@@ -1039,14 +1039,14 @@ static void domcreate_devmodel_started(l
     /* Plug nic interfaces */
     if (d_config->num_nics > 0) {
         /* Attach nics */
-        libxl__multidev_begin(ao, &dcs->aodevs);
-        dcs->aodevs.callback = domcreate_attach_pci;
-        libxl__add_nics(egc, ao, domid, d_config, &dcs->aodevs);
-        libxl__multidev_prepared(egc, &dcs->aodevs, 0);
+        libxl__multidev_begin(ao, &dcs->multidev);
+        dcs->multidev.callback = domcreate_attach_pci;
+        libxl__add_nics(egc, ao, domid, d_config, &dcs->multidev);
+        libxl__multidev_prepared(egc, &dcs->multidev, 0);
         return;
     }
 
-    domcreate_attach_pci(egc, &dcs->aodevs, 0);
+    domcreate_attach_pci(egc, &dcs->multidev, 0);
     return;
 
 error_out:
@@ -1054,10 +1054,10 @@ error_out:
     domcreate_complete(egc, dcs, ret);
 }
 
-static void domcreate_attach_pci(libxl__egc *egc, libxl__ao_devices *aodevs,
+static void domcreate_attach_pci(libxl__egc *egc, libxl__multidev *multidev,
                                  int ret)
 {
-    libxl__domain_create_state *dcs = CONTAINER_OF(aodevs, *dcs, aodevs);
+    libxl__domain_create_state *dcs = CONTAINER_OF(multidev, *dcs, multidev);
     STATE_AO_GC(dcs->ao);
     int i;
     libxl_ctx *ctx = CTX;
diff -r ee32ae163126 -r a1b583ffbcb0 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:11 2012 +0100
@@ -403,13 +403,13 @@ void libxl__prepare_ao_device(libxl__ao 
 
 /* multidev */
 
-void libxl__multidev_begin(libxl__ao *ao, libxl__ao_devices *aodevs)
+void libxl__multidev_begin(libxl__ao *ao, libxl__multidev *multidev)
 {
     AO_GC;
 
-    aodevs->ao = ao;
-    aodevs->array = 0;
-    aodevs->used = aodevs->allocd = 0;
+    multidev->ao = ao;
+    multidev->array = 0;
+    multidev->used = multidev->allocd = 0;
 
     /* We allocate an aodev to represent the operation of preparing
      * all of the other operations.  This operation is completed when
@@ -422,25 +422,25 @@ void libxl__multidev_begin(libxl__ao *ao
      *  (iii) we have a nice consistent way to deal with any
      *      error that might occur while deciding what to initiate
      */
-    aodevs->preparation = libxl__multidev_prepare(aodevs);
+    multidev->preparation = libxl__multidev_prepare(multidev);
 }
 
 static void multidev_one_callback(libxl__egc *egc, libxl__ao_device *aodev);
 
-libxl__ao_device *libxl__multidev_prepare(libxl__ao_devices *aodevs) {
-    STATE_AO_GC(aodevs->ao);
+libxl__ao_device *libxl__multidev_prepare(libxl__multidev *multidev) {
+    STATE_AO_GC(multidev->ao);
     libxl__ao_device *aodev;
 
     GCNEW(aodev);
-    aodev->aodevs = aodevs;
+    aodev->multidev = multidev;
     aodev->callback = multidev_one_callback;
     libxl__prepare_ao_device(ao, aodev);
 
-    if (aodevs->used >= aodevs->allocd) {
-        aodevs->allocd = aodevs->used * 2 + 5;
-        GCREALLOC_ARRAY(aodevs->array, aodevs->allocd);
+    if (multidev->used >= multidev->allocd) {
+        multidev->allocd = multidev->used * 2 + 5;
+        GCREALLOC_ARRAY(multidev->array, multidev->allocd);
     }
-    aodevs->array[aodevs->used++] = aodev;
+    multidev->array[multidev->used++] = aodev;
 
     return aodev;
 }
@@ -448,28 +448,28 @@ libxl__ao_device *libxl__multidev_prepar
 static void multidev_one_callback(libxl__egc *egc, libxl__ao_device *aodev)
 {
     STATE_AO_GC(aodev->ao);
-    libxl__ao_devices *aodevs = aodev->aodevs;
+    libxl__multidev *multidev = aodev->multidev;
     int i, error = 0;
 
     aodev->active = 0;
 
-    for (i = 0; i < aodevs->used; i++) {
-        if (aodevs->array[i]->active)
+    for (i = 0; i < multidev->used; i++) {
+        if (multidev->array[i]->active)
             return;
 
-        if (aodevs->array[i]->rc)
-            error = aodevs->array[i]->rc;
+        if (multidev->array[i]->rc)
+            error = multidev->array[i]->rc;
     }
 
-    aodevs->callback(egc, aodevs, error);
+    multidev->callback(egc, multidev, error);
     return;
 }
 
-void libxl__multidev_prepared(libxl__egc *egc, libxl__ao_devices *aodevs,
-                              int rc)
+void libxl__multidev_prepared(libxl__egc *egc,
+                              libxl__multidev *multidev, int rc)
 {
-    aodevs->preparation->rc = rc;
-    multidev_one_callback(egc, aodevs->preparation);
+    multidev->preparation->rc = rc;
+    multidev_one_callback(egc, multidev->preparation);
 }
 
 /******************************************************************************/
@@ -486,12 +486,12 @@ void libxl__multidev_prepared(libxl__egc
 #define DEFINE_DEVICES_ADD(type)                                        \
     void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid, \
                               libxl_domain_config *d_config,            \
-                              libxl__ao_devices *aodevs)                \
+                              libxl__multidev *multidev)                \
     {                                                                   \
         AO_GC;                                                          \
         int i;                                                          \
         for (i = 0; i < d_config->num_##type##s; i++) {                 \
-            libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);  \
+            libxl__ao_device *aodev = libxl__multidev_prepare(multidev);  \
             libxl__device_##type##_add(egc, domid, &d_config->type##s[i], \
                                        aodev);                          \
         }                                                               \
@@ -532,8 +532,8 @@ out:
 
 /* Callback for device destruction */
 
-static void devices_remove_callback(libxl__egc *egc, libxl__ao_devices *aodevs,
-                                    int rc);
+static void devices_remove_callback(libxl__egc *egc,
+                                    libxl__multidev *multidev, int rc);
 
 void libxl__devices_destroy(libxl__egc *egc, libxl__devices_remove_state *drs)
 {
@@ -545,12 +545,12 @@ void libxl__devices_destroy(libxl__egc *
     char **kinds = NULL, **devs = NULL;
     int i, j, rc = 0;
     libxl__device *dev;
-    libxl__ao_devices *aodevs = &drs->aodevs;
+    libxl__multidev *multidev = &drs->multidev;
     libxl__ao_device *aodev;
     libxl__device_kind kind;
 
-    libxl__multidev_begin(ao, aodevs);
-    aodevs->callback = devices_remove_callback;
+    libxl__multidev_begin(ao, multidev);
+    multidev->callback = devices_remove_callback;
 
     path = libxl__sprintf(gc, "/local/domain/%d/device", domid);
     kinds = libxl__xs_directory(gc, XBT_NULL, path, &num_kinds);
@@ -587,7 +587,7 @@ void libxl__devices_destroy(libxl__egc *
                     libxl__device_destroy(gc, dev);
                     continue;
                 }
-                aodev = libxl__multidev_prepare(aodevs);
+                aodev = libxl__multidev_prepare(multidev);
                 aodev->action = DEVICE_DISCONNECT;
                 aodev->dev = dev;
                 aodev->force = drs->force;
@@ -613,7 +613,7 @@ void libxl__devices_destroy(libxl__egc *
     }
 
 out:
-    libxl__multidev_prepared(egc, aodevs, rc);
+    libxl__multidev_prepared(egc, multidev, rc);
 }
 
 /* Callbacks for device related operations */
@@ -1003,10 +1003,10 @@ static void device_hotplug_clean(libxl__
     assert(!libxl__ev_child_inuse(&aodev->child));
 }
 
-static void devices_remove_callback(libxl__egc *egc, libxl__ao_devices *aodevs,
-                                    int rc)
+static void devices_remove_callback(libxl__egc *egc,
+                                    libxl__multidev *multidev, int rc)
 {
-    libxl__devices_remove_state *drs = CONTAINER_OF(aodevs, *drs, aodevs);
+    libxl__devices_remove_state *drs = CONTAINER_OF(multidev, *drs, multidev);
     STATE_AO_GC(drs->ao);
 
     drs->callback(egc, drs, rc);
diff -r ee32ae163126 -r a1b583ffbcb0 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:11 2012 +0100
@@ -714,10 +714,10 @@ static void spawn_stubdom_pvqemu_cb(libx
                                 int rc);
 
 static void spawn_stub_launch_dm(libxl__egc *egc,
-                                 libxl__ao_devices *aodevs, int ret);
+                                 libxl__multidev *aodevs, int ret);
 
 static void stubdom_pvqemu_cb(libxl__egc *egc,
-                              libxl__ao_devices *aodevs,
+                              libxl__multidev *aodevs,
                               int rc);
 
 static void spaw_stubdom_pvqemu_destroy_cb(libxl__egc *egc,
@@ -856,10 +856,10 @@ retry_transaction:
         if (errno == EAGAIN)
             goto retry_transaction;
 
-    libxl__multidev_begin(ao, &sdss->aodevs);
-    sdss->aodevs.callback = spawn_stub_launch_dm;
-    libxl__add_disks(egc, ao, dm_domid, dm_config, &sdss->aodevs);
-    libxl__multidev_prepared(egc, &sdss->aodevs, 0);
+    libxl__multidev_begin(ao, &sdss->multidev);
+    sdss->multidev.callback = spawn_stub_launch_dm;
+    libxl__add_disks(egc, ao, dm_domid, dm_config, &sdss->multidev);
+    libxl__multidev_prepared(egc, &sdss->multidev, 0);
 
     free(args);
     return;
@@ -872,9 +872,9 @@ out:
 }
 
 static void spawn_stub_launch_dm(libxl__egc *egc,
-                                 libxl__ao_devices *aodevs, int ret)
+                                 libxl__multidev *multidev, int ret)
 {
-    libxl__stub_dm_spawn_state *sdss = CONTAINER_OF(aodevs, *sdss, aodevs);
+    libxl__stub_dm_spawn_state *sdss = CONTAINER_OF(multidev, *sdss, multidev);
     STATE_AO_GC(sdss->dm.spawn.ao);
     libxl_ctx *ctx = libxl__gc_owner(gc);
     int i, num_console = STUBDOM_SPECIAL_CONSOLES;
@@ -982,22 +982,22 @@ static void spawn_stubdom_pvqemu_cb(libx
     if (rc) goto out;
 
     if (d_config->num_nics > 0) {
-        libxl__multidev_begin(ao, &sdss->aodevs);
-        sdss->aodevs.callback = stubdom_pvqemu_cb;
-        libxl__add_nics(egc, ao, dm_domid, d_config, &sdss->aodevs);
-        libxl__multidev_prepared(egc, &sdss->aodevs, 0);
+        libxl__multidev_begin(ao, &sdss->multidev);
+        sdss->multidev.callback = stubdom_pvqemu_cb;
+        libxl__add_nics(egc, ao, dm_domid, d_config, &sdss->multidev);
+        libxl__multidev_prepared(egc, &sdss->multidev, 0);
         return;
     }
 
 out:
-    stubdom_pvqemu_cb(egc, &sdss->aodevs, rc);
+    stubdom_pvqemu_cb(egc, &sdss->multidev, rc);
 }
 
 static void stubdom_pvqemu_cb(libxl__egc *egc,
-                              libxl__ao_devices *aodevs,
+                              libxl__multidev *multidev,
                               int rc)
 {
-    libxl__stub_dm_spawn_state *sdss = CONTAINER_OF(aodevs, *sdss, aodevs);
+    libxl__stub_dm_spawn_state *sdss = CONTAINER_OF(multidev, *sdss, multidev);
     STATE_AO_GC(sdss->dm.spawn.ao);
     uint32_t dm_domid = sdss->pvqemu.guest_domid;
 
diff -r ee32ae163126 -r a1b583ffbcb0 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:11 2012 +0100
@@ -1797,7 +1797,7 @@ typedef enum {
 } libxl__device_action;
 
 typedef struct libxl__ao_device libxl__ao_device;
-typedef struct libxl__ao_devices libxl__ao_devices;
+typedef struct libxl__multidev libxl__multidev;
 typedef void libxl__device_callback(libxl__egc*, libxl__ao_device*);
 
 /* This functions sets the necessary libxl__ao_device struct values to use
@@ -1827,7 +1827,7 @@ struct libxl__ao_device {
     int rc;
     /* private for multidev */
     int active;
-    libxl__ao_devices *aodevs; /* reference to the containing multidev */
+    libxl__multidev *multidev; /* reference to the containing multidev */
     /* private for add/remove implementation */
     libxl__ev_devstate backend_ds;
     /* Bodge for Qemu devices, also used for timeout of hotplug execution */
@@ -1853,12 +1853,12 @@ struct libxl__ao_device {
  */
 
 /* Starts preparing to add/remove a bunch of devices. */
-_hidden void libxl__multidev_begin(libxl__ao *ao, libxl__ao_devices*);
+_hidden void libxl__multidev_begin(libxl__ao *ao, libxl__multidev*);
 
 /* Prepares to add/remove one of many devices.  Returns a libxl__ao_device
  * which has had libxl__prepare_ao_device called, and which has also
  * had ->callback set.  The user should not mess with aodev->callback. */
-_hidden libxl__ao_device *libxl__multidev_prepare(libxl__ao_devices*);
+_hidden libxl__ao_device *libxl__multidev_prepare(libxl__multidev*);
 
 /* Notifies the multidev machinery that we have now finished preparing
  * and initiating devices.  multidev->callback may then be called as
@@ -1866,10 +1866,10 @@ _hidden libxl__ao_device *libxl__multide
  * outstanding, perhaps reentrantly.  If rc!=0 (error should have been
  * logged) multidev->callback will get a non-zero rc.
  * callback may be set by the user at any point before prepared. */
-_hidden void libxl__multidev_prepared(libxl__egc*, libxl__ao_devices*, int rc);
-
-typedef void libxl__devices_callback(libxl__egc*, libxl__ao_devices*, int rc);
-struct libxl__ao_devices {
+_hidden void libxl__multidev_prepared(libxl__egc*, libxl__multidev*, int rc);
+
+typedef void libxl__devices_callback(libxl__egc*, libxl__multidev*, int rc);
+struct libxl__multidev {
     /* set by user: */
     libxl__devices_callback *callback;
     /* for private use by libxl__...ao_devices... machinery: */
@@ -2342,7 +2342,7 @@ struct libxl__devices_remove_state {
     libxl__devices_remove_callback *callback;
     int force; /* libxl_device_TYPE_destroy rather than _remove */
     /* private */
-    libxl__ao_devices aodevs;
+    libxl__multidev multidev;
     int num_devices;
 };
 
@@ -2386,7 +2386,7 @@ _hidden void libxl__devices_destroy(libx
                                     libxl__devices_remove_state *drs);
 
 /* Helper function to add a bunch of disks. This should be used when
- * the caller is inside an async op. "devices" will NOT be prepared by
+ * the caller is inside an async op. "multidev" will NOT be prepared by
  * this function, so the caller must make sure to call
  * libxl__multidev_begin before calling this function.
  *
@@ -2395,11 +2395,11 @@ _hidden void libxl__devices_destroy(libx
  */
 _hidden void libxl__add_disks(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
                               libxl_domain_config *d_config,
-                              libxl__ao_devices *aodevs);
+                              libxl__multidev *multidev);
 
 _hidden void libxl__add_nics(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
                              libxl_domain_config *d_config,
-                             libxl__ao_devices *aodevs);
+                             libxl__multidev *multidev);
 
 /*----- device model creation -----*/
 
@@ -2435,7 +2435,7 @@ typedef struct {
     libxl__domain_build_state dm_state;
     libxl__dm_spawn_state pvqemu;
     libxl__destroy_domid_state dis;
-    libxl__ao_devices aodevs;
+    libxl__multidev multidev;
 } libxl__stub_dm_spawn_state;
 
 _hidden void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state*);
@@ -2467,7 +2467,7 @@ struct libxl__domain_create_state {
     libxl__save_helper_state shs;
     /* necessary if the domain creation failed and we have to destroy it */
     libxl__domain_destroy_state dds;
-    libxl__ao_devices aodevs;
+    libxl__multidev multidev;
 };
 
 /*----- Domain suspend (save) functions -----*/

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005Xa-MC; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005VP-Tq
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Received: from [85.158.143.35:5612] by server-3.bemta-4.messagelabs.com id
	CA/D5-01511-29B71205; Tue, 07 Aug 2012 20:33:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1344371600!17303580!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12393 invoked from network); 7 Aug 2012 20:33:21 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:21 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-00041Y-DR
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-0003L0-CJ
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Message-Id: <E1SyqSu-0003L0-CJ@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:19 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Intel VT-d: Dump IOMMU supported
	page sizes
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Santosh Jodh <santosh.jodh@citrix.com>
# Date 1343986684 -3600
# Node ID 9ad379939b78769a9368123989bb0736096fc6ab
# Parent  612898732e66db3d3b992df1a1af1655af4d92c9
Intel VT-d: Dump IOMMU supported page sizes

Signed-off-by: Santosh Jodh <santosh.jodh@citrix.com>
---


diff -r 612898732e66 -r 9ad379939b78 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c	Fri Aug 03 09:54:17 2012 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c	Fri Aug 03 10:38:04 2012 +0100
@@ -2137,6 +2137,15 @@ int __init intel_vtd_setup(void)
     {
         iommu = drhd->iommu;
 
+        printk("Intel VT-d supported page sizes: 4kB");
+        if (cap_sps_2mb(iommu->cap))
+            printk(", 2MB");
+
+        if (cap_sps_1gb(iommu->cap))
+            printk(", 1GB");
+
+        printk(".\n");
+
         if ( iommu_snoop && !ecap_snp_ctl(iommu->ecap) )
             iommu_snoop = 0;
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005Xa-MC; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005VP-Tq
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Received: from [85.158.143.35:5612] by server-3.bemta-4.messagelabs.com id
	CA/D5-01511-29B71205; Tue, 07 Aug 2012 20:33:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-21.messagelabs.com!1344371600!17303580!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12393 invoked from network); 7 Aug 2012 20:33:21 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:21 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-00041Y-DR
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-0003L0-CJ
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Message-Id: <E1SyqSu-0003L0-CJ@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:19 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Intel VT-d: Dump IOMMU supported
	page sizes
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Santosh Jodh <santosh.jodh@citrix.com>
# Date 1343986684 -3600
# Node ID 9ad379939b78769a9368123989bb0736096fc6ab
# Parent  612898732e66db3d3b992df1a1af1655af4d92c9
Intel VT-d: Dump IOMMU supported page sizes

Signed-off-by: Santosh Jodh <santosh.jodh@citrix.com>
---


diff -r 612898732e66 -r 9ad379939b78 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c	Fri Aug 03 09:54:17 2012 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c	Fri Aug 03 10:38:04 2012 +0100
@@ -2137,6 +2137,15 @@ int __init intel_vtd_setup(void)
     {
         iommu = drhd->iommu;
 
+        printk("Intel VT-d supported page sizes: 4kB");
+        if (cap_sps_2mb(iommu->cap))
+            printk(", 2MB");
+
+        if (cap_sps_1gb(iommu->cap))
+            printk(", 1GB");
+
+        printk(".\n");
+
         if ( iommu_snoop && !ecap_snp_ctl(iommu->ecap) )
             iommu_snoop = 0;
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSx-0005WE-5s; Tue, 07 Aug 2012 20:33:23 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSv-0005Sg-36
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:21 +0000
Received: from [85.158.138.51:58642] by server-6.bemta-3.messagelabs.com id
	43/F1-02321-09B71205; Tue, 07 Aug 2012 20:33:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1344371599!30952324!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15259 invoked from network); 7 Aug 2012 20:33:20 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSs-00041P-QX
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSs-0003KH-OY
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:18 +0000
Message-Id: <E1SyqSs-0003KH-OY@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: add a comment re the memory
	management API instability
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984055 -3600
# Node ID afff548d43d770a3e074a20e1e7154ba5df1c8c6
# Parent  32aa98840f2ba38081d007a919a40efefc62d20a
libxl: add a comment re the memory management API instability

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 32aa98840f2b -r afff548d43d7 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Aug 03 09:54:14 2012 +0100
+++ b/tools/libxl/libxl.h	Fri Aug 03 09:54:15 2012 +0100
@@ -567,6 +567,17 @@ int libxl_domain_core_dump(libxl_ctx *ct
 int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint32_t target_memkb);
 int libxl_set_memory_target(libxl_ctx *ctx, uint32_t domid, int32_t target_memkb, int relative, int enforce);
 int libxl_get_memory_target(libxl_ctx *ctx, uint32_t domid, uint32_t *out_target);
+
+
+/*
+ * WARNING
+ * This memory management API is unstable even in Xen 4.2.
+ * It has a numer of deficiencies and we intend to replace it.
+ *
+ * The semantics of these functions should not be relied on to be very
+ * coherent or stable.  We will however endeavour to keep working
+ * existing programs which use them in roughly the same way as libxl.
+ */
 /* how much free memory in the system a domain needs to be built */
 int libxl_domain_need_memory(libxl_ctx *ctx, libxl_domain_build_info *b_info,
                              uint32_t *need_memkb);
@@ -577,6 +588,7 @@ int libxl_wait_for_free_memory(libxl_ctx
 /* wait for the memory target of a domain to be reached */
 int libxl_wait_for_memory_target(libxl_ctx *ctx, uint32_t domid, int wait_secs);
 
+
 int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass);
 int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_type type);
 /* libxl_primary_console_exec finds the domid and console number

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSx-0005WE-5s; Tue, 07 Aug 2012 20:33:23 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSv-0005Sg-36
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:21 +0000
Received: from [85.158.138.51:58642] by server-6.bemta-3.messagelabs.com id
	43/F1-02321-09B71205; Tue, 07 Aug 2012 20:33:20 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1344371599!30952324!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15259 invoked from network); 7 Aug 2012 20:33:20 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSs-00041P-QX
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSs-0003KH-OY
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:18 +0000
Message-Id: <E1SyqSs-0003KH-OY@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: add a comment re the memory
	management API instability
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984055 -3600
# Node ID afff548d43d770a3e074a20e1e7154ba5df1c8c6
# Parent  32aa98840f2ba38081d007a919a40efefc62d20a
libxl: add a comment re the memory management API instability

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 32aa98840f2b -r afff548d43d7 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Aug 03 09:54:14 2012 +0100
+++ b/tools/libxl/libxl.h	Fri Aug 03 09:54:15 2012 +0100
@@ -567,6 +567,17 @@ int libxl_domain_core_dump(libxl_ctx *ct
 int libxl_domain_setmaxmem(libxl_ctx *ctx, uint32_t domid, uint32_t target_memkb);
 int libxl_set_memory_target(libxl_ctx *ctx, uint32_t domid, int32_t target_memkb, int relative, int enforce);
 int libxl_get_memory_target(libxl_ctx *ctx, uint32_t domid, uint32_t *out_target);
+
+
+/*
+ * WARNING
+ * This memory management API is unstable even in Xen 4.2.
+ * It has a numer of deficiencies and we intend to replace it.
+ *
+ * The semantics of these functions should not be relied on to be very
+ * coherent or stable.  We will however endeavour to keep working
+ * existing programs which use them in roughly the same way as libxl.
+ */
 /* how much free memory in the system a domain needs to be built */
 int libxl_domain_need_memory(libxl_ctx *ctx, libxl_domain_build_info *b_info,
                              uint32_t *need_memkb);
@@ -577,6 +588,7 @@ int libxl_wait_for_free_memory(libxl_ctx
 /* wait for the memory target of a domain to be reached */
 int libxl_wait_for_memory_target(libxl_ctx *ctx, uint32_t domid, int wait_secs);
 
+
 int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass);
 int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_type type);
 /* libxl_primary_console_exec finds the domid and console number

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005XJ-Gw; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005Uy-C2
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
Received: from [85.158.138.51:32917] by server-10.bemta-3.messagelabs.com id
	F6/5C-07905-19B71205; Tue, 07 Aug 2012 20:33:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1344371599!30789575!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17908 invoked from network); 7 Aug 2012 20:33:20 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-00041S-Bb
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-0003KW-AK
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Message-Id: <E1SyqSt-0003KW-AK@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: const correctness for
	libxl__xs_path_cleanup
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984056 -3600
# Node ID 12f65475c13dff134a7f5540bf75c391e90ef491
# Parent  afff548d43d770a3e074a20e1e7154ba5df1c8c6
libxl: const correctness for libxl__xs_path_cleanup

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r afff548d43d7 -r 12f65475c13d tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:15 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:16 2012 +0100
@@ -507,7 +507,7 @@ DEFINE_DEVICES_ADD(nic)
 int libxl__device_destroy(libxl__gc *gc, libxl__device *dev)
 {
     char *be_path = libxl__device_backend_path(gc, dev);
-    char *fe_path = libxl__device_frontend_path(gc, dev);
+    const char *fe_path = libxl__device_frontend_path(gc, dev);
     xs_transaction_t t = 0;
     int rc;
 
diff -r afff548d43d7 -r 12f65475c13d tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:15 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:16 2012 +0100
@@ -614,7 +614,7 @@ void libxl__xs_transaction_abort(libxl__
  * It mimics xenstore-rm -t behaviour.
  */
 _hidden int libxl__xs_path_cleanup(libxl__gc *gc, xs_transaction_t t,
-                                   char *user_path);
+                                   const char *user_path);
 
 /*
  * Event generation functions provided by the libxl event core to the
diff -r afff548d43d7 -r 12f65475c13d tools/libxl/libxl_xshelp.c
--- a/tools/libxl/libxl_xshelp.c	Fri Aug 03 09:54:15 2012 +0100
+++ b/tools/libxl/libxl_xshelp.c	Fri Aug 03 09:54:16 2012 +0100
@@ -233,7 +233,8 @@ void libxl__xs_transaction_abort(libxl__
     *t = 0;
 }
 
-int libxl__xs_path_cleanup(libxl__gc *gc, xs_transaction_t t, char *user_path)
+int libxl__xs_path_cleanup(libxl__gc *gc, xs_transaction_t t,
+                           const char *user_path)
 {
     unsigned int nb = 0;
     char *path, *last, *val;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSv-0005Uz-Rh; Tue, 07 Aug 2012 20:33:21 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-0005Sg-W7
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Received: from [85.158.138.51:58570] by server-6.bemta-3.messagelabs.com id
	6E/E1-02321-F8B71205; Tue, 07 Aug 2012 20:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1344371597!30884359!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8010 invoked from network); 7 Aug 2012 20:33:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-00041G-7o
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-0003JY-6K
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Message-Id: <E1SyqSr-0003JY-6K@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: remus: mark TODOs more clearly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984053 -3600
# Node ID 646a1deabd189fca948385fc0c0c1d28a7c63664
# Parent  f1e7c1142fe515171df742b3748828b758d5f88b
libxl: remus: mark TODOs more clearly

Change the TODOs in the remus code to "REMUS TODO" which will make
them easier to grep for later.  AIUI all of these are essential for
use of remus in production.

Also add a new TODO and a new assert, to check rc on entry to
remus_checkpoint_dm_saved.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r f1e7c1142fe5 -r 646a1deabd18 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Aug 03 09:54:12 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Aug 03 09:54:13 2012 +0100
@@ -1110,7 +1110,7 @@ int libxl__toolstack_save(uint32_t domid
 
 static int libxl__remus_domain_suspend_callback(void *data)
 {
-    /* TODO: Issue disk and network checkpoint reqs. */
+    /* REMUS TODO: Issue disk and network checkpoint reqs. */
     return libxl__domain_suspend_common_callback(data);
 }
 
@@ -1124,7 +1124,7 @@ static int libxl__remus_domain_resume_ca
     if (libxl_domain_resume(CTX, dss->domid, /* Fast Suspend */1))
         return 0;
 
-    /* TODO: Deal with disk. Start a new network output buffer */
+    /* REMUS TODO: Deal with disk. Start a new network output buffer */
     return 1;
 }
 
@@ -1151,8 +1151,9 @@ static void libxl__remus_domain_checkpoi
 static void remus_checkpoint_dm_saved(libxl__egc *egc,
                                       libxl__domain_suspend_state *dss, int rc)
 {
-    /* TODO: Wait for disk and memory ack, release network buffer */
-    /* TODO: make this asynchronous */
+    /* REMUS TODO: Wait for disk and memory ack, release network buffer */
+    /* REMUS TODO: make this asynchronous */
+    assert(!rc); /* REMUS TODO handle this error properly */
     usleep(dss->interval * 1000);
     libxl__xc_domain_saverestore_async_callback_done(egc, &dss->shs, 1);
 }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005XJ-Gw; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005Uy-C2
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
Received: from [85.158.138.51:32917] by server-10.bemta-3.messagelabs.com id
	F6/5C-07905-19B71205; Tue, 07 Aug 2012 20:33:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1344371599!30789575!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17908 invoked from network); 7 Aug 2012 20:33:20 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:20 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-00041S-Bb
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-0003KW-AK
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Message-Id: <E1SyqSt-0003KW-AK@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:18 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: const correctness for
	libxl__xs_path_cleanup
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984056 -3600
# Node ID 12f65475c13dff134a7f5540bf75c391e90ef491
# Parent  afff548d43d770a3e074a20e1e7154ba5df1c8c6
libxl: const correctness for libxl__xs_path_cleanup

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r afff548d43d7 -r 12f65475c13d tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:15 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:16 2012 +0100
@@ -507,7 +507,7 @@ DEFINE_DEVICES_ADD(nic)
 int libxl__device_destroy(libxl__gc *gc, libxl__device *dev)
 {
     char *be_path = libxl__device_backend_path(gc, dev);
-    char *fe_path = libxl__device_frontend_path(gc, dev);
+    const char *fe_path = libxl__device_frontend_path(gc, dev);
     xs_transaction_t t = 0;
     int rc;
 
diff -r afff548d43d7 -r 12f65475c13d tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:15 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:16 2012 +0100
@@ -614,7 +614,7 @@ void libxl__xs_transaction_abort(libxl__
  * It mimics xenstore-rm -t behaviour.
  */
 _hidden int libxl__xs_path_cleanup(libxl__gc *gc, xs_transaction_t t,
-                                   char *user_path);
+                                   const char *user_path);
 
 /*
  * Event generation functions provided by the libxl event core to the
diff -r afff548d43d7 -r 12f65475c13d tools/libxl/libxl_xshelp.c
--- a/tools/libxl/libxl_xshelp.c	Fri Aug 03 09:54:15 2012 +0100
+++ b/tools/libxl/libxl_xshelp.c	Fri Aug 03 09:54:16 2012 +0100
@@ -233,7 +233,8 @@ void libxl__xs_transaction_abort(libxl__
     *t = 0;
 }
 
-int libxl__xs_path_cleanup(libxl__gc *gc, xs_transaction_t t, char *user_path)
+int libxl__xs_path_cleanup(libxl__gc *gc, xs_transaction_t t,
+                           const char *user_path)
 {
     unsigned int nb = 0;
     char *path, *last, *val;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSv-0005Uz-Rh; Tue, 07 Aug 2012 20:33:21 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-0005Sg-W7
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Received: from [85.158.138.51:58570] by server-6.bemta-3.messagelabs.com id
	6E/E1-02321-F8B71205; Tue, 07 Aug 2012 20:33:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-174.messagelabs.com!1344371597!30884359!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8010 invoked from network); 7 Aug 2012 20:33:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:18 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-00041G-7o
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSr-0003JY-6K
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:17 +0000
Message-Id: <E1SyqSr-0003JY-6K@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: remus: mark TODOs more clearly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984053 -3600
# Node ID 646a1deabd189fca948385fc0c0c1d28a7c63664
# Parent  f1e7c1142fe515171df742b3748828b758d5f88b
libxl: remus: mark TODOs more clearly

Change the TODOs in the remus code to "REMUS TODO" which will make
them easier to grep for later.  AIUI all of these are essential for
use of remus in production.

Also add a new TODO and a new assert, to check rc on entry to
remus_checkpoint_dm_saved.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r f1e7c1142fe5 -r 646a1deabd18 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Fri Aug 03 09:54:12 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Fri Aug 03 09:54:13 2012 +0100
@@ -1110,7 +1110,7 @@ int libxl__toolstack_save(uint32_t domid
 
 static int libxl__remus_domain_suspend_callback(void *data)
 {
-    /* TODO: Issue disk and network checkpoint reqs. */
+    /* REMUS TODO: Issue disk and network checkpoint reqs. */
     return libxl__domain_suspend_common_callback(data);
 }
 
@@ -1124,7 +1124,7 @@ static int libxl__remus_domain_resume_ca
     if (libxl_domain_resume(CTX, dss->domid, /* Fast Suspend */1))
         return 0;
 
-    /* TODO: Deal with disk. Start a new network output buffer */
+    /* REMUS TODO: Deal with disk. Start a new network output buffer */
     return 1;
 }
 
@@ -1151,8 +1151,9 @@ static void libxl__remus_domain_checkpoi
 static void remus_checkpoint_dm_saved(libxl__egc *egc,
                                       libxl__domain_suspend_state *dss, int rc)
 {
-    /* TODO: Wait for disk and memory ack, release network buffer */
-    /* TODO: make this asynchronous */
+    /* REMUS TODO: Wait for disk and memory ack, release network buffer */
+    /* REMUS TODO: make this asynchronous */
+    assert(!rc); /* REMUS TODO handle this error properly */
     usleep(dss->interval * 1000);
     libxl__xc_domain_saverestore_async_callback_done(egc, &dss->shs, 1);
 }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005Xo-RF; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-0005Qw-OS
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Received: from [85.158.143.35:34031] by server-2.bemta-4.messagelabs.com id
	A0/26-17938-19B71205; Tue, 07 Aug 2012 20:33:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1344371594!17271160!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15814 invoked from network); 7 Aug 2012 20:33:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSo-000411-HO
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSo-0003IK-Fr
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:14 +0000
Message-Id: <E1SyqSo-0003IK-Fr@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix device counting race in
	libxl__devices_destroy
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984049 -3600
# Node ID 7697fc6ff332b9d4be4b54a959352fe509573bfb
# Parent  ba32a6202e64a59d1ae9622e740d73faf54c77ba
libxl: fix device counting race in libxl__devices_destroy

Don't have a fixed number of devices in the aodevs array, and instead
size it depending on the devices present in xenstore.  Somewhat
formalise the multiple device addition/removal machinery to make this
clearer and easier to do.

As a side-effect we fix a few "lost thread of control" bug which would
occur if there were no devices of a particular kind.  (Various if
statements which checked for there being no devices have become
redundant, but are retained to avoid making the patch bigger.)

Specifically:

 * Users of libxl__ao_devices are no longer expected to know in
   advance how many device operations they are going to do.  Instead
   they can initiate them one at a time, between bracketing calls to
   "begin" and "prepared".

 * The array of aodevs used for this is dynamically sized; to support
   this it's an array of pointers rather than of structs.

 * Users of libxl__ao_devices are presented with a more opaque interface.
   They are are no longer expected to, themselves,
      - look into the array of aodevs (this is now private)
      - know that the individual addition/removal completions are
        handled by libxl__ao_devices_callback (this callback function
        is now a private function for the multidev machinery)
      - ever deal with populating the contents of an aodevs

 * The doc comments relating to some of the members of
   libxl__ao_device are clarified.  (And the member `aodevs' is moved
   to put it with the other members with the same status.)

 * The multidev machinery allocates an aodev to represent the
   operation of preparing all of the other operations.  See
   the comment in libxl__multidev_begin.

A wrinkle is that the functions are called "multidev" but the structs
are called "libxl__ao_devices" and "aodevs".  I have given these
functions this name to distinguish them from "libxl__ao_device" and
"aodev" and so forth by more than just the use of the plural "s"
suffix.

In the next patch we will rename the structs.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ba32a6202e64 -r 7697fc6ff332 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Aug 03 09:54:08 2012 +0100
+++ b/tools/libxl/libxl_create.c	Fri Aug 03 09:54:09 2012 +0100
@@ -909,10 +909,10 @@ static void domcreate_rebuild_done(libxl
 
     store_libxl_entry(gc, domid, &d_config->b_info);
 
-    dcs->aodevs.size = d_config->num_disks;
+    libxl__multidev_begin(ao, &dcs->aodevs);
     dcs->aodevs.callback = domcreate_launch_dm;
-    libxl__prepare_ao_devices(ao, &dcs->aodevs);
     libxl__add_disks(egc, ao, domid, 0, d_config, &dcs->aodevs);
+    libxl__multidev_prepared(egc, &dcs->aodevs, 0);
 
     return;
 
@@ -1039,10 +1039,10 @@ static void domcreate_devmodel_started(l
     /* Plug nic interfaces */
     if (d_config->num_nics > 0) {
         /* Attach nics */
-        dcs->aodevs.size = d_config->num_nics;
+        libxl__multidev_begin(ao, &dcs->aodevs);
         dcs->aodevs.callback = domcreate_attach_pci;
-        libxl__prepare_ao_devices(ao, &dcs->aodevs);
         libxl__add_nics(egc, ao, domid, 0, d_config, &dcs->aodevs);
+        libxl__multidev_prepared(egc, &dcs->aodevs, 0);
         return;
     }
 
diff -r ba32a6202e64 -r 7697fc6ff332 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:08 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:09 2012 +0100
@@ -58,50 +58,6 @@ int libxl__parse_backend_path(libxl__gc 
     return libxl__device_kind_from_string(strkind, &dev->backend_kind);
 }
 
-static int libxl__num_devices(libxl__gc *gc, uint32_t domid)
-{
-    char *path;
-    unsigned int num_kinds, num_devs;
-    char **kinds = NULL, **devs = NULL;
-    int i, j, rc = 0;
-    libxl__device dev;
-    libxl__device_kind kind;
-    int numdevs = 0;
-
-    path = GCSPRINTF("/local/domain/%d/device", domid);
-    kinds = libxl__xs_directory(gc, XBT_NULL, path, &num_kinds);
-    if (!kinds) {
-        if (errno != ENOENT) {
-            LOGE(ERROR, "unable to get xenstore device listing %s", path);
-            rc = ERROR_FAIL;
-            goto out;
-        }
-        num_kinds = 0;
-    }
-    for (i = 0; i < num_kinds; i++) {
-        if (libxl__device_kind_from_string(kinds[i], &kind))
-            continue;
-        if (kind == LIBXL__DEVICE_KIND_CONSOLE)
-            continue;
-
-        path = GCSPRINTF("/local/domain/%d/device/%s", domid, kinds[i]);
-        devs = libxl__xs_directory(gc, XBT_NULL, path, &num_devs);
-        if (!devs)
-            continue;
-        for (j = 0; j < num_devs; j++) {
-            path = GCSPRINTF("/local/domain/%d/device/%s/%s/backend",
-                             domid, kinds[i], devs[j]);
-            path = libxl__xs_read(gc, XBT_NULL, path);
-            if (path && libxl__parse_backend_path(gc, path, &dev) == 0) {
-                numdevs++;
-            }
-        }
-    }
-out:
-    if (rc) return rc;
-    return numdevs;
-}
-
 int libxl__nic_type(libxl__gc *gc, libxl__device *dev, libxl_nic_type *nictype)
 {
     char *snictype, *be_path;
@@ -445,40 +401,81 @@ void libxl__prepare_ao_device(libxl__ao 
     libxl__ev_child_init(&aodev->child);
 }
 
-void libxl__prepare_ao_devices(libxl__ao *ao, libxl__ao_devices *aodevs)
+/* multidev */
+
+void libxl__multidev_begin(libxl__ao *ao, libxl__ao_devices *aodevs)
 {
     AO_GC;
 
-    GCNEW_ARRAY(aodevs->array, aodevs->size);
-    for (int i = 0; i < aodevs->size; i++) {
-        aodevs->array[i].aodevs = aodevs;
-        libxl__prepare_ao_device(ao, &aodevs->array[i]);
-    }
+    aodevs->ao = ao;
+    aodevs->array = 0;
+    aodevs->used = aodevs->allocd = 0;
+
+    /* We allocate an aodev to represent the operation of preparing
+     * all of the other operations.  This operation is completed when
+     * we have started all the others (ie, when the user calls
+     * _prepared).  That arranges automatically that
+     *  (i) we do not think we have finished even if one of the
+     *      operations completes while we are still preparing
+     *  (ii) if we are starting zero operations, we do still
+     *      make the callback as soon as we know this fact
+     *  (iii) we have a nice consistent way to deal with any
+     *      error that might occur while deciding what to initiate
+     */
+    aodevs->preparation = libxl__multidev_prepare(aodevs);
 }
 
-void libxl__ao_devices_callback(libxl__egc *egc, libxl__ao_device *aodev)
+static void multidev_one_callback(libxl__egc *egc, libxl__ao_device *aodev);
+
+libxl__ao_device *libxl__multidev_prepare(libxl__ao_devices *aodevs) {
+    STATE_AO_GC(aodevs->ao);
+    libxl__ao_device *aodev;
+
+    GCNEW(aodev);
+    aodev->aodevs = aodevs;
+    aodev->callback = multidev_one_callback;
+    libxl__prepare_ao_device(ao, aodev);
+
+    if (aodevs->used >= aodevs->allocd) {
+        aodevs->allocd = aodevs->used * 2 + 5;
+        GCREALLOC_ARRAY(aodevs->array, aodevs->allocd);
+    }
+    aodevs->array[aodevs->used++] = aodev;
+
+    return aodev;
+}
+
+static void multidev_one_callback(libxl__egc *egc, libxl__ao_device *aodev)
 {
     STATE_AO_GC(aodev->ao);
     libxl__ao_devices *aodevs = aodev->aodevs;
     int i, error = 0;
 
     aodev->active = 0;
-    for (i = 0; i < aodevs->size; i++) {
-        if (aodevs->array[i].active)
+
+    for (i = 0; i < aodevs->used; i++) {
+        if (aodevs->array[i]->active)
             return;
 
-        if (aodevs->array[i].rc)
-            error = aodevs->array[i].rc;
+        if (aodevs->array[i]->rc)
+            error = aodevs->array[i]->rc;
     }
 
     aodevs->callback(egc, aodevs, error);
     return;
 }
 
+void libxl__multidev_prepared(libxl__egc *egc, libxl__ao_devices *aodevs,
+                              int rc)
+{
+    aodevs->preparation->rc = rc;
+    multidev_one_callback(egc, aodevs->preparation);
+}
+
 /******************************************************************************/
 
 /* Macro for defining the functions that will add a bunch of disks when
- * inside an async op.
+ * inside an async op with multidev.
  * This macro is added to prevent repetition of code.
  *
  * The following functions are defined:
@@ -495,9 +492,9 @@ void libxl__ao_devices_callback(libxl__e
         int i;                                                                 \
         int end = start + d_config->num_##type##s;                             \
         for (i = start; i < end; i++) {                                        \
-            aodevs->array[i].callback = libxl__ao_devices_callback;            \
+            libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);         \
             libxl__device_##type##_add(egc, domid, &d_config->type##s[i-start],\
-                                       &aodevs->array[i]);                     \
+                                       aodev);                                 \
         }                                                                      \
     }
 
@@ -547,20 +544,13 @@ void libxl__devices_destroy(libxl__egc *
     char *path;
     unsigned int num_kinds, num_dev_xsentries;
     char **kinds = NULL, **devs = NULL;
-    int i, j, numdev = 0, rc = 0;
+    int i, j, rc = 0;
     libxl__device *dev;
     libxl__ao_devices *aodevs = &drs->aodevs;
     libxl__ao_device *aodev;
     libxl__device_kind kind;
 
-    aodevs->size = libxl__num_devices(gc, drs->domid);
-    if (aodevs->size < 0) {
-        LOG(ERROR, "unable to get number of devices for domain %u", drs->domid);
-        rc = aodevs->size;
-        goto out;
-    }
-
-    libxl__prepare_ao_devices(drs->ao, aodevs);
+    libxl__multidev_begin(ao, aodevs);
     aodevs->callback = devices_remove_callback;
 
     path = libxl__sprintf(gc, "/local/domain/%d/device", domid);
@@ -598,13 +588,11 @@ void libxl__devices_destroy(libxl__egc *
                     libxl__device_destroy(gc, dev);
                     continue;
                 }
-                aodev = &aodevs->array[numdev];
+                aodev = libxl__multidev_prepare(aodevs);
                 aodev->action = DEVICE_DISCONNECT;
                 aodev->dev = dev;
-                aodev->callback = libxl__ao_devices_callback;
                 aodev->force = drs->force;
                 libxl__initiate_device_remove(egc, aodev);
-                numdev++;
             }
         }
     }
@@ -626,8 +614,7 @@ void libxl__devices_destroy(libxl__egc *
     }
 
 out:
-    if (!numdev) drs->callback(egc, drs, rc);
-    return;
+    libxl__multidev_prepared(egc, aodevs, rc);
 }
 
 /* Callbacks for device related operations */
diff -r ba32a6202e64 -r 7697fc6ff332 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:08 2012 +0100
+++ b/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:09 2012 +0100
@@ -856,10 +856,10 @@ retry_transaction:
         if (errno == EAGAIN)
             goto retry_transaction;
 
-    sdss->aodevs.size = dm_config->num_disks;
+    libxl__multidev_begin(ao, &sdss->aodevs);
     sdss->aodevs.callback = spawn_stub_launch_dm;
-    libxl__prepare_ao_devices(ao, &sdss->aodevs);
     libxl__add_disks(egc, ao, dm_domid, 0, dm_config, &sdss->aodevs);
+    libxl__multidev_prepared(egc, &sdss->aodevs, 0);
 
     free(args);
     return;
@@ -982,10 +982,10 @@ static void spawn_stubdom_pvqemu_cb(libx
     if (rc) goto out;
 
     if (d_config->num_nics > 0) {
-        sdss->aodevs.size = d_config->num_nics;
+        libxl__multidev_begin(ao, &sdss->aodevs);
         sdss->aodevs.callback = stubdom_pvqemu_cb;
-        libxl__prepare_ao_devices(ao, &sdss->aodevs);
         libxl__add_nics(egc, ao, dm_domid, 0, d_config, &sdss->aodevs);
+        libxl__multidev_prepared(egc, &sdss->aodevs, 0);
         return;
     }
 
diff -r ba32a6202e64 -r 7697fc6ff332 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:08 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:09 2012 +0100
@@ -1816,20 +1816,6 @@ typedef void libxl__device_callback(libx
  */
 _hidden void libxl__prepare_ao_device(libxl__ao *ao, libxl__ao_device *aodev);
 
-/* Prepare a bunch of devices for addition/removal. Every ao_device in
- * ao_devices is set to 'active', and the ao_device 'base' field is set to
- * the one pointed by aodevs.
- */
-_hidden void libxl__prepare_ao_devices(libxl__ao *ao,
-                                       libxl__ao_devices *aodevs);
-
-/* Generic callback to use when adding/removing several devices, this will
- * check if the given aodev is the last one, and call the callback in the
- * parent libxl__ao_devices struct, passing the appropriate error if found.
- */
-_hidden void libxl__ao_devices_callback(libxl__egc *egc,
-                                        libxl__ao_device *aodev);
-
 struct libxl__ao_device {
     /* filled in by user */
     libxl__ao *ao;
@@ -1837,32 +1823,60 @@ struct libxl__ao_device {
     libxl__device *dev;
     int force;
     libxl__device_callback *callback;
-    /* private for implementation */
+    /* return value, zeroed by user on entry, is valid on callback */
+    int rc;
+    /* private for multidev */
     int active;
-    int rc;
+    libxl__ao_devices *aodevs; /* reference to the containing multidev */
+    /* private for add/remove implementation */
     libxl__ev_devstate backend_ds;
     /* Bodge for Qemu devices, also used for timeout of hotplug execution */
     libxl__ev_time timeout;
-    /* Used internally to have a reference to the upper libxl__ao_devices
-     * struct when present */
-    libxl__ao_devices *aodevs;
     /* device hotplug execution */
     const char *what;
     int num_exec;
     libxl__ev_child child;
 };
 
-/* Helper struct to simply the plug/unplug of multiple devices at the same
- * time.
+/*
+ * Multiple devices "multidev" handling.
  *
- * This structure holds several devices, and the callback is only called
- * when all the devices inside of the array have finished.
+ * Firstly, you should
+ *    libxl__multidev_begin
+ *    multidev->callback = ...
+ * Then zero or more times
+ *    libxl__multidev_prepare
+ *    libal__initiate_device_{remove/addition}.
+ * Finally, once
+ *    libxl__multidev_prepared
+ * which will result (perhaps reentrantly) in one call to callback().
  */
+
+/* Starts preparing to add/remove a bunch of devices. */
+_hidden void libxl__multidev_begin(libxl__ao *ao, libxl__ao_devices*);
+
+/* Prepares to add/remove one of many devices.  Returns a libxl__ao_device
+ * which has had libxl__prepare_ao_device called, and which has also
+ * had ->callback set.  The user should not mess with aodev->callback. */
+_hidden libxl__ao_device *libxl__multidev_prepare(libxl__ao_devices*);
+
+/* Notifies the multidev machinery that we have now finished preparing
+ * and initiating devices.  multidev->callback may then be called as
+ * soon as there are no prepared but not completed operations
+ * outstanding, perhaps reentrantly.  If rc!=0 (error should have been
+ * logged) multidev->callback will get a non-zero rc.
+ * callback may be set by the user at any point before prepared. */
+_hidden void libxl__multidev_prepared(libxl__egc*, libxl__ao_devices*, int rc);
+
 typedef void libxl__devices_callback(libxl__egc*, libxl__ao_devices*, int rc);
 struct libxl__ao_devices {
-    libxl__ao_device *array;
-    int size;
+    /* set by user: */
     libxl__devices_callback *callback;
+    /* for private use by libxl__...ao_devices... machinery: */
+    libxl__ao *ao;
+    libxl__ao_device **array;
+    int used, allocd;
+    libxl__ao_device *preparation;
 };
 
 /*
@@ -2372,10 +2386,11 @@ _hidden void libxl__devices_destroy(libx
                                     libxl__devices_remove_state *drs);
 
 /* Helper function to add a bunch of disks. This should be used when
- * the caller is inside an async op. "devices" will NOT be prepared by this
- * function, so the caller must make sure to call _prepare before calling this
- * function. The start parameter contains the position inside the aodevs array
- * that should be used to store the state of this devices.
+ * the caller is inside an async op. "devices" will NOT be prepared by
+ * this function, so the caller must make sure to call
+ * libxl__multidev_begin before calling this function. The start
+ * parameter contains the position inside the aodevs array that should
+ * be used to store the state of this devices.
  *
  * The "callback" will be called for each device, and the user is responsible
  * for calling libxl__ao_device_check_last on the callback.

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005Ww-8d; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005Rf-73
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-27.messagelabs.com!1344371590!9577753!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11951 invoked from network); 7 Aug 2012 20:33:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSi-00040U-MZ
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSi-0003Fc-EC
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:08 +0000
Message-Id: <E1SyqSi-0003Fc-EC@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xen: detect compiler version with
	'--version' rather than '-v'
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1343905471 -3600
# Node ID 90bc5e0a67b5ba896bd9cf1f92b345793010adc3
# Parent  3d17148e465ce87ddd8f555a001280348d848419
xen: detect compiler version with '--version' rather than '-v'

This allows us to get rid of the 'grep version', which doesn't
work with localized compilers.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r 3d17148e465c -r 90bc5e0a67b5 xen/Makefile
--- a/xen/Makefile	Thu Aug 02 11:49:37 2012 +0200
+++ b/xen/Makefile	Thu Aug 02 12:04:31 2012 +0100
@@ -103,7 +103,7 @@ include/xen/compile.h: include/xen/compi
 	    -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
 	    -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
 	    -e 's/@@hostname@@/$(shell hostname)/g' \
-	    -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | grep version | tail -1)!g' \
+	    -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!g' \
 	    -e 's/@@version@@/$(XEN_VERSION)/g' \
 	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
 	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005Ww-8d; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005Rf-73
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-27.messagelabs.com!1344371590!9577753!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11951 invoked from network); 7 Aug 2012 20:33:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSi-00040U-MZ
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSi-0003Fc-EC
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:08 +0000
Message-Id: <E1SyqSi-0003Fc-EC@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xen: detect compiler version with
	'--version' rather than '-v'
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1343905471 -3600
# Node ID 90bc5e0a67b5ba896bd9cf1f92b345793010adc3
# Parent  3d17148e465ce87ddd8f555a001280348d848419
xen: detect compiler version with '--version' rather than '-v'

This allows us to get rid of the 'grep version', which doesn't
work with localized compilers.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r 3d17148e465c -r 90bc5e0a67b5 xen/Makefile
--- a/xen/Makefile	Thu Aug 02 11:49:37 2012 +0200
+++ b/xen/Makefile	Thu Aug 02 12:04:31 2012 +0100
@@ -103,7 +103,7 @@ include/xen/compile.h: include/xen/compi
 	    -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
 	    -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
 	    -e 's/@@hostname@@/$(shell hostname)/g' \
-	    -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | grep version | tail -1)!g' \
+	    -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!g' \
 	    -e 's/@@version@@/$(XEN_VERSION)/g' \
 	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
 	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005Xo-RF; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-0005Qw-OS
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Received: from [85.158.143.35:34031] by server-2.bemta-4.messagelabs.com id
	A0/26-17938-19B71205; Tue, 07 Aug 2012 20:33:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1344371594!17271160!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15814 invoked from network); 7 Aug 2012 20:33:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSo-000411-HO
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSo-0003IK-Fr
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:14 +0000
Message-Id: <E1SyqSo-0003IK-Fr@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:13 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix device counting race in
	libxl__devices_destroy
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984049 -3600
# Node ID 7697fc6ff332b9d4be4b54a959352fe509573bfb
# Parent  ba32a6202e64a59d1ae9622e740d73faf54c77ba
libxl: fix device counting race in libxl__devices_destroy

Don't have a fixed number of devices in the aodevs array, and instead
size it depending on the devices present in xenstore.  Somewhat
formalise the multiple device addition/removal machinery to make this
clearer and easier to do.

As a side-effect we fix a few "lost thread of control" bug which would
occur if there were no devices of a particular kind.  (Various if
statements which checked for there being no devices have become
redundant, but are retained to avoid making the patch bigger.)

Specifically:

 * Users of libxl__ao_devices are no longer expected to know in
   advance how many device operations they are going to do.  Instead
   they can initiate them one at a time, between bracketing calls to
   "begin" and "prepared".

 * The array of aodevs used for this is dynamically sized; to support
   this it's an array of pointers rather than of structs.

 * Users of libxl__ao_devices are presented with a more opaque interface.
   They are are no longer expected to, themselves,
      - look into the array of aodevs (this is now private)
      - know that the individual addition/removal completions are
        handled by libxl__ao_devices_callback (this callback function
        is now a private function for the multidev machinery)
      - ever deal with populating the contents of an aodevs

 * The doc comments relating to some of the members of
   libxl__ao_device are clarified.  (And the member `aodevs' is moved
   to put it with the other members with the same status.)

 * The multidev machinery allocates an aodev to represent the
   operation of preparing all of the other operations.  See
   the comment in libxl__multidev_begin.

A wrinkle is that the functions are called "multidev" but the structs
are called "libxl__ao_devices" and "aodevs".  I have given these
functions this name to distinguish them from "libxl__ao_device" and
"aodev" and so forth by more than just the use of the plural "s"
suffix.

In the next patch we will rename the structs.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r ba32a6202e64 -r 7697fc6ff332 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Aug 03 09:54:08 2012 +0100
+++ b/tools/libxl/libxl_create.c	Fri Aug 03 09:54:09 2012 +0100
@@ -909,10 +909,10 @@ static void domcreate_rebuild_done(libxl
 
     store_libxl_entry(gc, domid, &d_config->b_info);
 
-    dcs->aodevs.size = d_config->num_disks;
+    libxl__multidev_begin(ao, &dcs->aodevs);
     dcs->aodevs.callback = domcreate_launch_dm;
-    libxl__prepare_ao_devices(ao, &dcs->aodevs);
     libxl__add_disks(egc, ao, domid, 0, d_config, &dcs->aodevs);
+    libxl__multidev_prepared(egc, &dcs->aodevs, 0);
 
     return;
 
@@ -1039,10 +1039,10 @@ static void domcreate_devmodel_started(l
     /* Plug nic interfaces */
     if (d_config->num_nics > 0) {
         /* Attach nics */
-        dcs->aodevs.size = d_config->num_nics;
+        libxl__multidev_begin(ao, &dcs->aodevs);
         dcs->aodevs.callback = domcreate_attach_pci;
-        libxl__prepare_ao_devices(ao, &dcs->aodevs);
         libxl__add_nics(egc, ao, domid, 0, d_config, &dcs->aodevs);
+        libxl__multidev_prepared(egc, &dcs->aodevs, 0);
         return;
     }
 
diff -r ba32a6202e64 -r 7697fc6ff332 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:08 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:09 2012 +0100
@@ -58,50 +58,6 @@ int libxl__parse_backend_path(libxl__gc 
     return libxl__device_kind_from_string(strkind, &dev->backend_kind);
 }
 
-static int libxl__num_devices(libxl__gc *gc, uint32_t domid)
-{
-    char *path;
-    unsigned int num_kinds, num_devs;
-    char **kinds = NULL, **devs = NULL;
-    int i, j, rc = 0;
-    libxl__device dev;
-    libxl__device_kind kind;
-    int numdevs = 0;
-
-    path = GCSPRINTF("/local/domain/%d/device", domid);
-    kinds = libxl__xs_directory(gc, XBT_NULL, path, &num_kinds);
-    if (!kinds) {
-        if (errno != ENOENT) {
-            LOGE(ERROR, "unable to get xenstore device listing %s", path);
-            rc = ERROR_FAIL;
-            goto out;
-        }
-        num_kinds = 0;
-    }
-    for (i = 0; i < num_kinds; i++) {
-        if (libxl__device_kind_from_string(kinds[i], &kind))
-            continue;
-        if (kind == LIBXL__DEVICE_KIND_CONSOLE)
-            continue;
-
-        path = GCSPRINTF("/local/domain/%d/device/%s", domid, kinds[i]);
-        devs = libxl__xs_directory(gc, XBT_NULL, path, &num_devs);
-        if (!devs)
-            continue;
-        for (j = 0; j < num_devs; j++) {
-            path = GCSPRINTF("/local/domain/%d/device/%s/%s/backend",
-                             domid, kinds[i], devs[j]);
-            path = libxl__xs_read(gc, XBT_NULL, path);
-            if (path && libxl__parse_backend_path(gc, path, &dev) == 0) {
-                numdevs++;
-            }
-        }
-    }
-out:
-    if (rc) return rc;
-    return numdevs;
-}
-
 int libxl__nic_type(libxl__gc *gc, libxl__device *dev, libxl_nic_type *nictype)
 {
     char *snictype, *be_path;
@@ -445,40 +401,81 @@ void libxl__prepare_ao_device(libxl__ao 
     libxl__ev_child_init(&aodev->child);
 }
 
-void libxl__prepare_ao_devices(libxl__ao *ao, libxl__ao_devices *aodevs)
+/* multidev */
+
+void libxl__multidev_begin(libxl__ao *ao, libxl__ao_devices *aodevs)
 {
     AO_GC;
 
-    GCNEW_ARRAY(aodevs->array, aodevs->size);
-    for (int i = 0; i < aodevs->size; i++) {
-        aodevs->array[i].aodevs = aodevs;
-        libxl__prepare_ao_device(ao, &aodevs->array[i]);
-    }
+    aodevs->ao = ao;
+    aodevs->array = 0;
+    aodevs->used = aodevs->allocd = 0;
+
+    /* We allocate an aodev to represent the operation of preparing
+     * all of the other operations.  This operation is completed when
+     * we have started all the others (ie, when the user calls
+     * _prepared).  That arranges automatically that
+     *  (i) we do not think we have finished even if one of the
+     *      operations completes while we are still preparing
+     *  (ii) if we are starting zero operations, we do still
+     *      make the callback as soon as we know this fact
+     *  (iii) we have a nice consistent way to deal with any
+     *      error that might occur while deciding what to initiate
+     */
+    aodevs->preparation = libxl__multidev_prepare(aodevs);
 }
 
-void libxl__ao_devices_callback(libxl__egc *egc, libxl__ao_device *aodev)
+static void multidev_one_callback(libxl__egc *egc, libxl__ao_device *aodev);
+
+libxl__ao_device *libxl__multidev_prepare(libxl__ao_devices *aodevs) {
+    STATE_AO_GC(aodevs->ao);
+    libxl__ao_device *aodev;
+
+    GCNEW(aodev);
+    aodev->aodevs = aodevs;
+    aodev->callback = multidev_one_callback;
+    libxl__prepare_ao_device(ao, aodev);
+
+    if (aodevs->used >= aodevs->allocd) {
+        aodevs->allocd = aodevs->used * 2 + 5;
+        GCREALLOC_ARRAY(aodevs->array, aodevs->allocd);
+    }
+    aodevs->array[aodevs->used++] = aodev;
+
+    return aodev;
+}
+
+static void multidev_one_callback(libxl__egc *egc, libxl__ao_device *aodev)
 {
     STATE_AO_GC(aodev->ao);
     libxl__ao_devices *aodevs = aodev->aodevs;
     int i, error = 0;
 
     aodev->active = 0;
-    for (i = 0; i < aodevs->size; i++) {
-        if (aodevs->array[i].active)
+
+    for (i = 0; i < aodevs->used; i++) {
+        if (aodevs->array[i]->active)
             return;
 
-        if (aodevs->array[i].rc)
-            error = aodevs->array[i].rc;
+        if (aodevs->array[i]->rc)
+            error = aodevs->array[i]->rc;
     }
 
     aodevs->callback(egc, aodevs, error);
     return;
 }
 
+void libxl__multidev_prepared(libxl__egc *egc, libxl__ao_devices *aodevs,
+                              int rc)
+{
+    aodevs->preparation->rc = rc;
+    multidev_one_callback(egc, aodevs->preparation);
+}
+
 /******************************************************************************/
 
 /* Macro for defining the functions that will add a bunch of disks when
- * inside an async op.
+ * inside an async op with multidev.
  * This macro is added to prevent repetition of code.
  *
  * The following functions are defined:
@@ -495,9 +492,9 @@ void libxl__ao_devices_callback(libxl__e
         int i;                                                                 \
         int end = start + d_config->num_##type##s;                             \
         for (i = start; i < end; i++) {                                        \
-            aodevs->array[i].callback = libxl__ao_devices_callback;            \
+            libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);         \
             libxl__device_##type##_add(egc, domid, &d_config->type##s[i-start],\
-                                       &aodevs->array[i]);                     \
+                                       aodev);                                 \
         }                                                                      \
     }
 
@@ -547,20 +544,13 @@ void libxl__devices_destroy(libxl__egc *
     char *path;
     unsigned int num_kinds, num_dev_xsentries;
     char **kinds = NULL, **devs = NULL;
-    int i, j, numdev = 0, rc = 0;
+    int i, j, rc = 0;
     libxl__device *dev;
     libxl__ao_devices *aodevs = &drs->aodevs;
     libxl__ao_device *aodev;
     libxl__device_kind kind;
 
-    aodevs->size = libxl__num_devices(gc, drs->domid);
-    if (aodevs->size < 0) {
-        LOG(ERROR, "unable to get number of devices for domain %u", drs->domid);
-        rc = aodevs->size;
-        goto out;
-    }
-
-    libxl__prepare_ao_devices(drs->ao, aodevs);
+    libxl__multidev_begin(ao, aodevs);
     aodevs->callback = devices_remove_callback;
 
     path = libxl__sprintf(gc, "/local/domain/%d/device", domid);
@@ -598,13 +588,11 @@ void libxl__devices_destroy(libxl__egc *
                     libxl__device_destroy(gc, dev);
                     continue;
                 }
-                aodev = &aodevs->array[numdev];
+                aodev = libxl__multidev_prepare(aodevs);
                 aodev->action = DEVICE_DISCONNECT;
                 aodev->dev = dev;
-                aodev->callback = libxl__ao_devices_callback;
                 aodev->force = drs->force;
                 libxl__initiate_device_remove(egc, aodev);
-                numdev++;
             }
         }
     }
@@ -626,8 +614,7 @@ void libxl__devices_destroy(libxl__egc *
     }
 
 out:
-    if (!numdev) drs->callback(egc, drs, rc);
-    return;
+    libxl__multidev_prepared(egc, aodevs, rc);
 }
 
 /* Callbacks for device related operations */
diff -r ba32a6202e64 -r 7697fc6ff332 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:08 2012 +0100
+++ b/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:09 2012 +0100
@@ -856,10 +856,10 @@ retry_transaction:
         if (errno == EAGAIN)
             goto retry_transaction;
 
-    sdss->aodevs.size = dm_config->num_disks;
+    libxl__multidev_begin(ao, &sdss->aodevs);
     sdss->aodevs.callback = spawn_stub_launch_dm;
-    libxl__prepare_ao_devices(ao, &sdss->aodevs);
     libxl__add_disks(egc, ao, dm_domid, 0, dm_config, &sdss->aodevs);
+    libxl__multidev_prepared(egc, &sdss->aodevs, 0);
 
     free(args);
     return;
@@ -982,10 +982,10 @@ static void spawn_stubdom_pvqemu_cb(libx
     if (rc) goto out;
 
     if (d_config->num_nics > 0) {
-        sdss->aodevs.size = d_config->num_nics;
+        libxl__multidev_begin(ao, &sdss->aodevs);
         sdss->aodevs.callback = stubdom_pvqemu_cb;
-        libxl__prepare_ao_devices(ao, &sdss->aodevs);
         libxl__add_nics(egc, ao, dm_domid, 0, d_config, &sdss->aodevs);
+        libxl__multidev_prepared(egc, &sdss->aodevs, 0);
         return;
     }
 
diff -r ba32a6202e64 -r 7697fc6ff332 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:08 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:09 2012 +0100
@@ -1816,20 +1816,6 @@ typedef void libxl__device_callback(libx
  */
 _hidden void libxl__prepare_ao_device(libxl__ao *ao, libxl__ao_device *aodev);
 
-/* Prepare a bunch of devices for addition/removal. Every ao_device in
- * ao_devices is set to 'active', and the ao_device 'base' field is set to
- * the one pointed by aodevs.
- */
-_hidden void libxl__prepare_ao_devices(libxl__ao *ao,
-                                       libxl__ao_devices *aodevs);
-
-/* Generic callback to use when adding/removing several devices, this will
- * check if the given aodev is the last one, and call the callback in the
- * parent libxl__ao_devices struct, passing the appropriate error if found.
- */
-_hidden void libxl__ao_devices_callback(libxl__egc *egc,
-                                        libxl__ao_device *aodev);
-
 struct libxl__ao_device {
     /* filled in by user */
     libxl__ao *ao;
@@ -1837,32 +1823,60 @@ struct libxl__ao_device {
     libxl__device *dev;
     int force;
     libxl__device_callback *callback;
-    /* private for implementation */
+    /* return value, zeroed by user on entry, is valid on callback */
+    int rc;
+    /* private for multidev */
     int active;
-    int rc;
+    libxl__ao_devices *aodevs; /* reference to the containing multidev */
+    /* private for add/remove implementation */
     libxl__ev_devstate backend_ds;
     /* Bodge for Qemu devices, also used for timeout of hotplug execution */
     libxl__ev_time timeout;
-    /* Used internally to have a reference to the upper libxl__ao_devices
-     * struct when present */
-    libxl__ao_devices *aodevs;
     /* device hotplug execution */
     const char *what;
     int num_exec;
     libxl__ev_child child;
 };
 
-/* Helper struct to simply the plug/unplug of multiple devices at the same
- * time.
+/*
+ * Multiple devices "multidev" handling.
  *
- * This structure holds several devices, and the callback is only called
- * when all the devices inside of the array have finished.
+ * Firstly, you should
+ *    libxl__multidev_begin
+ *    multidev->callback = ...
+ * Then zero or more times
+ *    libxl__multidev_prepare
+ *    libal__initiate_device_{remove/addition}.
+ * Finally, once
+ *    libxl__multidev_prepared
+ * which will result (perhaps reentrantly) in one call to callback().
  */
+
+/* Starts preparing to add/remove a bunch of devices. */
+_hidden void libxl__multidev_begin(libxl__ao *ao, libxl__ao_devices*);
+
+/* Prepares to add/remove one of many devices.  Returns a libxl__ao_device
+ * which has had libxl__prepare_ao_device called, and which has also
+ * had ->callback set.  The user should not mess with aodev->callback. */
+_hidden libxl__ao_device *libxl__multidev_prepare(libxl__ao_devices*);
+
+/* Notifies the multidev machinery that we have now finished preparing
+ * and initiating devices.  multidev->callback may then be called as
+ * soon as there are no prepared but not completed operations
+ * outstanding, perhaps reentrantly.  If rc!=0 (error should have been
+ * logged) multidev->callback will get a non-zero rc.
+ * callback may be set by the user at any point before prepared. */
+_hidden void libxl__multidev_prepared(libxl__egc*, libxl__ao_devices*, int rc);
+
 typedef void libxl__devices_callback(libxl__egc*, libxl__ao_devices*, int rc);
 struct libxl__ao_devices {
-    libxl__ao_device *array;
-    int size;
+    /* set by user: */
     libxl__devices_callback *callback;
+    /* for private use by libxl__...ao_devices... machinery: */
+    libxl__ao *ao;
+    libxl__ao_device **array;
+    int used, allocd;
+    libxl__ao_device *preparation;
 };
 
 /*
@@ -2372,10 +2386,11 @@ _hidden void libxl__devices_destroy(libx
                                     libxl__devices_remove_state *drs);
 
 /* Helper function to add a bunch of disks. This should be used when
- * the caller is inside an async op. "devices" will NOT be prepared by this
- * function, so the caller must make sure to call _prepare before calling this
- * function. The start parameter contains the position inside the aodevs array
- * that should be used to store the state of this devices.
+ * the caller is inside an async op. "devices" will NOT be prepared by
+ * this function, so the caller must make sure to call
+ * libxl__multidev_begin before calling this function. The start
+ * parameter contains the position inside the aodevs array that should
+ * be used to store the state of this devices.
  *
  * The "callback" will be called for each device, and the user is responsible
  * for calling libxl__ao_device_check_last on the callback.

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005Xx-Tc; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0005SU-5n
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1344371596!12699043!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28852 invoked from network); 7 Aug 2012 20:33:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-00041D-Mu
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-0003JJ-Li
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Message-Id: <E1SyqSq-0003JJ-Li@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: do not blunder on if
	bootloader fails (again)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984052 -3600
# Node ID f1e7c1142fe515171df742b3748828b758d5f88b
# Parent  a1b583ffbcb0503ad3907253c41986bd65f56ac7
libxl: do not blunder on if bootloader fails (again)

Do not lose the rc value passed to bootloader_callback.  Do not lose
the rc value from the bl when the local disk detach succeeds.

While we're here rationalise the use of bl->rc to make things clearer.
Set it to zero at the start and always update it conditionally; copy
it into bootloader_callback's argument each time.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r a1b583ffbcb0 -r f1e7c1142fe5 tools/libxl/libxl_bootloader.c
--- a/tools/libxl/libxl_bootloader.c	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_bootloader.c	Fri Aug 03 09:54:12 2012 +0100
@@ -206,6 +206,7 @@ static int parse_bootloader_result(libxl
 void libxl__bootloader_init(libxl__bootloader_state *bl)
 {
     assert(bl->ao);
+    bl->rc = 0;
     bl->dls.diskpath = NULL;
     bl->openpty.ao = bl->ao;
     bl->dls.ao = bl->ao;
@@ -255,6 +256,9 @@ static void bootloader_local_detached_cb
 static void bootloader_callback(libxl__egc *egc, libxl__bootloader_state *bl,
                                 int rc)
 {
+    if (!bl->rc)
+        bl->rc = rc;
+
     bootloader_cleanup(egc, bl);
 
     bl->dls.callback = bootloader_local_detached_cb;
@@ -270,9 +274,11 @@ static void bootloader_local_detached_cb
 
     if (rc) {
         LOG(ERROR, "unable to detach locally attached disk");
+        if (!bl->rc)
+            bl->rc = rc;
     }
 
-    bl->callback(egc, bl, rc);
+    bl->callback(egc, bl, bl->rc);
 }
 
 /* might be called at any time, provided it's init'd */
@@ -289,7 +295,8 @@ static void bootloader_stop(libxl__egc *
         if (r) LOGE(WARN, "%sfailed to kill bootloader [%lu]",
                     rc ? "after failure, " : "", (unsigned long)bl->child.pid);
     }
-    bl->rc = rc;
+    if (!bl->rc)
+        bl->rc = rc;
 }
 
 /*----- main flow of control -----*/

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005Xx-Tc; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0005SU-5n
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1344371596!12699043!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28852 invoked from network); 7 Aug 2012 20:33:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-00041D-Mu
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSq-0003JJ-Li
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:16 +0000
Message-Id: <E1SyqSq-0003JJ-Li@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:16 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: do not blunder on if
	bootloader fails (again)
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984052 -3600
# Node ID f1e7c1142fe515171df742b3748828b758d5f88b
# Parent  a1b583ffbcb0503ad3907253c41986bd65f56ac7
libxl: do not blunder on if bootloader fails (again)

Do not lose the rc value passed to bootloader_callback.  Do not lose
the rc value from the bl when the local disk detach succeeds.

While we're here rationalise the use of bl->rc to make things clearer.
Set it to zero at the start and always update it conditionally; copy
it into bootloader_callback's argument each time.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r a1b583ffbcb0 -r f1e7c1142fe5 tools/libxl/libxl_bootloader.c
--- a/tools/libxl/libxl_bootloader.c	Fri Aug 03 09:54:11 2012 +0100
+++ b/tools/libxl/libxl_bootloader.c	Fri Aug 03 09:54:12 2012 +0100
@@ -206,6 +206,7 @@ static int parse_bootloader_result(libxl
 void libxl__bootloader_init(libxl__bootloader_state *bl)
 {
     assert(bl->ao);
+    bl->rc = 0;
     bl->dls.diskpath = NULL;
     bl->openpty.ao = bl->ao;
     bl->dls.ao = bl->ao;
@@ -255,6 +256,9 @@ static void bootloader_local_detached_cb
 static void bootloader_callback(libxl__egc *egc, libxl__bootloader_state *bl,
                                 int rc)
 {
+    if (!bl->rc)
+        bl->rc = rc;
+
     bootloader_cleanup(egc, bl);
 
     bl->dls.callback = bootloader_local_detached_cb;
@@ -270,9 +274,11 @@ static void bootloader_local_detached_cb
 
     if (rc) {
         LOG(ERROR, "unable to detach locally attached disk");
+        if (!bl->rc)
+            bl->rc = rc;
     }
 
-    bl->callback(egc, bl, rc);
+    bl->callback(egc, bl, bl->rc);
 }
 
 /* might be called at any time, provided it's init'd */
@@ -289,7 +295,8 @@ static void bootloader_stop(libxl__egc *
         if (r) LOGE(WARN, "%sfailed to kill bootloader [%lu]",
                     rc ? "after failure, " : "", (unsigned long)bl->child.pid);
     }
-    bl->rc = rc;
+    if (!bl->rc)
+        bl->rc = rc;
 }
 
 /*----- main flow of control -----*/

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005X1-BB; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005Rg-75
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1344371593!11288921!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7725 invoked from network); 7 Aug 2012 20:33:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-00040p-De
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-0003HL-CH
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Message-Id: <E1SyqSm-0003HL-CH@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: only read script once in
	libxl__hotplug_*
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984046 -3600
# Node ID 428014e272914d21cb2fc63a651a556543242a7d
# Parent  a3cfa3666857ada79c3fad002a41e382568332b6
libxl: only read script once in libxl__hotplug_*

instead of duplicating the error handling etc in get_hotplug_env just pass the
script already read by the caller down.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r a3cfa3666857 -r 428014e27291 tools/libxl/libxl_linux.c
--- a/tools/libxl/libxl_linux.c	Fri Aug 03 09:54:05 2012 +0100
+++ b/tools/libxl/libxl_linux.c	Fri Aug 03 09:54:06 2012 +0100
@@ -80,22 +80,14 @@ char *libxl__devid_to_localdev(libxl__gc
 
 /* Hotplug scripts helpers */
 
-static char **get_hotplug_env(libxl__gc *gc, libxl__device *dev)
+static char **get_hotplug_env(libxl__gc *gc,
+                              char *script, libxl__device *dev)
 {
-    char *be_path = libxl__device_backend_path(gc, dev);
-    char *script;
     const char *type = libxl__device_kind_to_string(dev->backend_kind);
     char **env;
     int nr = 0;
     libxl_nic_type nictype;
 
-    script = libxl__xs_read(gc, XBT_NULL,
-                            GCSPRINTF("%s/%s", be_path, "script"));
-    if (!script) {
-        LOGEV(ERROR, errno, "unable to read script from %s", be_path);
-        return NULL;
-    }
-
     const int arraysize = 13;
     GCNEW_ARRAY(env, arraysize);
     env[nr++] = "script";
@@ -170,7 +162,7 @@ static int libxl__hotplug_nic(libxl__gc 
         goto out;
     }
 
-    *env = get_hotplug_env(gc, dev);
+    *env = get_hotplug_env(gc, script, dev);
     if (!env) {
         rc = ERROR_FAIL;
         goto out;
@@ -212,7 +204,7 @@ static int libxl__hotplug_disk(libxl__gc
         goto error;
     }
 
-    *env = get_hotplug_env(gc, dev);
+    *env = get_hotplug_env(gc, script, dev);
     if (!*env) {
         rc = ERROR_FAIL;
         goto error;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005XA-Dw; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005Re-89
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1344371592!6017190!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25385 invoked from network); 7 Aug 2012 20:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSk-00040g-SI
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSk-0003Ga-R4
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:10 +0000
Message-Id: <E1SyqSk-0003Ga-R4@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: make libxl_device_pci_{add,
	remove, destroy} interfaces asynchronous
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984043 -3600
# Node ID 65ae31da1c536b2551c6465d796642ba42e594a2
# Parent  7fd5facb608427b7e5890ff10cee8ed0da6a7703
libxl: make libxl_device_pci_{add,remove,destroy} interfaces asynchronous

This does not make the implementation fully asynchronous but just
updates the API to support asynchrony in the future.

Currently although these functions do not call hotplug scripts etc and
therefore are not "slow" (per the comment about ao machinery in
libxl_internal.h) they do interact with the device model and so are
not quite "fast" either. We can live with this for now.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 7fd5facb6084 -r 65ae31da1c53 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/libxl/libxl.h	Fri Aug 03 09:54:03 2012 +0100
@@ -757,10 +757,21 @@ int libxl_device_vfb_destroy(libxl_ctx *
                              LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* PCI Passthrough */
-int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
-int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
-int libxl_device_pci_destroy(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
-libxl_device_pci *libxl_device_pci_list(libxl_ctx *ctx, uint32_t domid, int *num);
+int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid,
+                         libxl_device_pci *pcidev,
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
+int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid,
+                            libxl_device_pci *pcidev,
+                            const libxl_asyncop_how *ao_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
+int libxl_device_pci_destroy(libxl_ctx *ctx, uint32_t domid,
+                             libxl_device_pci *pcidev,
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
+
+libxl_device_pci *libxl_device_pci_list(libxl_ctx *ctx, uint32_t domid,
+                                        int *num);
 
 /*
  * Functions related to making devices assignable -- that is, bound to
diff -r 7fd5facb6084 -r 65ae31da1c53 tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/libxl/libxl_pci.c	Fri Aug 03 09:54:03 2012 +0100
@@ -1010,13 +1010,15 @@ int libxl__device_pci_setdefault(libxl__
     return 0;
 }
 
-int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev)
+int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid,
+                         libxl_device_pci *pcidev,
+                         const libxl_asyncop_how *ao_how)
 {
-    GC_INIT(ctx);
+    AO_CREATE(ctx, domid, ao_how);
     int rc;
     rc = libxl__device_pci_add(gc, domid, pcidev, 0);
-    GC_FREE;
-    return rc;
+    libxl__ao_complete(egc, ao, rc);
+    return AO_INPROGRESS;
 }
 
 static int libxl_pcidev_assignable(libxl_ctx *ctx, libxl_device_pci *pcidev)
@@ -1150,6 +1152,9 @@ static int qemu_pci_remove_xenstore(libx
     return 0;
 }
 
+static int libxl__device_pci_remove_common(libxl__gc *gc, uint32_t domid,
+                                           libxl_device_pci *pcidev, int force);
+
 static int do_pci_remove(libxl__gc *gc, uint32_t domid,
                          libxl_device_pci *pcidev, int force)
 {
@@ -1263,10 +1268,7 @@ out:
     stubdomid = libxl_get_stubdom_id(ctx, domid);
     if (stubdomid != 0) {
         libxl_device_pci pcidev_s = *pcidev;
-        if (force)
-                libxl_device_pci_destroy(ctx, stubdomid, &pcidev_s);
-        else
-                libxl_device_pci_remove(ctx, stubdomid, &pcidev_s);
+        libxl__device_pci_remove_common(gc, stubdomid, &pcidev_s, force);
     }
 
     libxl__device_pci_remove_xenstore(gc, domid, pcidev);
@@ -1313,27 +1315,31 @@ out:
     return rc;
 }
 
-int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev)
+int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid,
+                            libxl_device_pci *pcidev,
+                            const libxl_asyncop_how *ao_how)
+
 {
-    GC_INIT(ctx);
+    AO_CREATE(ctx, domid, ao_how);
     int rc;
 
     rc = libxl__device_pci_remove_common(gc, domid, pcidev, 0);
 
-    GC_FREE;
-    return rc;
+    libxl__ao_complete(egc, ao, rc);
+    return AO_INPROGRESS;
 }
 
 int libxl_device_pci_destroy(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_device_pci *pcidev)
+                             libxl_device_pci *pcidev,
+                             const libxl_asyncop_how *ao_how)
 {
-    GC_INIT(ctx);
+    AO_CREATE(ctx, domid, ao_how);
     int rc;
 
     rc = libxl__device_pci_remove_common(gc, domid, pcidev, 1);
 
-    GC_FREE;
-    return rc;
+    libxl__ao_complete(egc, ao, rc);
+    return AO_INPROGRESS;
 }
 
 static void libxl__device_pci_from_xs_be(libxl__gc *gc,
@@ -1415,7 +1421,7 @@ int libxl__device_pci_destroy_all(libxl_
          * respond to SCI interrupt because the guest kernel has shut down the
          * devices by the time we even get here!
          */
-        if (libxl_device_pci_destroy(ctx, domid, pcidevs + i) < 0)
+        if (libxl__device_pci_remove_common(gc, domid, pcidevs + i, 1) < 0)
             rc = ERROR_FAIL;
     }
 
diff -r 7fd5facb6084 -r 65ae31da1c53 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/libxl/xl_cmdimpl.c	Fri Aug 03 09:54:03 2012 +0100
@@ -2389,9 +2389,9 @@ static void pcidetach(const char *dom, c
         exit(2);
     }
     if (force)
-        libxl_device_pci_destroy(ctx, domid, &pcidev);
+        libxl_device_pci_destroy(ctx, domid, &pcidev, 0);
     else
-        libxl_device_pci_remove(ctx, domid, &pcidev);
+        libxl_device_pci_remove(ctx, domid, &pcidev, 0);
 
     libxl_device_pci_dispose(&pcidev);
     xlu_cfg_destroy(config);
@@ -2435,7 +2435,7 @@ static void pciattach(const char *dom, c
         fprintf(stderr, "pci-attach: malformed BDF specification \"%s\"\n", bdf);
         exit(2);
     }
-    libxl_device_pci_add(ctx, domid, &pcidev);
+    libxl_device_pci_add(ctx, domid, &pcidev, 0);
 
     libxl_device_pci_dispose(&pcidev);
     xlu_cfg_destroy(config);
diff -r 7fd5facb6084 -r 65ae31da1c53 tools/ocaml/libs/xl/xenlight_stubs.c
--- a/tools/ocaml/libs/xl/xenlight_stubs.c	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c	Fri Aug 03 09:54:03 2012 +0100
@@ -423,7 +423,7 @@ value stub_xl_device_pci_add(value info,
 	device_pci_val(&gc, &lg, &c_info, info);
 
 	INIT_CTX();
-	ret = libxl_device_pci_add(ctx, Int_val(domid), &c_info);
+	ret = libxl_device_pci_add(ctx, Int_val(domid), &c_info, 0);
 	if (ret != 0)
 		failwith_xl("pci_add", &lg);
 	FREE_CTX();
@@ -441,7 +441,7 @@ value stub_xl_device_pci_remove(value in
 	device_pci_val(&gc, &lg, &c_info, info);
 
 	INIT_CTX();
-	ret = libxl_device_pci_remove(ctx, Int_val(domid), &c_info);
+	ret = libxl_device_pci_remove(ctx, Int_val(domid), &c_info, 0);
 	if (ret != 0)
 		failwith_xl("pci_remove", &lg);
 	FREE_CTX();
diff -r 7fd5facb6084 -r 65ae31da1c53 tools/python/xen/lowlevel/xl/xl.c
--- a/tools/python/xen/lowlevel/xl/xl.c	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/python/xen/lowlevel/xl/xl.c	Fri Aug 03 09:54:03 2012 +0100
@@ -497,7 +497,7 @@ static PyObject *pyxl_pci_add(XlObject *
         return NULL;
     }
     pci = (Py_device_pci *)obj;
-    if ( libxl_device_pci_add(self->ctx, domid, &pci->obj) ) {
+    if ( libxl_device_pci_add(self->ctx, domid, &pci->obj, 0) ) {
         PyErr_SetString(xl_error_obj, "cannot add pci device");
         return NULL;
     }
@@ -519,12 +519,12 @@ static PyObject *pyxl_pci_del(XlObject *
     }
     pci = (Py_device_pci *)obj;
     if ( force ) {
-        if ( libxl_device_pci_destroy(self->ctx, domid, &pci->obj) ) {
+        if ( libxl_device_pci_destroy(self->ctx, domid, &pci->obj, 0) ) {
             PyErr_SetString(xl_error_obj, "cannot remove pci device");
             return NULL;
         }
     } else {
-        if ( libxl_device_pci_remove(self->ctx, domid, &pci->obj) ) {
+        if ( libxl_device_pci_remove(self->ctx, domid, &pci->obj, 0) ) {
             PyErr_SetString(xl_error_obj, "cannot remove pci device");
             return NULL;
         }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005X1-BB; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005Rg-75
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1344371593!11288921!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7725 invoked from network); 7 Aug 2012 20:33:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-00040p-De
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSm-0003HL-CH
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:12 +0000
Message-Id: <E1SyqSm-0003HL-CH@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: only read script once in
	libxl__hotplug_*
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984046 -3600
# Node ID 428014e272914d21cb2fc63a651a556543242a7d
# Parent  a3cfa3666857ada79c3fad002a41e382568332b6
libxl: only read script once in libxl__hotplug_*

instead of duplicating the error handling etc in get_hotplug_env just pass the
script already read by the caller down.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r a3cfa3666857 -r 428014e27291 tools/libxl/libxl_linux.c
--- a/tools/libxl/libxl_linux.c	Fri Aug 03 09:54:05 2012 +0100
+++ b/tools/libxl/libxl_linux.c	Fri Aug 03 09:54:06 2012 +0100
@@ -80,22 +80,14 @@ char *libxl__devid_to_localdev(libxl__gc
 
 /* Hotplug scripts helpers */
 
-static char **get_hotplug_env(libxl__gc *gc, libxl__device *dev)
+static char **get_hotplug_env(libxl__gc *gc,
+                              char *script, libxl__device *dev)
 {
-    char *be_path = libxl__device_backend_path(gc, dev);
-    char *script;
     const char *type = libxl__device_kind_to_string(dev->backend_kind);
     char **env;
     int nr = 0;
     libxl_nic_type nictype;
 
-    script = libxl__xs_read(gc, XBT_NULL,
-                            GCSPRINTF("%s/%s", be_path, "script"));
-    if (!script) {
-        LOGEV(ERROR, errno, "unable to read script from %s", be_path);
-        return NULL;
-    }
-
     const int arraysize = 13;
     GCNEW_ARRAY(env, arraysize);
     env[nr++] = "script";
@@ -170,7 +162,7 @@ static int libxl__hotplug_nic(libxl__gc 
         goto out;
     }
 
-    *env = get_hotplug_env(gc, dev);
+    *env = get_hotplug_env(gc, script, dev);
     if (!env) {
         rc = ERROR_FAIL;
         goto out;
@@ -212,7 +204,7 @@ static int libxl__hotplug_disk(libxl__gc
         goto error;
     }
 
-    *env = get_hotplug_env(gc, dev);
+    *env = get_hotplug_env(gc, script, dev);
     if (!*env) {
         rc = ERROR_FAIL;
         goto error;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005XA-Dw; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005Re-89
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-27.messagelabs.com!1344371592!6017190!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25385 invoked from network); 7 Aug 2012 20:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSk-00040g-SI
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSk-0003Ga-R4
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:10 +0000
Message-Id: <E1SyqSk-0003Ga-R4@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: make libxl_device_pci_{add,
	remove, destroy} interfaces asynchronous
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984043 -3600
# Node ID 65ae31da1c536b2551c6465d796642ba42e594a2
# Parent  7fd5facb608427b7e5890ff10cee8ed0da6a7703
libxl: make libxl_device_pci_{add,remove,destroy} interfaces asynchronous

This does not make the implementation fully asynchronous but just
updates the API to support asynchrony in the future.

Currently although these functions do not call hotplug scripts etc and
therefore are not "slow" (per the comment about ao machinery in
libxl_internal.h) they do interact with the device model and so are
not quite "fast" either. We can live with this for now.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 7fd5facb6084 -r 65ae31da1c53 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/libxl/libxl.h	Fri Aug 03 09:54:03 2012 +0100
@@ -757,10 +757,21 @@ int libxl_device_vfb_destroy(libxl_ctx *
                              LIBXL_EXTERNAL_CALLERS_ONLY;
 
 /* PCI Passthrough */
-int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
-int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
-int libxl_device_pci_destroy(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev);
-libxl_device_pci *libxl_device_pci_list(libxl_ctx *ctx, uint32_t domid, int *num);
+int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid,
+                         libxl_device_pci *pcidev,
+                         const libxl_asyncop_how *ao_how)
+                         LIBXL_EXTERNAL_CALLERS_ONLY;
+int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid,
+                            libxl_device_pci *pcidev,
+                            const libxl_asyncop_how *ao_how)
+                            LIBXL_EXTERNAL_CALLERS_ONLY;
+int libxl_device_pci_destroy(libxl_ctx *ctx, uint32_t domid,
+                             libxl_device_pci *pcidev,
+                             const libxl_asyncop_how *ao_how)
+                             LIBXL_EXTERNAL_CALLERS_ONLY;
+
+libxl_device_pci *libxl_device_pci_list(libxl_ctx *ctx, uint32_t domid,
+                                        int *num);
 
 /*
  * Functions related to making devices assignable -- that is, bound to
diff -r 7fd5facb6084 -r 65ae31da1c53 tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/libxl/libxl_pci.c	Fri Aug 03 09:54:03 2012 +0100
@@ -1010,13 +1010,15 @@ int libxl__device_pci_setdefault(libxl__
     return 0;
 }
 
-int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev)
+int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid,
+                         libxl_device_pci *pcidev,
+                         const libxl_asyncop_how *ao_how)
 {
-    GC_INIT(ctx);
+    AO_CREATE(ctx, domid, ao_how);
     int rc;
     rc = libxl__device_pci_add(gc, domid, pcidev, 0);
-    GC_FREE;
-    return rc;
+    libxl__ao_complete(egc, ao, rc);
+    return AO_INPROGRESS;
 }
 
 static int libxl_pcidev_assignable(libxl_ctx *ctx, libxl_device_pci *pcidev)
@@ -1150,6 +1152,9 @@ static int qemu_pci_remove_xenstore(libx
     return 0;
 }
 
+static int libxl__device_pci_remove_common(libxl__gc *gc, uint32_t domid,
+                                           libxl_device_pci *pcidev, int force);
+
 static int do_pci_remove(libxl__gc *gc, uint32_t domid,
                          libxl_device_pci *pcidev, int force)
 {
@@ -1263,10 +1268,7 @@ out:
     stubdomid = libxl_get_stubdom_id(ctx, domid);
     if (stubdomid != 0) {
         libxl_device_pci pcidev_s = *pcidev;
-        if (force)
-                libxl_device_pci_destroy(ctx, stubdomid, &pcidev_s);
-        else
-                libxl_device_pci_remove(ctx, stubdomid, &pcidev_s);
+        libxl__device_pci_remove_common(gc, stubdomid, &pcidev_s, force);
     }
 
     libxl__device_pci_remove_xenstore(gc, domid, pcidev);
@@ -1313,27 +1315,31 @@ out:
     return rc;
 }
 
-int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid, libxl_device_pci *pcidev)
+int libxl_device_pci_remove(libxl_ctx *ctx, uint32_t domid,
+                            libxl_device_pci *pcidev,
+                            const libxl_asyncop_how *ao_how)
+
 {
-    GC_INIT(ctx);
+    AO_CREATE(ctx, domid, ao_how);
     int rc;
 
     rc = libxl__device_pci_remove_common(gc, domid, pcidev, 0);
 
-    GC_FREE;
-    return rc;
+    libxl__ao_complete(egc, ao, rc);
+    return AO_INPROGRESS;
 }
 
 int libxl_device_pci_destroy(libxl_ctx *ctx, uint32_t domid,
-                                  libxl_device_pci *pcidev)
+                             libxl_device_pci *pcidev,
+                             const libxl_asyncop_how *ao_how)
 {
-    GC_INIT(ctx);
+    AO_CREATE(ctx, domid, ao_how);
     int rc;
 
     rc = libxl__device_pci_remove_common(gc, domid, pcidev, 1);
 
-    GC_FREE;
-    return rc;
+    libxl__ao_complete(egc, ao, rc);
+    return AO_INPROGRESS;
 }
 
 static void libxl__device_pci_from_xs_be(libxl__gc *gc,
@@ -1415,7 +1421,7 @@ int libxl__device_pci_destroy_all(libxl_
          * respond to SCI interrupt because the guest kernel has shut down the
          * devices by the time we even get here!
          */
-        if (libxl_device_pci_destroy(ctx, domid, pcidevs + i) < 0)
+        if (libxl__device_pci_remove_common(gc, domid, pcidevs + i, 1) < 0)
             rc = ERROR_FAIL;
     }
 
diff -r 7fd5facb6084 -r 65ae31da1c53 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/libxl/xl_cmdimpl.c	Fri Aug 03 09:54:03 2012 +0100
@@ -2389,9 +2389,9 @@ static void pcidetach(const char *dom, c
         exit(2);
     }
     if (force)
-        libxl_device_pci_destroy(ctx, domid, &pcidev);
+        libxl_device_pci_destroy(ctx, domid, &pcidev, 0);
     else
-        libxl_device_pci_remove(ctx, domid, &pcidev);
+        libxl_device_pci_remove(ctx, domid, &pcidev, 0);
 
     libxl_device_pci_dispose(&pcidev);
     xlu_cfg_destroy(config);
@@ -2435,7 +2435,7 @@ static void pciattach(const char *dom, c
         fprintf(stderr, "pci-attach: malformed BDF specification \"%s\"\n", bdf);
         exit(2);
     }
-    libxl_device_pci_add(ctx, domid, &pcidev);
+    libxl_device_pci_add(ctx, domid, &pcidev, 0);
 
     libxl_device_pci_dispose(&pcidev);
     xlu_cfg_destroy(config);
diff -r 7fd5facb6084 -r 65ae31da1c53 tools/ocaml/libs/xl/xenlight_stubs.c
--- a/tools/ocaml/libs/xl/xenlight_stubs.c	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/ocaml/libs/xl/xenlight_stubs.c	Fri Aug 03 09:54:03 2012 +0100
@@ -423,7 +423,7 @@ value stub_xl_device_pci_add(value info,
 	device_pci_val(&gc, &lg, &c_info, info);
 
 	INIT_CTX();
-	ret = libxl_device_pci_add(ctx, Int_val(domid), &c_info);
+	ret = libxl_device_pci_add(ctx, Int_val(domid), &c_info, 0);
 	if (ret != 0)
 		failwith_xl("pci_add", &lg);
 	FREE_CTX();
@@ -441,7 +441,7 @@ value stub_xl_device_pci_remove(value in
 	device_pci_val(&gc, &lg, &c_info, info);
 
 	INIT_CTX();
-	ret = libxl_device_pci_remove(ctx, Int_val(domid), &c_info);
+	ret = libxl_device_pci_remove(ctx, Int_val(domid), &c_info, 0);
 	if (ret != 0)
 		failwith_xl("pci_remove", &lg);
 	FREE_CTX();
diff -r 7fd5facb6084 -r 65ae31da1c53 tools/python/xen/lowlevel/xl/xl.c
--- a/tools/python/xen/lowlevel/xl/xl.c	Fri Aug 03 09:50:28 2012 +0200
+++ b/tools/python/xen/lowlevel/xl/xl.c	Fri Aug 03 09:54:03 2012 +0100
@@ -497,7 +497,7 @@ static PyObject *pyxl_pci_add(XlObject *
         return NULL;
     }
     pci = (Py_device_pci *)obj;
-    if ( libxl_device_pci_add(self->ctx, domid, &pci->obj) ) {
+    if ( libxl_device_pci_add(self->ctx, domid, &pci->obj, 0) ) {
         PyErr_SetString(xl_error_obj, "cannot add pci device");
         return NULL;
     }
@@ -519,12 +519,12 @@ static PyObject *pyxl_pci_del(XlObject *
     }
     pci = (Py_device_pci *)obj;
     if ( force ) {
-        if ( libxl_device_pci_destroy(self->ctx, domid, &pci->obj) ) {
+        if ( libxl_device_pci_destroy(self->ctx, domid, &pci->obj, 0) ) {
             PyErr_SetString(xl_error_obj, "cannot remove pci device");
             return NULL;
         }
     } else {
-        if ( libxl_device_pci_remove(self->ctx, domid, &pci->obj) ) {
+        if ( libxl_device_pci_remove(self->ctx, domid, &pci->obj, 0) ) {
             PyErr_SetString(xl_error_obj, "cannot remove pci device");
             return NULL;
         }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005XR-Ju; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005VE-NF
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Received: from [85.158.138.51:32927] by server-1.bemta-3.messagelabs.com id
	DF/79-29224-19B71205; Tue, 07 Aug 2012 20:33:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1344371600!30952328!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15284 invoked from network); 7 Aug 2012 20:33:21 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:21 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-00041V-Sp
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-0003Kl-Re
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Message-Id: <E1SyqSt-0003Kl-Re@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:19 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nestedhvm: fix nested page fault
	build error on 32-bit
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <Ian.Campbell@citrix.com>
# Date 1343984057 -3600
# Node ID 612898732e66db3d3b992df1a1af1655af4d92c9
# Parent  12f65475c13dff134a7f5540bf75c391e90ef491
nestedhvm: fix nested page fault build error on 32-bit

    cc1: warnings being treated as errors
    hvm.c: In function ?hvm_hap_nested_page_fault?:
    hvm.c:1282: error: passing argument 2 of ?nestedhvm_hap_nested_page_fault? from incompatible pointer type /local/scratch/ianc/devel/xen-unstable.hg/xen/include/asm/hvm/nestedhvm.h:55: note: expected ?paddr_t *? but argument is of type ?long unsigned int *?

hvm_hap_nested_page_fault takes an unsigned long gpa and passes &gpa
to nestedhvm_hap_nested_page_fault which takes a paddr_t *. Since both
of the callers of hvm_hap_nested_page_fault (svm_do_nested_pgfault and
ept_handle_violation) actually have the gpa which they pass to
hvm_hap_nested_page_fault as a paddr_t I think it makes sense to
change the argument to hvm_hap_nested_page_fault.

The other user of gpa in hvm_hap_nested_page_fault is a call to
p2m_mem_access_check, which currently also takes a paddr_t gpa but I
think a paddr_t is appropriate there too.

Jan points out that this is also an issue for >4GB guests on the 32
bit hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 12f65475c13d -r 612898732e66 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Fri Aug 03 09:54:16 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Fri Aug 03 09:54:17 2012 +0100
@@ -1242,7 +1242,7 @@ void hvm_inject_page_fault(int errcode, 
     hvm_inject_trap(&trap);
 }
 
-int hvm_hap_nested_page_fault(unsigned long gpa,
+int hvm_hap_nested_page_fault(paddr_t gpa,
                               bool_t gla_valid,
                               unsigned long gla,
                               bool_t access_r,
diff -r 12f65475c13d -r 612898732e66 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Fri Aug 03 09:54:16 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Fri Aug 03 09:54:17 2012 +0100
@@ -1233,7 +1233,7 @@ void p2m_mem_paging_resume(struct domain
     }
 }
 
-bool_t p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 
+bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, 
                           bool_t access_r, bool_t access_w, bool_t access_x,
                           mem_event_request_t **req_ptr)
 {
diff -r 12f65475c13d -r 612898732e66 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h	Fri Aug 03 09:54:16 2012 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h	Fri Aug 03 09:54:17 2012 +0100
@@ -433,7 +433,7 @@ static inline void hvm_set_info_guest(st
 
 int hvm_debug_op(struct vcpu *v, int32_t op);
 
-int hvm_hap_nested_page_fault(unsigned long gpa,
+int hvm_hap_nested_page_fault(paddr_t gpa,
                               bool_t gla_valid, unsigned long gla,
                               bool_t access_r,
                               bool_t access_w,
diff -r 12f65475c13d -r 612898732e66 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h	Fri Aug 03 09:54:16 2012 +0100
+++ b/xen/include/asm-x86/p2m.h	Fri Aug 03 09:54:17 2012 +0100
@@ -589,7 +589,7 @@ static inline void p2m_mem_paging_popula
  * been promoted with no underlying vcpu pause. If the req_ptr has been populated, 
  * then the caller must put the event in the ring (once having released get_gfn*
  * locks -- caller must also xfree the request. */
-bool_t p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 
+bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, 
                           bool_t access_r, bool_t access_w, bool_t access_x,
                           mem_event_request_t **req_ptr);
 /* Resumes the running of the VCPU, restarting the last instruction */
@@ -606,7 +606,7 @@ int p2m_get_mem_access(struct domain *d,
                        hvmmem_access_t *access);
 
 #else
-static inline bool_t p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, 
+static inline bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, 
                                         unsigned long gla, bool_t access_r, 
                                         bool_t access_w, bool_t access_x,
                                         mem_event_request_t **req_ptr)

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqSy-0005XR-Ju; Tue, 07 Aug 2012 20:33:24 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0005VE-NF
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Received: from [85.158.138.51:32927] by server-1.bemta-3.messagelabs.com id
	DF/79-29224-19B71205; Tue, 07 Aug 2012 20:33:21 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1344371600!30952328!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15284 invoked from network); 7 Aug 2012 20:33:21 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:21 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-00041V-Sp
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSt-0003Kl-Re
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:19 +0000
Message-Id: <E1SyqSt-0003Kl-Re@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:19 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nestedhvm: fix nested page fault
	build error on 32-bit
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <Ian.Campbell@citrix.com>
# Date 1343984057 -3600
# Node ID 612898732e66db3d3b992df1a1af1655af4d92c9
# Parent  12f65475c13dff134a7f5540bf75c391e90ef491
nestedhvm: fix nested page fault build error on 32-bit

    cc1: warnings being treated as errors
    hvm.c: In function ?hvm_hap_nested_page_fault?:
    hvm.c:1282: error: passing argument 2 of ?nestedhvm_hap_nested_page_fault? from incompatible pointer type /local/scratch/ianc/devel/xen-unstable.hg/xen/include/asm/hvm/nestedhvm.h:55: note: expected ?paddr_t *? but argument is of type ?long unsigned int *?

hvm_hap_nested_page_fault takes an unsigned long gpa and passes &gpa
to nestedhvm_hap_nested_page_fault which takes a paddr_t *. Since both
of the callers of hvm_hap_nested_page_fault (svm_do_nested_pgfault and
ept_handle_violation) actually have the gpa which they pass to
hvm_hap_nested_page_fault as a paddr_t I think it makes sense to
change the argument to hvm_hap_nested_page_fault.

The other user of gpa in hvm_hap_nested_page_fault is a call to
p2m_mem_access_check, which currently also takes a paddr_t gpa but I
think a paddr_t is appropriate there too.

Jan points out that this is also an issue for >4GB guests on the 32
bit hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 12f65475c13d -r 612898732e66 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Fri Aug 03 09:54:16 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Fri Aug 03 09:54:17 2012 +0100
@@ -1242,7 +1242,7 @@ void hvm_inject_page_fault(int errcode, 
     hvm_inject_trap(&trap);
 }
 
-int hvm_hap_nested_page_fault(unsigned long gpa,
+int hvm_hap_nested_page_fault(paddr_t gpa,
                               bool_t gla_valid,
                               unsigned long gla,
                               bool_t access_r,
diff -r 12f65475c13d -r 612898732e66 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Fri Aug 03 09:54:16 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Fri Aug 03 09:54:17 2012 +0100
@@ -1233,7 +1233,7 @@ void p2m_mem_paging_resume(struct domain
     }
 }
 
-bool_t p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 
+bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, 
                           bool_t access_r, bool_t access_w, bool_t access_x,
                           mem_event_request_t **req_ptr)
 {
diff -r 12f65475c13d -r 612898732e66 xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h	Fri Aug 03 09:54:16 2012 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h	Fri Aug 03 09:54:17 2012 +0100
@@ -433,7 +433,7 @@ static inline void hvm_set_info_guest(st
 
 int hvm_debug_op(struct vcpu *v, int32_t op);
 
-int hvm_hap_nested_page_fault(unsigned long gpa,
+int hvm_hap_nested_page_fault(paddr_t gpa,
                               bool_t gla_valid, unsigned long gla,
                               bool_t access_r,
                               bool_t access_w,
diff -r 12f65475c13d -r 612898732e66 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h	Fri Aug 03 09:54:16 2012 +0100
+++ b/xen/include/asm-x86/p2m.h	Fri Aug 03 09:54:17 2012 +0100
@@ -589,7 +589,7 @@ static inline void p2m_mem_paging_popula
  * been promoted with no underlying vcpu pause. If the req_ptr has been populated, 
  * then the caller must put the event in the ring (once having released get_gfn*
  * locks -- caller must also xfree the request. */
-bool_t p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, unsigned long gla, 
+bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla, 
                           bool_t access_r, bool_t access_w, bool_t access_x,
                           mem_event_request_t **req_ptr);
 /* Resumes the running of the VCPU, restarting the last instruction */
@@ -606,7 +606,7 @@ int p2m_get_mem_access(struct domain *d,
                        hvmmem_access_t *access);
 
 #else
-static inline bool_t p2m_mem_access_check(unsigned long gpa, bool_t gla_valid, 
+static inline bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, 
                                         unsigned long gla, bool_t access_r, 
                                         bool_t access_w, bool_t access_x,
                                         mem_event_request_t **req_ptr)

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT0-0005bK-9S; Tue, 07 Aug 2012 20:33:26 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0005Sf-PQ
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-27.messagelabs.com!1344371596!4377392!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25133 invoked from network); 7 Aug 2012 20:33:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-000417-Kc
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-0003Io-JG
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Message-Id: <E1SyqSp-0003Io-JG@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: abolish useless `start'
	parameter to libxl__add_*
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984051 -3600
# Node ID ee32ae1631266f0f6cce3d8c95ba15a68ec258a4
# Parent  8897bc3d8a3029d6a6e6cba9dfcdc08f94016bd7
libxl: abolish useless `start' parameter to libxl__add_*

0 is always passed for this parameter and the code doesn't, actually,
use it, now.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_create.c	Fri Aug 03 09:54:11 2012 +0100
@@ -911,7 +911,7 @@ static void domcreate_rebuild_done(libxl
 
     libxl__multidev_begin(ao, &dcs->aodevs);
     dcs->aodevs.callback = domcreate_launch_dm;
-    libxl__add_disks(egc, ao, domid, 0, d_config, &dcs->aodevs);
+    libxl__add_disks(egc, ao, domid, d_config, &dcs->aodevs);
     libxl__multidev_prepared(egc, &dcs->aodevs, 0);
 
     return;
@@ -1041,7 +1041,7 @@ static void domcreate_devmodel_started(l
         /* Attach nics */
         libxl__multidev_begin(ao, &dcs->aodevs);
         dcs->aodevs.callback = domcreate_attach_pci;
-        libxl__add_nics(egc, ao, domid, 0, d_config, &dcs->aodevs);
+        libxl__add_nics(egc, ao, domid, d_config, &dcs->aodevs);
         libxl__multidev_prepared(egc, &dcs->aodevs, 0);
         return;
     }
diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:11 2012 +0100
@@ -485,15 +485,14 @@ void libxl__multidev_prepared(libxl__egc
 
 #define DEFINE_DEVICES_ADD(type)                                        \
     void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid, \
-                              int start, libxl_domain_config *d_config, \
+                              libxl_domain_config *d_config,            \
                               libxl__ao_devices *aodevs)                \
     {                                                                   \
         AO_GC;                                                          \
         int i;                                                          \
-        int end = start + d_config->num_##type##s;                      \
-        for (i = start; i < end; i++) {                                 \
+        for (i = 0; i < d_config->num_##type##s; i++) {                 \
             libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);  \
-            libxl__device_##type##_add(egc, domid, &d_config->type##s[i-start], \
+            libxl__device_##type##_add(egc, domid, &d_config->type##s[i], \
                                        aodev);                          \
         }                                                               \
     }
diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:11 2012 +0100
@@ -858,7 +858,7 @@ retry_transaction:
 
     libxl__multidev_begin(ao, &sdss->aodevs);
     sdss->aodevs.callback = spawn_stub_launch_dm;
-    libxl__add_disks(egc, ao, dm_domid, 0, dm_config, &sdss->aodevs);
+    libxl__add_disks(egc, ao, dm_domid, dm_config, &sdss->aodevs);
     libxl__multidev_prepared(egc, &sdss->aodevs, 0);
 
     free(args);
@@ -984,7 +984,7 @@ static void spawn_stubdom_pvqemu_cb(libx
     if (d_config->num_nics > 0) {
         libxl__multidev_begin(ao, &sdss->aodevs);
         sdss->aodevs.callback = stubdom_pvqemu_cb;
-        libxl__add_nics(egc, ao, dm_domid, 0, d_config, &sdss->aodevs);
+        libxl__add_nics(egc, ao, dm_domid, d_config, &sdss->aodevs);
         libxl__multidev_prepared(egc, &sdss->aodevs, 0);
         return;
     }
diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:11 2012 +0100
@@ -2388,19 +2388,17 @@ _hidden void libxl__devices_destroy(libx
 /* Helper function to add a bunch of disks. This should be used when
  * the caller is inside an async op. "devices" will NOT be prepared by
  * this function, so the caller must make sure to call
- * libxl__multidev_begin before calling this function. The start
- * parameter contains the position inside the aodevs array that should
- * be used to store the state of this devices.
+ * libxl__multidev_begin before calling this function.
  *
  * The "callback" will be called for each device, and the user is responsible
  * for calling libxl__ao_device_check_last on the callback.
  */
 _hidden void libxl__add_disks(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
-                              int start, libxl_domain_config *d_config,
+                              libxl_domain_config *d_config,
                               libxl__ao_devices *aodevs);
 
 _hidden void libxl__add_nics(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
-                             int start, libxl_domain_config *d_config,
+                             libxl_domain_config *d_config,
                              libxl__ao_devices *aodevs);
 
 /*----- device model creation -----*/

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT0-0005bK-9S; Tue, 07 Aug 2012 20:33:26 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0005Sf-PQ
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-27.messagelabs.com!1344371596!4377392!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25133 invoked from network); 7 Aug 2012 20:33:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-000417-Kc
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSp-0003Io-JG
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:15 +0000
Message-Id: <E1SyqSp-0003Io-JG@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:15 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: abolish useless `start'
	parameter to libxl__add_*
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <ian.jackson@eu.citrix.com>
# Date 1343984051 -3600
# Node ID ee32ae1631266f0f6cce3d8c95ba15a68ec258a4
# Parent  8897bc3d8a3029d6a6e6cba9dfcdc08f94016bd7
libxl: abolish useless `start' parameter to libxl__add_*

0 is always passed for this parameter and the code doesn't, actually,
use it, now.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_create.c	Fri Aug 03 09:54:11 2012 +0100
@@ -911,7 +911,7 @@ static void domcreate_rebuild_done(libxl
 
     libxl__multidev_begin(ao, &dcs->aodevs);
     dcs->aodevs.callback = domcreate_launch_dm;
-    libxl__add_disks(egc, ao, domid, 0, d_config, &dcs->aodevs);
+    libxl__add_disks(egc, ao, domid, d_config, &dcs->aodevs);
     libxl__multidev_prepared(egc, &dcs->aodevs, 0);
 
     return;
@@ -1041,7 +1041,7 @@ static void domcreate_devmodel_started(l
         /* Attach nics */
         libxl__multidev_begin(ao, &dcs->aodevs);
         dcs->aodevs.callback = domcreate_attach_pci;
-        libxl__add_nics(egc, ao, domid, 0, d_config, &dcs->aodevs);
+        libxl__add_nics(egc, ao, domid, d_config, &dcs->aodevs);
         libxl__multidev_prepared(egc, &dcs->aodevs, 0);
         return;
     }
diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 09:54:11 2012 +0100
@@ -485,15 +485,14 @@ void libxl__multidev_prepared(libxl__egc
 
 #define DEFINE_DEVICES_ADD(type)                                        \
     void libxl__add_##type##s(libxl__egc *egc, libxl__ao *ao, uint32_t domid, \
-                              int start, libxl_domain_config *d_config, \
+                              libxl_domain_config *d_config,            \
                               libxl__ao_devices *aodevs)                \
     {                                                                   \
         AO_GC;                                                          \
         int i;                                                          \
-        int end = start + d_config->num_##type##s;                      \
-        for (i = start; i < end; i++) {                                 \
+        for (i = 0; i < d_config->num_##type##s; i++) {                 \
             libxl__ao_device *aodev = libxl__multidev_prepare(aodevs);  \
-            libxl__device_##type##_add(egc, domid, &d_config->type##s[i-start], \
+            libxl__device_##type##_add(egc, domid, &d_config->type##s[i], \
                                        aodev);                          \
         }                                                               \
     }
diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_dm.c	Fri Aug 03 09:54:11 2012 +0100
@@ -858,7 +858,7 @@ retry_transaction:
 
     libxl__multidev_begin(ao, &sdss->aodevs);
     sdss->aodevs.callback = spawn_stub_launch_dm;
-    libxl__add_disks(egc, ao, dm_domid, 0, dm_config, &sdss->aodevs);
+    libxl__add_disks(egc, ao, dm_domid, dm_config, &sdss->aodevs);
     libxl__multidev_prepared(egc, &sdss->aodevs, 0);
 
     free(args);
@@ -984,7 +984,7 @@ static void spawn_stubdom_pvqemu_cb(libx
     if (d_config->num_nics > 0) {
         libxl__multidev_begin(ao, &sdss->aodevs);
         sdss->aodevs.callback = stubdom_pvqemu_cb;
-        libxl__add_nics(egc, ao, dm_domid, 0, d_config, &sdss->aodevs);
+        libxl__add_nics(egc, ao, dm_domid, d_config, &sdss->aodevs);
         libxl__multidev_prepared(egc, &sdss->aodevs, 0);
         return;
     }
diff -r 8897bc3d8a30 -r ee32ae163126 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:10 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 09:54:11 2012 +0100
@@ -2388,19 +2388,17 @@ _hidden void libxl__devices_destroy(libx
 /* Helper function to add a bunch of disks. This should be used when
  * the caller is inside an async op. "devices" will NOT be prepared by
  * this function, so the caller must make sure to call
- * libxl__multidev_begin before calling this function. The start
- * parameter contains the position inside the aodevs array that should
- * be used to store the state of this devices.
+ * libxl__multidev_begin before calling this function.
  *
  * The "callback" will be called for each device, and the user is responsible
  * for calling libxl__ao_device_check_last on the callback.
  */
 _hidden void libxl__add_disks(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
-                              int start, libxl_domain_config *d_config,
+                              libxl_domain_config *d_config,
                               libxl__ao_devices *aodevs);
 
 _hidden void libxl__add_nics(libxl__egc *egc, libxl__ao *ao, uint32_t domid,
-                             int start, libxl_domain_config *d_config,
+                             libxl_domain_config *d_config,
                              libxl__ao_devices *aodevs);
 
 /*----- device model creation -----*/

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT0-0005b0-2M; Tue, 07 Aug 2012 20:33:26 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0005Wp-Ox
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Received: from [85.158.138.51:58797] by server-4.bemta-3.messagelabs.com id
	FB/BB-06379-39B71205; Tue, 07 Aug 2012 20:33:23 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-174.messagelabs.com!1344371602!30905208!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24727 invoked from network); 7 Aug 2012 20:33:23 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:23 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-00041h-0w
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSv-0003Lj-Vq
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:21 +0000
Message-Id: <E1SyqSv-0003Lj-Vq@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:21 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/hotplug/Linux/init.d/: load
	other xen kernel modules on xencommons start
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Fabio Fantoni <fabio.fantoni@heliman.it>
# Date 1343992054 -3600
# Node ID a6edbc39fc84904f0be4d9ab60a4e50624d5f7cf
# Parent  a8d708fcb3474b7fc112de37b3064e9213d4de92
tools/hotplug/Linux/init.d/: load other xen kernel modules on xencommons start

Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r a8d708fcb347 -r a6edbc39fc84 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/hotplug/Linux/init.d/xencommons	Fri Aug 03 12:07:34 2012 +0100
@@ -56,6 +56,9 @@ do_start () {
 
 	modprobe xen-evtchn 2>/dev/null
 	modprobe xen-gntdev 2>/dev/null
+	modprobe xen-gntalloc 2>/dev/null
+	modprobe xen-blkback 2>/dev/null
+	modprobe xen-netback 2>/dev/null
 	modprobe evtchn 2>/dev/null
 	modprobe gntdev 2>/dev/null
 	modprobe xen-acpi-processor 2>/dev/null

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT0-0005b0-2M; Tue, 07 Aug 2012 20:33:26 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0005Wp-Ox
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Received: from [85.158.138.51:58797] by server-4.bemta-3.messagelabs.com id
	FB/BB-06379-39B71205; Tue, 07 Aug 2012 20:33:23 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-174.messagelabs.com!1344371602!30905208!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24727 invoked from network); 7 Aug 2012 20:33:23 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:23 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-00041h-0w
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSv-0003Lj-Vq
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:21 +0000
Message-Id: <E1SyqSv-0003Lj-Vq@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:21 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/hotplug/Linux/init.d/: load
	other xen kernel modules on xencommons start
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Fabio Fantoni <fabio.fantoni@heliman.it>
# Date 1343992054 -3600
# Node ID a6edbc39fc84904f0be4d9ab60a4e50624d5f7cf
# Parent  a8d708fcb3474b7fc112de37b3064e9213d4de92
tools/hotplug/Linux/init.d/: load other xen kernel modules on xencommons start

Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r a8d708fcb347 -r a6edbc39fc84 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/hotplug/Linux/init.d/xencommons	Fri Aug 03 12:07:34 2012 +0100
@@ -56,6 +56,9 @@ do_start () {
 
 	modprobe xen-evtchn 2>/dev/null
 	modprobe xen-gntdev 2>/dev/null
+	modprobe xen-gntalloc 2>/dev/null
+	modprobe xen-blkback 2>/dev/null
+	modprobe xen-netback 2>/dev/null
 	modprobe evtchn 2>/dev/null
 	modprobe gntdev 2>/dev/null
 	modprobe xen-acpi-processor 2>/dev/null

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:27 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT1-0005cw-JK; Tue, 07 Aug 2012 20:33:27 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-0005Ti-BG
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-27.messagelabs.com!1344371598!4319581!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6455 invoked from network); 7 Aug 2012 20:33:19 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSs-00041M-8i
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSs-0003K2-7V
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:18 +0000
Message-Id: <E1SyqSs-0003K2-7V@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: idl: always initialise the
	KeyedEnum keyvar in the member init function
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984054 -3600
# Node ID 32aa98840f2ba38081d007a919a40efefc62d20a
# Parent  aa93fe2d5a60770c697a44fc9635918417b1f5b5
libxl: idl: always initialise the KeyedEnum keyvar in the member init function

Previously we only initialised it if an explicit keyvar_init_val was
given but not if the default was implicitly 0.

In the generated code this only changes the unused libxl_event_init_type
function:

 void libxl_event_init_type(libxl_event *p, libxl_event_type type)
 {
+    assert(!p->type);
+    p->type = type;
     switch (p->type) {
     case LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN:
         break;

However I think it is wrong that this function is unused, this and
libxl_event_init should be used by libxl__event_new. As it happens
both are just memset to zero but for correctness we should use the
init functions (in case the IDL changes).

In the generator we also need to properly handle init_var == 0 which
the current if statements incorrectly treat as False. This doesn't
actually have any impact on the generated code.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r aa93fe2d5a60 -r 32aa98840f2b tools/libxl/gentypes.py
--- a/tools/libxl/gentypes.py	Fri Aug 03 09:54:14 2012 +0100
+++ b/tools/libxl/gentypes.py	Fri Aug 03 09:54:14 2012 +0100
@@ -162,17 +162,20 @@ def libxl_C_type_member_init(ty, field):
                                 ku.keyvar.type.make_arg(ku.keyvar.name))
     s += "{\n"
     
-    if ku.keyvar.init_val:
+    if ku.keyvar.init_val is not None:
         init_val = ku.keyvar.init_val
-    elif ku.keyvar.type.init_val:
+    elif ku.keyvar.type.init_val is not None:
         init_val = ku.keyvar.type.init_val
     else:
         init_val = None
         
+    (nparent,fexpr) = ty.member(ty.pass_arg("p"), ku.keyvar, isref=True)
     if init_val is not None:
-        (nparent,fexpr) = ty.member(ty.pass_arg("p"), ku.keyvar, isref=True)
         s += "    assert(%s == %s);\n" % (fexpr, init_val)
-        s += "    %s = %s;\n" % (fexpr, ku.keyvar.name)
+    else:
+        s += "    assert(!%s);\n" % (fexpr)
+    s += "    %s = %s;\n" % (fexpr, ku.keyvar.name)
+
     (nparent,fexpr) = ty.member(ty.pass_arg("p"), field, isref=True)
     s += _libxl_C_type_init(ku, fexpr, parent=nparent, subinit=True)
     s += "}\n"
diff -r aa93fe2d5a60 -r 32aa98840f2b tools/libxl/libxl_event.c
--- a/tools/libxl/libxl_event.c	Fri Aug 03 09:54:14 2012 +0100
+++ b/tools/libxl/libxl_event.c	Fri Aug 03 09:54:14 2012 +0100
@@ -1163,7 +1163,10 @@ libxl_event *libxl__event_new(libxl__egc
     libxl_event *ev;
 
     ev = libxl__zalloc(NOGC,sizeof(*ev));
-    ev->type = type;
+
+    libxl_event_init(ev);
+    libxl_event_init_type(ev, type);
+
     ev->domid = domid;
 
     return ev;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:27 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT1-0005cw-JK; Tue, 07 Aug 2012 20:33:27 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-0005Ti-BG
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-27.messagelabs.com!1344371598!4319581!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6455 invoked from network); 7 Aug 2012 20:33:19 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:19 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSs-00041M-8i
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSs-0003K2-7V
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:18 +0000
Message-Id: <E1SyqSs-0003K2-7V@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:17 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: idl: always initialise the
	KeyedEnum keyvar in the member init function
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343984054 -3600
# Node ID 32aa98840f2ba38081d007a919a40efefc62d20a
# Parent  aa93fe2d5a60770c697a44fc9635918417b1f5b5
libxl: idl: always initialise the KeyedEnum keyvar in the member init function

Previously we only initialised it if an explicit keyvar_init_val was
given but not if the default was implicitly 0.

In the generated code this only changes the unused libxl_event_init_type
function:

 void libxl_event_init_type(libxl_event *p, libxl_event_type type)
 {
+    assert(!p->type);
+    p->type = type;
     switch (p->type) {
     case LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN:
         break;

However I think it is wrong that this function is unused, this and
libxl_event_init should be used by libxl__event_new. As it happens
both are just memset to zero but for correctness we should use the
init functions (in case the IDL changes).

In the generator we also need to properly handle init_var == 0 which
the current if statements incorrectly treat as False. This doesn't
actually have any impact on the generated code.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r aa93fe2d5a60 -r 32aa98840f2b tools/libxl/gentypes.py
--- a/tools/libxl/gentypes.py	Fri Aug 03 09:54:14 2012 +0100
+++ b/tools/libxl/gentypes.py	Fri Aug 03 09:54:14 2012 +0100
@@ -162,17 +162,20 @@ def libxl_C_type_member_init(ty, field):
                                 ku.keyvar.type.make_arg(ku.keyvar.name))
     s += "{\n"
     
-    if ku.keyvar.init_val:
+    if ku.keyvar.init_val is not None:
         init_val = ku.keyvar.init_val
-    elif ku.keyvar.type.init_val:
+    elif ku.keyvar.type.init_val is not None:
         init_val = ku.keyvar.type.init_val
     else:
         init_val = None
         
+    (nparent,fexpr) = ty.member(ty.pass_arg("p"), ku.keyvar, isref=True)
     if init_val is not None:
-        (nparent,fexpr) = ty.member(ty.pass_arg("p"), ku.keyvar, isref=True)
         s += "    assert(%s == %s);\n" % (fexpr, init_val)
-        s += "    %s = %s;\n" % (fexpr, ku.keyvar.name)
+    else:
+        s += "    assert(!%s);\n" % (fexpr)
+    s += "    %s = %s;\n" % (fexpr, ku.keyvar.name)
+
     (nparent,fexpr) = ty.member(ty.pass_arg("p"), field, isref=True)
     s += _libxl_C_type_init(ku, fexpr, parent=nparent, subinit=True)
     s += "}\n"
diff -r aa93fe2d5a60 -r 32aa98840f2b tools/libxl/libxl_event.c
--- a/tools/libxl/libxl_event.c	Fri Aug 03 09:54:14 2012 +0100
+++ b/tools/libxl/libxl_event.c	Fri Aug 03 09:54:14 2012 +0100
@@ -1163,7 +1163,10 @@ libxl_event *libxl__event_new(libxl__egc
     libxl_event *ev;
 
     ev = libxl__zalloc(NOGC,sizeof(*ev));
-    ev->type = type;
+
+    libxl_event_init(ev);
+    libxl_event_init_type(ev, type);
+
     ev->domid = domid;
 
     return ev;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:27 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT1-0005cf-DZ; Tue, 07 Aug 2012 20:33:27 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-0005VP-J4
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Received: from [85.158.143.35:34117] by server-3.bemta-4.messagelabs.com id
	F0/E5-01511-59B71205; Tue, 07 Aug 2012 20:33:25 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1344371603!13940794!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4795 invoked from network); 7 Aug 2012 20:33:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:24 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-00041o-2F
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-0003MD-12
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Message-Id: <E1SyqSx-0003MD-12@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:22 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: fix wait code asm() constraints
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344244723 -7200
# Node ID 6221bee07e5dc31d9ed9eb3c0c1c94a80c56c78d
# Parent  6ccad16b50b6b402a98ddfeb9ac6fa7522119778
x86: fix wait code asm() constraints

This fixes theoretical issues with those constraints - operands that
get clobbered before consuming all input operands must be marked so
according the the gcc documentation. Beyond that, the change is merely
code improvement, not a bug fix.

In __prepare_to_wait(), properly mark early clobbered registers. By
doing so, we at once eliminate the need to save/restore rCX and rDI.

In check_wakeup_from_wait(), make the current constraints match by
removing the code that actuall alters registers. By adjusting the
resume address in __prepare_to_wait(), we can simply re-use the copying
operation there (rather than doing a second pointless copy in the
opposite direction after branching to the resume point), which at once
eliminates the need for re-loading rCX and rDI inside the asm().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 6ccad16b50b6 -r 6221bee07e5d xen/common/wait.c
--- a/xen/common/wait.c	Fri Aug 03 12:25:29 2012 +0100
+++ b/xen/common/wait.c	Mon Aug 06 11:18:43 2012 +0200
@@ -126,6 +126,7 @@ static void __prepare_to_wait(struct wai
 {
     char *cpu_info = (char *)get_cpu_info();
     struct vcpu *curr = current;
+    unsigned long dummy;
 
     ASSERT(wqv->esp == 0);
 
@@ -140,27 +141,27 @@ static void __prepare_to_wait(struct wai
 
     asm volatile (
 #ifdef CONFIG_X86_64
-        "push %%rax; push %%rbx; push %%rcx; push %%rdx; push %%rdi; "
+        "push %%rax; push %%rbx; push %%rdx; "
         "push %%rbp; push %%r8; push %%r9; push %%r10; push %%r11; "
         "push %%r12; push %%r13; push %%r14; push %%r15; call 1f; "
-        "1: mov 80(%%rsp),%%rdi; mov 96(%%rsp),%%rcx; mov %%rsp,%%rsi; "
+        "1: mov %%rsp,%%rsi; addq $2f-1b,(%%rsp); "
         "sub %%rsi,%%rcx; cmp %3,%%rcx; jbe 2f; "
         "xor %%esi,%%esi; jmp 3f; "
         "2: rep movsb; mov %%rsp,%%rsi; 3: pop %%rax; "
         "pop %%r15; pop %%r14; pop %%r13; pop %%r12; "
         "pop %%r11; pop %%r10; pop %%r9; pop %%r8; "
-        "pop %%rbp; pop %%rdi; pop %%rdx; pop %%rcx; pop %%rbx; pop %%rax"
+        "pop %%rbp; pop %%rdx; pop %%rbx; pop %%rax"
 #else
-        "push %%eax; push %%ebx; push %%ecx; push %%edx; push %%edi; "
+        "push %%eax; push %%ebx; push %%edx; "
         "push %%ebp; call 1f; "
-        "1: mov 8(%%esp),%%edi; mov 16(%%esp),%%ecx; mov %%esp,%%esi; "
+        "1: mov %%esp,%%esi; addl $2f-1b,(%%esp); "
         "sub %%esi,%%ecx; cmp %3,%%ecx; jbe 2f; "
         "xor %%esi,%%esi; jmp 3f; "
         "2: rep movsb; mov %%esp,%%esi; 3: pop %%eax; "
-        "pop %%ebp; pop %%edi; pop %%edx; pop %%ecx; pop %%ebx; pop %%eax"
+        "pop %%ebp; pop %%edx; pop %%ebx; pop %%eax"
 #endif
-        : "=S" (wqv->esp)
-        : "c" (cpu_info), "D" (wqv->stack), "i" (PAGE_SIZE)
+        : "=&S" (wqv->esp), "=&c" (dummy), "=&D" (dummy)
+        : "i" (PAGE_SIZE), "1" (cpu_info), "2" (wqv->stack)
         : "memory" );
 
     if ( unlikely(wqv->esp == 0) )
@@ -200,7 +201,7 @@ void check_wakeup_from_wait(void)
     }
 
     asm volatile (
-        "mov %1,%%"__OP"sp; rep movsb; jmp *(%%"__OP"sp)"
+        "mov %1,%%"__OP"sp; jmp *(%0)"
         : : "S" (wqv->stack), "D" (wqv->esp),
         "c" ((char *)get_cpu_info() - (char *)wqv->esp)
         : "memory" );

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:27 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT1-0005co-H3; Tue, 07 Aug 2012 20:33:27 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-0005VP-8q
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Received: from [85.158.143.99:37534] by server-3.bemta-4.messagelabs.com id
	32/E5-01511-69B71205; Tue, 07 Aug 2012 20:33:26 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-216.messagelabs.com!1344371602!30751332!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11843 invoked from network); 7 Aug 2012 20:33:23 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:23 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-00041k-Hz
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0003Ly-Gj
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
Message-Id: <E1SyqSw-0003Ly-Gj@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:22 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix cleanup of tap devices in
	libxl__device_destroy
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343993129 -3600
# Node ID 6ccad16b50b6b402a98ddfeb9ac6fa7522119778
# Parent  a6edbc39fc84904f0be4d9ab60a4e50624d5f7cf
libxl: fix cleanup of tap devices in libxl__device_destroy

We pass be_path to tapdisk_destroy but we've already deleted it so it
fails to read tapdisk-params. However it appears that we need to
destroy the tap device after tearing down xenstore, to avoid the leak
reported by Greg Wettstein in
<201207312141.q6VLfJje012656@wind.enjellic.com>.

So read the tapdisk-params in the cleanup transaction, before the
remove, and pass that down to destroy_tapdisk instead. tapdisk-params
may of course be NULL if the device isn't a tap device.

There is no need to tear down the tap device from
libxl__initiate_device_remove since this ultimately calls
libxl__device_destroy.

Propagate and log errors from libxl__device_destroy_tapdisk.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r a6edbc39fc84 -r 6ccad16b50b6 tools/libxl/libxl_blktap2.c
--- a/tools/libxl/libxl_blktap2.c	Fri Aug 03 12:07:34 2012 +0100
+++ b/tools/libxl/libxl_blktap2.c	Fri Aug 03 12:25:29 2012 +0100
@@ -51,28 +51,37 @@ char *libxl__blktap_devpath(libxl__gc *g
 }
 
 
-void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path)
+int libxl__device_destroy_tapdisk(libxl__gc *gc, const char *params)
 {
-    char *path, *params, *type, *disk;
+    char *type, *disk;
     int err;
     tap_list_t tap;
 
-    path = libxl__sprintf(gc, "%s/tapdisk-params", be_path);
-    if (!path) return;
+    type = libxl__strdup(gc, params);
 
-    params = libxl__xs_read(gc, XBT_NULL, path);
-    if (!params) return;
-
-    type = params;
-    disk = strchr(params, ':');
-    if (!disk) return;
+    disk = strchr(type, ':');
+    if (!disk) {
+        LOG(ERROR, "Unable to parse params %s", params);
+        return ERROR_INVAL;
+    }
 
     *disk++ = '\0';
 
     err = tap_ctl_find(type, disk, &tap);
-    if (err < 0) return;
+    if (err < 0) {
+        /* returns -errno */
+        LOGEV(ERROR, -err, "Unable to find type %s disk %s", type, disk);
+        return ERROR_FAIL;
+    }
 
-    tap_ctl_destroy(tap.id, tap.minor);
+    err = tap_ctl_destroy(tap.id, tap.minor);
+    if (err < 0) {
+        LOGEV(ERROR, -err, "Failed to destroy tap device id %d minor %d",
+              tap.id, tap.minor);
+        return ERROR_FAIL;
+    }
+
+    return 0;
 }
 
 /*
diff -r a6edbc39fc84 -r 6ccad16b50b6 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 12:07:34 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 12:25:29 2012 +0100
@@ -522,8 +522,10 @@ DEFINE_DEVICES_ADD(nic)
 
 int libxl__device_destroy(libxl__gc *gc, libxl__device *dev)
 {
-    char *be_path = libxl__device_backend_path(gc, dev);
+    const char *be_path = libxl__device_backend_path(gc, dev);
     const char *fe_path = libxl__device_frontend_path(gc, dev);
+    const char *tapdisk_path = GCSPRINTF("%s/%s", be_path, "tapdisk-params");
+    const char *tapdisk_params;
     xs_transaction_t t = 0;
     int rc;
 
@@ -531,6 +533,10 @@ int libxl__device_destroy(libxl__gc *gc,
         rc = libxl__xs_transaction_start(gc, &t);
         if (rc) goto out;
 
+        /* May not exist if this is not a tap device */
+        rc = libxl__xs_read_checked(gc, t, tapdisk_path, &tapdisk_params);
+        if (rc) goto out;
+
         libxl__xs_path_cleanup(gc, t, fe_path);
         libxl__xs_path_cleanup(gc, t, be_path);
 
@@ -539,7 +545,8 @@ int libxl__device_destroy(libxl__gc *gc,
         if (rc < 0) goto out;
     }
 
-    libxl__device_destroy_tapdisk(gc, be_path);
+    if (tapdisk_params)
+        rc = libxl__device_destroy_tapdisk(gc, tapdisk_params);
 
 out:
     libxl__xs_transaction_abort(gc, &t);
@@ -790,8 +797,6 @@ void libxl__initiate_device_remove(libxl
         if (rc < 0) goto out;
     }
 
-    libxl__device_destroy_tapdisk(gc, be_path);
-
     rc = libxl__ev_devstate_wait(gc, &aodev->backend_ds,
                                  device_backend_callback,
                                  state_path, XenbusStateClosed,
diff -r a6edbc39fc84 -r 6ccad16b50b6 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 12:07:34 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 12:25:29 2012 +0100
@@ -1344,8 +1344,9 @@ _hidden char *libxl__blktap_devpath(libx
 /* libxl__device_destroy_tapdisk:
  *   Destroys any tapdisk process associated with the backend represented
  *   by be_path.
+ *   Always logs on failure.
  */
-_hidden void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path);
+_hidden int libxl__device_destroy_tapdisk(libxl__gc *gc, const char *params);
 
 _hidden int libxl__device_from_disk(libxl__gc *gc, uint32_t domid,
                                    libxl_device_disk *disk,
diff -r a6edbc39fc84 -r 6ccad16b50b6 tools/libxl/libxl_noblktap2.c
--- a/tools/libxl/libxl_noblktap2.c	Fri Aug 03 12:07:34 2012 +0100
+++ b/tools/libxl/libxl_noblktap2.c	Fri Aug 03 12:25:29 2012 +0100
@@ -28,8 +28,9 @@ char *libxl__blktap_devpath(libxl__gc *g
     return NULL;
 }
 
-void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path)
+int libxl__device_destroy_tapdisk(libxl__gc *gc, const char *params)
 {
+    return 0;
 }
 
 /*

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:27 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT1-0005cf-DZ; Tue, 07 Aug 2012 20:33:27 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-0005VP-J4
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Received: from [85.158.143.35:34117] by server-3.bemta-4.messagelabs.com id
	F0/E5-01511-59B71205; Tue, 07 Aug 2012 20:33:25 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1344371603!13940794!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4795 invoked from network); 7 Aug 2012 20:33:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:24 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-00041o-2F
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-0003MD-12
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Message-Id: <E1SyqSx-0003MD-12@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:22 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: fix wait code asm() constraints
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344244723 -7200
# Node ID 6221bee07e5dc31d9ed9eb3c0c1c94a80c56c78d
# Parent  6ccad16b50b6b402a98ddfeb9ac6fa7522119778
x86: fix wait code asm() constraints

This fixes theoretical issues with those constraints - operands that
get clobbered before consuming all input operands must be marked so
according the the gcc documentation. Beyond that, the change is merely
code improvement, not a bug fix.

In __prepare_to_wait(), properly mark early clobbered registers. By
doing so, we at once eliminate the need to save/restore rCX and rDI.

In check_wakeup_from_wait(), make the current constraints match by
removing the code that actuall alters registers. By adjusting the
resume address in __prepare_to_wait(), we can simply re-use the copying
operation there (rather than doing a second pointless copy in the
opposite direction after branching to the resume point), which at once
eliminates the need for re-loading rCX and rDI inside the asm().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 6ccad16b50b6 -r 6221bee07e5d xen/common/wait.c
--- a/xen/common/wait.c	Fri Aug 03 12:25:29 2012 +0100
+++ b/xen/common/wait.c	Mon Aug 06 11:18:43 2012 +0200
@@ -126,6 +126,7 @@ static void __prepare_to_wait(struct wai
 {
     char *cpu_info = (char *)get_cpu_info();
     struct vcpu *curr = current;
+    unsigned long dummy;
 
     ASSERT(wqv->esp == 0);
 
@@ -140,27 +141,27 @@ static void __prepare_to_wait(struct wai
 
     asm volatile (
 #ifdef CONFIG_X86_64
-        "push %%rax; push %%rbx; push %%rcx; push %%rdx; push %%rdi; "
+        "push %%rax; push %%rbx; push %%rdx; "
         "push %%rbp; push %%r8; push %%r9; push %%r10; push %%r11; "
         "push %%r12; push %%r13; push %%r14; push %%r15; call 1f; "
-        "1: mov 80(%%rsp),%%rdi; mov 96(%%rsp),%%rcx; mov %%rsp,%%rsi; "
+        "1: mov %%rsp,%%rsi; addq $2f-1b,(%%rsp); "
         "sub %%rsi,%%rcx; cmp %3,%%rcx; jbe 2f; "
         "xor %%esi,%%esi; jmp 3f; "
         "2: rep movsb; mov %%rsp,%%rsi; 3: pop %%rax; "
         "pop %%r15; pop %%r14; pop %%r13; pop %%r12; "
         "pop %%r11; pop %%r10; pop %%r9; pop %%r8; "
-        "pop %%rbp; pop %%rdi; pop %%rdx; pop %%rcx; pop %%rbx; pop %%rax"
+        "pop %%rbp; pop %%rdx; pop %%rbx; pop %%rax"
 #else
-        "push %%eax; push %%ebx; push %%ecx; push %%edx; push %%edi; "
+        "push %%eax; push %%ebx; push %%edx; "
         "push %%ebp; call 1f; "
-        "1: mov 8(%%esp),%%edi; mov 16(%%esp),%%ecx; mov %%esp,%%esi; "
+        "1: mov %%esp,%%esi; addl $2f-1b,(%%esp); "
         "sub %%esi,%%ecx; cmp %3,%%ecx; jbe 2f; "
         "xor %%esi,%%esi; jmp 3f; "
         "2: rep movsb; mov %%esp,%%esi; 3: pop %%eax; "
-        "pop %%ebp; pop %%edi; pop %%edx; pop %%ecx; pop %%ebx; pop %%eax"
+        "pop %%ebp; pop %%edx; pop %%ebx; pop %%eax"
 #endif
-        : "=S" (wqv->esp)
-        : "c" (cpu_info), "D" (wqv->stack), "i" (PAGE_SIZE)
+        : "=&S" (wqv->esp), "=&c" (dummy), "=&D" (dummy)
+        : "i" (PAGE_SIZE), "1" (cpu_info), "2" (wqv->stack)
         : "memory" );
 
     if ( unlikely(wqv->esp == 0) )
@@ -200,7 +201,7 @@ void check_wakeup_from_wait(void)
     }
 
     asm volatile (
-        "mov %1,%%"__OP"sp; rep movsb; jmp *(%%"__OP"sp)"
+        "mov %1,%%"__OP"sp; jmp *(%0)"
         : : "S" (wqv->stack), "D" (wqv->esp),
         "c" ((char *)get_cpu_info() - (char *)wqv->esp)
         : "memory" );

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:27 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT1-0005co-H3; Tue, 07 Aug 2012 20:33:27 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-0005VP-8q
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Received: from [85.158.143.99:37534] by server-3.bemta-4.messagelabs.com id
	32/E5-01511-69B71205; Tue, 07 Aug 2012 20:33:26 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-216.messagelabs.com!1344371602!30751332!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11843 invoked from network); 7 Aug 2012 20:33:23 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:23 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-00041k-Hz
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSw-0003Ly-Gj
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:22 +0000
Message-Id: <E1SyqSw-0003Ly-Gj@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:22 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix cleanup of tap devices in
	libxl__device_destroy
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343993129 -3600
# Node ID 6ccad16b50b6b402a98ddfeb9ac6fa7522119778
# Parent  a6edbc39fc84904f0be4d9ab60a4e50624d5f7cf
libxl: fix cleanup of tap devices in libxl__device_destroy

We pass be_path to tapdisk_destroy but we've already deleted it so it
fails to read tapdisk-params. However it appears that we need to
destroy the tap device after tearing down xenstore, to avoid the leak
reported by Greg Wettstein in
<201207312141.q6VLfJje012656@wind.enjellic.com>.

So read the tapdisk-params in the cleanup transaction, before the
remove, and pass that down to destroy_tapdisk instead. tapdisk-params
may of course be NULL if the device isn't a tap device.

There is no need to tear down the tap device from
libxl__initiate_device_remove since this ultimately calls
libxl__device_destroy.

Propagate and log errors from libxl__device_destroy_tapdisk.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r a6edbc39fc84 -r 6ccad16b50b6 tools/libxl/libxl_blktap2.c
--- a/tools/libxl/libxl_blktap2.c	Fri Aug 03 12:07:34 2012 +0100
+++ b/tools/libxl/libxl_blktap2.c	Fri Aug 03 12:25:29 2012 +0100
@@ -51,28 +51,37 @@ char *libxl__blktap_devpath(libxl__gc *g
 }
 
 
-void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path)
+int libxl__device_destroy_tapdisk(libxl__gc *gc, const char *params)
 {
-    char *path, *params, *type, *disk;
+    char *type, *disk;
     int err;
     tap_list_t tap;
 
-    path = libxl__sprintf(gc, "%s/tapdisk-params", be_path);
-    if (!path) return;
+    type = libxl__strdup(gc, params);
 
-    params = libxl__xs_read(gc, XBT_NULL, path);
-    if (!params) return;
-
-    type = params;
-    disk = strchr(params, ':');
-    if (!disk) return;
+    disk = strchr(type, ':');
+    if (!disk) {
+        LOG(ERROR, "Unable to parse params %s", params);
+        return ERROR_INVAL;
+    }
 
     *disk++ = '\0';
 
     err = tap_ctl_find(type, disk, &tap);
-    if (err < 0) return;
+    if (err < 0) {
+        /* returns -errno */
+        LOGEV(ERROR, -err, "Unable to find type %s disk %s", type, disk);
+        return ERROR_FAIL;
+    }
 
-    tap_ctl_destroy(tap.id, tap.minor);
+    err = tap_ctl_destroy(tap.id, tap.minor);
+    if (err < 0) {
+        LOGEV(ERROR, -err, "Failed to destroy tap device id %d minor %d",
+              tap.id, tap.minor);
+        return ERROR_FAIL;
+    }
+
+    return 0;
 }
 
 /*
diff -r a6edbc39fc84 -r 6ccad16b50b6 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 12:07:34 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 12:25:29 2012 +0100
@@ -522,8 +522,10 @@ DEFINE_DEVICES_ADD(nic)
 
 int libxl__device_destroy(libxl__gc *gc, libxl__device *dev)
 {
-    char *be_path = libxl__device_backend_path(gc, dev);
+    const char *be_path = libxl__device_backend_path(gc, dev);
     const char *fe_path = libxl__device_frontend_path(gc, dev);
+    const char *tapdisk_path = GCSPRINTF("%s/%s", be_path, "tapdisk-params");
+    const char *tapdisk_params;
     xs_transaction_t t = 0;
     int rc;
 
@@ -531,6 +533,10 @@ int libxl__device_destroy(libxl__gc *gc,
         rc = libxl__xs_transaction_start(gc, &t);
         if (rc) goto out;
 
+        /* May not exist if this is not a tap device */
+        rc = libxl__xs_read_checked(gc, t, tapdisk_path, &tapdisk_params);
+        if (rc) goto out;
+
         libxl__xs_path_cleanup(gc, t, fe_path);
         libxl__xs_path_cleanup(gc, t, be_path);
 
@@ -539,7 +545,8 @@ int libxl__device_destroy(libxl__gc *gc,
         if (rc < 0) goto out;
     }
 
-    libxl__device_destroy_tapdisk(gc, be_path);
+    if (tapdisk_params)
+        rc = libxl__device_destroy_tapdisk(gc, tapdisk_params);
 
 out:
     libxl__xs_transaction_abort(gc, &t);
@@ -790,8 +797,6 @@ void libxl__initiate_device_remove(libxl
         if (rc < 0) goto out;
     }
 
-    libxl__device_destroy_tapdisk(gc, be_path);
-
     rc = libxl__ev_devstate_wait(gc, &aodev->backend_ds,
                                  device_backend_callback,
                                  state_path, XenbusStateClosed,
diff -r a6edbc39fc84 -r 6ccad16b50b6 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Fri Aug 03 12:07:34 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Fri Aug 03 12:25:29 2012 +0100
@@ -1344,8 +1344,9 @@ _hidden char *libxl__blktap_devpath(libx
 /* libxl__device_destroy_tapdisk:
  *   Destroys any tapdisk process associated with the backend represented
  *   by be_path.
+ *   Always logs on failure.
  */
-_hidden void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path);
+_hidden int libxl__device_destroy_tapdisk(libxl__gc *gc, const char *params);
 
 _hidden int libxl__device_from_disk(libxl__gc *gc, uint32_t domid,
                                    libxl_device_disk *disk,
diff -r a6edbc39fc84 -r 6ccad16b50b6 tools/libxl/libxl_noblktap2.c
--- a/tools/libxl/libxl_noblktap2.c	Fri Aug 03 12:07:34 2012 +0100
+++ b/tools/libxl/libxl_noblktap2.c	Fri Aug 03 12:25:29 2012 +0100
@@ -28,8 +28,9 @@ char *libxl__blktap_devpath(libxl__gc *g
     return NULL;
 }
 
-void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path)
+int libxl__device_destroy_tapdisk(libxl__gc *gc, const char *params)
 {
+    return 0;
 }
 
 /*

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:29 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:29 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT2-0005eh-Ls; Tue, 07 Aug 2012 20:33:28 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT1-0005Qw-9V
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:27 +0000
Received: from [85.158.143.35:5703] by server-2.bemta-4.messagelabs.com id
	C9/26-17938-79B71205; Tue, 07 Aug 2012 20:33:27 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-21.messagelabs.com!1344371601!11349912!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19727 invoked from network); 7 Aug 2012 20:33:22 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:22 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-00041b-Tz
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-0003LF-Sl
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Message-Id: <E1SyqSu-0003LF-Sl@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:20 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: correct some comments
	regarding event API and fds
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1343991430 -3600
# Node ID 4a1dde3b9dfe4572d222847cbe37a355d81b1986
# Parent  9ad379939b78769a9368123989bb0736096fc6ab
libxl: correct some comments regarding event API and fds

* libxl may indeed register more than one callback for the same fd,
  with some restrictions.  The allowable range of responses to this by
  the application means that this should pose no problems for users.
  But the documentation comment should be fixed.

* Document the relaxed synchronicity semantics of the fd_modify
  registration callback.

* A couple of comments referred to old names for functions.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 9ad379939b78 -r 4a1dde3b9dfe tools/libxl/libxl_event.h
--- a/tools/libxl/libxl_event.h	Fri Aug 03 10:38:04 2012 +0100
+++ b/tools/libxl/libxl_event.h	Fri Aug 03 11:57:10 2012 +0100
@@ -320,13 +320,24 @@ typedef struct libxl_osevent_hooks {
  * *for_registration_update is honoured by libxl and will be passed
  * to future modify or deregister calls.
  *
- * libxl will only attempt to register one callback for any one fd.
+ * libxl may want to register more than one callback for any one fd;
+ * in that case: (i) each such registration will have at least one bit
+ * set in revents which is unique to that registration; (ii) if an
+ * event occurs which is relevant for multiple registrations the
+ * application's event system may call libxl_osevent_occurred_fd
+ * for one, some, or all of those registrations.
+ *
+ * If fd_modify is used, it is permitted for the application's event
+ * system to still make calls to libxl_osevent_occurred_fd for the
+ * "old" set of requested events; these will be safely ignored by
+ * libxl.
+ *
  * libxl will remember the value stored in *for_app_registration_out
  * (or *for_app_registration_update) by a successful call to
  * register (or modify), and pass it to subsequent calls to modify
  * or deregister.
  *
- * register_fd_hooks may be called only once for each libxl_ctx.
+ * osevent_register_hooks may be called only once for each libxl_ctx.
  * libxl may make calls to register/modify/deregister from within
  * any libxl function (indeed, it will usually call register from
  * register_event_hooks).  Conversely, the application MUST NOT make
@@ -357,7 +368,7 @@ void libxl_osevent_register_hooks(libxl_
 /* It is NOT legal to call _occurred_ reentrantly within any libxl
  * function.  Specifically it is NOT legal to call it from within
  * a register callback.  Conversely, libxl MAY call register/deregister
- * from within libxl_event_registered_call_*.
+ * from within libxl_event_occurred_call_*.
  */
 
 void libxl_osevent_occurred_fd(libxl_ctx *ctx, void *for_libxl,

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:29 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:29 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT2-0005eh-Ls; Tue, 07 Aug 2012 20:33:28 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT1-0005Qw-9V
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:27 +0000
Received: from [85.158.143.35:5703] by server-2.bemta-4.messagelabs.com id
	C9/26-17938-79B71205; Tue, 07 Aug 2012 20:33:27 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-21.messagelabs.com!1344371601!11349912!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19727 invoked from network); 7 Aug 2012 20:33:22 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:22 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-00041b-Tz
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSu-0003LF-Sl
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:20 +0000
Message-Id: <E1SyqSu-0003LF-Sl@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:20 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: correct some comments
	regarding event API and fds
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1343991430 -3600
# Node ID 4a1dde3b9dfe4572d222847cbe37a355d81b1986
# Parent  9ad379939b78769a9368123989bb0736096fc6ab
libxl: correct some comments regarding event API and fds

* libxl may indeed register more than one callback for the same fd,
  with some restrictions.  The allowable range of responses to this by
  the application means that this should pose no problems for users.
  But the documentation comment should be fixed.

* Document the relaxed synchronicity semantics of the fd_modify
  registration callback.

* A couple of comments referred to old names for functions.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 9ad379939b78 -r 4a1dde3b9dfe tools/libxl/libxl_event.h
--- a/tools/libxl/libxl_event.h	Fri Aug 03 10:38:04 2012 +0100
+++ b/tools/libxl/libxl_event.h	Fri Aug 03 11:57:10 2012 +0100
@@ -320,13 +320,24 @@ typedef struct libxl_osevent_hooks {
  * *for_registration_update is honoured by libxl and will be passed
  * to future modify or deregister calls.
  *
- * libxl will only attempt to register one callback for any one fd.
+ * libxl may want to register more than one callback for any one fd;
+ * in that case: (i) each such registration will have at least one bit
+ * set in revents which is unique to that registration; (ii) if an
+ * event occurs which is relevant for multiple registrations the
+ * application's event system may call libxl_osevent_occurred_fd
+ * for one, some, or all of those registrations.
+ *
+ * If fd_modify is used, it is permitted for the application's event
+ * system to still make calls to libxl_osevent_occurred_fd for the
+ * "old" set of requested events; these will be safely ignored by
+ * libxl.
+ *
  * libxl will remember the value stored in *for_app_registration_out
  * (or *for_app_registration_update) by a successful call to
  * register (or modify), and pass it to subsequent calls to modify
  * or deregister.
  *
- * register_fd_hooks may be called only once for each libxl_ctx.
+ * osevent_register_hooks may be called only once for each libxl_ctx.
  * libxl may make calls to register/modify/deregister from within
  * any libxl function (indeed, it will usually call register from
  * register_event_hooks).  Conversely, the application MUST NOT make
@@ -357,7 +368,7 @@ void libxl_osevent_register_hooks(libxl_
 /* It is NOT legal to call _occurred_ reentrantly within any libxl
  * function.  Specifically it is NOT legal to call it from within
  * a register callback.  Conversely, libxl MAY call register/deregister
- * from within libxl_event_registered_call_*.
+ * from within libxl_event_occurred_call_*.
  */
 
 void libxl_osevent_occurred_fd(libxl_ctx *ctx, void *for_libxl,

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:30 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:30 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT3-0005fr-OW; Tue, 07 Aug 2012 20:33:29 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT1-0005Wp-Sv
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:28 +0000
Received: from [85.158.138.51:58947] by server-4.bemta-3.messagelabs.com id
	D6/CB-06379-79B71205; Tue, 07 Aug 2012 20:33:27 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1344371605!26853189!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23424 invoked from network); 7 Aug 2012 20:33:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:26 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-00042H-AM
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-0003NC-94
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Message-Id: <E1SyqSz-0003NC-94@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:24 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/MCE: remove mcg_ctl and other
	adjustment for future vMCE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Liu, Jinsong <jinsong.liu@intel.com>
# Date 1344320197 -7200
# Node ID a5f4efac996f030ba2f572b93ddbbcd1eff5ade7
# Parent  353bc0801b11ee28855cad50ffc7b8afe0efa556
x86/MCE: remove mcg_ctl and other adjustment for future vMCE

This is a middle-work patch, preparing for the future new vMCE model.
It removes mcg_ctl, disables MCG_CTL_P, and sets bank count to 2.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 353bc0801b11 -r a5f4efac996f xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c	Mon Aug 06 12:28:03 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.c	Tue Aug 07 08:16:37 2012 +0200
@@ -843,8 +843,6 @@ void mcheck_init(struct cpuinfo_x86 *c, 
 
     mctelem_init(sizeof(struct mc_info));
 
-    vmce_init(c);
-
     /* Turn on MCE now */
     set_in_cr4(X86_CR4_MCE);
 
diff -r 353bc0801b11 -r a5f4efac996f xen/arch/x86/cpu/mcheck/mce.h
--- a/xen/arch/x86/cpu/mcheck/mce.h	Mon Aug 06 12:28:03 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.h	Tue Aug 07 08:16:37 2012 +0200
@@ -170,8 +170,6 @@ int fill_vmsr_data(struct mcinfo_bank *m
 int inject_vmce(struct domain *d);
 int vmce_domain_inject(struct mcinfo_bank *bank, struct domain *d, struct mcinfo_global *global);
 
-extern int vmce_init(struct cpuinfo_x86 *c);
-
 static inline int mce_vendor_bank_msr(const struct vcpu *v, uint32_t msr)
 {
     if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
diff -r 353bc0801b11 -r a5f4efac996f xen/arch/x86/cpu/mcheck/vmce.c
--- a/xen/arch/x86/cpu/mcheck/vmce.c	Mon Aug 06 12:28:03 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/vmce.c	Tue Aug 07 08:16:37 2012 +0200
@@ -19,13 +19,18 @@
 #include "mce.h"
 #include "x86_mca.h"
 
+/*
+ * Emulate 2 banks for guest
+ * Bank0: reserved for 'bank0 quirk' occur at some very old processors:
+ *   1). Intel cpu whose family-model value < 06-1A;
+ *   2). AMD K7
+ * Bank1: used to transfer error info to guest
+ */
+#define GUEST_BANK_NUM 2
+#define GUEST_MCG_CAP (MCG_TES_P | MCG_SER_P | GUEST_BANK_NUM)
+
 #define dom_vmce(x)   ((x)->arch.vmca_msrs)
 
-static uint64_t __read_mostly g_mcg_cap;
-
-/* Real value in physical CTL MSR */
-static uint64_t __read_mostly h_mcg_ctl;
-
 int vmce_init_msr(struct domain *d)
 {
     dom_vmce(d) = xmalloc(struct domain_mca_msrs);
@@ -33,7 +38,6 @@ int vmce_init_msr(struct domain *d)
         return -ENOMEM;
 
     dom_vmce(d)->mcg_status = 0x0;
-    dom_vmce(d)->mcg_ctl = ~(uint64_t)0x0;
     dom_vmce(d)->nr_injection = 0;
 
     INIT_LIST_HEAD(&dom_vmce(d)->impact_header);
@@ -52,17 +56,17 @@ void vmce_destroy_msr(struct domain *d)
 
 void vmce_init_vcpu(struct vcpu *v)
 {
-    v->arch.mcg_cap = g_mcg_cap;
+    v->arch.mcg_cap = GUEST_MCG_CAP;
 }
 
 int vmce_restore_vcpu(struct vcpu *v, uint64_t caps)
 {
-    if ( caps & ~g_mcg_cap & ~MCG_CAP_COUNT & ~MCG_CTL_P )
+    if ( caps & ~GUEST_MCG_CAP & ~MCG_CAP_COUNT & ~MCG_CTL_P )
     {
         dprintk(XENLOG_G_ERR, "%s restore: unsupported MCA capabilities"
                 " %#" PRIx64 " for d%d:v%u (supported: %#Lx)\n",
                 is_hvm_vcpu(v) ? "HVM" : "PV", caps, v->domain->domain_id,
-                v->vcpu_id, g_mcg_cap & ~MCG_CAP_COUNT);
+                v->vcpu_id, GUEST_MCG_CAP & ~MCG_CAP_COUNT);
         return -EPERM;
     }
 
@@ -175,11 +179,10 @@ int vmce_rdmsr(uint32_t msr, uint64_t *v
                    *val);
         break;
     case MSR_IA32_MCG_CTL:
-        /* Always 0 if no CTL support */
+        /* Stick all 1's when CTL support, and 0's when no CTL support */
         if ( cur->arch.mcg_cap & MCG_CTL_P )
-            *val = vmce->mcg_ctl & h_mcg_ctl;
-        mce_printk(MCE_VERBOSE, "MCE: rdmsr MCG_CTL 0x%"PRIx64"\n",
-                   *val);
+            *val = ~0ULL;
+        mce_printk(MCE_VERBOSE, "MCE: rdmsr MCG_CTL 0x%"PRIx64"\n", *val);
         break;
     default:
         ret = mce_bank_msr(cur, msr) ? bank_mce_rdmsr(cur, msr, val) : 0;
@@ -287,15 +290,11 @@ int vmce_wrmsr(u32 msr, u64 val)
     struct domain_mca_msrs *vmce = dom_vmce(cur->domain);
     int ret = 1;
 
-    if ( !g_mcg_cap )
-        return 0;
-
     spin_lock(&vmce->lock);
 
     switch ( msr )
     {
     case MSR_IA32_MCG_CTL:
-        vmce->mcg_ctl = val;
         break;
     case MSR_IA32_MCG_STATUS:
         vmce->mcg_status = val;
@@ -510,31 +509,6 @@ int vmce_domain_inject(
 }
 #endif
 
-int vmce_init(struct cpuinfo_x86 *c)
-{
-    u64 value;
-
-    rdmsrl(MSR_IA32_MCG_CAP, value);
-    /* For Guest vMCE usage */
-    g_mcg_cap = value & (MCG_CAP_COUNT | MCG_CTL_P | MCG_TES_P | MCG_SER_P);
-    if (value & MCG_CTL_P)
-        rdmsrl(MSR_IA32_MCG_CTL, h_mcg_ctl);
-
-    return 0;
-}
-
-static int mca_ctl_conflict(struct mcinfo_bank *bank, struct domain *d)
-{
-    if ( !bank || !d )
-        return 1;
-
-    /* Will MCE happen in host if If host mcg_ctl is 0? */
-    if ( ~d->arch.vmca_msrs->mcg_ctl & h_mcg_ctl )
-        return 1;
-
-    return 0;
-}
-
 static int is_hvm_vmce_ready(struct mcinfo_bank *bank, struct domain *d)
 {
     struct vcpu *v;
@@ -588,14 +562,6 @@ static int is_hvm_vmce_ready(struct mcin
     if (no_vmce)
         return 0;
 
-    /* Guest has different MCE ctl value setting */
-    if (mca_ctl_conflict(bank, d))
-    {
-        dprintk(XENLOG_WARNING,
-          "No vmce, guest has different mca control setting\n");
-        return 0;
-    }
-
     return 1;
 }
 
diff -r 353bc0801b11 -r a5f4efac996f xen/include/asm-x86/mce.h
--- a/xen/include/asm-x86/mce.h	Mon Aug 06 12:28:03 2012 +0100
+++ b/xen/include/asm-x86/mce.h	Tue Aug 07 08:16:37 2012 +0200
@@ -16,7 +16,6 @@ struct bank_entry {
 struct domain_mca_msrs
 {
     /* Guest should not change below values after DOM boot up */
-    uint64_t mcg_ctl;
     uint64_t mcg_status;
     uint16_t nr_injection;
     struct list_head impact_header;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:30 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:30 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT3-0005fr-OW; Tue, 07 Aug 2012 20:33:29 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT1-0005Wp-Sv
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:28 +0000
Received: from [85.158.138.51:58947] by server-4.bemta-3.messagelabs.com id
	D6/CB-06379-79B71205; Tue, 07 Aug 2012 20:33:27 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1344371605!26853189!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23424 invoked from network); 7 Aug 2012 20:33:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:26 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-00042H-AM
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-0003NC-94
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Message-Id: <E1SyqSz-0003NC-94@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:24 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/MCE: remove mcg_ctl and other
	adjustment for future vMCE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Liu, Jinsong <jinsong.liu@intel.com>
# Date 1344320197 -7200
# Node ID a5f4efac996f030ba2f572b93ddbbcd1eff5ade7
# Parent  353bc0801b11ee28855cad50ffc7b8afe0efa556
x86/MCE: remove mcg_ctl and other adjustment for future vMCE

This is a middle-work patch, preparing for the future new vMCE model.
It removes mcg_ctl, disables MCG_CTL_P, and sets bank count to 2.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 353bc0801b11 -r a5f4efac996f xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c	Mon Aug 06 12:28:03 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.c	Tue Aug 07 08:16:37 2012 +0200
@@ -843,8 +843,6 @@ void mcheck_init(struct cpuinfo_x86 *c, 
 
     mctelem_init(sizeof(struct mc_info));
 
-    vmce_init(c);
-
     /* Turn on MCE now */
     set_in_cr4(X86_CR4_MCE);
 
diff -r 353bc0801b11 -r a5f4efac996f xen/arch/x86/cpu/mcheck/mce.h
--- a/xen/arch/x86/cpu/mcheck/mce.h	Mon Aug 06 12:28:03 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.h	Tue Aug 07 08:16:37 2012 +0200
@@ -170,8 +170,6 @@ int fill_vmsr_data(struct mcinfo_bank *m
 int inject_vmce(struct domain *d);
 int vmce_domain_inject(struct mcinfo_bank *bank, struct domain *d, struct mcinfo_global *global);
 
-extern int vmce_init(struct cpuinfo_x86 *c);
-
 static inline int mce_vendor_bank_msr(const struct vcpu *v, uint32_t msr)
 {
     if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
diff -r 353bc0801b11 -r a5f4efac996f xen/arch/x86/cpu/mcheck/vmce.c
--- a/xen/arch/x86/cpu/mcheck/vmce.c	Mon Aug 06 12:28:03 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/vmce.c	Tue Aug 07 08:16:37 2012 +0200
@@ -19,13 +19,18 @@
 #include "mce.h"
 #include "x86_mca.h"
 
+/*
+ * Emulate 2 banks for guest
+ * Bank0: reserved for 'bank0 quirk' occur at some very old processors:
+ *   1). Intel cpu whose family-model value < 06-1A;
+ *   2). AMD K7
+ * Bank1: used to transfer error info to guest
+ */
+#define GUEST_BANK_NUM 2
+#define GUEST_MCG_CAP (MCG_TES_P | MCG_SER_P | GUEST_BANK_NUM)
+
 #define dom_vmce(x)   ((x)->arch.vmca_msrs)
 
-static uint64_t __read_mostly g_mcg_cap;
-
-/* Real value in physical CTL MSR */
-static uint64_t __read_mostly h_mcg_ctl;
-
 int vmce_init_msr(struct domain *d)
 {
     dom_vmce(d) = xmalloc(struct domain_mca_msrs);
@@ -33,7 +38,6 @@ int vmce_init_msr(struct domain *d)
         return -ENOMEM;
 
     dom_vmce(d)->mcg_status = 0x0;
-    dom_vmce(d)->mcg_ctl = ~(uint64_t)0x0;
     dom_vmce(d)->nr_injection = 0;
 
     INIT_LIST_HEAD(&dom_vmce(d)->impact_header);
@@ -52,17 +56,17 @@ void vmce_destroy_msr(struct domain *d)
 
 void vmce_init_vcpu(struct vcpu *v)
 {
-    v->arch.mcg_cap = g_mcg_cap;
+    v->arch.mcg_cap = GUEST_MCG_CAP;
 }
 
 int vmce_restore_vcpu(struct vcpu *v, uint64_t caps)
 {
-    if ( caps & ~g_mcg_cap & ~MCG_CAP_COUNT & ~MCG_CTL_P )
+    if ( caps & ~GUEST_MCG_CAP & ~MCG_CAP_COUNT & ~MCG_CTL_P )
     {
         dprintk(XENLOG_G_ERR, "%s restore: unsupported MCA capabilities"
                 " %#" PRIx64 " for d%d:v%u (supported: %#Lx)\n",
                 is_hvm_vcpu(v) ? "HVM" : "PV", caps, v->domain->domain_id,
-                v->vcpu_id, g_mcg_cap & ~MCG_CAP_COUNT);
+                v->vcpu_id, GUEST_MCG_CAP & ~MCG_CAP_COUNT);
         return -EPERM;
     }
 
@@ -175,11 +179,10 @@ int vmce_rdmsr(uint32_t msr, uint64_t *v
                    *val);
         break;
     case MSR_IA32_MCG_CTL:
-        /* Always 0 if no CTL support */
+        /* Stick all 1's when CTL support, and 0's when no CTL support */
         if ( cur->arch.mcg_cap & MCG_CTL_P )
-            *val = vmce->mcg_ctl & h_mcg_ctl;
-        mce_printk(MCE_VERBOSE, "MCE: rdmsr MCG_CTL 0x%"PRIx64"\n",
-                   *val);
+            *val = ~0ULL;
+        mce_printk(MCE_VERBOSE, "MCE: rdmsr MCG_CTL 0x%"PRIx64"\n", *val);
         break;
     default:
         ret = mce_bank_msr(cur, msr) ? bank_mce_rdmsr(cur, msr, val) : 0;
@@ -287,15 +290,11 @@ int vmce_wrmsr(u32 msr, u64 val)
     struct domain_mca_msrs *vmce = dom_vmce(cur->domain);
     int ret = 1;
 
-    if ( !g_mcg_cap )
-        return 0;
-
     spin_lock(&vmce->lock);
 
     switch ( msr )
     {
     case MSR_IA32_MCG_CTL:
-        vmce->mcg_ctl = val;
         break;
     case MSR_IA32_MCG_STATUS:
         vmce->mcg_status = val;
@@ -510,31 +509,6 @@ int vmce_domain_inject(
 }
 #endif
 
-int vmce_init(struct cpuinfo_x86 *c)
-{
-    u64 value;
-
-    rdmsrl(MSR_IA32_MCG_CAP, value);
-    /* For Guest vMCE usage */
-    g_mcg_cap = value & (MCG_CAP_COUNT | MCG_CTL_P | MCG_TES_P | MCG_SER_P);
-    if (value & MCG_CTL_P)
-        rdmsrl(MSR_IA32_MCG_CTL, h_mcg_ctl);
-
-    return 0;
-}
-
-static int mca_ctl_conflict(struct mcinfo_bank *bank, struct domain *d)
-{
-    if ( !bank || !d )
-        return 1;
-
-    /* Will MCE happen in host if If host mcg_ctl is 0? */
-    if ( ~d->arch.vmca_msrs->mcg_ctl & h_mcg_ctl )
-        return 1;
-
-    return 0;
-}
-
 static int is_hvm_vmce_ready(struct mcinfo_bank *bank, struct domain *d)
 {
     struct vcpu *v;
@@ -588,14 +562,6 @@ static int is_hvm_vmce_ready(struct mcin
     if (no_vmce)
         return 0;
 
-    /* Guest has different MCE ctl value setting */
-    if (mca_ctl_conflict(bank, d))
-    {
-        dprintk(XENLOG_WARNING,
-          "No vmce, guest has different mca control setting\n");
-        return 0;
-    }
-
     return 1;
 }
 
diff -r 353bc0801b11 -r a5f4efac996f xen/include/asm-x86/mce.h
--- a/xen/include/asm-x86/mce.h	Mon Aug 06 12:28:03 2012 +0100
+++ b/xen/include/asm-x86/mce.h	Tue Aug 07 08:16:37 2012 +0200
@@ -16,7 +16,6 @@ struct bank_entry {
 struct domain_mca_msrs
 {
     /* Guest should not change below values after DOM boot up */
-    uint64_t mcg_ctl;
     uint64_t mcg_status;
     uint16_t nr_injection;
     struct list_head impact_header;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT4-0005hj-Tf; Tue, 07 Aug 2012 20:33:30 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT2-0005dx-GI
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:28 +0000
Received: from [85.158.143.99:37571] by server-1.bemta-4.messagelabs.com id
	E6/DB-24392-79B71205; Tue, 07 Aug 2012 20:33:27 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-216.messagelabs.com!1344371604!29818854!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8552 invoked from network); 7 Aug 2012 20:33:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:25 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-000420-6g
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0003Mh-52
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Message-Id: <E1SyqSy-0003Mh-52@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:23 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Merge backout of 25727:a8d708fcb347
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1344252306 -3600
# Node ID 60f2c7b74741776d1a25fe2618fb17b570996ce5
# Parent  6221bee07e5dc31d9ed9eb3c0c1c94a80c56c78d
# Parent  ce0079dc8c52d5335d78b24c4c6e0a36d4780061
Merge backout of 25727:a8d708fcb347
---


diff -r 6221bee07e5d -r 60f2c7b74741 docs/misc/xl-disk-configuration.txt
--- a/docs/misc/xl-disk-configuration.txt	Mon Aug 06 11:18:43 2012 +0200
+++ b/docs/misc/xl-disk-configuration.txt	Mon Aug 06 12:25:06 2012 +0100
@@ -160,10 +160,7 @@ script=<script>
 ---------------
 
 Specifies that <target> is not a normal host path, but rather
-information to be interpreted by the executable program <script>,
-(looked for in /etc/xen/scripts, if it doesn't contain a slash).
-
-These scripts are normally called "block-<script>".
+information to be interpreted by /etc/xen/scripts/block-<script>.
 
 
 
@@ -207,7 +204,7 @@ Supported values:      iscsi:  nbd:  enb
 In xend and old versions of libxl it was necessary to specify the
 "script" (see above) with a prefix.  For compatibility, these four
 prefixes are recognised as specifying the corresponding script.  They
-are equivalent to "script=block-<script>".
+are equivalent to "script=<script>".
 
 
 <deprecated-prefix>:
diff -r 6221bee07e5d -r 60f2c7b74741 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/hotplug/Linux/block	Mon Aug 06 12:25:06 2012 +0100
@@ -342,4 +342,4 @@ esac
 
 # If we've reached here, $t is neither phy nor file, so fire a helper script.
 [ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \
-  ${XEN_SCRIPT_DIR}/block-"$t" "$command"
+  ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/check-xl-disk-parse
--- a/tools/libxl/check-xl-disk-parse	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/check-xl-disk-parse	Mon Aug 06 12:25:06 2012 +0100
@@ -142,44 +142,5 @@ disk: {
 
 EOF
 one 0 vdev=hdc,access=r,devtype=cdrom,format=empty
-one 0 vdev=hdc,access=r,devtype=cdrom
-
-expected <<EOF
-disk: {
-    "backend_domid": 0,
-    "pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost",
-    "vdev": "xvda",
-    "backend": "unknown",
-    "format": "raw",
-    "script": "block-iscsi",
-    "removable": 0,
-    "readwrite": 1,
-    "is_cdrom": 0
-}
-
-EOF
-
-# http://backdrift.org/xen-block-iscsi-script-with-multipath-support
-one 0 iscsi:iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost,xvda,w
-one 0 vdev=xvda,access=w,script=block-iscsi,target=iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost
-
-expected <<EOF
-disk: {
-    "backend_domid": 0,
-    "pdev_path": "app01",
-    "vdev": "hda",
-    "backend": "unknown",
-    "format": "raw",
-    "script": "block-drbd",
-    "removable": 0,
-    "readwrite": 1,
-    "is_cdrom": 0
-}
-
-EOF
-
-# http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html
-# http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html
-one 0 drbd:app01,hda,w
 
 complete
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxl.c	Mon Aug 06 12:25:06 2012 +0100
@@ -1796,9 +1796,9 @@ static void device_disk_add(libxl__egc *
     STATE_AO_GC(aodev->ao);
     flexarray_t *front = NULL;
     flexarray_t *back = NULL;
-    char *dev, *script;
+    char *dev;
     libxl__device *device;
-    int rc;
+    int major, minor, rc;
     libxl_ctx *ctx = gc->owner;
     xs_transaction_t t = XBT_NULL;
 
@@ -1833,6 +1833,13 @@ static void device_disk_add(libxl__egc *
             goto out_free;
         }
 
+        if (disk->script) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts"
+                       " not yet supported, sorry");
+            rc = ERROR_INVAL;
+            goto out_free;
+        }
+
         GCNEW(device);
         rc = libxl__device_from_disk(gc, domid, disk, device);
         if (rc != 0) {
@@ -1844,16 +1851,18 @@ static void device_disk_add(libxl__egc *
         switch (disk->backend) {
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
-
-                script = libxl__abs_path(gc, disk->script ?: "block",
-                                         libxl__xen_script_dir_path());
-
         do_backend_phy:
+                libxl__device_physdisk_major_minor(dev, &major, &minor);
+                flexarray_append(back, "physical-device");
+                flexarray_append(back, libxl__sprintf(gc, "%x:%x", major, minor));
+
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                assert(script);
-                flexarray_append_pair(back, "script", script);
+                flexarray_append(back, "script");
+                flexarray_append(back, GCSPRINTF("%s/%s",
+                                                 libxl__xen_script_dir_path(),
+                                                 "block"));
 
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
@@ -1870,12 +1879,10 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                /*
-                 * tap devices do not support custom block scripts and
-                 * always use the plain block script.
-                 */
-                script = libxl__abs_path(gc, "block",
-                                         libxl__xen_script_dir_path());
+                flexarray_append(back, "script");
+                flexarray_append(back, GCSPRINTF("%s/%s",
+                                                 libxl__xen_script_dir_path(),
+                                                 "blktap"));
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;
@@ -2575,10 +2582,13 @@ void libxl__device_nic_add(libxl__egc *e
     flexarray_append(back, "1");
     flexarray_append(back, "state");
     flexarray_append(back, libxl__sprintf(gc, "%d", 1));
-    if (nic->script)
-        flexarray_append_pair(back, "script",
-                              libxl__abs_path(gc, nic->script,
-                                              libxl__xen_script_dir_path()));
+    if (nic->script) {
+        flexarray_append(back, "script");
+        flexarray_append(back, nic->script[0]=='/' ? nic->script
+                         : libxl__sprintf(gc, "%s/%s",
+                                          libxl__xen_script_dir_path(),
+                                          nic->script));
+    }
 
     if (nic->ifname) {
         flexarray_append(back, "vifname");
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxl_device.c	Mon Aug 06 12:25:06 2012 +0100
@@ -147,26 +147,18 @@ typedef struct {
 } disk_try_backend_args;
 
 static int disk_try_backend(disk_try_backend_args *a,
-                            libxl_disk_backend backend)
- {
-    libxl__gc *gc = a->gc;
+                            libxl_disk_backend backend) {
     /* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or
      * backend on success */
-    libxl_ctx *ctx = libxl__gc_owner(gc);
+    libxl_ctx *ctx = libxl__gc_owner(a->gc);
+    switch (backend) {
 
-    switch (backend) {
     case LIBXL_DISK_BACKEND_PHY:
         if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW ||
               a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) {
             goto bad_format;
         }
 
-        if (a->disk->script) {
-            LOG(DEBUG, "Disk vdev=%s, uses script=... assuming phy backend",
-                a->disk->vdev);
-            return backend;
-        }
-
         if (libxl__try_phy_backend(a->stab.st_mode))
             return backend;
 
@@ -176,8 +168,6 @@ static int disk_try_backend(disk_try_bac
         return 0;
 
     case LIBXL_DISK_BACKEND_TAP:
-        if (a->disk->script) goto bad_script;
-
         if (!libxl__blktap_enabled(a->gc)) {
             LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
                        " unsuitable because blktap not available",
@@ -191,7 +181,6 @@ static int disk_try_backend(disk_try_bac
         return backend;
 
     case LIBXL_DISK_BACKEND_QDISK:
-        if (a->disk->script) goto bad_script;
         return backend;
 
     default:
@@ -209,11 +198,6 @@ static int disk_try_backend(disk_try_bac
                libxl_disk_backend_to_string(backend),
                libxl_disk_format_to_string(a->disk->format));
     return 0;
-
- bad_script:
-    LOG(DEBUG, "Disk vdev=%s, backend %s not compatible with script=...",
-        a->disk->vdev, libxl_disk_backend_to_string(backend));
-    return 0;
 }
 
 int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
@@ -236,7 +220,7 @@ int libxl__device_disk_set_backend(libxl
             return ERROR_INVAL;
         }
         memset(&a.stab, 0, sizeof(a.stab));
-    } else if (!disk->script) {
+    } else {
         if (stat(disk->pdev_path, &a.stab)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s "
                              "failed to stat: %s",
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxlu_disk_i.h
--- a/tools/libxl/libxlu_disk_i.h	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxlu_disk_i.h	Mon Aug 06 12:25:06 2012 +0100
@@ -1,6 +1,8 @@
 #ifndef LIBXLU_DISK_I_H
 #define LIBXLU_DISK_I_H
 
+#include "libxl_osdeps.h" /* must come before any other headers */
+
 #include "libxlu_internal.h"
 
 
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxlu_disk_l.c
--- a/tools/libxl/libxlu_disk_l.c	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxlu_disk_l.c	Mon Aug 06 12:25:06 2012 +0100
@@ -1,10 +1,6 @@
 #line 2 "libxlu_disk_l.c"
-#line 31 "libxlu_disk_l.l"
-#include "libxl_osdeps.h" /* must come before any other headers */
 
-
-
-#line 8 "libxlu_disk_l.c"
+#line 4 "libxlu_disk_l.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -383,76 +379,77 @@ static yyconst flex_int16_t yy_acclist[4
      8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
 
-       22,   22,   24, 8193,   22, 8193,   22, 8193, 8213,   22,
-     8213,   22, 8213,   12,   22,   22,   22,   22,   22,   22,
+       22,   24, 8193,   22, 8193,   22, 8193, 8213,   22, 8213,
+       22, 8213,   12,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-       22,   22, 8213,   22, 8213,   22, 8213,   12,   22,   17,
-     8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
-     8206, 8213,   22,16398,16405,   20, 8213,   22,16405,   22,
-     8205, 8213,   22,16397,16405,   22,   22, 8208, 8213,   22,
-    16400,16405,   22,   22,   22,   22,   17, 8213,   22,   17,
-     8213,   22,   17,   22,   17, 8213,   22,    3,   22,   22,
-       19, 8213,   22,16405,   22,   22, 8206, 8213,   22, 8206,
+     8213,   22, 8213,   22, 8213,   12,   22,   17, 8213,   22,
+    16405,   22,   22,   22,   22,   22,   22,   22, 8213,   22,
+    16405,   20, 8213,   22,16405,   22, 8205, 8213,   22,16397,
+    16405,   22,   22, 8208, 8213,   22,16400,16405,   22,   22,
+       22,   22,   17, 8213,   22,   17, 8213,   22,   17,   22,
+       17, 8213,   22,    3,   22,   22,   19, 8213,   22,16405,
+       22,   22,   22,   22,   20, 8213,   22,   20, 8213,   22,
 
-     8213,   22, 8206,   22, 8206, 8213,   20, 8213,   22,   20,
-     8213,   22,   20,   22,   20, 8213, 8205, 8213,   22, 8205,
-     8213,   22, 8205,   22, 8205, 8213,   22, 8208, 8213,   22,
-     8208, 8213,   22, 8208,   22, 8208, 8213,   22,   22,    9,
-       22,   17, 8213,   22,   17, 8213,   22,   17, 8213,   17,
-       22,   17,   22,    3,   22,   22,   19, 8213,   22,   19,
-     8213,   22,   19,   22,   19, 8213,   22,   18, 8213,   22,
-    16405, 8206, 8213,   22, 8206, 8213,   22, 8206, 8213, 8206,
-       22, 8206,   20, 8213,   22,   20, 8213,   22,   20, 8213,
-       20,   22,   20, 8205, 8213,   22, 8205, 8213,   22, 8205,
+       20,   22,   20, 8213, 8205, 8213,   22, 8205, 8213,   22,
+     8205,   22, 8205, 8213,   22, 8208, 8213,   22, 8208, 8213,
+       22, 8208,   22, 8208, 8213,   22,   22,    9,   22,   17,
+     8213,   22,   17, 8213,   22,   17, 8213,   17,   22,   17,
+       22,    3,   22,   22,   19, 8213,   22,   19, 8213,   22,
+       19,   22,   19, 8213,   22,   18, 8213,   22,16405, 8206,
+     8213,   22,16398,16405,   22,   20, 8213,   22,   20, 8213,
+       22,   20, 8213,   20,   22,   20, 8205, 8213,   22, 8205,
+     8213,   22, 8205, 8213, 8205,   22, 8205,   22, 8208, 8213,
+       22, 8208, 8213,   22, 8208, 8213, 8208,   22, 8208,   22,
 
-     8213, 8205,   22, 8205,   22, 8208, 8213,   22, 8208, 8213,
-       22, 8208, 8213, 8208,   22, 8208,   22,   22,    9,   12,
-        9,    7,   22,   22,   19, 8213,   22,   19, 8213,   22,
-       19, 8213,   19,   22,   19,    2,   18, 8213,   22,   18,
-     8213,   22,   18,   22,   18, 8213,   10,   22,   11,    9,
-        9,   12,    7,   12,    7,   22,    6,    2,   12,    2,
-       18, 8213,   22,   18, 8213,   22,   18, 8213,   18,   22,
-       18,   10,   12,   10,   15, 8213,   22,16405,   11,   12,
-       11,    7,    7,   12,   22,    6,   12,    6,    6,   12,
-        6,   12,    2,    2,   12,   10,   10,   12,   15, 8213,
+       22,    9,   12,    9,    7,   22,   22,   19, 8213,   22,
+       19, 8213,   22,   19, 8213,   19,   22,   19,    2,   18,
+     8213,   22,   18, 8213,   22,   18,   22,   18, 8213, 8206,
+     8213,   22, 8206, 8213,   22, 8206,   22, 8206, 8213,   22,
+       10,   22,   11,    9,    9,   12,    7,   12,    7,   22,
+        6,    2,   12,    2,   18, 8213,   22,   18, 8213,   22,
+       18, 8213,   18,   22,   18, 8206, 8213,   22, 8206, 8213,
+       22, 8206, 8213, 8206,   22, 8206,   22,   10,   12,   10,
+       15, 8213,   22,16405,   11,   12,   11,    7,    7,   12,
+       22,    6,   12,    6,    6,   12,    6,   12,    2,    2,
 
-       22,   15, 8213,   22,   15,   22,   15, 8213,   11,   12,
-       22,    6,    6,   12,    6,    6,   15, 8213,   22,   15,
-     8213,   22,   15, 8213,   15,   22,   15,   22,    6,    6,
-        8,    6,    5,    6,    8,   12,    8,    4,    6,    5,
-        6,    8,    8,   12,    4,    6
+       12, 8206,   22,16398,   10,   10,   12,   15, 8213,   22,
+       15, 8213,   22,   15,   22,   15, 8213,   11,   12,   22,
+        6,    6,   12,    6,    6,   15, 8213,   22,   15, 8213,
+       22,   15, 8213,   15,   22,   15,   22,    6,    6,    8,
+        6,    5,    6,    8,   12,    8,    4,    6,    5,    6,
+        8,    8,   12,    4,    6
     } ;
 
-static yyconst flex_int16_t yy_accept[252] =
+static yyconst flex_int16_t yy_accept[257] =
     {   0,
         1,    1,    1,    2,    3,    4,    7,   12,   16,   19,
        21,   24,   27,   30,   33,   36,   39,   42,   45,   48,
        51,   54,   57,   60,   63,   66,   68,   69,   70,   71,
        73,   76,   78,   79,   80,   81,   84,   84,   85,   86,
        87,   88,   89,   90,   91,   92,   93,   94,   95,   96,
-       97,   98,   99,  100,  101,  102,  103,  104,  106,  108,
-      109,  111,  113,  114,  115,  116,  117,  118,  119,  120,
+       97,   98,   99,  100,  101,  102,  103,  105,  107,  108,
+      110,  112,  113,  114,  115,  116,  117,  118,  119,  120,
       121,  122,  123,  124,  125,  126,  127,  128,  129,  130,
-      131,  132,  133,  135,  137,  138,  139,  140,  144,  145,
-      146,  147,  148,  149,  150,  151,  156,  160,  161,  166,
+      131,  133,  135,  136,  137,  138,  142,  143,  144,  145,
+      146,  147,  148,  149,  152,  156,  157,  162,  163,  164,
 
-      167,  168,  173,  174,  175,  176,  177,  180,  183,  185,
-      187,  188,  190,  191,  195,  196,  197,  200,  203,  205,
-      207,  210,  213,  215,  217,  220,  223,  225,  227,  228,
-      231,  234,  236,  238,  239,  240,  241,  242,  245,  248,
-      250,  252,  253,  254,  256,  257,  260,  263,  265,  267,
-      268,  272,  275,  278,  280,  282,  283,  286,  289,  291,
-      293,  294,  297,  300,  302,  304,  305,  306,  309,  312,
-      314,  316,  317,  318,  319,  321,  322,  323,  324,  325,
-      328,  331,  333,  335,  336,  337,  340,  343,  345,  347,
-      348,  349,  350,  351,  353,  355,  356,  357,  358,  360,
+      169,  170,  171,  172,  173,  176,  179,  181,  183,  184,
+      186,  187,  191,  192,  193,  194,  195,  198,  201,  203,
+      205,  208,  211,  213,  215,  216,  219,  222,  224,  226,
+      227,  228,  229,  230,  233,  236,  238,  240,  241,  242,
+      244,  245,  248,  251,  253,  255,  256,  260,  265,  266,
+      269,  272,  274,  276,  277,  280,  283,  285,  287,  288,
+      289,  292,  295,  297,  299,  300,  301,  302,  304,  305,
+      306,  307,  308,  311,  314,  316,  318,  319,  320,  323,
+      326,  328,  330,  333,  336,  338,  340,  341,  342,  343,
+      344,  345,  347,  349,  350,  351,  352,  354,  355,  358,
 
-      361,  364,  367,  369,  371,  372,  374,  375,  379,  381,
-      382,  383,  385,  386,  388,  389,  391,  393,  394,  396,
-      397,  399,  402,  405,  407,  409,  411,  412,  413,  415,
-      416,  417,  420,  423,  425,  427,  428,  429,  430,  431,
-      432,  433,  435,  437,  438,  440,  442,  443,  445,  447,
-      447
+      361,  363,  365,  366,  369,  372,  374,  376,  377,  378,
+      380,  381,  385,  387,  388,  389,  391,  392,  394,  395,
+      397,  399,  400,  402,  405,  406,  408,  411,  414,  416,
+      418,  420,  421,  422,  424,  425,  426,  429,  432,  434,
+      436,  437,  438,  439,  440,  441,  442,  444,  446,  447,
+      449,  451,  452,  454,  456,  456
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -495,238 +492,244 @@ static yyconst flex_int32_t yy_meta[34] 
         1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[308] =
+static yyconst flex_int16_t yy_base[313] =
     {   0,
-        0,    0,  546,  538,  533,  521,   32,   35,  656,  656,
-       44,   62,   30,   41,   50,   51,  507,   64,   47,   66,
-       67,  499,   68,  487,   72,    0,  656,  465,  656,   87,
-       91,    0,    0,  100,  452,  109,    0,   74,   95,   87,
-       32,   96,  105,  110,   77,   97,   40,  113,  116,  112,
-      118,  120,  121,  122,  123,  125,    0,  137,    0,    0,
-      147,    0,    0,  449,  129,  126,  134,  143,  145,  147,
-      148,  149,  151,  153,  156,  160,  155,  167,  162,  175,
-      168,  159,  188,    0,    0,  656,  166,  197,  179,  185,
-      176,  200,  435,  186,  193,  216,  225,  205,  234,  221,
+        0,    0,  572,  560,  559,  551,   32,   35,  662,  662,
+       44,   62,   30,   40,   32,   50,  533,   49,   47,   59,
+       68,  525,   69,  517,   72,    0,  662,  515,  662,   83,
+       91,    0,    0,  100,  501,  109,    0,   78,   51,   86,
+       89,   74,   96,  105,  109,  110,  111,  112,  117,   73,
+      119,  118,  121,  120,  122,    0,  134,    0,    0,  138,
+        0,    0,  495,  130,  144,  129,  143,  145,  146,  147,
+      148,  149,  153,  154,  155,  158,  161,  165,  166,  170,
+      180,    0,    0,  662,  171,  201,  176,  175,  178,  183,
+      465,  182,  190,  455,  212,  188,  221,  208,  224,  234,
 
-      237,  247,  204,  230,  244,  213,  254,    0,  256,    0,
-      251,  258,  254,  279,  256,  259,  267,    0,  269,    0,
-      286,    0,  288,    0,  290,    0,  297,    0,  267,  299,
-        0,  301,    0,  288,  297,  421,  302,  310,    0,    0,
-        0,    0,  305,  656,  307,  319,    0,  321,    0,  322,
-      332,  335,    0,    0,    0,    0,  339,    0,    0,    0,
-        0,  342,    0,    0,    0,    0,  340,  349,    0,    0,
-        0,    0,  337,  345,  420,  656,  419,  346,  350,  358,
-        0,    0,    0,    0,  418,  360,    0,  362,    0,  417,
-      319,  369,  416,  656,  415,  656,  276,  364,  414,  656,
+      209,  230,  236,  221,  244,    0,  247,    0,  184,  248,
+      244,  269,  231,  247,  251,  258,  272,    0,  279,    0,
+      283,    0,  286,    0,  255,  290,    0,  293,    0,  270,
+      281,  455,  254,  297,    0,    0,    0,    0,  294,  662,
+      295,  308,    0,  310,    0,  257,  319,  328,  304,  331,
+        0,    0,    0,    0,  335,    0,    0,    0,    0,  316,
+      338,    0,    0,    0,    0,  333,  336,  447,  662,  429,
+      338,  340,  348,    0,    0,    0,    0,  428,  351,    0,
+      355,    0,  359,    0,  362,    0,  357,  427,  308,  369,
+      426,  662,  425,  662,  346,  365,  423,  662,  371,    0,
 
-      375,    0,    0,    0,    0,  413,  656,  384,  412,    0,
-      410,  656,  370,  409,  656,  370,  378,  408,  656,  366,
-      656,  394,    0,  396,    0,    0,  380,  316,  656,  377,
-      387,  398,    0,    0,    0,    0,  399,  402,  407,  271,
-      406,  228,  200,  656,  175,  656,   77,  656,  656,  656,
-      428,  432,  435,  439,  443,  447,  451,  455,  459,  463,
-      467,  471,  475,  479,  483,  487,  491,  495,  499,  503,
-      507,  511,  515,  519,  523,  527,  531,  535,  539,  543,
-      547,  551,  555,  559,  563,  567,  571,  575,  579,  583,
-      587,  591,  595,  599,  603,  607,  611,  615,  619,  623,
+        0,    0,    0,  378,    0,    0,    0,    0,  380,  421,
+      662,  388,  420,    0,  419,  662,  373,  418,  662,  372,
+      382,  417,  662,  398,  416,  662,  400,    0,  402,    0,
+        0,  385,  415,  662,  390,  275,  409,    0,    0,    0,
+        0,  405,  404,  406,  264,  412,  224,  129,  662,   87,
+      662,   47,  662,  662,  662,  434,  438,  441,  445,  449,
+      453,  457,  461,  465,  469,  473,  477,  481,  485,  489,
+      493,  497,  501,  505,  509,  513,  517,  521,  525,  529,
+      533,  537,  541,  545,  549,  553,  557,  561,  565,  569,
+      573,  577,  581,  585,  589,  593,  597,  601,  605,  609,
 
-      627,  631,  635,  639,  643,  647,  651
+      613,  617,  621,  625,  629,  633,  637,  641,  645,  649,
+      653,  657
     } ;
 
-static yyconst flex_int16_t yy_def[308] =
+static yyconst flex_int16_t yy_def[313] =
     {   0,
-      250,    1,  251,  251,  250,  252,  253,  253,  250,  250,
-      254,  254,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  255,  250,  252,  250,  256,
-      253,  257,  257,  258,   12,  252,  259,   12,   12,   12,
+      255,    1,  256,  256,  255,  257,  258,  258,  255,  255,
+      259,  259,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  260,  255,  257,  255,  261,
+      258,  262,  262,  263,   12,  257,  264,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,   12,  255,  256,  257,  257,
-      260,  261,  261,  250,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  260,  261,  262,  262,  265,
+      266,  266,  255,   12,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,  260,  261,  261,  250,   12,  262,   12,   12,
-       12,   12,   12,   12,   12,  263,  264,   12,  265,   12,
+      265,  266,  266,  255,   12,  267,   12,   12,   12,   12,
+       12,   12,   12,   36,  268,   12,  269,   12,   12,  270,
 
-       12,  266,   12,   12,   12,   12,  267,  268,  262,  268,
-       12,   12,   12,  269,   12,   12,  270,  271,  263,  271,
-      272,  273,  264,  273,  274,  275,  265,  275,   12,  276,
-      277,  266,  277,   12,   12,  278,   12,  267,  268,  268,
-      279,  279,   12,  250,   12,  280,  281,  269,  281,   12,
-      282,  270,  271,  271,  283,  283,  272,  273,  273,  284,
-      284,  274,  275,  275,  285,  285,   12,  276,  277,  277,
-      286,  286,   12,   12,  287,  250,  288,   12,   12,  280,
-      281,  281,  289,  289,  290,  291,  292,  282,  292,  293,
-       12,  294,  287,  250,  295,  250,   12,  296,  297,  250,
+       12,   12,   12,   12,  271,  272,  267,  272,   12,   12,
+       12,  273,   12,   12,   12,  257,  274,  275,  268,  275,
+      276,  277,  269,  277,   12,  278,  279,  270,  279,   12,
+       12,  280,   12,  271,  272,  272,  281,  281,   12,  255,
+       12,  282,  283,  273,  283,   12,  284,  285,  257,  274,
+      275,  275,  286,  286,  276,  277,  277,  287,  287,   12,
+      278,  279,  279,  288,  288,   12,   12,  289,  255,  290,
+       12,   12,  282,  283,  283,  291,  291,  292,  293,  294,
+      284,  294,  295,  296,  285,  296,  257,  297,   12,  298,
+      289,  255,  299,  255,   12,  300,  301,  255,  293,  294,
 
-      291,  292,  292,  298,  298,  299,  250,  300,  301,  301,
-      295,  250,   12,  302,  250,  302,  302,  297,  250,  299,
-      250,  303,  304,  300,  304,  301,   12,  302,  250,  302,
-      302,  303,  304,  304,  305,  305,   12,  302,  302,  306,
-      302,  302,  307,  250,  302,  250,  307,  250,  250,    0,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      294,  302,  302,  295,  296,  296,  303,  303,  257,  304,
+      255,  305,  306,  306,  299,  255,   12,  307,  255,  307,
+      307,  301,  255,  285,  304,  255,  308,  309,  305,  309,
+      306,   12,  307,  255,  307,  307,  308,  309,  309,  310,
+      310,   12,  307,  307,  311,  307,  307,  312,  255,  307,
+      255,  312,  255,  255,    0,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 
-      250,  250,  250,  250,  250,  250,  250
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255
     } ;
 
-static yyconst flex_int16_t yy_nxt[690] =
+static yyconst flex_int16_t yy_nxt[696] =
     {   0,
         6,    7,    8,    9,    6,    6,    6,    6,   10,   11,
        12,   13,   14,   15,   16,   17,   17,   18,   17,   17,
        17,   17,   19,   17,   20,   21,   22,   23,   24,   17,
        25,   17,   17,   31,   31,   32,   31,   31,   32,   35,
        33,   35,   41,   33,   28,   28,   28,   29,   34,   35,
-       35,   36,   37,   73,   42,   38,   35,   49,   68,   35,
-       35,   39,   28,   28,   28,   29,   34,   43,   45,   36,
-       37,   40,   44,   35,   46,   35,   35,   35,   51,   53,
-      244,   35,   50,   35,   55,   65,   35,   47,   56,   28,
-       59,   48,   31,   31,   32,   60,   35,   71,   67,   33,
+      249,   36,   37,   42,   43,   38,   35,   48,   35,   35,
+       35,   39,   28,   28,   28,   29,   34,   44,   35,   36,
+       37,   40,   46,   45,   65,   49,   47,   35,   35,   50,
+       52,   35,   35,   35,   54,   28,   58,   35,   55,   64,
+      254,   59,   31,   31,   32,   35,   75,   66,   35,   33,
 
-       28,   28,   28,   29,   35,   35,   35,   28,   37,   61,
-       61,   61,   62,   61,   35,   70,   61,   63,   66,   35,
-       49,   35,   35,   72,   74,   35,   69,   35,   75,   35,
-       35,   35,   35,   88,   35,   35,   82,   78,   35,   28,
-       59,   77,   87,   35,   76,   60,   80,   79,   81,   28,
-       84,   78,   35,   89,   35,   85,   35,   35,   35,   75,
-       35,   92,   35,   96,   35,   35,   90,   97,   35,   35,
-       93,   35,   94,   91,   99,   35,   35,   35,  249,  100,
-       95,  101,  102,  104,   35,   35,   98,  103,   35,  105,
-       28,   84,  111,  106,   35,   35,   85,  107,  107,   61,
+       28,   28,   28,   29,   68,   35,   48,   28,   37,   60,
+       60,   60,   61,   60,   35,   67,   60,   62,   35,   35,
+       35,   35,   72,   71,   73,   69,   35,   35,   35,   35,
+       35,   35,  253,   80,   76,   70,   28,   58,   35,   35,
+       28,   82,   59,   85,   77,   78,   83,   79,   87,   74,
+       76,   86,   35,   35,   35,   35,   35,   35,   35,   90,
+       94,   95,   35,   35,   35,   97,   88,   35,   91,   92,
+       35,   99,  100,   89,   35,   35,   93,  101,   98,   35,
+       35,  102,   28,   82,   35,   35,   96,   35,   83,  109,
+      112,   35,   35,   35,   76,   97,  110,   35,  104,   35,
 
-      108,  107,   35,  248,  107,  110,  112,  114,  113,   35,
-       75,   78,   99,   35,   35,  116,  117,  117,   61,  118,
-      117,  134,   35,  117,  120,  121,  121,   61,  122,  121,
-       35,  246,  121,  124,  125,  125,   61,  126,  125,   35,
-      137,  125,  128,  135,  102,  129,   35,  130,  130,   61,
-      131,  130,  136,   35,  130,  133,   28,  139,   28,  141,
-       35,  144,  140,   35,  142,   35,  151,   35,   35,   28,
-      153,   28,  155,  143,  244,  154,   35,  156,  145,  146,
-      146,   61,  147,  146,  150,   35,  146,  149,   28,  158,
-       28,  160,   28,  163,  159,  167,  161,   35,  164,   28,
+      103,  105,  105,   60,  106,  105,  139,  115,  105,  108,
+      111,  114,  117,  117,   60,  118,  117,   35,   35,  117,
+      120,  121,  121,   60,  122,  121,  130,  251,  121,  124,
+       35,  100,  125,   35,  126,  126,   60,  127,  126,   35,
+       35,  126,  129,  131,  132,   35,   28,  135,  133,   28,
+      137,  140,  136,   35,  147,  138,   35,   35,  148,  146,
+       35,   29,  170,   35,   35,  178,   35,  249,  141,  142,
+      142,   60,  143,  142,   28,  151,  142,  145,  219,   35,
+      152,   28,  153,  160,  149,   28,  156,  154,   28,  158,
+       35,  157,   28,  162,  159,   28,  164,  166,  163,   28,
 
-      165,   28,  169,   28,  171,  166,   35,  170,  213,  172,
-      177,   35,   28,  139,   35,  173,   35,  178,  140,  215,
-      179,   28,  181,   28,  183,  174,  208,  182,   35,  184,
-      185,   35,  186,  186,   61,  187,  186,   28,  153,  186,
-      189,   28,  158,  154,   28,  163,   35,  159,  190,   35,
-      164,   28,  169,  192,   35,   35,  191,  170,  198,   35,
-       28,  181,   28,  202,   28,  204,  182,  215,  203,  207,
-      205,   64,  210,  229,  197,  216,  217,   28,  202,   35,
-      215,  229,  230,  203,  222,  222,   61,  223,  222,   35,
-      215,  222,  225,  237,  227,  231,   28,  233,   28,  235,
+      135,  165,  244,   35,   35,  136,  171,   29,  172,  167,
+       28,  174,   28,  176,  187,  212,  175,   35,  177,  179,
+      179,   60,  180,  179,  188,   35,  179,  182,  183,  183,
+       60,  184,  183,   28,  151,  183,  186,   28,  156,  152,
+       28,  162,   35,  157,  190,   35,  163,   35,  196,   35,
+       28,  174,  189,   28,  200,   35,  175,   28,  202,  201,
+       29,   28,  205,  203,   28,  207,  195,  206,  219,  209,
+      208,   63,  214,   28,  200,  234,  220,  221,  217,  201,
+       28,  205,   35,   29,  235,  234,  206,  224,  227,  227,
+       60,  228,  227,  219,   35,  227,  230,  232,  242,  236,
 
-       28,  233,  234,  238,  236,  215,  234,  240,   35,  215,
-      215,  200,  229,  196,  239,  226,  221,  219,  212,  176,
-      207,  200,  196,  194,  176,  241,  242,  245,   26,   26,
-       26,   26,   28,   28,   28,   30,   30,   30,   30,   35,
-       35,   35,   35,   57,  115,   57,   57,   58,   58,   58,
-       58,   60,   86,   60,   60,   34,   34,   34,   34,   64,
-       64,   35,   64,   83,   83,   83,   83,   85,   29,   85,
-       85,  109,  109,  109,  109,  119,  119,  119,  119,  123,
-      123,  123,  123,  127,  127,  127,  127,  132,  132,  132,
-      132,  138,  138,  138,  138,  140,   54,  140,  140,  148,
+       28,  207,   28,  238,   28,  240,  208,  219,  239,  219,
+      241,   28,  238,  245,   35,  219,  243,  239,  219,  211,
+      198,  234,  194,  231,  226,  247,  223,  246,  216,  169,
+      211,  198,  194,  250,   26,   26,   26,   26,   28,   28,
+       28,   30,   30,   30,   30,   35,   35,   35,   35,   56,
+      192,   56,   56,   57,   57,   57,   57,   59,  169,   59,
+       59,   34,   34,   34,   34,   63,   63,  116,   63,   81,
+       81,   81,   81,   83,  113,   83,   83,  107,  107,  107,
+      107,  119,  119,  119,  119,  123,  123,  123,  123,  128,
+      128,  128,  128,  134,  134,  134,  134,  136,   84,  136,
 
-      148,  148,  148,  152,  152,  152,  152,  154,   52,  154,
-      154,  157,  157,  157,  157,  159,   35,  159,  159,  162,
-      162,  162,  162,  164,   29,  164,  164,  168,  168,  168,
-      168,  170,  250,  170,  170,  175,  175,  175,  175,  142,
-       27,  142,  142,  180,  180,  180,  180,  182,   27,  182,
-      182,  188,  188,  188,  188,  156,  250,  156,  156,  161,
-      250,  161,  161,  166,  250,  166,  166,  172,  250,  172,
-      172,  193,  193,  193,  193,  195,  195,  195,  195,  184,
-      250,  184,  184,  199,  199,  199,  199,  201,  201,  201,
-      201,  203,  250,  203,  203,  206,  206,  206,  206,  209,
+      136,  144,  144,  144,  144,  150,  150,  150,  150,  152,
+       35,  152,  152,  155,  155,  155,  155,  157,   29,  157,
+      157,  161,  161,  161,  161,  163,   53,  163,  163,  168,
+      168,  168,  168,  138,   51,  138,  138,  173,  173,  173,
+      173,  175,   35,  175,  175,  181,  181,  181,  181,  185,
+      185,  185,  185,  154,   29,  154,  154,  159,  255,  159,
+      159,  165,   27,  165,  165,  191,  191,  191,  191,  193,
+      193,  193,  193,  177,   27,  177,  177,  197,  197,  197,
+      197,  199,  199,  199,  199,  201,  255,  201,  201,  204,
+      204,  204,  204,  206,  255,  206,  206,  210,  210,  210,
 
-      209,  209,  209,  211,  211,  211,  211,  214,  214,  214,
-      214,  218,  218,  218,  218,  205,  250,  205,  205,  220,
-      220,  220,  220,  224,  224,  224,  224,  210,  250,  210,
-      210,  228,  228,  228,  228,  232,  232,  232,  232,  234,
-      250,  234,  234,  236,  250,  236,  236,  243,  243,  243,
-      243,  247,  247,  247,  247,    5,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250
+      210,  213,  213,  213,  213,  215,  215,  215,  215,  218,
+      218,  218,  218,  222,  222,  222,  222,  203,  255,  203,
+      203,  208,  255,  208,  208,  225,  225,  225,  225,  229,
+      229,  229,  229,  214,  255,  214,  214,  233,  233,  233,
+      233,  237,  237,  237,  237,  239,  255,  239,  239,  241,
+      255,  241,  241,  248,  248,  248,  248,  252,  252,  252,
+      252,    5,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255
+
     } ;
 
-static yyconst flex_int16_t yy_chk[690] =
+static yyconst flex_int16_t yy_chk[696] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    7,    7,    7,    8,    8,    8,   13,
-        7,   41,   13,    8,   11,   11,   11,   11,   11,   47,
-       14,   11,   11,   47,   14,   11,   19,   19,   41,   15,
-       16,   11,   12,   12,   12,   12,   12,   14,   16,   12,
-       12,   12,   15,   18,   16,   20,   21,   23,   21,   23,
-      247,   25,   20,   38,   25,   38,   45,   18,   25,   30,
-       30,   18,   31,   31,   31,   30,   40,   45,   40,   31,
+        7,   15,   13,    8,   11,   11,   11,   11,   11,   14,
+      252,   11,   11,   14,   15,   11,   19,   19,   18,   16,
+       39,   11,   12,   12,   12,   12,   12,   16,   20,   12,
+       12,   12,   18,   16,   39,   20,   18,   21,   23,   21,
+       23,   25,   50,   42,   25,   30,   30,   38,   25,   38,
+      250,   30,   31,   31,   31,   40,   50,   40,   41,   31,
 
-       34,   34,   34,   34,   39,   42,   46,   34,   34,   36,
-       36,   36,   36,   36,   43,   43,   36,   36,   39,   44,
-       44,   50,   48,   46,   48,   49,   42,   51,   49,   52,
-       53,   54,   55,   66,   56,   66,   55,   56,   65,   58,
-       58,   51,   65,   67,   50,   58,   54,   53,   54,   61,
-       61,   52,   68,   67,   69,   61,   70,   71,   72,   70,
-       73,   71,   74,   75,   77,   75,   68,   76,   82,   76,
-       72,   79,   73,   69,   78,   87,   78,   81,  245,   79,
-       74,   80,   80,   81,   80,   91,   77,   80,   89,   82,
-       83,   83,   89,   87,   90,   94,   83,   88,   88,   88,
+       34,   34,   34,   34,   42,   43,   43,   34,   34,   36,
+       36,   36,   36,   36,   44,   41,   36,   36,   45,   46,
+       47,   48,   47,   46,   48,   44,   49,   52,   51,   54,
+       53,   55,  248,   54,   55,   45,   57,   57,   66,   64,
+       60,   60,   57,   64,   52,   53,   60,   53,   66,   49,
+       51,   65,   67,   65,   68,   69,   70,   71,   72,   69,
+       73,   74,   73,   74,   75,   76,   67,   76,   70,   71,
+       77,   78,   78,   68,   78,   79,   72,   78,   77,   80,
+       85,   79,   81,   81,   88,   87,   75,   89,   81,   87,
+       90,   92,   90,  109,   96,   96,   88,   96,   85,   93,
 
-       88,   88,   95,  243,   88,   88,   90,   92,   91,   92,
-       95,   98,   98,  103,   98,   94,   96,   96,   96,   96,
-       96,  103,  106,   96,   96,   97,   97,   97,   97,   97,
-      100,  242,   97,   97,   99,   99,   99,   99,   99,  104,
-      106,   99,   99,  104,  101,  100,  101,  102,  102,  102,
-      102,  102,  105,  105,  102,  102,  107,  107,  109,  109,
-      111,  112,  107,  113,  109,  115,  116,  112,  116,  117,
-      117,  119,  119,  111,  240,  117,  129,  119,  113,  114,
-      114,  114,  114,  114,  115,  197,  114,  114,  121,  121,
-      123,  123,  125,  125,  121,  129,  123,  134,  125,  127,
+       80,   86,   86,   86,   86,   86,  109,   93,   86,   86,
+       89,   92,   95,   95,   95,   95,   95,   98,  101,   95,
+       95,   97,   97,   97,   97,   97,  101,  247,   97,   97,
+      104,   99,   98,   99,  100,  100,  100,  100,  100,  102,
+      113,  100,  100,  102,  103,  103,  105,  105,  104,  107,
+      107,  110,  105,  111,  114,  107,  114,  110,  115,  113,
+      115,  116,  133,  133,  125,  146,  146,  245,  111,  112,
+      112,  112,  112,  112,  117,  117,  112,  112,  236,  130,
+      117,  119,  119,  125,  116,  121,  121,  119,  123,  123,
+      131,  121,  126,  126,  123,  128,  128,  130,  126,  134,
 
-      127,  130,  130,  132,  132,  127,  135,  130,  197,  132,
-      137,  137,  138,  138,  143,  134,  145,  143,  138,  228,
-      145,  146,  146,  148,  148,  135,  191,  146,  191,  148,
-      150,  150,  151,  151,  151,  151,  151,  152,  152,  151,
-      151,  157,  157,  152,  162,  162,  173,  157,  167,  167,
-      162,  168,  168,  174,  174,  178,  173,  168,  179,  179,
-      180,  180,  186,  186,  188,  188,  180,  198,  186,  220,
-      188,  192,  192,  216,  178,  198,  198,  201,  201,  213,
-      230,  217,  216,  201,  208,  208,  208,  208,  208,  227,
-      231,  208,  208,  227,  213,  217,  222,  222,  224,  224,
+      134,  128,  236,  139,  141,  134,  139,  149,  141,  131,
+      142,  142,  144,  144,  149,  189,  142,  189,  144,  147,
+      147,  147,  147,  147,  160,  160,  147,  147,  148,  148,
+      148,  148,  148,  150,  150,  148,  148,  155,  155,  150,
+      161,  161,  166,  155,  167,  167,  161,  171,  172,  172,
+      173,  173,  166,  179,  179,  195,  173,  181,  181,  179,
+      187,  183,  183,  181,  185,  185,  171,  183,  196,  187,
+      185,  190,  190,  199,  199,  220,  196,  196,  195,  199,
+      204,  204,  217,  209,  220,  221,  204,  209,  212,  212,
+      212,  212,  212,  235,  232,  212,  212,  217,  232,  221,
 
-      232,  232,  222,  230,  224,  238,  232,  237,  237,  241,
-      239,  218,  214,  211,  231,  209,  206,  199,  195,  193,
-      190,  185,  177,  175,  136,  238,  239,  241,  251,  251,
-      251,  251,  252,  252,  252,  253,  253,  253,  253,  254,
-      254,  254,  254,  255,   93,  255,  255,  256,  256,  256,
-      256,  257,   64,  257,  257,  258,  258,  258,  258,  259,
-      259,   35,  259,  260,  260,  260,  260,  261,   28,  261,
-      261,  262,  262,  262,  262,  263,  263,  263,  263,  264,
-      264,  264,  264,  265,  265,  265,  265,  266,  266,  266,
-      266,  267,  267,  267,  267,  268,   24,  268,  268,  269,
+      224,  224,  227,  227,  229,  229,  224,  243,  227,  244,
+      229,  237,  237,  242,  242,  246,  235,  237,  233,  225,
+      222,  218,  215,  213,  210,  244,  197,  243,  193,  191,
+      188,  178,  170,  246,  256,  256,  256,  256,  257,  257,
+      257,  258,  258,  258,  258,  259,  259,  259,  259,  260,
+      168,  260,  260,  261,  261,  261,  261,  262,  132,  262,
+      262,  263,  263,  263,  263,  264,  264,   94,  264,  265,
+      265,  265,  265,  266,   91,  266,  266,  267,  267,  267,
+      267,  268,  268,  268,  268,  269,  269,  269,  269,  270,
+      270,  270,  270,  271,  271,  271,  271,  272,   63,  272,
 
-      269,  269,  269,  270,  270,  270,  270,  271,   22,  271,
-      271,  272,  272,  272,  272,  273,   17,  273,  273,  274,
-      274,  274,  274,  275,    6,  275,  275,  276,  276,  276,
-      276,  277,    5,  277,  277,  278,  278,  278,  278,  279,
-        4,  279,  279,  280,  280,  280,  280,  281,    3,  281,
-      281,  282,  282,  282,  282,  283,    0,  283,  283,  284,
-        0,  284,  284,  285,    0,  285,  285,  286,    0,  286,
-      286,  287,  287,  287,  287,  288,  288,  288,  288,  289,
-        0,  289,  289,  290,  290,  290,  290,  291,  291,  291,
-      291,  292,    0,  292,  292,  293,  293,  293,  293,  294,
+      272,  273,  273,  273,  273,  274,  274,  274,  274,  275,
+       35,  275,  275,  276,  276,  276,  276,  277,   28,  277,
+      277,  278,  278,  278,  278,  279,   24,  279,  279,  280,
+      280,  280,  280,  281,   22,  281,  281,  282,  282,  282,
+      282,  283,   17,  283,  283,  284,  284,  284,  284,  285,
+      285,  285,  285,  286,    6,  286,  286,  287,    5,  287,
+      287,  288,    4,  288,  288,  289,  289,  289,  289,  290,
+      290,  290,  290,  291,    3,  291,  291,  292,  292,  292,
+      292,  293,  293,  293,  293,  294,    0,  294,  294,  295,
+      295,  295,  295,  296,    0,  296,  296,  297,  297,  297,
 
-      294,  294,  294,  295,  295,  295,  295,  296,  296,  296,
-      296,  297,  297,  297,  297,  298,    0,  298,  298,  299,
-      299,  299,  299,  300,  300,  300,  300,  301,    0,  301,
-      301,  302,  302,  302,  302,  303,  303,  303,  303,  304,
-        0,  304,  304,  305,    0,  305,  305,  306,  306,  306,
-      306,  307,  307,  307,  307,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250
+      297,  298,  298,  298,  298,  299,  299,  299,  299,  300,
+      300,  300,  300,  301,  301,  301,  301,  302,    0,  302,
+      302,  303,    0,  303,  303,  304,  304,  304,  304,  305,
+      305,  305,  305,  306,    0,  306,  306,  307,  307,  307,
+      307,  308,  308,  308,  308,  309,    0,  309,  309,  310,
+        0,  310,  310,  311,  311,  311,  311,  312,  312,  312,
+      312,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255
+
     } ;
 
 #define YY_TRAILING_MASK 0x2000
@@ -773,8 +776,7 @@ goto find_rule; \
  * syntax; if the target string has to contain "," or ":" the new
  * syntax's "target=" should be used.
  */
-
-#line 35 "libxlu_disk_l.l"
+#line 31 "libxlu_disk_l.l"
 #include "libxlu_disk_i.h"
 
 #define YY_NO_INPUT
@@ -883,7 +885,7 @@ static int vdev_and_devtype(DiskParseCon
 #define DPC ((DiskParseContext*)yyextra)
 
 
-#line 887 "libxlu_disk_l.c"
+#line 889 "libxlu_disk_l.c"
 
 #define INITIAL 0
 #define LEXERR 1
@@ -1119,12 +1121,12 @@ YY_DECL
 	register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 155 "libxlu_disk_l.l"
+#line 151 "libxlu_disk_l.l"
 
 
  /*----- the scanner rules which do the parsing -----*/
 
-#line 1128 "libxlu_disk_l.c"
+#line 1130 "libxlu_disk_l.c"
 
 	if ( !yyg->yy_init )
 		{
@@ -1318,7 +1320,7 @@ YY_RULE_SETUP
    * matched the whole string, so these patterns take precedence */
 case 13:
 YY_RULE_SETUP
-#line 189 "libxlu_disk_l.l"
+#line 185 "libxlu_disk_l.l"
 {
                     STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `[format=]...,'");
@@ -1352,7 +1354,7 @@ case 17:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 210 "libxlu_disk_l.l"
+#line 199 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 18:
@@ -1360,7 +1362,7 @@ case 18:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 211 "libxlu_disk_l.l"
+#line 200 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 19:
@@ -1368,7 +1370,7 @@ case 19:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 212 "libxlu_disk_l.l"
+#line 201 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 20:
@@ -1392,7 +1394,7 @@ YY_RULE_SETUP
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 222 "libxlu_disk_l.l"
+#line 211 "libxlu_disk_l.l"
 {
     STRIP(',');
 
@@ -1421,7 +1423,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 248 "libxlu_disk_l.l"
+#line 237 "libxlu_disk_l.l"
 {
     BEGIN(LEXERR);
     yymore();
@@ -2531,4 +2533,4 @@ void xlu__disk_yyfree (void * ptr , yysc
 
 #define YYTABLES_NAME "yytables"
 
-#line 255 "libxlu_disk_l.l"
+#line 244 "libxlu_disk_l.l"
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxlu_disk_l.h
--- a/tools/libxl/libxlu_disk_l.h	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxlu_disk_l.h	Mon Aug 06 12:25:06 2012 +0100
@@ -3,12 +3,8 @@
 #define xlu__disk_yyIN_HEADER 1
 
 #line 6 "libxlu_disk_l.h"
-#line 31 "libxlu_disk_l.l"
-#include "libxl_osdeps.h" /* must come before any other headers */
 
-
-
-#line 12 "libxlu_disk_l.h"
+#line 8 "libxlu_disk_l.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -344,8 +340,8 @@ extern int xlu__disk_yylex (yyscan_t yys
 #undef YY_DECL
 #endif
 
-#line 255 "libxlu_disk_l.l"
+#line 244 "libxlu_disk_l.l"
 
-#line 350 "libxlu_disk_l.h"
+#line 346 "libxlu_disk_l.h"
 #undef xlu__disk_yyIN_HEADER
 #endif /* xlu__disk_yyHEADER_H */
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxlu_disk_l.l
--- a/tools/libxl/libxlu_disk_l.l	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxlu_disk_l.l	Mon Aug 06 12:25:06 2012 +0100
@@ -27,10 +27,6 @@
  * syntax's "target=" should be used.
  */
 
-%top{
-#include "libxl_osdeps.h" /* must come before any other headers */
-}
-
 %{
 #include "libxlu_disk_i.h"
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT5-0005hz-0j; Tue, 07 Aug 2012 20:33:31 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT2-0005eX-UN
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:29 +0000
Received: from [85.158.139.83:59913] by server-2.bemta-5.messagelabs.com id
	E4/1C-25118-89B71205; Tue, 07 Aug 2012 20:33:28 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-182.messagelabs.com!1344371606!30719751!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23161 invoked from network); 7 Aug 2012 20:33:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:27 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-00042R-Bu
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-0003Ng-AB
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Message-Id: <E1SyqT0-0003Ng-AB@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:25 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] mark 8x14 font data const
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344339752 -7200
# Node ID 5fb24be93a2ae41e60690a9a3f1385112c05c06c
# Parent  ca1db6da64e9a54cc6a5fc378dcdcea0a5715403
mark 8x14 font data const

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---


diff -r ca1db6da64e9 -r 5fb24be93a2a xen/drivers/video/font_8x14.c
--- a/xen/drivers/video/font_8x14.c	Tue Aug 07 08:49:53 2012 +0200
+++ b/xen/drivers/video/font_8x14.c	Tue Aug 07 13:42:32 2012 +0200
@@ -9,7 +9,7 @@
 
 #define FONTDATAMAX (256*14)
 
-static unsigned char fontdata_8x14[FONTDATAMAX] = {
+static const unsigned char fontdata_8x14[FONTDATAMAX] = {
 
     /* 0 0x00 '^@' */
     0x00, /* 00000000 */

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT4-0005hj-Tf; Tue, 07 Aug 2012 20:33:30 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT2-0005dx-GI
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:28 +0000
Received: from [85.158.143.99:37571] by server-1.bemta-4.messagelabs.com id
	E6/DB-24392-79B71205; Tue, 07 Aug 2012 20:33:27 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-216.messagelabs.com!1344371604!29818854!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8552 invoked from network); 7 Aug 2012 20:33:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:25 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-000420-6g
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0003Mh-52
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Message-Id: <E1SyqSy-0003Mh-52@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:23 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Merge backout of 25727:a8d708fcb347
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1344252306 -3600
# Node ID 60f2c7b74741776d1a25fe2618fb17b570996ce5
# Parent  6221bee07e5dc31d9ed9eb3c0c1c94a80c56c78d
# Parent  ce0079dc8c52d5335d78b24c4c6e0a36d4780061
Merge backout of 25727:a8d708fcb347
---


diff -r 6221bee07e5d -r 60f2c7b74741 docs/misc/xl-disk-configuration.txt
--- a/docs/misc/xl-disk-configuration.txt	Mon Aug 06 11:18:43 2012 +0200
+++ b/docs/misc/xl-disk-configuration.txt	Mon Aug 06 12:25:06 2012 +0100
@@ -160,10 +160,7 @@ script=<script>
 ---------------
 
 Specifies that <target> is not a normal host path, but rather
-information to be interpreted by the executable program <script>,
-(looked for in /etc/xen/scripts, if it doesn't contain a slash).
-
-These scripts are normally called "block-<script>".
+information to be interpreted by /etc/xen/scripts/block-<script>.
 
 
 
@@ -207,7 +204,7 @@ Supported values:      iscsi:  nbd:  enb
 In xend and old versions of libxl it was necessary to specify the
 "script" (see above) with a prefix.  For compatibility, these four
 prefixes are recognised as specifying the corresponding script.  They
-are equivalent to "script=block-<script>".
+are equivalent to "script=<script>".
 
 
 <deprecated-prefix>:
diff -r 6221bee07e5d -r 60f2c7b74741 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/hotplug/Linux/block	Mon Aug 06 12:25:06 2012 +0100
@@ -342,4 +342,4 @@ esac
 
 # If we've reached here, $t is neither phy nor file, so fire a helper script.
 [ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \
-  ${XEN_SCRIPT_DIR}/block-"$t" "$command"
+  ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/check-xl-disk-parse
--- a/tools/libxl/check-xl-disk-parse	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/check-xl-disk-parse	Mon Aug 06 12:25:06 2012 +0100
@@ -142,44 +142,5 @@ disk: {
 
 EOF
 one 0 vdev=hdc,access=r,devtype=cdrom,format=empty
-one 0 vdev=hdc,access=r,devtype=cdrom
-
-expected <<EOF
-disk: {
-    "backend_domid": 0,
-    "pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost",
-    "vdev": "xvda",
-    "backend": "unknown",
-    "format": "raw",
-    "script": "block-iscsi",
-    "removable": 0,
-    "readwrite": 1,
-    "is_cdrom": 0
-}
-
-EOF
-
-# http://backdrift.org/xen-block-iscsi-script-with-multipath-support
-one 0 iscsi:iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost,xvda,w
-one 0 vdev=xvda,access=w,script=block-iscsi,target=iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost
-
-expected <<EOF
-disk: {
-    "backend_domid": 0,
-    "pdev_path": "app01",
-    "vdev": "hda",
-    "backend": "unknown",
-    "format": "raw",
-    "script": "block-drbd",
-    "removable": 0,
-    "readwrite": 1,
-    "is_cdrom": 0
-}
-
-EOF
-
-# http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html
-# http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html
-one 0 drbd:app01,hda,w
 
 complete
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxl.c	Mon Aug 06 12:25:06 2012 +0100
@@ -1796,9 +1796,9 @@ static void device_disk_add(libxl__egc *
     STATE_AO_GC(aodev->ao);
     flexarray_t *front = NULL;
     flexarray_t *back = NULL;
-    char *dev, *script;
+    char *dev;
     libxl__device *device;
-    int rc;
+    int major, minor, rc;
     libxl_ctx *ctx = gc->owner;
     xs_transaction_t t = XBT_NULL;
 
@@ -1833,6 +1833,13 @@ static void device_disk_add(libxl__egc *
             goto out_free;
         }
 
+        if (disk->script) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts"
+                       " not yet supported, sorry");
+            rc = ERROR_INVAL;
+            goto out_free;
+        }
+
         GCNEW(device);
         rc = libxl__device_from_disk(gc, domid, disk, device);
         if (rc != 0) {
@@ -1844,16 +1851,18 @@ static void device_disk_add(libxl__egc *
         switch (disk->backend) {
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
-
-                script = libxl__abs_path(gc, disk->script ?: "block",
-                                         libxl__xen_script_dir_path());
-
         do_backend_phy:
+                libxl__device_physdisk_major_minor(dev, &major, &minor);
+                flexarray_append(back, "physical-device");
+                flexarray_append(back, libxl__sprintf(gc, "%x:%x", major, minor));
+
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                assert(script);
-                flexarray_append_pair(back, "script", script);
+                flexarray_append(back, "script");
+                flexarray_append(back, GCSPRINTF("%s/%s",
+                                                 libxl__xen_script_dir_path(),
+                                                 "block"));
 
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
@@ -1870,12 +1879,10 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                /*
-                 * tap devices do not support custom block scripts and
-                 * always use the plain block script.
-                 */
-                script = libxl__abs_path(gc, "block",
-                                         libxl__xen_script_dir_path());
+                flexarray_append(back, "script");
+                flexarray_append(back, GCSPRINTF("%s/%s",
+                                                 libxl__xen_script_dir_path(),
+                                                 "blktap"));
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;
@@ -2575,10 +2582,13 @@ void libxl__device_nic_add(libxl__egc *e
     flexarray_append(back, "1");
     flexarray_append(back, "state");
     flexarray_append(back, libxl__sprintf(gc, "%d", 1));
-    if (nic->script)
-        flexarray_append_pair(back, "script",
-                              libxl__abs_path(gc, nic->script,
-                                              libxl__xen_script_dir_path()));
+    if (nic->script) {
+        flexarray_append(back, "script");
+        flexarray_append(back, nic->script[0]=='/' ? nic->script
+                         : libxl__sprintf(gc, "%s/%s",
+                                          libxl__xen_script_dir_path(),
+                                          nic->script));
+    }
 
     if (nic->ifname) {
         flexarray_append(back, "vifname");
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxl_device.c	Mon Aug 06 12:25:06 2012 +0100
@@ -147,26 +147,18 @@ typedef struct {
 } disk_try_backend_args;
 
 static int disk_try_backend(disk_try_backend_args *a,
-                            libxl_disk_backend backend)
- {
-    libxl__gc *gc = a->gc;
+                            libxl_disk_backend backend) {
     /* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or
      * backend on success */
-    libxl_ctx *ctx = libxl__gc_owner(gc);
+    libxl_ctx *ctx = libxl__gc_owner(a->gc);
+    switch (backend) {
 
-    switch (backend) {
     case LIBXL_DISK_BACKEND_PHY:
         if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW ||
               a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) {
             goto bad_format;
         }
 
-        if (a->disk->script) {
-            LOG(DEBUG, "Disk vdev=%s, uses script=... assuming phy backend",
-                a->disk->vdev);
-            return backend;
-        }
-
         if (libxl__try_phy_backend(a->stab.st_mode))
             return backend;
 
@@ -176,8 +168,6 @@ static int disk_try_backend(disk_try_bac
         return 0;
 
     case LIBXL_DISK_BACKEND_TAP:
-        if (a->disk->script) goto bad_script;
-
         if (!libxl__blktap_enabled(a->gc)) {
             LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
                        " unsuitable because blktap not available",
@@ -191,7 +181,6 @@ static int disk_try_backend(disk_try_bac
         return backend;
 
     case LIBXL_DISK_BACKEND_QDISK:
-        if (a->disk->script) goto bad_script;
         return backend;
 
     default:
@@ -209,11 +198,6 @@ static int disk_try_backend(disk_try_bac
                libxl_disk_backend_to_string(backend),
                libxl_disk_format_to_string(a->disk->format));
     return 0;
-
- bad_script:
-    LOG(DEBUG, "Disk vdev=%s, backend %s not compatible with script=...",
-        a->disk->vdev, libxl_disk_backend_to_string(backend));
-    return 0;
 }
 
 int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
@@ -236,7 +220,7 @@ int libxl__device_disk_set_backend(libxl
             return ERROR_INVAL;
         }
         memset(&a.stab, 0, sizeof(a.stab));
-    } else if (!disk->script) {
+    } else {
         if (stat(disk->pdev_path, &a.stab)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s "
                              "failed to stat: %s",
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxlu_disk_i.h
--- a/tools/libxl/libxlu_disk_i.h	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxlu_disk_i.h	Mon Aug 06 12:25:06 2012 +0100
@@ -1,6 +1,8 @@
 #ifndef LIBXLU_DISK_I_H
 #define LIBXLU_DISK_I_H
 
+#include "libxl_osdeps.h" /* must come before any other headers */
+
 #include "libxlu_internal.h"
 
 
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxlu_disk_l.c
--- a/tools/libxl/libxlu_disk_l.c	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxlu_disk_l.c	Mon Aug 06 12:25:06 2012 +0100
@@ -1,10 +1,6 @@
 #line 2 "libxlu_disk_l.c"
-#line 31 "libxlu_disk_l.l"
-#include "libxl_osdeps.h" /* must come before any other headers */
 
-
-
-#line 8 "libxlu_disk_l.c"
+#line 4 "libxlu_disk_l.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -383,76 +379,77 @@ static yyconst flex_int16_t yy_acclist[4
      8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
 
-       22,   22,   24, 8193,   22, 8193,   22, 8193, 8213,   22,
-     8213,   22, 8213,   12,   22,   22,   22,   22,   22,   22,
+       22,   24, 8193,   22, 8193,   22, 8193, 8213,   22, 8213,
+       22, 8213,   12,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-       22,   22, 8213,   22, 8213,   22, 8213,   12,   22,   17,
-     8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
-     8206, 8213,   22,16398,16405,   20, 8213,   22,16405,   22,
-     8205, 8213,   22,16397,16405,   22,   22, 8208, 8213,   22,
-    16400,16405,   22,   22,   22,   22,   17, 8213,   22,   17,
-     8213,   22,   17,   22,   17, 8213,   22,    3,   22,   22,
-       19, 8213,   22,16405,   22,   22, 8206, 8213,   22, 8206,
+     8213,   22, 8213,   22, 8213,   12,   22,   17, 8213,   22,
+    16405,   22,   22,   22,   22,   22,   22,   22, 8213,   22,
+    16405,   20, 8213,   22,16405,   22, 8205, 8213,   22,16397,
+    16405,   22,   22, 8208, 8213,   22,16400,16405,   22,   22,
+       22,   22,   17, 8213,   22,   17, 8213,   22,   17,   22,
+       17, 8213,   22,    3,   22,   22,   19, 8213,   22,16405,
+       22,   22,   22,   22,   20, 8213,   22,   20, 8213,   22,
 
-     8213,   22, 8206,   22, 8206, 8213,   20, 8213,   22,   20,
-     8213,   22,   20,   22,   20, 8213, 8205, 8213,   22, 8205,
-     8213,   22, 8205,   22, 8205, 8213,   22, 8208, 8213,   22,
-     8208, 8213,   22, 8208,   22, 8208, 8213,   22,   22,    9,
-       22,   17, 8213,   22,   17, 8213,   22,   17, 8213,   17,
-       22,   17,   22,    3,   22,   22,   19, 8213,   22,   19,
-     8213,   22,   19,   22,   19, 8213,   22,   18, 8213,   22,
-    16405, 8206, 8213,   22, 8206, 8213,   22, 8206, 8213, 8206,
-       22, 8206,   20, 8213,   22,   20, 8213,   22,   20, 8213,
-       20,   22,   20, 8205, 8213,   22, 8205, 8213,   22, 8205,
+       20,   22,   20, 8213, 8205, 8213,   22, 8205, 8213,   22,
+     8205,   22, 8205, 8213,   22, 8208, 8213,   22, 8208, 8213,
+       22, 8208,   22, 8208, 8213,   22,   22,    9,   22,   17,
+     8213,   22,   17, 8213,   22,   17, 8213,   17,   22,   17,
+       22,    3,   22,   22,   19, 8213,   22,   19, 8213,   22,
+       19,   22,   19, 8213,   22,   18, 8213,   22,16405, 8206,
+     8213,   22,16398,16405,   22,   20, 8213,   22,   20, 8213,
+       22,   20, 8213,   20,   22,   20, 8205, 8213,   22, 8205,
+     8213,   22, 8205, 8213, 8205,   22, 8205,   22, 8208, 8213,
+       22, 8208, 8213,   22, 8208, 8213, 8208,   22, 8208,   22,
 
-     8213, 8205,   22, 8205,   22, 8208, 8213,   22, 8208, 8213,
-       22, 8208, 8213, 8208,   22, 8208,   22,   22,    9,   12,
-        9,    7,   22,   22,   19, 8213,   22,   19, 8213,   22,
-       19, 8213,   19,   22,   19,    2,   18, 8213,   22,   18,
-     8213,   22,   18,   22,   18, 8213,   10,   22,   11,    9,
-        9,   12,    7,   12,    7,   22,    6,    2,   12,    2,
-       18, 8213,   22,   18, 8213,   22,   18, 8213,   18,   22,
-       18,   10,   12,   10,   15, 8213,   22,16405,   11,   12,
-       11,    7,    7,   12,   22,    6,   12,    6,    6,   12,
-        6,   12,    2,    2,   12,   10,   10,   12,   15, 8213,
+       22,    9,   12,    9,    7,   22,   22,   19, 8213,   22,
+       19, 8213,   22,   19, 8213,   19,   22,   19,    2,   18,
+     8213,   22,   18, 8213,   22,   18,   22,   18, 8213, 8206,
+     8213,   22, 8206, 8213,   22, 8206,   22, 8206, 8213,   22,
+       10,   22,   11,    9,    9,   12,    7,   12,    7,   22,
+        6,    2,   12,    2,   18, 8213,   22,   18, 8213,   22,
+       18, 8213,   18,   22,   18, 8206, 8213,   22, 8206, 8213,
+       22, 8206, 8213, 8206,   22, 8206,   22,   10,   12,   10,
+       15, 8213,   22,16405,   11,   12,   11,    7,    7,   12,
+       22,    6,   12,    6,    6,   12,    6,   12,    2,    2,
 
-       22,   15, 8213,   22,   15,   22,   15, 8213,   11,   12,
-       22,    6,    6,   12,    6,    6,   15, 8213,   22,   15,
-     8213,   22,   15, 8213,   15,   22,   15,   22,    6,    6,
-        8,    6,    5,    6,    8,   12,    8,    4,    6,    5,
-        6,    8,    8,   12,    4,    6
+       12, 8206,   22,16398,   10,   10,   12,   15, 8213,   22,
+       15, 8213,   22,   15,   22,   15, 8213,   11,   12,   22,
+        6,    6,   12,    6,    6,   15, 8213,   22,   15, 8213,
+       22,   15, 8213,   15,   22,   15,   22,    6,    6,    8,
+        6,    5,    6,    8,   12,    8,    4,    6,    5,    6,
+        8,    8,   12,    4,    6
     } ;
 
-static yyconst flex_int16_t yy_accept[252] =
+static yyconst flex_int16_t yy_accept[257] =
     {   0,
         1,    1,    1,    2,    3,    4,    7,   12,   16,   19,
        21,   24,   27,   30,   33,   36,   39,   42,   45,   48,
        51,   54,   57,   60,   63,   66,   68,   69,   70,   71,
        73,   76,   78,   79,   80,   81,   84,   84,   85,   86,
        87,   88,   89,   90,   91,   92,   93,   94,   95,   96,
-       97,   98,   99,  100,  101,  102,  103,  104,  106,  108,
-      109,  111,  113,  114,  115,  116,  117,  118,  119,  120,
+       97,   98,   99,  100,  101,  102,  103,  105,  107,  108,
+      110,  112,  113,  114,  115,  116,  117,  118,  119,  120,
       121,  122,  123,  124,  125,  126,  127,  128,  129,  130,
-      131,  132,  133,  135,  137,  138,  139,  140,  144,  145,
-      146,  147,  148,  149,  150,  151,  156,  160,  161,  166,
+      131,  133,  135,  136,  137,  138,  142,  143,  144,  145,
+      146,  147,  148,  149,  152,  156,  157,  162,  163,  164,
 
-      167,  168,  173,  174,  175,  176,  177,  180,  183,  185,
-      187,  188,  190,  191,  195,  196,  197,  200,  203,  205,
-      207,  210,  213,  215,  217,  220,  223,  225,  227,  228,
-      231,  234,  236,  238,  239,  240,  241,  242,  245,  248,
-      250,  252,  253,  254,  256,  257,  260,  263,  265,  267,
-      268,  272,  275,  278,  280,  282,  283,  286,  289,  291,
-      293,  294,  297,  300,  302,  304,  305,  306,  309,  312,
-      314,  316,  317,  318,  319,  321,  322,  323,  324,  325,
-      328,  331,  333,  335,  336,  337,  340,  343,  345,  347,
-      348,  349,  350,  351,  353,  355,  356,  357,  358,  360,
+      169,  170,  171,  172,  173,  176,  179,  181,  183,  184,
+      186,  187,  191,  192,  193,  194,  195,  198,  201,  203,
+      205,  208,  211,  213,  215,  216,  219,  222,  224,  226,
+      227,  228,  229,  230,  233,  236,  238,  240,  241,  242,
+      244,  245,  248,  251,  253,  255,  256,  260,  265,  266,
+      269,  272,  274,  276,  277,  280,  283,  285,  287,  288,
+      289,  292,  295,  297,  299,  300,  301,  302,  304,  305,
+      306,  307,  308,  311,  314,  316,  318,  319,  320,  323,
+      326,  328,  330,  333,  336,  338,  340,  341,  342,  343,
+      344,  345,  347,  349,  350,  351,  352,  354,  355,  358,
 
-      361,  364,  367,  369,  371,  372,  374,  375,  379,  381,
-      382,  383,  385,  386,  388,  389,  391,  393,  394,  396,
-      397,  399,  402,  405,  407,  409,  411,  412,  413,  415,
-      416,  417,  420,  423,  425,  427,  428,  429,  430,  431,
-      432,  433,  435,  437,  438,  440,  442,  443,  445,  447,
-      447
+      361,  363,  365,  366,  369,  372,  374,  376,  377,  378,
+      380,  381,  385,  387,  388,  389,  391,  392,  394,  395,
+      397,  399,  400,  402,  405,  406,  408,  411,  414,  416,
+      418,  420,  421,  422,  424,  425,  426,  429,  432,  434,
+      436,  437,  438,  439,  440,  441,  442,  444,  446,  447,
+      449,  451,  452,  454,  456,  456
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -495,238 +492,244 @@ static yyconst flex_int32_t yy_meta[34] 
         1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[308] =
+static yyconst flex_int16_t yy_base[313] =
     {   0,
-        0,    0,  546,  538,  533,  521,   32,   35,  656,  656,
-       44,   62,   30,   41,   50,   51,  507,   64,   47,   66,
-       67,  499,   68,  487,   72,    0,  656,  465,  656,   87,
-       91,    0,    0,  100,  452,  109,    0,   74,   95,   87,
-       32,   96,  105,  110,   77,   97,   40,  113,  116,  112,
-      118,  120,  121,  122,  123,  125,    0,  137,    0,    0,
-      147,    0,    0,  449,  129,  126,  134,  143,  145,  147,
-      148,  149,  151,  153,  156,  160,  155,  167,  162,  175,
-      168,  159,  188,    0,    0,  656,  166,  197,  179,  185,
-      176,  200,  435,  186,  193,  216,  225,  205,  234,  221,
+        0,    0,  572,  560,  559,  551,   32,   35,  662,  662,
+       44,   62,   30,   40,   32,   50,  533,   49,   47,   59,
+       68,  525,   69,  517,   72,    0,  662,  515,  662,   83,
+       91,    0,    0,  100,  501,  109,    0,   78,   51,   86,
+       89,   74,   96,  105,  109,  110,  111,  112,  117,   73,
+      119,  118,  121,  120,  122,    0,  134,    0,    0,  138,
+        0,    0,  495,  130,  144,  129,  143,  145,  146,  147,
+      148,  149,  153,  154,  155,  158,  161,  165,  166,  170,
+      180,    0,    0,  662,  171,  201,  176,  175,  178,  183,
+      465,  182,  190,  455,  212,  188,  221,  208,  224,  234,
 
-      237,  247,  204,  230,  244,  213,  254,    0,  256,    0,
-      251,  258,  254,  279,  256,  259,  267,    0,  269,    0,
-      286,    0,  288,    0,  290,    0,  297,    0,  267,  299,
-        0,  301,    0,  288,  297,  421,  302,  310,    0,    0,
-        0,    0,  305,  656,  307,  319,    0,  321,    0,  322,
-      332,  335,    0,    0,    0,    0,  339,    0,    0,    0,
-        0,  342,    0,    0,    0,    0,  340,  349,    0,    0,
-        0,    0,  337,  345,  420,  656,  419,  346,  350,  358,
-        0,    0,    0,    0,  418,  360,    0,  362,    0,  417,
-      319,  369,  416,  656,  415,  656,  276,  364,  414,  656,
+      209,  230,  236,  221,  244,    0,  247,    0,  184,  248,
+      244,  269,  231,  247,  251,  258,  272,    0,  279,    0,
+      283,    0,  286,    0,  255,  290,    0,  293,    0,  270,
+      281,  455,  254,  297,    0,    0,    0,    0,  294,  662,
+      295,  308,    0,  310,    0,  257,  319,  328,  304,  331,
+        0,    0,    0,    0,  335,    0,    0,    0,    0,  316,
+      338,    0,    0,    0,    0,  333,  336,  447,  662,  429,
+      338,  340,  348,    0,    0,    0,    0,  428,  351,    0,
+      355,    0,  359,    0,  362,    0,  357,  427,  308,  369,
+      426,  662,  425,  662,  346,  365,  423,  662,  371,    0,
 
-      375,    0,    0,    0,    0,  413,  656,  384,  412,    0,
-      410,  656,  370,  409,  656,  370,  378,  408,  656,  366,
-      656,  394,    0,  396,    0,    0,  380,  316,  656,  377,
-      387,  398,    0,    0,    0,    0,  399,  402,  407,  271,
-      406,  228,  200,  656,  175,  656,   77,  656,  656,  656,
-      428,  432,  435,  439,  443,  447,  451,  455,  459,  463,
-      467,  471,  475,  479,  483,  487,  491,  495,  499,  503,
-      507,  511,  515,  519,  523,  527,  531,  535,  539,  543,
-      547,  551,  555,  559,  563,  567,  571,  575,  579,  583,
-      587,  591,  595,  599,  603,  607,  611,  615,  619,  623,
+        0,    0,    0,  378,    0,    0,    0,    0,  380,  421,
+      662,  388,  420,    0,  419,  662,  373,  418,  662,  372,
+      382,  417,  662,  398,  416,  662,  400,    0,  402,    0,
+        0,  385,  415,  662,  390,  275,  409,    0,    0,    0,
+        0,  405,  404,  406,  264,  412,  224,  129,  662,   87,
+      662,   47,  662,  662,  662,  434,  438,  441,  445,  449,
+      453,  457,  461,  465,  469,  473,  477,  481,  485,  489,
+      493,  497,  501,  505,  509,  513,  517,  521,  525,  529,
+      533,  537,  541,  545,  549,  553,  557,  561,  565,  569,
+      573,  577,  581,  585,  589,  593,  597,  601,  605,  609,
 
-      627,  631,  635,  639,  643,  647,  651
+      613,  617,  621,  625,  629,  633,  637,  641,  645,  649,
+      653,  657
     } ;
 
-static yyconst flex_int16_t yy_def[308] =
+static yyconst flex_int16_t yy_def[313] =
     {   0,
-      250,    1,  251,  251,  250,  252,  253,  253,  250,  250,
-      254,  254,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  255,  250,  252,  250,  256,
-      253,  257,  257,  258,   12,  252,  259,   12,   12,   12,
+      255,    1,  256,  256,  255,  257,  258,  258,  255,  255,
+      259,  259,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  260,  255,  257,  255,  261,
+      258,  262,  262,  263,   12,  257,  264,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,   12,  255,  256,  257,  257,
-      260,  261,  261,  250,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  260,  261,  262,  262,  265,
+      266,  266,  255,   12,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,  260,  261,  261,  250,   12,  262,   12,   12,
-       12,   12,   12,   12,   12,  263,  264,   12,  265,   12,
+      265,  266,  266,  255,   12,  267,   12,   12,   12,   12,
+       12,   12,   12,   36,  268,   12,  269,   12,   12,  270,
 
-       12,  266,   12,   12,   12,   12,  267,  268,  262,  268,
-       12,   12,   12,  269,   12,   12,  270,  271,  263,  271,
-      272,  273,  264,  273,  274,  275,  265,  275,   12,  276,
-      277,  266,  277,   12,   12,  278,   12,  267,  268,  268,
-      279,  279,   12,  250,   12,  280,  281,  269,  281,   12,
-      282,  270,  271,  271,  283,  283,  272,  273,  273,  284,
-      284,  274,  275,  275,  285,  285,   12,  276,  277,  277,
-      286,  286,   12,   12,  287,  250,  288,   12,   12,  280,
-      281,  281,  289,  289,  290,  291,  292,  282,  292,  293,
-       12,  294,  287,  250,  295,  250,   12,  296,  297,  250,
+       12,   12,   12,   12,  271,  272,  267,  272,   12,   12,
+       12,  273,   12,   12,   12,  257,  274,  275,  268,  275,
+      276,  277,  269,  277,   12,  278,  279,  270,  279,   12,
+       12,  280,   12,  271,  272,  272,  281,  281,   12,  255,
+       12,  282,  283,  273,  283,   12,  284,  285,  257,  274,
+      275,  275,  286,  286,  276,  277,  277,  287,  287,   12,
+      278,  279,  279,  288,  288,   12,   12,  289,  255,  290,
+       12,   12,  282,  283,  283,  291,  291,  292,  293,  294,
+      284,  294,  295,  296,  285,  296,  257,  297,   12,  298,
+      289,  255,  299,  255,   12,  300,  301,  255,  293,  294,
 
-      291,  292,  292,  298,  298,  299,  250,  300,  301,  301,
-      295,  250,   12,  302,  250,  302,  302,  297,  250,  299,
-      250,  303,  304,  300,  304,  301,   12,  302,  250,  302,
-      302,  303,  304,  304,  305,  305,   12,  302,  302,  306,
-      302,  302,  307,  250,  302,  250,  307,  250,  250,    0,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      294,  302,  302,  295,  296,  296,  303,  303,  257,  304,
+      255,  305,  306,  306,  299,  255,   12,  307,  255,  307,
+      307,  301,  255,  285,  304,  255,  308,  309,  305,  309,
+      306,   12,  307,  255,  307,  307,  308,  309,  309,  310,
+      310,   12,  307,  307,  311,  307,  307,  312,  255,  307,
+      255,  312,  255,  255,    0,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 
-      250,  250,  250,  250,  250,  250,  250
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255
     } ;
 
-static yyconst flex_int16_t yy_nxt[690] =
+static yyconst flex_int16_t yy_nxt[696] =
     {   0,
         6,    7,    8,    9,    6,    6,    6,    6,   10,   11,
        12,   13,   14,   15,   16,   17,   17,   18,   17,   17,
        17,   17,   19,   17,   20,   21,   22,   23,   24,   17,
        25,   17,   17,   31,   31,   32,   31,   31,   32,   35,
        33,   35,   41,   33,   28,   28,   28,   29,   34,   35,
-       35,   36,   37,   73,   42,   38,   35,   49,   68,   35,
-       35,   39,   28,   28,   28,   29,   34,   43,   45,   36,
-       37,   40,   44,   35,   46,   35,   35,   35,   51,   53,
-      244,   35,   50,   35,   55,   65,   35,   47,   56,   28,
-       59,   48,   31,   31,   32,   60,   35,   71,   67,   33,
+      249,   36,   37,   42,   43,   38,   35,   48,   35,   35,
+       35,   39,   28,   28,   28,   29,   34,   44,   35,   36,
+       37,   40,   46,   45,   65,   49,   47,   35,   35,   50,
+       52,   35,   35,   35,   54,   28,   58,   35,   55,   64,
+      254,   59,   31,   31,   32,   35,   75,   66,   35,   33,
 
-       28,   28,   28,   29,   35,   35,   35,   28,   37,   61,
-       61,   61,   62,   61,   35,   70,   61,   63,   66,   35,
-       49,   35,   35,   72,   74,   35,   69,   35,   75,   35,
-       35,   35,   35,   88,   35,   35,   82,   78,   35,   28,
-       59,   77,   87,   35,   76,   60,   80,   79,   81,   28,
-       84,   78,   35,   89,   35,   85,   35,   35,   35,   75,
-       35,   92,   35,   96,   35,   35,   90,   97,   35,   35,
-       93,   35,   94,   91,   99,   35,   35,   35,  249,  100,
-       95,  101,  102,  104,   35,   35,   98,  103,   35,  105,
-       28,   84,  111,  106,   35,   35,   85,  107,  107,   61,
+       28,   28,   28,   29,   68,   35,   48,   28,   37,   60,
+       60,   60,   61,   60,   35,   67,   60,   62,   35,   35,
+       35,   35,   72,   71,   73,   69,   35,   35,   35,   35,
+       35,   35,  253,   80,   76,   70,   28,   58,   35,   35,
+       28,   82,   59,   85,   77,   78,   83,   79,   87,   74,
+       76,   86,   35,   35,   35,   35,   35,   35,   35,   90,
+       94,   95,   35,   35,   35,   97,   88,   35,   91,   92,
+       35,   99,  100,   89,   35,   35,   93,  101,   98,   35,
+       35,  102,   28,   82,   35,   35,   96,   35,   83,  109,
+      112,   35,   35,   35,   76,   97,  110,   35,  104,   35,
 
-      108,  107,   35,  248,  107,  110,  112,  114,  113,   35,
-       75,   78,   99,   35,   35,  116,  117,  117,   61,  118,
-      117,  134,   35,  117,  120,  121,  121,   61,  122,  121,
-       35,  246,  121,  124,  125,  125,   61,  126,  125,   35,
-      137,  125,  128,  135,  102,  129,   35,  130,  130,   61,
-      131,  130,  136,   35,  130,  133,   28,  139,   28,  141,
-       35,  144,  140,   35,  142,   35,  151,   35,   35,   28,
-      153,   28,  155,  143,  244,  154,   35,  156,  145,  146,
-      146,   61,  147,  146,  150,   35,  146,  149,   28,  158,
-       28,  160,   28,  163,  159,  167,  161,   35,  164,   28,
+      103,  105,  105,   60,  106,  105,  139,  115,  105,  108,
+      111,  114,  117,  117,   60,  118,  117,   35,   35,  117,
+      120,  121,  121,   60,  122,  121,  130,  251,  121,  124,
+       35,  100,  125,   35,  126,  126,   60,  127,  126,   35,
+       35,  126,  129,  131,  132,   35,   28,  135,  133,   28,
+      137,  140,  136,   35,  147,  138,   35,   35,  148,  146,
+       35,   29,  170,   35,   35,  178,   35,  249,  141,  142,
+      142,   60,  143,  142,   28,  151,  142,  145,  219,   35,
+      152,   28,  153,  160,  149,   28,  156,  154,   28,  158,
+       35,  157,   28,  162,  159,   28,  164,  166,  163,   28,
 
-      165,   28,  169,   28,  171,  166,   35,  170,  213,  172,
-      177,   35,   28,  139,   35,  173,   35,  178,  140,  215,
-      179,   28,  181,   28,  183,  174,  208,  182,   35,  184,
-      185,   35,  186,  186,   61,  187,  186,   28,  153,  186,
-      189,   28,  158,  154,   28,  163,   35,  159,  190,   35,
-      164,   28,  169,  192,   35,   35,  191,  170,  198,   35,
-       28,  181,   28,  202,   28,  204,  182,  215,  203,  207,
-      205,   64,  210,  229,  197,  216,  217,   28,  202,   35,
-      215,  229,  230,  203,  222,  222,   61,  223,  222,   35,
-      215,  222,  225,  237,  227,  231,   28,  233,   28,  235,
+      135,  165,  244,   35,   35,  136,  171,   29,  172,  167,
+       28,  174,   28,  176,  187,  212,  175,   35,  177,  179,
+      179,   60,  180,  179,  188,   35,  179,  182,  183,  183,
+       60,  184,  183,   28,  151,  183,  186,   28,  156,  152,
+       28,  162,   35,  157,  190,   35,  163,   35,  196,   35,
+       28,  174,  189,   28,  200,   35,  175,   28,  202,  201,
+       29,   28,  205,  203,   28,  207,  195,  206,  219,  209,
+      208,   63,  214,   28,  200,  234,  220,  221,  217,  201,
+       28,  205,   35,   29,  235,  234,  206,  224,  227,  227,
+       60,  228,  227,  219,   35,  227,  230,  232,  242,  236,
 
-       28,  233,  234,  238,  236,  215,  234,  240,   35,  215,
-      215,  200,  229,  196,  239,  226,  221,  219,  212,  176,
-      207,  200,  196,  194,  176,  241,  242,  245,   26,   26,
-       26,   26,   28,   28,   28,   30,   30,   30,   30,   35,
-       35,   35,   35,   57,  115,   57,   57,   58,   58,   58,
-       58,   60,   86,   60,   60,   34,   34,   34,   34,   64,
-       64,   35,   64,   83,   83,   83,   83,   85,   29,   85,
-       85,  109,  109,  109,  109,  119,  119,  119,  119,  123,
-      123,  123,  123,  127,  127,  127,  127,  132,  132,  132,
-      132,  138,  138,  138,  138,  140,   54,  140,  140,  148,
+       28,  207,   28,  238,   28,  240,  208,  219,  239,  219,
+      241,   28,  238,  245,   35,  219,  243,  239,  219,  211,
+      198,  234,  194,  231,  226,  247,  223,  246,  216,  169,
+      211,  198,  194,  250,   26,   26,   26,   26,   28,   28,
+       28,   30,   30,   30,   30,   35,   35,   35,   35,   56,
+      192,   56,   56,   57,   57,   57,   57,   59,  169,   59,
+       59,   34,   34,   34,   34,   63,   63,  116,   63,   81,
+       81,   81,   81,   83,  113,   83,   83,  107,  107,  107,
+      107,  119,  119,  119,  119,  123,  123,  123,  123,  128,
+      128,  128,  128,  134,  134,  134,  134,  136,   84,  136,
 
-      148,  148,  148,  152,  152,  152,  152,  154,   52,  154,
-      154,  157,  157,  157,  157,  159,   35,  159,  159,  162,
-      162,  162,  162,  164,   29,  164,  164,  168,  168,  168,
-      168,  170,  250,  170,  170,  175,  175,  175,  175,  142,
-       27,  142,  142,  180,  180,  180,  180,  182,   27,  182,
-      182,  188,  188,  188,  188,  156,  250,  156,  156,  161,
-      250,  161,  161,  166,  250,  166,  166,  172,  250,  172,
-      172,  193,  193,  193,  193,  195,  195,  195,  195,  184,
-      250,  184,  184,  199,  199,  199,  199,  201,  201,  201,
-      201,  203,  250,  203,  203,  206,  206,  206,  206,  209,
+      136,  144,  144,  144,  144,  150,  150,  150,  150,  152,
+       35,  152,  152,  155,  155,  155,  155,  157,   29,  157,
+      157,  161,  161,  161,  161,  163,   53,  163,  163,  168,
+      168,  168,  168,  138,   51,  138,  138,  173,  173,  173,
+      173,  175,   35,  175,  175,  181,  181,  181,  181,  185,
+      185,  185,  185,  154,   29,  154,  154,  159,  255,  159,
+      159,  165,   27,  165,  165,  191,  191,  191,  191,  193,
+      193,  193,  193,  177,   27,  177,  177,  197,  197,  197,
+      197,  199,  199,  199,  199,  201,  255,  201,  201,  204,
+      204,  204,  204,  206,  255,  206,  206,  210,  210,  210,
 
-      209,  209,  209,  211,  211,  211,  211,  214,  214,  214,
-      214,  218,  218,  218,  218,  205,  250,  205,  205,  220,
-      220,  220,  220,  224,  224,  224,  224,  210,  250,  210,
-      210,  228,  228,  228,  228,  232,  232,  232,  232,  234,
-      250,  234,  234,  236,  250,  236,  236,  243,  243,  243,
-      243,  247,  247,  247,  247,    5,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250
+      210,  213,  213,  213,  213,  215,  215,  215,  215,  218,
+      218,  218,  218,  222,  222,  222,  222,  203,  255,  203,
+      203,  208,  255,  208,  208,  225,  225,  225,  225,  229,
+      229,  229,  229,  214,  255,  214,  214,  233,  233,  233,
+      233,  237,  237,  237,  237,  239,  255,  239,  239,  241,
+      255,  241,  241,  248,  248,  248,  248,  252,  252,  252,
+      252,    5,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255
+
     } ;
 
-static yyconst flex_int16_t yy_chk[690] =
+static yyconst flex_int16_t yy_chk[696] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    7,    7,    7,    8,    8,    8,   13,
-        7,   41,   13,    8,   11,   11,   11,   11,   11,   47,
-       14,   11,   11,   47,   14,   11,   19,   19,   41,   15,
-       16,   11,   12,   12,   12,   12,   12,   14,   16,   12,
-       12,   12,   15,   18,   16,   20,   21,   23,   21,   23,
-      247,   25,   20,   38,   25,   38,   45,   18,   25,   30,
-       30,   18,   31,   31,   31,   30,   40,   45,   40,   31,
+        7,   15,   13,    8,   11,   11,   11,   11,   11,   14,
+      252,   11,   11,   14,   15,   11,   19,   19,   18,   16,
+       39,   11,   12,   12,   12,   12,   12,   16,   20,   12,
+       12,   12,   18,   16,   39,   20,   18,   21,   23,   21,
+       23,   25,   50,   42,   25,   30,   30,   38,   25,   38,
+      250,   30,   31,   31,   31,   40,   50,   40,   41,   31,
 
-       34,   34,   34,   34,   39,   42,   46,   34,   34,   36,
-       36,   36,   36,   36,   43,   43,   36,   36,   39,   44,
-       44,   50,   48,   46,   48,   49,   42,   51,   49,   52,
-       53,   54,   55,   66,   56,   66,   55,   56,   65,   58,
-       58,   51,   65,   67,   50,   58,   54,   53,   54,   61,
-       61,   52,   68,   67,   69,   61,   70,   71,   72,   70,
-       73,   71,   74,   75,   77,   75,   68,   76,   82,   76,
-       72,   79,   73,   69,   78,   87,   78,   81,  245,   79,
-       74,   80,   80,   81,   80,   91,   77,   80,   89,   82,
-       83,   83,   89,   87,   90,   94,   83,   88,   88,   88,
+       34,   34,   34,   34,   42,   43,   43,   34,   34,   36,
+       36,   36,   36,   36,   44,   41,   36,   36,   45,   46,
+       47,   48,   47,   46,   48,   44,   49,   52,   51,   54,
+       53,   55,  248,   54,   55,   45,   57,   57,   66,   64,
+       60,   60,   57,   64,   52,   53,   60,   53,   66,   49,
+       51,   65,   67,   65,   68,   69,   70,   71,   72,   69,
+       73,   74,   73,   74,   75,   76,   67,   76,   70,   71,
+       77,   78,   78,   68,   78,   79,   72,   78,   77,   80,
+       85,   79,   81,   81,   88,   87,   75,   89,   81,   87,
+       90,   92,   90,  109,   96,   96,   88,   96,   85,   93,
 
-       88,   88,   95,  243,   88,   88,   90,   92,   91,   92,
-       95,   98,   98,  103,   98,   94,   96,   96,   96,   96,
-       96,  103,  106,   96,   96,   97,   97,   97,   97,   97,
-      100,  242,   97,   97,   99,   99,   99,   99,   99,  104,
-      106,   99,   99,  104,  101,  100,  101,  102,  102,  102,
-      102,  102,  105,  105,  102,  102,  107,  107,  109,  109,
-      111,  112,  107,  113,  109,  115,  116,  112,  116,  117,
-      117,  119,  119,  111,  240,  117,  129,  119,  113,  114,
-      114,  114,  114,  114,  115,  197,  114,  114,  121,  121,
-      123,  123,  125,  125,  121,  129,  123,  134,  125,  127,
+       80,   86,   86,   86,   86,   86,  109,   93,   86,   86,
+       89,   92,   95,   95,   95,   95,   95,   98,  101,   95,
+       95,   97,   97,   97,   97,   97,  101,  247,   97,   97,
+      104,   99,   98,   99,  100,  100,  100,  100,  100,  102,
+      113,  100,  100,  102,  103,  103,  105,  105,  104,  107,
+      107,  110,  105,  111,  114,  107,  114,  110,  115,  113,
+      115,  116,  133,  133,  125,  146,  146,  245,  111,  112,
+      112,  112,  112,  112,  117,  117,  112,  112,  236,  130,
+      117,  119,  119,  125,  116,  121,  121,  119,  123,  123,
+      131,  121,  126,  126,  123,  128,  128,  130,  126,  134,
 
-      127,  130,  130,  132,  132,  127,  135,  130,  197,  132,
-      137,  137,  138,  138,  143,  134,  145,  143,  138,  228,
-      145,  146,  146,  148,  148,  135,  191,  146,  191,  148,
-      150,  150,  151,  151,  151,  151,  151,  152,  152,  151,
-      151,  157,  157,  152,  162,  162,  173,  157,  167,  167,
-      162,  168,  168,  174,  174,  178,  173,  168,  179,  179,
-      180,  180,  186,  186,  188,  188,  180,  198,  186,  220,
-      188,  192,  192,  216,  178,  198,  198,  201,  201,  213,
-      230,  217,  216,  201,  208,  208,  208,  208,  208,  227,
-      231,  208,  208,  227,  213,  217,  222,  222,  224,  224,
+      134,  128,  236,  139,  141,  134,  139,  149,  141,  131,
+      142,  142,  144,  144,  149,  189,  142,  189,  144,  147,
+      147,  147,  147,  147,  160,  160,  147,  147,  148,  148,
+      148,  148,  148,  150,  150,  148,  148,  155,  155,  150,
+      161,  161,  166,  155,  167,  167,  161,  171,  172,  172,
+      173,  173,  166,  179,  179,  195,  173,  181,  181,  179,
+      187,  183,  183,  181,  185,  185,  171,  183,  196,  187,
+      185,  190,  190,  199,  199,  220,  196,  196,  195,  199,
+      204,  204,  217,  209,  220,  221,  204,  209,  212,  212,
+      212,  212,  212,  235,  232,  212,  212,  217,  232,  221,
 
-      232,  232,  222,  230,  224,  238,  232,  237,  237,  241,
-      239,  218,  214,  211,  231,  209,  206,  199,  195,  193,
-      190,  185,  177,  175,  136,  238,  239,  241,  251,  251,
-      251,  251,  252,  252,  252,  253,  253,  253,  253,  254,
-      254,  254,  254,  255,   93,  255,  255,  256,  256,  256,
-      256,  257,   64,  257,  257,  258,  258,  258,  258,  259,
-      259,   35,  259,  260,  260,  260,  260,  261,   28,  261,
-      261,  262,  262,  262,  262,  263,  263,  263,  263,  264,
-      264,  264,  264,  265,  265,  265,  265,  266,  266,  266,
-      266,  267,  267,  267,  267,  268,   24,  268,  268,  269,
+      224,  224,  227,  227,  229,  229,  224,  243,  227,  244,
+      229,  237,  237,  242,  242,  246,  235,  237,  233,  225,
+      222,  218,  215,  213,  210,  244,  197,  243,  193,  191,
+      188,  178,  170,  246,  256,  256,  256,  256,  257,  257,
+      257,  258,  258,  258,  258,  259,  259,  259,  259,  260,
+      168,  260,  260,  261,  261,  261,  261,  262,  132,  262,
+      262,  263,  263,  263,  263,  264,  264,   94,  264,  265,
+      265,  265,  265,  266,   91,  266,  266,  267,  267,  267,
+      267,  268,  268,  268,  268,  269,  269,  269,  269,  270,
+      270,  270,  270,  271,  271,  271,  271,  272,   63,  272,
 
-      269,  269,  269,  270,  270,  270,  270,  271,   22,  271,
-      271,  272,  272,  272,  272,  273,   17,  273,  273,  274,
-      274,  274,  274,  275,    6,  275,  275,  276,  276,  276,
-      276,  277,    5,  277,  277,  278,  278,  278,  278,  279,
-        4,  279,  279,  280,  280,  280,  280,  281,    3,  281,
-      281,  282,  282,  282,  282,  283,    0,  283,  283,  284,
-        0,  284,  284,  285,    0,  285,  285,  286,    0,  286,
-      286,  287,  287,  287,  287,  288,  288,  288,  288,  289,
-        0,  289,  289,  290,  290,  290,  290,  291,  291,  291,
-      291,  292,    0,  292,  292,  293,  293,  293,  293,  294,
+      272,  273,  273,  273,  273,  274,  274,  274,  274,  275,
+       35,  275,  275,  276,  276,  276,  276,  277,   28,  277,
+      277,  278,  278,  278,  278,  279,   24,  279,  279,  280,
+      280,  280,  280,  281,   22,  281,  281,  282,  282,  282,
+      282,  283,   17,  283,  283,  284,  284,  284,  284,  285,
+      285,  285,  285,  286,    6,  286,  286,  287,    5,  287,
+      287,  288,    4,  288,  288,  289,  289,  289,  289,  290,
+      290,  290,  290,  291,    3,  291,  291,  292,  292,  292,
+      292,  293,  293,  293,  293,  294,    0,  294,  294,  295,
+      295,  295,  295,  296,    0,  296,  296,  297,  297,  297,
 
-      294,  294,  294,  295,  295,  295,  295,  296,  296,  296,
-      296,  297,  297,  297,  297,  298,    0,  298,  298,  299,
-      299,  299,  299,  300,  300,  300,  300,  301,    0,  301,
-      301,  302,  302,  302,  302,  303,  303,  303,  303,  304,
-        0,  304,  304,  305,    0,  305,  305,  306,  306,  306,
-      306,  307,  307,  307,  307,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250
+      297,  298,  298,  298,  298,  299,  299,  299,  299,  300,
+      300,  300,  300,  301,  301,  301,  301,  302,    0,  302,
+      302,  303,    0,  303,  303,  304,  304,  304,  304,  305,
+      305,  305,  305,  306,    0,  306,  306,  307,  307,  307,
+      307,  308,  308,  308,  308,  309,    0,  309,  309,  310,
+        0,  310,  310,  311,  311,  311,  311,  312,  312,  312,
+      312,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255
+
     } ;
 
 #define YY_TRAILING_MASK 0x2000
@@ -773,8 +776,7 @@ goto find_rule; \
  * syntax; if the target string has to contain "," or ":" the new
  * syntax's "target=" should be used.
  */
-
-#line 35 "libxlu_disk_l.l"
+#line 31 "libxlu_disk_l.l"
 #include "libxlu_disk_i.h"
 
 #define YY_NO_INPUT
@@ -883,7 +885,7 @@ static int vdev_and_devtype(DiskParseCon
 #define DPC ((DiskParseContext*)yyextra)
 
 
-#line 887 "libxlu_disk_l.c"
+#line 889 "libxlu_disk_l.c"
 
 #define INITIAL 0
 #define LEXERR 1
@@ -1119,12 +1121,12 @@ YY_DECL
 	register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 155 "libxlu_disk_l.l"
+#line 151 "libxlu_disk_l.l"
 
 
  /*----- the scanner rules which do the parsing -----*/
 
-#line 1128 "libxlu_disk_l.c"
+#line 1130 "libxlu_disk_l.c"
 
 	if ( !yyg->yy_init )
 		{
@@ -1318,7 +1320,7 @@ YY_RULE_SETUP
    * matched the whole string, so these patterns take precedence */
 case 13:
 YY_RULE_SETUP
-#line 189 "libxlu_disk_l.l"
+#line 185 "libxlu_disk_l.l"
 {
                     STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `[format=]...,'");
@@ -1352,7 +1354,7 @@ case 17:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 210 "libxlu_disk_l.l"
+#line 199 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 18:
@@ -1360,7 +1362,7 @@ case 18:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 211 "libxlu_disk_l.l"
+#line 200 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 19:
@@ -1368,7 +1370,7 @@ case 19:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 212 "libxlu_disk_l.l"
+#line 201 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 20:
@@ -1392,7 +1394,7 @@ YY_RULE_SETUP
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 222 "libxlu_disk_l.l"
+#line 211 "libxlu_disk_l.l"
 {
     STRIP(',');
 
@@ -1421,7 +1423,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 248 "libxlu_disk_l.l"
+#line 237 "libxlu_disk_l.l"
 {
     BEGIN(LEXERR);
     yymore();
@@ -2531,4 +2533,4 @@ void xlu__disk_yyfree (void * ptr , yysc
 
 #define YYTABLES_NAME "yytables"
 
-#line 255 "libxlu_disk_l.l"
+#line 244 "libxlu_disk_l.l"
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxlu_disk_l.h
--- a/tools/libxl/libxlu_disk_l.h	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxlu_disk_l.h	Mon Aug 06 12:25:06 2012 +0100
@@ -3,12 +3,8 @@
 #define xlu__disk_yyIN_HEADER 1
 
 #line 6 "libxlu_disk_l.h"
-#line 31 "libxlu_disk_l.l"
-#include "libxl_osdeps.h" /* must come before any other headers */
 
-
-
-#line 12 "libxlu_disk_l.h"
+#line 8 "libxlu_disk_l.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -344,8 +340,8 @@ extern int xlu__disk_yylex (yyscan_t yys
 #undef YY_DECL
 #endif
 
-#line 255 "libxlu_disk_l.l"
+#line 244 "libxlu_disk_l.l"
 
-#line 350 "libxlu_disk_l.h"
+#line 346 "libxlu_disk_l.h"
 #undef xlu__disk_yyIN_HEADER
 #endif /* xlu__disk_yyHEADER_H */
diff -r 6221bee07e5d -r 60f2c7b74741 tools/libxl/libxlu_disk_l.l
--- a/tools/libxl/libxlu_disk_l.l	Mon Aug 06 11:18:43 2012 +0200
+++ b/tools/libxl/libxlu_disk_l.l	Mon Aug 06 12:25:06 2012 +0100
@@ -27,10 +27,6 @@
  * syntax's "target=" should be used.
  */
 
-%top{
-#include "libxl_osdeps.h" /* must come before any other headers */
-}
-
 %{
 #include "libxlu_disk_i.h"
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT5-0005hz-0j; Tue, 07 Aug 2012 20:33:31 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT2-0005eX-UN
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:29 +0000
Received: from [85.158.139.83:59913] by server-2.bemta-5.messagelabs.com id
	E4/1C-25118-89B71205; Tue, 07 Aug 2012 20:33:28 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-182.messagelabs.com!1344371606!30719751!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23161 invoked from network); 7 Aug 2012 20:33:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:27 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-00042R-Bu
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-0003Ng-AB
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Message-Id: <E1SyqT0-0003Ng-AB@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:25 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] mark 8x14 font data const
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344339752 -7200
# Node ID 5fb24be93a2ae41e60690a9a3f1385112c05c06c
# Parent  ca1db6da64e9a54cc6a5fc378dcdcea0a5715403
mark 8x14 font data const

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---


diff -r ca1db6da64e9 -r 5fb24be93a2a xen/drivers/video/font_8x14.c
--- a/xen/drivers/video/font_8x14.c	Tue Aug 07 08:49:53 2012 +0200
+++ b/xen/drivers/video/font_8x14.c	Tue Aug 07 13:42:32 2012 +0200
@@ -9,7 +9,7 @@
 
 #define FONTDATAMAX (256*14)
 
-static unsigned char fontdata_8x14[FONTDATAMAX] = {
+static const unsigned char fontdata_8x14[FONTDATAMAX] = {
 
     /* 0 0x00 '^@' */
     0x00, /* 00000000 */

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT5-0005id-7Z; Tue, 07 Aug 2012 20:33:31 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT3-0005er-Gj
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:29 +0000
Received: from [85.158.139.83:59944] by server-8.bemta-5.messagelabs.com id
	75/F1-05939-89B71205; Tue, 07 Aug 2012 20:33:28 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-182.messagelabs.com!1344371607!30669766!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9184 invoked from network); 7 Aug 2012 20:33:28 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:28 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-00042U-VG
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-0003Nv-S7
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Message-Id: <E1SyqT0-0003Nv-S7@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:26 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] eliminate lock profile pointer from
	spinlock structure when !LOCK_PROFILE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344344957 -7200
# Node ID 817f5f381d1bb443fb4c517829dca5f47acca9ab
# Parent  5fb24be93a2ae41e60690a9a3f1385112c05c06c
eliminate lock profile pointer from spinlock structure when !LOCK_PROFILE

This pointer is never used for anything, and needlessly increases the
memory footprint of various pieces of data.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 5fb24be93a2a -r 817f5f381d1b xen/include/xen/spinlock.h
--- a/xen/include/xen/spinlock.h	Tue Aug 07 13:42:32 2012 +0200
+++ b/xen/include/xen/spinlock.h	Tue Aug 07 15:09:17 2012 +0200
@@ -115,11 +115,10 @@ extern void spinlock_profile_reset(unsig
 
 #else
 
-struct lock_profile { };
 struct lock_profile_qhead { };
 
 #define SPIN_LOCK_UNLOCKED                                                    \
-    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG, NULL }
+    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG }
 #define DEFINE_SPINLOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED
 
 #define spin_lock_init_prof(s, l) spin_lock_init(&((s)->l))
@@ -133,7 +132,9 @@ typedef struct spinlock {
     u16 recurse_cpu:12;
     u16 recurse_cnt:4;
     struct lock_debug debug;
+#ifdef LOCK_PROFILE
     struct lock_profile *profile;
+#endif
 } spinlock_t;
 
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT5-0005id-7Z; Tue, 07 Aug 2012 20:33:31 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT3-0005er-Gj
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:29 +0000
Received: from [85.158.139.83:59944] by server-8.bemta-5.messagelabs.com id
	75/F1-05939-89B71205; Tue, 07 Aug 2012 20:33:28 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-182.messagelabs.com!1344371607!30669766!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9184 invoked from network); 7 Aug 2012 20:33:28 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:28 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-00042U-VG
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT0-0003Nv-S7
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:26 +0000
Message-Id: <E1SyqT0-0003Nv-S7@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:26 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] eliminate lock profile pointer from
	spinlock structure when !LOCK_PROFILE
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344344957 -7200
# Node ID 817f5f381d1bb443fb4c517829dca5f47acca9ab
# Parent  5fb24be93a2ae41e60690a9a3f1385112c05c06c
eliminate lock profile pointer from spinlock structure when !LOCK_PROFILE

This pointer is never used for anything, and needlessly increases the
memory footprint of various pieces of data.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 5fb24be93a2a -r 817f5f381d1b xen/include/xen/spinlock.h
--- a/xen/include/xen/spinlock.h	Tue Aug 07 13:42:32 2012 +0200
+++ b/xen/include/xen/spinlock.h	Tue Aug 07 15:09:17 2012 +0200
@@ -115,11 +115,10 @@ extern void spinlock_profile_reset(unsig
 
 #else
 
-struct lock_profile { };
 struct lock_profile_qhead { };
 
 #define SPIN_LOCK_UNLOCKED                                                    \
-    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG, NULL }
+    { _RAW_SPIN_LOCK_UNLOCKED, 0xfffu, 0, _LOCK_DEBUG }
 #define DEFINE_SPINLOCK(l) spinlock_t l = SPIN_LOCK_UNLOCKED
 
 #define spin_lock_init_prof(s, l) spin_lock_init(&((s)->l))
@@ -133,7 +132,9 @@ typedef struct spinlock {
     u16 recurse_cpu:12;
     u16 recurse_cnt:4;
     struct lock_debug debug;
+#ifdef LOCK_PROFILE
     struct lock_profile *profile;
+#endif
 } spinlock_t;
 
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT5-0005iB-3a; Tue, 07 Aug 2012 20:33:31 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT2-0005WR-VV
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:29 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-27.messagelabs.com!1344371592!10310435!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7355 invoked from network); 7 Aug 2012 20:33:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSj-00040X-3F
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSj-0003Fr-1P
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:09 +0000
Message-Id: <E1SyqSj-0003Fr-1P@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nestedhvm: fix write access fault on
	ro mapping
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Christoph Egger <Christoph.Egger@amd.com>
# Date 1343914689 -3600
# Node ID c323f1af7e677e791d13f7d6a62abeec55a4a2d5
# Parent  90bc5e0a67b5ba896bd9cf1f92b345793010adc3
nestedhvm: fix write access fault on ro mapping

Fix write access fault when host npt is mapped read-only.
In this case let the host handle the #NPF.
Apply host p2mt to hap-on-hap pagetable entry.
This fixes the l2 guest graphic display refresh problem.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r 90bc5e0a67b5 -r c323f1af7e67 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Thu Aug 02 12:04:31 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Thu Aug 02 14:38:09 2012 +0100
@@ -1278,12 +1278,14 @@ int hvm_hap_nested_page_fault(unsigned l
          * into l1 guest if not fixable. The algorithm is
          * the same as for shadow paging.
          */
-        rv = nestedhvm_hap_nested_page_fault(v, gpa,
+        rv = nestedhvm_hap_nested_page_fault(v, &gpa,
                                              access_r, access_w, access_x);
         switch (rv) {
         case NESTEDHVM_PAGEFAULT_DONE:
             return 1;
-        case NESTEDHVM_PAGEFAULT_ERROR:
+        case NESTEDHVM_PAGEFAULT_L1_ERROR:
+            /* An error occured while translating gpa from
+             * l2 guest address to l1 guest address. */
             return 0;
         case NESTEDHVM_PAGEFAULT_INJECT:
             return -1;
@@ -1291,6 +1293,10 @@ int hvm_hap_nested_page_fault(unsigned l
             if ( !handle_mmio() )
                 hvm_inject_hw_exception(TRAP_gp_fault, 0);
             return 1;
+        case NESTEDHVM_PAGEFAULT_L0_ERROR:
+            /* gpa is now translated to l1 guest address, update gfn. */
+            gfn = gpa >> PAGE_SHIFT;
+            break;
         }
     }
 
diff -r 90bc5e0a67b5 -r c323f1af7e67 xen/arch/x86/mm/hap/nested_hap.c
--- a/xen/arch/x86/mm/hap/nested_hap.c	Thu Aug 02 12:04:31 2012 +0100
+++ b/xen/arch/x86/mm/hap/nested_hap.c	Thu Aug 02 14:38:09 2012 +0100
@@ -141,26 +141,29 @@ nestedhap_fix_p2m(struct vcpu *v, struct
  */
 static int
 nestedhap_walk_L0_p2m(struct p2m_domain *p2m, paddr_t L1_gpa, paddr_t *L0_gpa,
-                      unsigned int *page_order)
+                      p2m_type_t *p2mt,
+                      unsigned int *page_order,
+                      bool_t access_r, bool_t access_w, bool_t access_x)
 {
     mfn_t mfn;
-    p2m_type_t p2mt;
     p2m_access_t p2ma;
     int rc;
 
     /* walk L0 P2M table */
-    mfn = get_gfn_type_access(p2m, L1_gpa >> PAGE_SHIFT, &p2mt, &p2ma, 
+    mfn = get_gfn_type_access(p2m, L1_gpa >> PAGE_SHIFT, p2mt, &p2ma, 
                               0, page_order);
 
     rc = NESTEDHVM_PAGEFAULT_MMIO;
-    if ( p2m_is_mmio(p2mt) )
+    if ( p2m_is_mmio(*p2mt) )
         goto out;
 
-    rc = NESTEDHVM_PAGEFAULT_ERROR;
-    if ( p2m_is_paging(p2mt) || p2m_is_shared(p2mt) || !p2m_is_ram(p2mt) )
+    rc = NESTEDHVM_PAGEFAULT_L0_ERROR;
+    if ( access_w && p2m_is_readonly(*p2mt) )
         goto out;
 
-    rc = NESTEDHVM_PAGEFAULT_ERROR;
+    if ( p2m_is_paging(*p2mt) || p2m_is_shared(*p2mt) || !p2m_is_ram(*p2mt) )
+        goto out;
+
     if ( !mfn_valid(mfn) )
         goto out;
 
@@ -207,7 +210,7 @@ nestedhap_walk_L1_p2m(struct vcpu *v, pa
  * Returns:
  */
 int
-nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t L2_gpa,
+nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t *L2_gpa,
     bool_t access_r, bool_t access_w, bool_t access_x)
 {
     int rv;
@@ -215,19 +218,20 @@ nestedhvm_hap_nested_page_fault(struct v
     struct domain *d = v->domain;
     struct p2m_domain *p2m, *nested_p2m;
     unsigned int page_order_21, page_order_10, page_order_20;
+    p2m_type_t p2mt_10;
 
     p2m = p2m_get_hostp2m(d); /* L0 p2m */
     nested_p2m = p2m_get_nestedp2m(v, nhvm_vcpu_hostcr3(v));
 
     /* walk the L1 P2M table */
-    rv = nestedhap_walk_L1_p2m(v, L2_gpa, &L1_gpa, &page_order_21,
+    rv = nestedhap_walk_L1_p2m(v, *L2_gpa, &L1_gpa, &page_order_21,
         access_r, access_w, access_x);
 
     /* let caller to handle these two cases */
     switch (rv) {
     case NESTEDHVM_PAGEFAULT_INJECT:
         return rv;
-    case NESTEDHVM_PAGEFAULT_ERROR:
+    case NESTEDHVM_PAGEFAULT_L1_ERROR:
         return rv;
     case NESTEDHVM_PAGEFAULT_DONE:
         break;
@@ -237,13 +241,16 @@ nestedhvm_hap_nested_page_fault(struct v
     }
 
     /* ==> we have to walk L0 P2M */
-    rv = nestedhap_walk_L0_p2m(p2m, L1_gpa, &L0_gpa, &page_order_10);
+    rv = nestedhap_walk_L0_p2m(p2m, L1_gpa, &L0_gpa,
+        &p2mt_10, &page_order_10,
+        access_r, access_w, access_x);
 
     /* let upper level caller to handle these two cases */
     switch (rv) {
     case NESTEDHVM_PAGEFAULT_INJECT:
         return rv;
-    case NESTEDHVM_PAGEFAULT_ERROR:
+    case NESTEDHVM_PAGEFAULT_L0_ERROR:
+        *L2_gpa = L1_gpa;
         return rv;
     case NESTEDHVM_PAGEFAULT_DONE:
         break;
@@ -257,9 +264,9 @@ nestedhvm_hap_nested_page_fault(struct v
     page_order_20 = min(page_order_21, page_order_10);
 
     /* fix p2m_get_pagetable(nested_p2m) */
-    nestedhap_fix_p2m(v, nested_p2m, L2_gpa, L0_gpa, page_order_20,
-        p2m_ram_rw,
-        p2m_access_rwx /* FIXME: Should use same permission as l1 guest */);
+    nestedhap_fix_p2m(v, nested_p2m, *L2_gpa, L0_gpa, page_order_20,
+        p2mt_10,
+        p2m_access_rwx /* FIXME: Should use minimum permission. */);
 
     return NESTEDHVM_PAGEFAULT_DONE;
 }
diff -r 90bc5e0a67b5 -r c323f1af7e67 xen/include/asm-x86/hvm/nestedhvm.h
--- a/xen/include/asm-x86/hvm/nestedhvm.h	Thu Aug 02 12:04:31 2012 +0100
+++ b/xen/include/asm-x86/hvm/nestedhvm.h	Thu Aug 02 14:38:09 2012 +0100
@@ -47,11 +47,12 @@ bool_t nestedhvm_vcpu_in_guestmode(struc
     vcpu_nestedhvm(v).nv_guestmode = 0
 
 /* Nested paging */
-#define NESTEDHVM_PAGEFAULT_DONE   0
-#define NESTEDHVM_PAGEFAULT_INJECT 1
-#define NESTEDHVM_PAGEFAULT_ERROR  2
-#define NESTEDHVM_PAGEFAULT_MMIO   3
-int nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t L2_gpa,
+#define NESTEDHVM_PAGEFAULT_DONE       0
+#define NESTEDHVM_PAGEFAULT_INJECT     1
+#define NESTEDHVM_PAGEFAULT_L1_ERROR   2
+#define NESTEDHVM_PAGEFAULT_L0_ERROR   3
+#define NESTEDHVM_PAGEFAULT_MMIO       4
+int nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t *L2_gpa,
     bool_t access_r, bool_t access_w, bool_t access_x);
 
 /* IO permission map */

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT5-0005iB-3a; Tue, 07 Aug 2012 20:33:31 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT2-0005WR-VV
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:29 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-27.messagelabs.com!1344371592!10310435!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7355 invoked from network); 7 Aug 2012 20:33:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:17 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSj-00040X-3F
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSj-0003Fr-1P
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:09 +0000
Message-Id: <E1SyqSj-0003Fr-1P@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nestedhvm: fix write access fault on
	ro mapping
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Christoph Egger <Christoph.Egger@amd.com>
# Date 1343914689 -3600
# Node ID c323f1af7e677e791d13f7d6a62abeec55a4a2d5
# Parent  90bc5e0a67b5ba896bd9cf1f92b345793010adc3
nestedhvm: fix write access fault on ro mapping

Fix write access fault when host npt is mapped read-only.
In this case let the host handle the #NPF.
Apply host p2mt to hap-on-hap pagetable entry.
This fixes the l2 guest graphic display refresh problem.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r 90bc5e0a67b5 -r c323f1af7e67 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Thu Aug 02 12:04:31 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Thu Aug 02 14:38:09 2012 +0100
@@ -1278,12 +1278,14 @@ int hvm_hap_nested_page_fault(unsigned l
          * into l1 guest if not fixable. The algorithm is
          * the same as for shadow paging.
          */
-        rv = nestedhvm_hap_nested_page_fault(v, gpa,
+        rv = nestedhvm_hap_nested_page_fault(v, &gpa,
                                              access_r, access_w, access_x);
         switch (rv) {
         case NESTEDHVM_PAGEFAULT_DONE:
             return 1;
-        case NESTEDHVM_PAGEFAULT_ERROR:
+        case NESTEDHVM_PAGEFAULT_L1_ERROR:
+            /* An error occured while translating gpa from
+             * l2 guest address to l1 guest address. */
             return 0;
         case NESTEDHVM_PAGEFAULT_INJECT:
             return -1;
@@ -1291,6 +1293,10 @@ int hvm_hap_nested_page_fault(unsigned l
             if ( !handle_mmio() )
                 hvm_inject_hw_exception(TRAP_gp_fault, 0);
             return 1;
+        case NESTEDHVM_PAGEFAULT_L0_ERROR:
+            /* gpa is now translated to l1 guest address, update gfn. */
+            gfn = gpa >> PAGE_SHIFT;
+            break;
         }
     }
 
diff -r 90bc5e0a67b5 -r c323f1af7e67 xen/arch/x86/mm/hap/nested_hap.c
--- a/xen/arch/x86/mm/hap/nested_hap.c	Thu Aug 02 12:04:31 2012 +0100
+++ b/xen/arch/x86/mm/hap/nested_hap.c	Thu Aug 02 14:38:09 2012 +0100
@@ -141,26 +141,29 @@ nestedhap_fix_p2m(struct vcpu *v, struct
  */
 static int
 nestedhap_walk_L0_p2m(struct p2m_domain *p2m, paddr_t L1_gpa, paddr_t *L0_gpa,
-                      unsigned int *page_order)
+                      p2m_type_t *p2mt,
+                      unsigned int *page_order,
+                      bool_t access_r, bool_t access_w, bool_t access_x)
 {
     mfn_t mfn;
-    p2m_type_t p2mt;
     p2m_access_t p2ma;
     int rc;
 
     /* walk L0 P2M table */
-    mfn = get_gfn_type_access(p2m, L1_gpa >> PAGE_SHIFT, &p2mt, &p2ma, 
+    mfn = get_gfn_type_access(p2m, L1_gpa >> PAGE_SHIFT, p2mt, &p2ma, 
                               0, page_order);
 
     rc = NESTEDHVM_PAGEFAULT_MMIO;
-    if ( p2m_is_mmio(p2mt) )
+    if ( p2m_is_mmio(*p2mt) )
         goto out;
 
-    rc = NESTEDHVM_PAGEFAULT_ERROR;
-    if ( p2m_is_paging(p2mt) || p2m_is_shared(p2mt) || !p2m_is_ram(p2mt) )
+    rc = NESTEDHVM_PAGEFAULT_L0_ERROR;
+    if ( access_w && p2m_is_readonly(*p2mt) )
         goto out;
 
-    rc = NESTEDHVM_PAGEFAULT_ERROR;
+    if ( p2m_is_paging(*p2mt) || p2m_is_shared(*p2mt) || !p2m_is_ram(*p2mt) )
+        goto out;
+
     if ( !mfn_valid(mfn) )
         goto out;
 
@@ -207,7 +210,7 @@ nestedhap_walk_L1_p2m(struct vcpu *v, pa
  * Returns:
  */
 int
-nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t L2_gpa,
+nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t *L2_gpa,
     bool_t access_r, bool_t access_w, bool_t access_x)
 {
     int rv;
@@ -215,19 +218,20 @@ nestedhvm_hap_nested_page_fault(struct v
     struct domain *d = v->domain;
     struct p2m_domain *p2m, *nested_p2m;
     unsigned int page_order_21, page_order_10, page_order_20;
+    p2m_type_t p2mt_10;
 
     p2m = p2m_get_hostp2m(d); /* L0 p2m */
     nested_p2m = p2m_get_nestedp2m(v, nhvm_vcpu_hostcr3(v));
 
     /* walk the L1 P2M table */
-    rv = nestedhap_walk_L1_p2m(v, L2_gpa, &L1_gpa, &page_order_21,
+    rv = nestedhap_walk_L1_p2m(v, *L2_gpa, &L1_gpa, &page_order_21,
         access_r, access_w, access_x);
 
     /* let caller to handle these two cases */
     switch (rv) {
     case NESTEDHVM_PAGEFAULT_INJECT:
         return rv;
-    case NESTEDHVM_PAGEFAULT_ERROR:
+    case NESTEDHVM_PAGEFAULT_L1_ERROR:
         return rv;
     case NESTEDHVM_PAGEFAULT_DONE:
         break;
@@ -237,13 +241,16 @@ nestedhvm_hap_nested_page_fault(struct v
     }
 
     /* ==> we have to walk L0 P2M */
-    rv = nestedhap_walk_L0_p2m(p2m, L1_gpa, &L0_gpa, &page_order_10);
+    rv = nestedhap_walk_L0_p2m(p2m, L1_gpa, &L0_gpa,
+        &p2mt_10, &page_order_10,
+        access_r, access_w, access_x);
 
     /* let upper level caller to handle these two cases */
     switch (rv) {
     case NESTEDHVM_PAGEFAULT_INJECT:
         return rv;
-    case NESTEDHVM_PAGEFAULT_ERROR:
+    case NESTEDHVM_PAGEFAULT_L0_ERROR:
+        *L2_gpa = L1_gpa;
         return rv;
     case NESTEDHVM_PAGEFAULT_DONE:
         break;
@@ -257,9 +264,9 @@ nestedhvm_hap_nested_page_fault(struct v
     page_order_20 = min(page_order_21, page_order_10);
 
     /* fix p2m_get_pagetable(nested_p2m) */
-    nestedhap_fix_p2m(v, nested_p2m, L2_gpa, L0_gpa, page_order_20,
-        p2m_ram_rw,
-        p2m_access_rwx /* FIXME: Should use same permission as l1 guest */);
+    nestedhap_fix_p2m(v, nested_p2m, *L2_gpa, L0_gpa, page_order_20,
+        p2mt_10,
+        p2m_access_rwx /* FIXME: Should use minimum permission. */);
 
     return NESTEDHVM_PAGEFAULT_DONE;
 }
diff -r 90bc5e0a67b5 -r c323f1af7e67 xen/include/asm-x86/hvm/nestedhvm.h
--- a/xen/include/asm-x86/hvm/nestedhvm.h	Thu Aug 02 12:04:31 2012 +0100
+++ b/xen/include/asm-x86/hvm/nestedhvm.h	Thu Aug 02 14:38:09 2012 +0100
@@ -47,11 +47,12 @@ bool_t nestedhvm_vcpu_in_guestmode(struc
     vcpu_nestedhvm(v).nv_guestmode = 0
 
 /* Nested paging */
-#define NESTEDHVM_PAGEFAULT_DONE   0
-#define NESTEDHVM_PAGEFAULT_INJECT 1
-#define NESTEDHVM_PAGEFAULT_ERROR  2
-#define NESTEDHVM_PAGEFAULT_MMIO   3
-int nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t L2_gpa,
+#define NESTEDHVM_PAGEFAULT_DONE       0
+#define NESTEDHVM_PAGEFAULT_INJECT     1
+#define NESTEDHVM_PAGEFAULT_L1_ERROR   2
+#define NESTEDHVM_PAGEFAULT_L0_ERROR   3
+#define NESTEDHVM_PAGEFAULT_MMIO       4
+int nestedhvm_hap_nested_page_fault(struct vcpu *v, paddr_t *L2_gpa,
     bool_t access_r, bool_t access_w, bool_t access_x);
 
 /* IO permission map */

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT5-0005jZ-KG; Tue, 07 Aug 2012 20:33:31 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT4-0005fi-7p
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:30 +0000
Received: from [85.158.139.83:32566] by server-3.bemta-5.messagelabs.com id
	1B/FA-31899-99B71205; Tue, 07 Aug 2012 20:33:29 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-182.messagelabs.com!1344371607!30047735!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29957 invoked from network); 7 Aug 2012 20:33:28 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:28 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT1-00042c-Fk
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT1-0003OA-EV
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:27 +0000
Message-Id: <E1SyqT1-0003OA-EV@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:26 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: write physical-device node if
	user did not supply a block script
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <Ian.Campbell@citrix.com>
# Date 1344345989 -3600
# Node ID 8ecd9177d977941c0b9638a2ae0a567ce58e8920
# Parent  817f5f381d1bb443fb4c517829dca5f47acca9ab
libxl: write physical-device node if user did not supply a block script

This reverts one of the intentional changes from 25733:353bc0801b11.
That change exposed an issue with the xl migration protocol, which
although safe triggers the hotplug scripts device sharing logic.

For 4.2 we disable this logic by writing the physical-device xenstore
node ourselves if a user did not supply a script. If the user did
supply a script then we continue to rely on it to write the
physical-device node (not least because the script may create the
device and therefore it is not available before we run the script).

This means that to support localhost migration a block hotplug script
needs to be robust against adding a device twice and should not
deactivate the device until it has been removed twice.

This should be revisited for 4.3.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 817f5f381d1b -r 8ecd9177d977 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Tue Aug 07 15:09:17 2012 +0200
+++ b/tools/libxl/libxl.c	Tue Aug 07 14:26:29 2012 +0100
@@ -1845,18 +1845,31 @@ static void device_disk_add(libxl__egc *
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
 
-                script = libxl__abs_path(gc, disk->script ?: "block",
-                                         libxl__xen_script_dir_path());
-
         do_backend_phy:
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                assert(script);
+                script = libxl__abs_path(gc, disk->script?: "block",
+                                         libxl__xen_script_dir_path());
                 flexarray_append_pair(back, "script", script);
 
+                /* If the user did not supply a block script then we
+                 * write the physical-device node ourselves.
+                 *
+                 * If the user did supply a script then that script is
+                 * responsible for this since the block device may not
+                 * exist yet.
+                 */
+                if (!disk->script) {
+                    int major, minor;
+                    libxl__device_physdisk_major_minor(dev, &major, &minor);
+                    flexarray_append_pair(back, "physical-device",
+                            libxl__sprintf(gc, "%x:%x", major, minor));
+                }
+
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
+
             case LIBXL_DISK_BACKEND_TAP:
                 dev = libxl__blktap_devpath(gc, disk->pdev_path, disk->format);
                 if (!dev) {
@@ -1870,12 +1883,9 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                /*
-                 * tap devices do not support custom block scripts and
-                 * always use the plain block script.
-                 */
-                script = libxl__abs_path(gc, "block",
-                                         libxl__xen_script_dir_path());
+                /* tap backends with scripts are rejected by
+                 * libxl__device_disk_set_backend */
+                assert(!disk->script);
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT5-0005jZ-KG; Tue, 07 Aug 2012 20:33:31 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT4-0005fi-7p
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:30 +0000
Received: from [85.158.139.83:32566] by server-3.bemta-5.messagelabs.com id
	1B/FA-31899-99B71205; Tue, 07 Aug 2012 20:33:29 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-182.messagelabs.com!1344371607!30047735!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29957 invoked from network); 7 Aug 2012 20:33:28 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:28 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT1-00042c-Fk
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT1-0003OA-EV
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:27 +0000
Message-Id: <E1SyqT1-0003OA-EV@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:26 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: write physical-device node if
	user did not supply a block script
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <Ian.Campbell@citrix.com>
# Date 1344345989 -3600
# Node ID 8ecd9177d977941c0b9638a2ae0a567ce58e8920
# Parent  817f5f381d1bb443fb4c517829dca5f47acca9ab
libxl: write physical-device node if user did not supply a block script

This reverts one of the intentional changes from 25733:353bc0801b11.
That change exposed an issue with the xl migration protocol, which
although safe triggers the hotplug scripts device sharing logic.

For 4.2 we disable this logic by writing the physical-device xenstore
node ourselves if a user did not supply a script. If the user did
supply a script then we continue to rely on it to write the
physical-device node (not least because the script may create the
device and therefore it is not available before we run the script).

This means that to support localhost migration a block hotplug script
needs to be robust against adding a device twice and should not
deactivate the device until it has been removed twice.

This should be revisited for 4.3.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 817f5f381d1b -r 8ecd9177d977 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Tue Aug 07 15:09:17 2012 +0200
+++ b/tools/libxl/libxl.c	Tue Aug 07 14:26:29 2012 +0100
@@ -1845,18 +1845,31 @@ static void device_disk_add(libxl__egc *
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
 
-                script = libxl__abs_path(gc, disk->script ?: "block",
-                                         libxl__xen_script_dir_path());
-
         do_backend_phy:
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                assert(script);
+                script = libxl__abs_path(gc, disk->script?: "block",
+                                         libxl__xen_script_dir_path());
                 flexarray_append_pair(back, "script", script);
 
+                /* If the user did not supply a block script then we
+                 * write the physical-device node ourselves.
+                 *
+                 * If the user did supply a script then that script is
+                 * responsible for this since the block device may not
+                 * exist yet.
+                 */
+                if (!disk->script) {
+                    int major, minor;
+                    libxl__device_physdisk_major_minor(dev, &major, &minor);
+                    flexarray_append_pair(back, "physical-device",
+                            libxl__sprintf(gc, "%x:%x", major, minor));
+                }
+
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
+
             case LIBXL_DISK_BACKEND_TAP:
                 dev = libxl__blktap_devpath(gc, disk->pdev_path, disk->format);
                 if (!dev) {
@@ -1870,12 +1883,9 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                /*
-                 * tap devices do not support custom block scripts and
-                 * always use the plain block script.
-                 */
-                script = libxl__abs_path(gc, "block",
-                                         libxl__xen_script_dir_path());
+                /* tap backends with scripts are rejected by
+                 * libxl__device_disk_set_backend */
+                assert(!disk->script);
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:33 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT7-0005nC-RQ; Tue, 07 Aug 2012 20:33:33 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT5-0005iA-L3
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:32 +0000
Received: from [85.158.138.51:33279] by server-8.bemta-3.messagelabs.com id
	A2/FE-25919-A9B71205; Tue, 07 Aug 2012 20:33:30 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1344371604!24551653!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2694 invoked from network); 7 Aug 2012 20:33:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:26 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-00042B-Ph
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0003Mx-Nz
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Message-Id: <E1SyqSy-0003Mx-Nz@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:24 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: support custom block hotplug
	scripts
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1344252483 -3600
# Node ID 353bc0801b11ee28855cad50ffc7b8afe0efa556
# Parent  60f2c7b74741776d1a25fe2618fb17b570996ce5
libxl: support custom block hotplug scripts

These are provided using the "script=" syntax described in
docs/misc/xl-disk-configuration.txt.

The existing hotplug scripts currently conflate two different
concepts, namely that of making a datapath available in the backend
domain (logging into iSCSI LUNs and the like) and that of actually
connecting that datapath to a Xen backend path (e.g. writing
"physical-device" node in xenstore to bring up blkback).

For this reason the script support implemented here is only supported
in conjunction with backendtype=phy.

Eventually we hope to rework the hotplug scripts to separate the to
concepts, but that is not 4.2 material.

In addition there are some other subtleties:

 - Previously in the blktap case we would add "script = .../blktap" to
   the backend flex array, but then jumped to the PHY case which added
   "script = .../block" too. The block one takes precendence since it
   comes second.

   This was, accidentally, correct. The blktap script is for blktap1
   devices and not blktap2 devices. libxl completely manages the
   blktap2 side of things without resorting to hotplug scripts and
   creates a blkback device directly.  Therefore the "block" script is
   always the correct one to call. Custom script are not supported in
   this context.

 - libxl should not write the "physical-device" node. This is the
   responsibility of the block script. Writing the "physical-device"
   node in libxl basically completely short-cuts the standard block
   hotplug script which uses "physical-device" to know if it has run
   already or not.

   In the case of more complex scripts libxl cannot know the right
   value to write here anyway, in particular the device may not exist
   until after the script is called.

   This change has the side effect of re-enabling the checks for
   device sharing aspect of the default block script, which I have tested
   and which now cause libxl to properly abort now that libxl properly
   checks for hotplug script errors.

   There is no sharing check for blktap2 since even if you reuse the
   same vhd the resulting tap device is different. I would have preferred
   to simply write the "physical-device" node for the blktap2 case but
   the hotplug script infrastructure is not currently setup to handle
   LIBXL__DEVICE_KIND_VBD
   devices without a hotplug script (backendtype phy and tap both end
   up as KIND_VBD). Changing this was more surgery than I was happy doing
   for 4.2 and therefore I have simply hardcoded to the block script for
   the LIBXL_DISK_BACKEND_TAP case.

 - libxl__device_disk_set_backend running against a phy device with a
   script cannot stat the device to check its properties since it may
   not exist until the script is run. Therefore I have special cased
   this in disk_try_backend to simply assume that backend == phy is
   always ok if a script was
   configured.  Similarly the other backend types are always rejected
   if a script was configured.

   Note that the reason for implementing the default script behaviour
   in device_disk_add instead of libxl__device_disk_setdefault is
   because we need to be able to tell when the script was
   user-supplied rather than defaulted by libxl in order to correctly
   implement the above. The setdefault function must be idempotent so
   we cannot simply update disk->script.

   I suspect that for 4.3 a script member should be added to
   libxl__device, this would also help in the case above of handling
   devices with no script in a consistent manner. This is not 4.2
   material.

 - When the block script falls through and shells out to a block-$type
   script it used to pass "$node" however the only place this was
   assigned was in the remove+phy case (in which case it contains the
   file:// derived /dev/loopN device), and in that case the script
   exits without falling through to the block-$type case.

   Since libxl never creates a type other than phy this never happens
   in practice anyway and we now call the correct block-$type script
   directly.  But fix it up anyway since it is confusing.

 - The block-nbd and block-enbd scripts which we supply appear to be
   broken WRT the hotplug calling convention, in that they seem to
   expect a command line parameter (perhaps the $node described above)
   rather than reading the appropriate node from xenstore.

   I rather suspect this was broken by 7774:e2e7f47e6f79 in November
   2005. I think it is safe to say no one is using these scripts! I
   haven't fixed this here. It would be good to track down some working
   scripts and either incorproate them or defer to them in their existing
   home (e.g. if they live somewhere useful like the nbd tools
   package).

 - Added a few block script related entries to check-xl-disk-parse
   from http://backdrift.org/xen-block-iscsi-script-with-multipath-support
   and http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html /
   http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html (and
   snuck in another interesting empty CDROM case)

   This highlighted two bugs in the libxlu disk parser handling of the
   deprecated "<script>:" prefix:

   - It was failing to prefix with "block-" to construct the actual
     script name

   - The regex for matching iscsi or drdb or e?nbd was incorrect

 - Use libxl__abs_path for the nic script too. Just because the
   existing code nearly tricked me into repeating the mistake

I have tested with a custom block script which uses "lvchange -a" to
dynamically add remove the referenced device (simulates iSCSI
login/logout without requiring me to faff around setting up an iSCSI
target). I also tested on a blktap2 system.

I haven't directly tested anything more complex like iscsi: or nbd:
other than what check-xl-disk-parse exercises.

[ Recommit of correct version of 25727:a8d708fcb347, which was mangled
  during commit.  Sorry. -iwj ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 60f2c7b74741 -r 353bc0801b11 docs/misc/xl-disk-configuration.txt
--- a/docs/misc/xl-disk-configuration.txt	Mon Aug 06 12:25:06 2012 +0100
+++ b/docs/misc/xl-disk-configuration.txt	Mon Aug 06 12:28:03 2012 +0100
@@ -160,7 +160,10 @@ script=<script>
 ---------------
 
 Specifies that <target> is not a normal host path, but rather
-information to be interpreted by /etc/xen/scripts/block-<script>.
+information to be interpreted by the executable program <script>,
+(looked for in /etc/xen/scripts, if it doesn't contain a slash).
+
+These scripts are normally called "block-<script>".
 
 
 
@@ -204,7 +207,7 @@ Supported values:      iscsi:  nbd:  enb
 In xend and old versions of libxl it was necessary to specify the
 "script" (see above) with a prefix.  For compatibility, these four
 prefixes are recognised as specifying the corresponding script.  They
-are equivalent to "script=<script>".
+are equivalent to "script=block-<script>".
 
 
 <deprecated-prefix>:
diff -r 60f2c7b74741 -r 353bc0801b11 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/hotplug/Linux/block	Mon Aug 06 12:28:03 2012 +0100
@@ -342,4 +342,4 @@ esac
 
 # If we've reached here, $t is neither phy nor file, so fire a helper script.
 [ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \
-  ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node
+  ${XEN_SCRIPT_DIR}/block-"$t" "$command"
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/check-xl-disk-parse
--- a/tools/libxl/check-xl-disk-parse	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/check-xl-disk-parse	Mon Aug 06 12:28:03 2012 +0100
@@ -142,5 +142,44 @@ disk: {
 
 EOF
 one 0 vdev=hdc,access=r,devtype=cdrom,format=empty
+one 0 vdev=hdc,access=r,devtype=cdrom
+
+expected <<EOF
+disk: {
+    "backend_domid": 0,
+    "pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost",
+    "vdev": "xvda",
+    "backend": "unknown",
+    "format": "raw",
+    "script": "block-iscsi",
+    "removable": 0,
+    "readwrite": 1,
+    "is_cdrom": 0
+}
+
+EOF
+
+# http://backdrift.org/xen-block-iscsi-script-with-multipath-support
+one 0 iscsi:iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost,xvda,w
+one 0 vdev=xvda,access=w,script=block-iscsi,target=iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost
+
+expected <<EOF
+disk: {
+    "backend_domid": 0,
+    "pdev_path": "app01",
+    "vdev": "hda",
+    "backend": "unknown",
+    "format": "raw",
+    "script": "block-drbd",
+    "removable": 0,
+    "readwrite": 1,
+    "is_cdrom": 0
+}
+
+EOF
+
+# http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html
+# http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html
+one 0 drbd:app01,hda,w
 
 complete
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxl.c	Mon Aug 06 12:28:03 2012 +0100
@@ -1796,9 +1796,9 @@ static void device_disk_add(libxl__egc *
     STATE_AO_GC(aodev->ao);
     flexarray_t *front = NULL;
     flexarray_t *back = NULL;
-    char *dev;
+    char *dev, *script;
     libxl__device *device;
-    int major, minor, rc;
+    int rc;
     libxl_ctx *ctx = gc->owner;
     xs_transaction_t t = XBT_NULL;
 
@@ -1833,13 +1833,6 @@ static void device_disk_add(libxl__egc *
             goto out_free;
         }
 
-        if (disk->script) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts"
-                       " not yet supported, sorry");
-            rc = ERROR_INVAL;
-            goto out_free;
-        }
-
         GCNEW(device);
         rc = libxl__device_from_disk(gc, domid, disk, device);
         if (rc != 0) {
@@ -1851,18 +1844,16 @@ static void device_disk_add(libxl__egc *
         switch (disk->backend) {
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
+
+                script = libxl__abs_path(gc, disk->script ?: "block",
+                                         libxl__xen_script_dir_path());
+
         do_backend_phy:
-                libxl__device_physdisk_major_minor(dev, &major, &minor);
-                flexarray_append(back, "physical-device");
-                flexarray_append(back, libxl__sprintf(gc, "%x:%x", major, minor));
-
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                flexarray_append(back, "script");
-                flexarray_append(back, GCSPRINTF("%s/%s",
-                                                 libxl__xen_script_dir_path(),
-                                                 "block"));
+                assert(script);
+                flexarray_append_pair(back, "script", script);
 
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
@@ -1879,10 +1870,12 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                flexarray_append(back, "script");
-                flexarray_append(back, GCSPRINTF("%s/%s",
-                                                 libxl__xen_script_dir_path(),
-                                                 "blktap"));
+                /*
+                 * tap devices do not support custom block scripts and
+                 * always use the plain block script.
+                 */
+                script = libxl__abs_path(gc, "block",
+                                         libxl__xen_script_dir_path());
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;
@@ -2582,13 +2575,10 @@ void libxl__device_nic_add(libxl__egc *e
     flexarray_append(back, "1");
     flexarray_append(back, "state");
     flexarray_append(back, libxl__sprintf(gc, "%d", 1));
-    if (nic->script) {
-        flexarray_append(back, "script");
-        flexarray_append(back, nic->script[0]=='/' ? nic->script
-                         : libxl__sprintf(gc, "%s/%s",
-                                          libxl__xen_script_dir_path(),
-                                          nic->script));
-    }
+    if (nic->script)
+        flexarray_append_pair(back, "script",
+                              libxl__abs_path(gc, nic->script,
+                                              libxl__xen_script_dir_path()));
 
     if (nic->ifname) {
         flexarray_append(back, "vifname");
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxl_device.c	Mon Aug 06 12:28:03 2012 +0100
@@ -147,18 +147,26 @@ typedef struct {
 } disk_try_backend_args;
 
 static int disk_try_backend(disk_try_backend_args *a,
-                            libxl_disk_backend backend) {
+                            libxl_disk_backend backend)
+ {
+    libxl__gc *gc = a->gc;
     /* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or
      * backend on success */
-    libxl_ctx *ctx = libxl__gc_owner(a->gc);
+    libxl_ctx *ctx = libxl__gc_owner(gc);
+
     switch (backend) {
-
     case LIBXL_DISK_BACKEND_PHY:
         if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW ||
               a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) {
             goto bad_format;
         }
 
+        if (a->disk->script) {
+            LOG(DEBUG, "Disk vdev=%s, uses script=... assuming phy backend",
+                a->disk->vdev);
+            return backend;
+        }
+
         if (libxl__try_phy_backend(a->stab.st_mode))
             return backend;
 
@@ -168,6 +176,8 @@ static int disk_try_backend(disk_try_bac
         return 0;
 
     case LIBXL_DISK_BACKEND_TAP:
+        if (a->disk->script) goto bad_script;
+
         if (!libxl__blktap_enabled(a->gc)) {
             LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
                        " unsuitable because blktap not available",
@@ -181,6 +191,7 @@ static int disk_try_backend(disk_try_bac
         return backend;
 
     case LIBXL_DISK_BACKEND_QDISK:
+        if (a->disk->script) goto bad_script;
         return backend;
 
     default:
@@ -198,6 +209,11 @@ static int disk_try_backend(disk_try_bac
                libxl_disk_backend_to_string(backend),
                libxl_disk_format_to_string(a->disk->format));
     return 0;
+
+ bad_script:
+    LOG(DEBUG, "Disk vdev=%s, backend %s not compatible with script=...",
+        a->disk->vdev, libxl_disk_backend_to_string(backend));
+    return 0;
 }
 
 int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
@@ -220,7 +236,7 @@ int libxl__device_disk_set_backend(libxl
             return ERROR_INVAL;
         }
         memset(&a.stab, 0, sizeof(a.stab));
-    } else {
+    } else if (!disk->script) {
         if (stat(disk->pdev_path, &a.stab)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s "
                              "failed to stat: %s",
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_i.h
--- a/tools/libxl/libxlu_disk_i.h	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxlu_disk_i.h	Mon Aug 06 12:28:03 2012 +0100
@@ -1,8 +1,6 @@
 #ifndef LIBXLU_DISK_I_H
 #define LIBXLU_DISK_I_H
 
-#include "libxl_osdeps.h" /* must come before any other headers */
-
 #include "libxlu_internal.h"
 
 
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_l.c
--- a/tools/libxl/libxlu_disk_l.c	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.c	Mon Aug 06 12:28:03 2012 +0100
@@ -1,6 +1,10 @@
 #line 2 "libxlu_disk_l.c"
+#line 31 "libxlu_disk_l.l"
+#include "libxl_osdeps.h" /* must come before any other headers */
 
-#line 4 "libxlu_disk_l.c"
+
+
+#line 8 "libxlu_disk_l.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -366,7 +370,7 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_acclist[456] =
+static yyconst flex_int16_t yy_acclist[447] =
     {   0,
        24,   24,   26,   22,   23,   25, 8193,   22,   23,   25,
     16385, 8193,   22,   25,16385,   22,   23,   25,   23,   25,
@@ -379,77 +383,76 @@ static yyconst flex_int16_t yy_acclist[4
      8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
 
-       22,   24, 8193,   22, 8193,   22, 8193, 8213,   22, 8213,
-       22, 8213,   12,   22,   22,   22,   22,   22,   22,   22,
+       22,   22,   24, 8193,   22, 8193,   22, 8193, 8213,   22,
+     8213,   22, 8213,   12,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-     8213,   22, 8213,   22, 8213,   12,   22,   17, 8213,   22,
-    16405,   22,   22,   22,   22,   22,   22,   22, 8213,   22,
-    16405,   20, 8213,   22,16405,   22, 8205, 8213,   22,16397,
-    16405,   22,   22, 8208, 8213,   22,16400,16405,   22,   22,
-       22,   22,   17, 8213,   22,   17, 8213,   22,   17,   22,
-       17, 8213,   22,    3,   22,   22,   19, 8213,   22,16405,
-       22,   22,   22,   22,   20, 8213,   22,   20, 8213,   22,
+       22,   22, 8213,   22, 8213,   22, 8213,   12,   22,   17,
+     8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
+     8206, 8213,   22,16398,16405,   20, 8213,   22,16405,   22,
+     8205, 8213,   22,16397,16405,   22,   22, 8208, 8213,   22,
+    16400,16405,   22,   22,   22,   22,   17, 8213,   22,   17,
+     8213,   22,   17,   22,   17, 8213,   22,    3,   22,   22,
+       19, 8213,   22,16405,   22,   22, 8206, 8213,   22, 8206,
 
-       20,   22,   20, 8213, 8205, 8213,   22, 8205, 8213,   22,
-     8205,   22, 8205, 8213,   22, 8208, 8213,   22, 8208, 8213,
-       22, 8208,   22, 8208, 8213,   22,   22,    9,   22,   17,
-     8213,   22,   17, 8213,   22,   17, 8213,   17,   22,   17,
-       22,    3,   22,   22,   19, 8213,   22,   19, 8213,   22,
-       19,   22,   19, 8213,   22,   18, 8213,   22,16405, 8206,
-     8213,   22,16398,16405,   22,   20, 8213,   22,   20, 8213,
-       22,   20, 8213,   20,   22,   20, 8205, 8213,   22, 8205,
-     8213,   22, 8205, 8213, 8205,   22, 8205,   22, 8208, 8213,
-       22, 8208, 8213,   22, 8208, 8213, 8208,   22, 8208,   22,
+     8213,   22, 8206,   22, 8206, 8213,   20, 8213,   22,   20,
+     8213,   22,   20,   22,   20, 8213, 8205, 8213,   22, 8205,
+     8213,   22, 8205,   22, 8205, 8213,   22, 8208, 8213,   22,
+     8208, 8213,   22, 8208,   22, 8208, 8213,   22,   22,    9,
+       22,   17, 8213,   22,   17, 8213,   22,   17, 8213,   17,
+       22,   17,   22,    3,   22,   22,   19, 8213,   22,   19,
+     8213,   22,   19,   22,   19, 8213,   22,   18, 8213,   22,
+    16405, 8206, 8213,   22, 8206, 8213,   22, 8206, 8213, 8206,
+       22, 8206,   20, 8213,   22,   20, 8213,   22,   20, 8213,
+       20,   22,   20, 8205, 8213,   22, 8205, 8213,   22, 8205,
 
-       22,    9,   12,    9,    7,   22,   22,   19, 8213,   22,
-       19, 8213,   22,   19, 8213,   19,   22,   19,    2,   18,
-     8213,   22,   18, 8213,   22,   18,   22,   18, 8213, 8206,
-     8213,   22, 8206, 8213,   22, 8206,   22, 8206, 8213,   22,
-       10,   22,   11,    9,    9,   12,    7,   12,    7,   22,
-        6,    2,   12,    2,   18, 8213,   22,   18, 8213,   22,
-       18, 8213,   18,   22,   18, 8206, 8213,   22, 8206, 8213,
-       22, 8206, 8213, 8206,   22, 8206,   22,   10,   12,   10,
-       15, 8213,   22,16405,   11,   12,   11,    7,    7,   12,
-       22,    6,   12,    6,    6,   12,    6,   12,    2,    2,
+     8213, 8205,   22, 8205,   22, 8208, 8213,   22, 8208, 8213,
+       22, 8208, 8213, 8208,   22, 8208,   22,   22,    9,   12,
+        9,    7,   22,   22,   19, 8213,   22,   19, 8213,   22,
+       19, 8213,   19,   22,   19,    2,   18, 8213,   22,   18,
+     8213,   22,   18,   22,   18, 8213,   10,   22,   11,    9,
+        9,   12,    7,   12,    7,   22,    6,    2,   12,    2,
+       18, 8213,   22,   18, 8213,   22,   18, 8213,   18,   22,
+       18,   10,   12,   10,   15, 8213,   22,16405,   11,   12,
+       11,    7,    7,   12,   22,    6,   12,    6,    6,   12,
+        6,   12,    2,    2,   12,   10,   10,   12,   15, 8213,
 
-       12, 8206,   22,16398,   10,   10,   12,   15, 8213,   22,
-       15, 8213,   22,   15,   22,   15, 8213,   11,   12,   22,
-        6,    6,   12,    6,    6,   15, 8213,   22,   15, 8213,
-       22,   15, 8213,   15,   22,   15,   22,    6,    6,    8,
-        6,    5,    6,    8,   12,    8,    4,    6,    5,    6,
-        8,    8,   12,    4,    6
+       22,   15, 8213,   22,   15,   22,   15, 8213,   11,   12,
+       22,    6,    6,   12,    6,    6,   15, 8213,   22,   15,
+     8213,   22,   15, 8213,   15,   22,   15,   22,    6,    6,
+        8,    6,    5,    6,    8,   12,    8,    4,    6,    5,
+        6,    8,    8,   12,    4,    6
     } ;
 
-static yyconst flex_int16_t yy_accept[257] =
+static yyconst flex_int16_t yy_accept[252] =
     {   0,
         1,    1,    1,    2,    3,    4,    7,   12,   16,   19,
        21,   24,   27,   30,   33,   36,   39,   42,   45,   48,
        51,   54,   57,   60,   63,   66,   68,   69,   70,   71,
        73,   76,   78,   79,   80,   81,   84,   84,   85,   86,
        87,   88,   89,   90,   91,   92,   93,   94,   95,   96,
-       97,   98,   99,  100,  101,  102,  103,  105,  107,  108,
-      110,  112,  113,  114,  115,  116,  117,  118,  119,  120,
+       97,   98,   99,  100,  101,  102,  103,  104,  106,  108,
+      109,  111,  113,  114,  115,  116,  117,  118,  119,  120,
       121,  122,  123,  124,  125,  126,  127,  128,  129,  130,
-      131,  133,  135,  136,  137,  138,  142,  143,  144,  145,
-      146,  147,  148,  149,  152,  156,  157,  162,  163,  164,
+      131,  132,  133,  135,  137,  138,  139,  140,  144,  145,
+      146,  147,  148,  149,  150,  151,  156,  160,  161,  166,
 
-      169,  170,  171,  172,  173,  176,  179,  181,  183,  184,
-      186,  187,  191,  192,  193,  194,  195,  198,  201,  203,
-      205,  208,  211,  213,  215,  216,  219,  222,  224,  226,
-      227,  228,  229,  230,  233,  236,  238,  240,  241,  242,
-      244,  245,  248,  251,  253,  255,  256,  260,  265,  266,
-      269,  272,  274,  276,  277,  280,  283,  285,  287,  288,
-      289,  292,  295,  297,  299,  300,  301,  302,  304,  305,
-      306,  307,  308,  311,  314,  316,  318,  319,  320,  323,
-      326,  328,  330,  333,  336,  338,  340,  341,  342,  343,
-      344,  345,  347,  349,  350,  351,  352,  354,  355,  358,
+      167,  168,  173,  174,  175,  176,  177,  180,  183,  185,
+      187,  188,  190,  191,  195,  196,  197,  200,  203,  205,
+      207,  210,  213,  215,  217,  220,  223,  225,  227,  228,
+      231,  234,  236,  238,  239,  240,  241,  242,  245,  248,
+      250,  252,  253,  254,  256,  257,  260,  263,  265,  267,
+      268,  272,  275,  278,  280,  282,  283,  286,  289,  291,
+      293,  294,  297,  300,  302,  304,  305,  306,  309,  312,
+      314,  316,  317,  318,  319,  321,  322,  323,  324,  325,
+      328,  331,  333,  335,  336,  337,  340,  343,  345,  347,
+      348,  349,  350,  351,  353,  355,  356,  357,  358,  360,
 
-      361,  363,  365,  366,  369,  372,  374,  376,  377,  378,
-      380,  381,  385,  387,  388,  389,  391,  392,  394,  395,
-      397,  399,  400,  402,  405,  406,  408,  411,  414,  416,
-      418,  420,  421,  422,  424,  425,  426,  429,  432,  434,
-      436,  437,  438,  439,  440,  441,  442,  444,  446,  447,
-      449,  451,  452,  454,  456,  456
+      361,  364,  367,  369,  371,  372,  374,  375,  379,  381,
+      382,  383,  385,  386,  388,  389,  391,  393,  394,  396,
+      397,  399,  402,  405,  407,  409,  411,  412,  413,  415,
+      416,  417,  420,  423,  425,  427,  428,  429,  430,  431,
+      432,  433,  435,  437,  438,  440,  442,  443,  445,  447,
+      447
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -492,244 +495,238 @@ static yyconst flex_int32_t yy_meta[34] 
         1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[313] =
+static yyconst flex_int16_t yy_base[308] =
     {   0,
-        0,    0,  572,  560,  559,  551,   32,   35,  662,  662,
-       44,   62,   30,   40,   32,   50,  533,   49,   47,   59,
-       68,  525,   69,  517,   72,    0,  662,  515,  662,   83,
-       91,    0,    0,  100,  501,  109,    0,   78,   51,   86,
-       89,   74,   96,  105,  109,  110,  111,  112,  117,   73,
-      119,  118,  121,  120,  122,    0,  134,    0,    0,  138,
-        0,    0,  495,  130,  144,  129,  143,  145,  146,  147,
-      148,  149,  153,  154,  155,  158,  161,  165,  166,  170,
-      180,    0,    0,  662,  171,  201,  176,  175,  178,  183,
-      465,  182,  190,  455,  212,  188,  221,  208,  224,  234,
+        0,    0,  546,  538,  533,  521,   32,   35,  656,  656,
+       44,   62,   30,   41,   50,   51,  507,   64,   47,   66,
+       67,  499,   68,  487,   72,    0,  656,  465,  656,   87,
+       91,    0,    0,  100,  452,  109,    0,   74,   95,   87,
+       32,   96,  105,  110,   77,   97,   40,  113,  116,  112,
+      118,  120,  121,  122,  123,  125,    0,  137,    0,    0,
+      147,    0,    0,  449,  129,  126,  134,  143,  145,  147,
+      148,  149,  151,  153,  156,  160,  155,  167,  162,  175,
+      168,  159,  188,    0,    0,  656,  166,  197,  179,  185,
+      176,  200,  435,  186,  193,  216,  225,  205,  234,  221,
 
-      209,  230,  236,  221,  244,    0,  247,    0,  184,  248,
-      244,  269,  231,  247,  251,  258,  272,    0,  279,    0,
-      283,    0,  286,    0,  255,  290,    0,  293,    0,  270,
-      281,  455,  254,  297,    0,    0,    0,    0,  294,  662,
-      295,  308,    0,  310,    0,  257,  319,  328,  304,  331,
-        0,    0,    0,    0,  335,    0,    0,    0,    0,  316,
-      338,    0,    0,    0,    0,  333,  336,  447,  662,  429,
-      338,  340,  348,    0,    0,    0,    0,  428,  351,    0,
-      355,    0,  359,    0,  362,    0,  357,  427,  308,  369,
-      426,  662,  425,  662,  346,  365,  423,  662,  371,    0,
+      237,  247,  204,  230,  244,  213,  254,    0,  256,    0,
+      251,  258,  254,  279,  256,  259,  267,    0,  269,    0,
+      286,    0,  288,    0,  290,    0,  297,    0,  267,  299,
+        0,  301,    0,  288,  297,  421,  302,  310,    0,    0,
+        0,    0,  305,  656,  307,  319,    0,  321,    0,  322,
+      332,  335,    0,    0,    0,    0,  339,    0,    0,    0,
+        0,  342,    0,    0,    0,    0,  340,  349,    0,    0,
+        0,    0,  337,  345,  420,  656,  419,  346,  350,  358,
+        0,    0,    0,    0,  418,  360,    0,  362,    0,  417,
+      319,  369,  416,  656,  415,  656,  276,  364,  414,  656,
 
-        0,    0,    0,  378,    0,    0,    0,    0,  380,  421,
-      662,  388,  420,    0,  419,  662,  373,  418,  662,  372,
-      382,  417,  662,  398,  416,  662,  400,    0,  402,    0,
-        0,  385,  415,  662,  390,  275,  409,    0,    0,    0,
-        0,  405,  404,  406,  264,  412,  224,  129,  662,   87,
-      662,   47,  662,  662,  662,  434,  438,  441,  445,  449,
-      453,  457,  461,  465,  469,  473,  477,  481,  485,  489,
-      493,  497,  501,  505,  509,  513,  517,  521,  525,  529,
-      533,  537,  541,  545,  549,  553,  557,  561,  565,  569,
-      573,  577,  581,  585,  589,  593,  597,  601,  605,  609,
+      375,    0,    0,    0,    0,  413,  656,  384,  412,    0,
+      410,  656,  370,  409,  656,  370,  378,  408,  656,  366,
+      656,  394,    0,  396,    0,    0,  380,  316,  656,  377,
+      387,  398,    0,    0,    0,    0,  399,  402,  407,  271,
+      406,  228,  200,  656,  175,  656,   77,  656,  656,  656,
+      428,  432,  435,  439,  443,  447,  451,  455,  459,  463,
+      467,  471,  475,  479,  483,  487,  491,  495,  499,  503,
+      507,  511,  515,  519,  523,  527,  531,  535,  539,  543,
+      547,  551,  555,  559,  563,  567,  571,  575,  579,  583,
+      587,  591,  595,  599,  603,  607,  611,  615,  619,  623,
 
-      613,  617,  621,  625,  629,  633,  637,  641,  645,  649,
-      653,  657
+      627,  631,  635,  639,  643,  647,  651
     } ;
 
-static yyconst flex_int16_t yy_def[313] =
+static yyconst flex_int16_t yy_def[308] =
     {   0,
-      255,    1,  256,  256,  255,  257,  258,  258,  255,  255,
-      259,  259,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  260,  255,  257,  255,  261,
-      258,  262,  262,  263,   12,  257,  264,   12,   12,   12,
+      250,    1,  251,  251,  250,  252,  253,  253,  250,  250,
+      254,  254,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  255,  250,  252,  250,  256,
+      253,  257,  257,  258,   12,  252,  259,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  260,  261,  262,  262,  265,
-      266,  266,  255,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,  255,  256,  257,  257,
+      260,  261,  261,  250,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-      265,  266,  266,  255,   12,  267,   12,   12,   12,   12,
-       12,   12,   12,   36,  268,   12,  269,   12,   12,  270,
+       12,   12,  260,  261,  261,  250,   12,  262,   12,   12,
+       12,   12,   12,   12,   12,  263,  264,   12,  265,   12,
 
-       12,   12,   12,   12,  271,  272,  267,  272,   12,   12,
-       12,  273,   12,   12,   12,  257,  274,  275,  268,  275,
-      276,  277,  269,  277,   12,  278,  279,  270,  279,   12,
-       12,  280,   12,  271,  272,  272,  281,  281,   12,  255,
-       12,  282,  283,  273,  283,   12,  284,  285,  257,  274,
-      275,  275,  286,  286,  276,  277,  277,  287,  287,   12,
-      278,  279,  279,  288,  288,   12,   12,  289,  255,  290,
-       12,   12,  282,  283,  283,  291,  291,  292,  293,  294,
-      284,  294,  295,  296,  285,  296,  257,  297,   12,  298,
-      289,  255,  299,  255,   12,  300,  301,  255,  293,  294,
+       12,  266,   12,   12,   12,   12,  267,  268,  262,  268,
+       12,   12,   12,  269,   12,   12,  270,  271,  263,  271,
+      272,  273,  264,  273,  274,  275,  265,  275,   12,  276,
+      277,  266,  277,   12,   12,  278,   12,  267,  268,  268,
+      279,  279,   12,  250,   12,  280,  281,  269,  281,   12,
+      282,  270,  271,  271,  283,  283,  272,  273,  273,  284,
+      284,  274,  275,  275,  285,  285,   12,  276,  277,  277,
+      286,  286,   12,   12,  287,  250,  288,   12,   12,  280,
+      281,  281,  289,  289,  290,  291,  292,  282,  292,  293,
+       12,  294,  287,  250,  295,  250,   12,  296,  297,  250,
 
-      294,  302,  302,  295,  296,  296,  303,  303,  257,  304,
-      255,  305,  306,  306,  299,  255,   12,  307,  255,  307,
-      307,  301,  255,  285,  304,  255,  308,  309,  305,  309,
-      306,   12,  307,  255,  307,  307,  308,  309,  309,  310,
-      310,   12,  307,  307,  311,  307,  307,  312,  255,  307,
-      255,  312,  255,  255,    0,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      291,  292,  292,  298,  298,  299,  250,  300,  301,  301,
+      295,  250,   12,  302,  250,  302,  302,  297,  250,  299,
+      250,  303,  304,  300,  304,  301,   12,  302,  250,  302,
+      302,  303,  304,  304,  305,  305,   12,  302,  302,  306,
+      302,  302,  307,  250,  302,  250,  307,  250,  250,    0,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
 
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255
+      250,  250,  250,  250,  250,  250,  250
     } ;
 
-static yyconst flex_int16_t yy_nxt[696] =
+static yyconst flex_int16_t yy_nxt[690] =
     {   0,
         6,    7,    8,    9,    6,    6,    6,    6,   10,   11,
        12,   13,   14,   15,   16,   17,   17,   18,   17,   17,
        17,   17,   19,   17,   20,   21,   22,   23,   24,   17,
        25,   17,   17,   31,   31,   32,   31,   31,   32,   35,
        33,   35,   41,   33,   28,   28,   28,   29,   34,   35,
-      249,   36,   37,   42,   43,   38,   35,   48,   35,   35,
-       35,   39,   28,   28,   28,   29,   34,   44,   35,   36,
-       37,   40,   46,   45,   65,   49,   47,   35,   35,   50,
-       52,   35,   35,   35,   54,   28,   58,   35,   55,   64,
-      254,   59,   31,   31,   32,   35,   75,   66,   35,   33,
+       35,   36,   37,   73,   42,   38,   35,   49,   68,   35,
+       35,   39,   28,   28,   28,   29,   34,   43,   45,   36,
+       37,   40,   44,   35,   46,   35,   35,   35,   51,   53,
+      244,   35,   50,   35,   55,   65,   35,   47,   56,   28,
+       59,   48,   31,   31,   32,   60,   35,   71,   67,   33,
 
-       28,   28,   28,   29,   68,   35,   48,   28,   37,   60,
-       60,   60,   61,   60,   35,   67,   60,   62,   35,   35,
-       35,   35,   72,   71,   73,   69,   35,   35,   35,   35,
-       35,   35,  253,   80,   76,   70,   28,   58,   35,   35,
-       28,   82,   59,   85,   77,   78,   83,   79,   87,   74,
-       76,   86,   35,   35,   35,   35,   35,   35,   35,   90,
-       94,   95,   35,   35,   35,   97,   88,   35,   91,   92,
-       35,   99,  100,   89,   35,   35,   93,  101,   98,   35,
-       35,  102,   28,   82,   35,   35,   96,   35,   83,  109,
-      112,   35,   35,   35,   76,   97,  110,   35,  104,   35,
+       28,   28,   28,   29,   35,   35,   35,   28,   37,   61,
+       61,   61,   62,   61,   35,   70,   61,   63,   66,   35,
+       49,   35,   35,   72,   74,   35,   69,   35,   75,   35,
+       35,   35,   35,   88,   35,   35,   82,   78,   35,   28,
+       59,   77,   87,   35,   76,   60,   80,   79,   81,   28,
+       84,   78,   35,   89,   35,   85,   35,   35,   35,   75,
+       35,   92,   35,   96,   35,   35,   90,   97,   35,   35,
+       93,   35,   94,   91,   99,   35,   35,   35,  249,  100,
+       95,  101,  102,  104,   35,   35,   98,  103,   35,  105,
+       28,   84,  111,  106,   35,   35,   85,  107,  107,   61,
 
-      103,  105,  105,   60,  106,  105,  139,  115,  105,  108,
-      111,  114,  117,  117,   60,  118,  117,   35,   35,  117,
-      120,  121,  121,   60,  122,  121,  130,  251,  121,  124,
-       35,  100,  125,   35,  126,  126,   60,  127,  126,   35,
-       35,  126,  129,  131,  132,   35,   28,  135,  133,   28,
-      137,  140,  136,   35,  147,  138,   35,   35,  148,  146,
-       35,   29,  170,   35,   35,  178,   35,  249,  141,  142,
-      142,   60,  143,  142,   28,  151,  142,  145,  219,   35,
-      152,   28,  153,  160,  149,   28,  156,  154,   28,  158,
-       35,  157,   28,  162,  159,   28,  164,  166,  163,   28,
+      108,  107,   35,  248,  107,  110,  112,  114,  113,   35,
+       75,   78,   99,   35,   35,  116,  117,  117,   61,  118,
+      117,  134,   35,  117,  120,  121,  121,   61,  122,  121,
+       35,  246,  121,  124,  125,  125,   61,  126,  125,   35,
+      137,  125,  128,  135,  102,  129,   35,  130,  130,   61,
+      131,  130,  136,   35,  130,  133,   28,  139,   28,  141,
+       35,  144,  140,   35,  142,   35,  151,   35,   35,   28,
+      153,   28,  155,  143,  244,  154,   35,  156,  145,  146,
+      146,   61,  147,  146,  150,   35,  146,  149,   28,  158,
+       28,  160,   28,  163,  159,  167,  161,   35,  164,   28,
 
-      135,  165,  244,   35,   35,  136,  171,   29,  172,  167,
-       28,  174,   28,  176,  187,  212,  175,   35,  177,  179,
-      179,   60,  180,  179,  188,   35,  179,  182,  183,  183,
-       60,  184,  183,   28,  151,  183,  186,   28,  156,  152,
-       28,  162,   35,  157,  190,   35,  163,   35,  196,   35,
-       28,  174,  189,   28,  200,   35,  175,   28,  202,  201,
-       29,   28,  205,  203,   28,  207,  195,  206,  219,  209,
-      208,   63,  214,   28,  200,  234,  220,  221,  217,  201,
-       28,  205,   35,   29,  235,  234,  206,  224,  227,  227,
-       60,  228,  227,  219,   35,  227,  230,  232,  242,  236,
+      165,   28,  169,   28,  171,  166,   35,  170,  213,  172,
+      177,   35,   28,  139,   35,  173,   35,  178,  140,  215,
+      179,   28,  181,   28,  183,  174,  208,  182,   35,  184,
+      185,   35,  186,  186,   61,  187,  186,   28,  153,  186,
+      189,   28,  158,  154,   28,  163,   35,  159,  190,   35,
+      164,   28,  169,  192,   35,   35,  191,  170,  198,   35,
+       28,  181,   28,  202,   28,  204,  182,  215,  203,  207,
+      205,   64,  210,  229,  197,  216,  217,   28,  202,   35,
+      215,  229,  230,  203,  222,  222,   61,  223,  222,   35,
+      215,  222,  225,  237,  227,  231,   28,  233,   28,  235,
 
-       28,  207,   28,  238,   28,  240,  208,  219,  239,  219,
-      241,   28,  238,  245,   35,  219,  243,  239,  219,  211,
-      198,  234,  194,  231,  226,  247,  223,  246,  216,  169,
-      211,  198,  194,  250,   26,   26,   26,   26,   28,   28,
-       28,   30,   30,   30,   30,   35,   35,   35,   35,   56,
-      192,   56,   56,   57,   57,   57,   57,   59,  169,   59,
-       59,   34,   34,   34,   34,   63,   63,  116,   63,   81,
-       81,   81,   81,   83,  113,   83,   83,  107,  107,  107,
-      107,  119,  119,  119,  119,  123,  123,  123,  123,  128,
-      128,  128,  128,  134,  134,  134,  134,  136,   84,  136,
+       28,  233,  234,  238,  236,  215,  234,  240,   35,  215,
+      215,  200,  229,  196,  239,  226,  221,  219,  212,  176,
+      207,  200,  196,  194,  176,  241,  242,  245,   26,   26,
+       26,   26,   28,   28,   28,   30,   30,   30,   30,   35,
+       35,   35,   35,   57,  115,   57,   57,   58,   58,   58,
+       58,   60,   86,   60,   60,   34,   34,   34,   34,   64,
+       64,   35,   64,   83,   83,   83,   83,   85,   29,   85,
+       85,  109,  109,  109,  109,  119,  119,  119,  119,  123,
+      123,  123,  123,  127,  127,  127,  127,  132,  132,  132,
+      132,  138,  138,  138,  138,  140,   54,  140,  140,  148,
 
-      136,  144,  144,  144,  144,  150,  150,  150,  150,  152,
-       35,  152,  152,  155,  155,  155,  155,  157,   29,  157,
-      157,  161,  161,  161,  161,  163,   53,  163,  163,  168,
-      168,  168,  168,  138,   51,  138,  138,  173,  173,  173,
-      173,  175,   35,  175,  175,  181,  181,  181,  181,  185,
-      185,  185,  185,  154,   29,  154,  154,  159,  255,  159,
-      159,  165,   27,  165,  165,  191,  191,  191,  191,  193,
-      193,  193,  193,  177,   27,  177,  177,  197,  197,  197,
-      197,  199,  199,  199,  199,  201,  255,  201,  201,  204,
-      204,  204,  204,  206,  255,  206,  206,  210,  210,  210,
+      148,  148,  148,  152,  152,  152,  152,  154,   52,  154,
+      154,  157,  157,  157,  157,  159,   35,  159,  159,  162,
+      162,  162,  162,  164,   29,  164,  164,  168,  168,  168,
+      168,  170,  250,  170,  170,  175,  175,  175,  175,  142,
+       27,  142,  142,  180,  180,  180,  180,  182,   27,  182,
+      182,  188,  188,  188,  188,  156,  250,  156,  156,  161,
+      250,  161,  161,  166,  250,  166,  166,  172,  250,  172,
+      172,  193,  193,  193,  193,  195,  195,  195,  195,  184,
+      250,  184,  184,  199,  199,  199,  199,  201,  201,  201,
+      201,  203,  250,  203,  203,  206,  206,  206,  206,  209,
 
-      210,  213,  213,  213,  213,  215,  215,  215,  215,  218,
-      218,  218,  218,  222,  222,  222,  222,  203,  255,  203,
-      203,  208,  255,  208,  208,  225,  225,  225,  225,  229,
-      229,  229,  229,  214,  255,  214,  214,  233,  233,  233,
-      233,  237,  237,  237,  237,  239,  255,  239,  239,  241,
-      255,  241,  241,  248,  248,  248,  248,  252,  252,  252,
-      252,    5,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255
-
+      209,  209,  209,  211,  211,  211,  211,  214,  214,  214,
+      214,  218,  218,  218,  218,  205,  250,  205,  205,  220,
+      220,  220,  220,  224,  224,  224,  224,  210,  250,  210,
+      210,  228,  228,  228,  228,  232,  232,  232,  232,  234,
+      250,  234,  234,  236,  250,  236,  236,  243,  243,  243,
+      243,  247,  247,  247,  247,    5,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250
     } ;
 
-static yyconst flex_int16_t yy_chk[696] =
+static yyconst flex_int16_t yy_chk[690] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    7,    7,    7,    8,    8,    8,   13,
-        7,   15,   13,    8,   11,   11,   11,   11,   11,   14,
-      252,   11,   11,   14,   15,   11,   19,   19,   18,   16,
-       39,   11,   12,   12,   12,   12,   12,   16,   20,   12,
-       12,   12,   18,   16,   39,   20,   18,   21,   23,   21,
-       23,   25,   50,   42,   25,   30,   30,   38,   25,   38,
-      250,   30,   31,   31,   31,   40,   50,   40,   41,   31,
+        7,   41,   13,    8,   11,   11,   11,   11,   11,   47,
+       14,   11,   11,   47,   14,   11,   19,   19,   41,   15,
+       16,   11,   12,   12,   12,   12,   12,   14,   16,   12,
+       12,   12,   15,   18,   16,   20,   21,   23,   21,   23,
+      247,   25,   20,   38,   25,   38,   45,   18,   25,   30,
+       30,   18,   31,   31,   31,   30,   40,   45,   40,   31,
 
-       34,   34,   34,   34,   42,   43,   43,   34,   34,   36,
-       36,   36,   36,   36,   44,   41,   36,   36,   45,   46,
-       47,   48,   47,   46,   48,   44,   49,   52,   51,   54,
-       53,   55,  248,   54,   55,   45,   57,   57,   66,   64,
-       60,   60,   57,   64,   52,   53,   60,   53,   66,   49,
-       51,   65,   67,   65,   68,   69,   70,   71,   72,   69,
-       73,   74,   73,   74,   75,   76,   67,   76,   70,   71,
-       77,   78,   78,   68,   78,   79,   72,   78,   77,   80,
-       85,   79,   81,   81,   88,   87,   75,   89,   81,   87,
-       90,   92,   90,  109,   96,   96,   88,   96,   85,   93,
+       34,   34,   34,   34,   39,   42,   46,   34,   34,   36,
+       36,   36,   36,   36,   43,   43,   36,   36,   39,   44,
+       44,   50,   48,   46,   48,   49,   42,   51,   49,   52,
+       53,   54,   55,   66,   56,   66,   55,   56,   65,   58,
+       58,   51,   65,   67,   50,   58,   54,   53,   54,   61,
+       61,   52,   68,   67,   69,   61,   70,   71,   72,   70,
+       73,   71,   74,   75,   77,   75,   68,   76,   82,   76,
+       72,   79,   73,   69,   78,   87,   78,   81,  245,   79,
+       74,   80,   80,   81,   80,   91,   77,   80,   89,   82,
+       83,   83,   89,   87,   90,   94,   83,   88,   88,   88,
 
-       80,   86,   86,   86,   86,   86,  109,   93,   86,   86,
-       89,   92,   95,   95,   95,   95,   95,   98,  101,   95,
-       95,   97,   97,   97,   97,   97,  101,  247,   97,   97,
-      104,   99,   98,   99,  100,  100,  100,  100,  100,  102,
-      113,  100,  100,  102,  103,  103,  105,  105,  104,  107,
-      107,  110,  105,  111,  114,  107,  114,  110,  115,  113,
-      115,  116,  133,  133,  125,  146,  146,  245,  111,  112,
-      112,  112,  112,  112,  117,  117,  112,  112,  236,  130,
-      117,  119,  119,  125,  116,  121,  121,  119,  123,  123,
-      131,  121,  126,  126,  123,  128,  128,  130,  126,  134,
+       88,   88,   95,  243,   88,   88,   90,   92,   91,   92,
+       95,   98,   98,  103,   98,   94,   96,   96,   96,   96,
+       96,  103,  106,   96,   96,   97,   97,   97,   97,   97,
+      100,  242,   97,   97,   99,   99,   99,   99,   99,  104,
+      106,   99,   99,  104,  101,  100,  101,  102,  102,  102,
+      102,  102,  105,  105,  102,  102,  107,  107,  109,  109,
+      111,  112,  107,  113,  109,  115,  116,  112,  116,  117,
+      117,  119,  119,  111,  240,  117,  129,  119,  113,  114,
+      114,  114,  114,  114,  115,  197,  114,  114,  121,  121,
+      123,  123,  125,  125,  121,  129,  123,  134,  125,  127,
 
-      134,  128,  236,  139,  141,  134,  139,  149,  141,  131,
-      142,  142,  144,  144,  149,  189,  142,  189,  144,  147,
-      147,  147,  147,  147,  160,  160,  147,  147,  148,  148,
-      148,  148,  148,  150,  150,  148,  148,  155,  155,  150,
-      161,  161,  166,  155,  167,  167,  161,  171,  172,  172,
-      173,  173,  166,  179,  179,  195,  173,  181,  181,  179,
-      187,  183,  183,  181,  185,  185,  171,  183,  196,  187,
-      185,  190,  190,  199,  199,  220,  196,  196,  195,  199,
-      204,  204,  217,  209,  220,  221,  204,  209,  212,  212,
-      212,  212,  212,  235,  232,  212,  212,  217,  232,  221,
+      127,  130,  130,  132,  132,  127,  135,  130,  197,  132,
+      137,  137,  138,  138,  143,  134,  145,  143,  138,  228,
+      145,  146,  146,  148,  148,  135,  191,  146,  191,  148,
+      150,  150,  151,  151,  151,  151,  151,  152,  152,  151,
+      151,  157,  157,  152,  162,  162,  173,  157,  167,  167,
+      162,  168,  168,  174,  174,  178,  173,  168,  179,  179,
+      180,  180,  186,  186,  188,  188,  180,  198,  186,  220,
+      188,  192,  192,  216,  178,  198,  198,  201,  201,  213,
+      230,  217,  216,  201,  208,  208,  208,  208,  208,  227,
+      231,  208,  208,  227,  213,  217,  222,  222,  224,  224,
 
-      224,  224,  227,  227,  229,  229,  224,  243,  227,  244,
-      229,  237,  237,  242,  242,  246,  235,  237,  233,  225,
-      222,  218,  215,  213,  210,  244,  197,  243,  193,  191,
-      188,  178,  170,  246,  256,  256,  256,  256,  257,  257,
-      257,  258,  258,  258,  258,  259,  259,  259,  259,  260,
-      168,  260,  260,  261,  261,  261,  261,  262,  132,  262,
-      262,  263,  263,  263,  263,  264,  264,   94,  264,  265,
-      265,  265,  265,  266,   91,  266,  266,  267,  267,  267,
-      267,  268,  268,  268,  268,  269,  269,  269,  269,  270,
-      270,  270,  270,  271,  271,  271,  271,  272,   63,  272,
+      232,  232,  222,  230,  224,  238,  232,  237,  237,  241,
+      239,  218,  214,  211,  231,  209,  206,  199,  195,  193,
+      190,  185,  177,  175,  136,  238,  239,  241,  251,  251,
+      251,  251,  252,  252,  252,  253,  253,  253,  253,  254,
+      254,  254,  254,  255,   93,  255,  255,  256,  256,  256,
+      256,  257,   64,  257,  257,  258,  258,  258,  258,  259,
+      259,   35,  259,  260,  260,  260,  260,  261,   28,  261,
+      261,  262,  262,  262,  262,  263,  263,  263,  263,  264,
+      264,  264,  264,  265,  265,  265,  265,  266,  266,  266,
+      266,  267,  267,  267,  267,  268,   24,  268,  268,  269,
 
-      272,  273,  273,  273,  273,  274,  274,  274,  274,  275,
-       35,  275,  275,  276,  276,  276,  276,  277,   28,  277,
-      277,  278,  278,  278,  278,  279,   24,  279,  279,  280,
-      280,  280,  280,  281,   22,  281,  281,  282,  282,  282,
-      282,  283,   17,  283,  283,  284,  284,  284,  284,  285,
-      285,  285,  285,  286,    6,  286,  286,  287,    5,  287,
-      287,  288,    4,  288,  288,  289,  289,  289,  289,  290,
-      290,  290,  290,  291,    3,  291,  291,  292,  292,  292,
-      292,  293,  293,  293,  293,  294,    0,  294,  294,  295,
-      295,  295,  295,  296,    0,  296,  296,  297,  297,  297,
+      269,  269,  269,  270,  270,  270,  270,  271,   22,  271,
+      271,  272,  272,  272,  272,  273,   17,  273,  273,  274,
+      274,  274,  274,  275,    6,  275,  275,  276,  276,  276,
+      276,  277,    5,  277,  277,  278,  278,  278,  278,  279,
+        4,  279,  279,  280,  280,  280,  280,  281,    3,  281,
+      281,  282,  282,  282,  282,  283,    0,  283,  283,  284,
+        0,  284,  284,  285,    0,  285,  285,  286,    0,  286,
+      286,  287,  287,  287,  287,  288,  288,  288,  288,  289,
+        0,  289,  289,  290,  290,  290,  290,  291,  291,  291,
+      291,  292,    0,  292,  292,  293,  293,  293,  293,  294,
 
-      297,  298,  298,  298,  298,  299,  299,  299,  299,  300,
-      300,  300,  300,  301,  301,  301,  301,  302,    0,  302,
-      302,  303,    0,  303,  303,  304,  304,  304,  304,  305,
-      305,  305,  305,  306,    0,  306,  306,  307,  307,  307,
-      307,  308,  308,  308,  308,  309,    0,  309,  309,  310,
-        0,  310,  310,  311,  311,  311,  311,  312,  312,  312,
-      312,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255
-
+      294,  294,  294,  295,  295,  295,  295,  296,  296,  296,
+      296,  297,  297,  297,  297,  298,    0,  298,  298,  299,
+      299,  299,  299,  300,  300,  300,  300,  301,    0,  301,
+      301,  302,  302,  302,  302,  303,  303,  303,  303,  304,
+        0,  304,  304,  305,    0,  305,  305,  306,  306,  306,
+      306,  307,  307,  307,  307,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250
     } ;
 
 #define YY_TRAILING_MASK 0x2000
@@ -776,7 +773,8 @@ goto find_rule; \
  * syntax; if the target string has to contain "," or ":" the new
  * syntax's "target=" should be used.
  */
-#line 31 "libxlu_disk_l.l"
+
+#line 35 "libxlu_disk_l.l"
 #include "libxlu_disk_i.h"
 
 #define YY_NO_INPUT
@@ -885,7 +883,7 @@ static int vdev_and_devtype(DiskParseCon
 #define DPC ((DiskParseContext*)yyextra)
 
 
-#line 889 "libxlu_disk_l.c"
+#line 887 "libxlu_disk_l.c"
 
 #define INITIAL 0
 #define LEXERR 1
@@ -1121,12 +1119,12 @@ YY_DECL
 	register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 151 "libxlu_disk_l.l"
+#line 155 "libxlu_disk_l.l"
 
 
  /*----- the scanner rules which do the parsing -----*/
 
-#line 1130 "libxlu_disk_l.c"
+#line 1128 "libxlu_disk_l.c"
 
 	if ( !yyg->yy_init )
 		{
@@ -1190,14 +1188,14 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 256 )
+				if ( yy_current_state >= 251 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			*yyg->yy_state_ptr++ = yy_current_state;
 			++yy_cp;
 			}
-		while ( yy_current_state != 255 );
+		while ( yy_current_state != 250 );
 
 yy_find_action:
 		yy_current_state = *--yyg->yy_state_ptr;
@@ -1247,72 +1245,72 @@ do_action:	/* This label is used only to
 case 1:
 /* rule 1 can match eol */
 YY_RULE_SETUP
-#line 155 "libxlu_disk_l.l"
+#line 159 "libxlu_disk_l.l"
 { /* ignore whitespace before parameters */ }
 	YY_BREAK
 /* ordinary parameters setting enums or strings */
 case 2:
 /* rule 2 can match eol */
 YY_RULE_SETUP
-#line 159 "libxlu_disk_l.l"
+#line 163 "libxlu_disk_l.l"
 { STRIP(','); setformat(DPC, FROMEQUALS); }
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 161 "libxlu_disk_l.l"
+#line 165 "libxlu_disk_l.l"
 { DPC->disk->is_cdrom = 1; }
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 162 "libxlu_disk_l.l"
+#line 166 "libxlu_disk_l.l"
 { DPC->disk->is_cdrom = 1; }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 163 "libxlu_disk_l.l"
+#line 167 "libxlu_disk_l.l"
 { DPC->disk->is_cdrom = 0; }
 	YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 164 "libxlu_disk_l.l"
+#line 168 "libxlu_disk_l.l"
 { xlu__disk_err(DPC,yytext,"unknown value for type"); }
 	YY_BREAK
 case 7:
 /* rule 7 can match eol */
 YY_RULE_SETUP
-#line 166 "libxlu_disk_l.l"
+#line 170 "libxlu_disk_l.l"
 { STRIP(','); setaccess(DPC, FROMEQUALS); }
 	YY_BREAK
 case 8:
 /* rule 8 can match eol */
 YY_RULE_SETUP
-#line 167 "libxlu_disk_l.l"
+#line 171 "libxlu_disk_l.l"
 { STRIP(','); setbackendtype(DPC,FROMEQUALS); }
 	YY_BREAK
 case 9:
 /* rule 9 can match eol */
 YY_RULE_SETUP
-#line 169 "libxlu_disk_l.l"
+#line 173 "libxlu_disk_l.l"
 { STRIP(','); SAVESTRING("vdev", vdev, FROMEQUALS); }
 	YY_BREAK
 case 10:
 /* rule 10 can match eol */
 YY_RULE_SETUP
-#line 170 "libxlu_disk_l.l"
+#line 174 "libxlu_disk_l.l"
 { STRIP(','); SAVESTRING("script", script, FROMEQUALS); }
 	YY_BREAK
 /* the target magic parameter, eats the rest of the string */
 case 11:
 YY_RULE_SETUP
-#line 174 "libxlu_disk_l.l"
+#line 178 "libxlu_disk_l.l"
 { STRIP(','); SAVESTRING("target", pdev_path, FROMEQUALS); }
 	YY_BREAK
 /* unknown parameters */
 case 12:
 /* rule 12 can match eol */
 YY_RULE_SETUP
-#line 178 "libxlu_disk_l.l"
+#line 182 "libxlu_disk_l.l"
 { xlu__disk_err(DPC,yytext,"unknown parameter"); }
 	YY_BREAK
 /* deprecated prefixes */
@@ -1320,7 +1318,7 @@ YY_RULE_SETUP
    * matched the whole string, so these patterns take precedence */
 case 13:
 YY_RULE_SETUP
-#line 185 "libxlu_disk_l.l"
+#line 189 "libxlu_disk_l.l"
 {
                     STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `[format=]...,'");
@@ -1329,24 +1327,31 @@ YY_RULE_SETUP
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 191 "libxlu_disk_l.l"
+#line 195 "libxlu_disk_l.l"
 {
-		    STRIP(':');
+                    char *newscript;
+                    STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `script=...'");
-		    SAVESTRING("script", script, yytext);
-		}
+                    if (asprintf(&newscript, "block-%s", yytext) < 0) {
+                            xlu__disk_err(DPC,yytext,"unable to format script");
+                            return 0;
+                    }
+                    savestring(DPC, "script respecified",
+                               &DPC->disk->script, newscript);
+                    free(newscript);
+                }
 	YY_BREAK
 case 15:
 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
 yyg->yy_c_buf_p = yy_cp = yy_bp + 8;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 197 "libxlu_disk_l.l"
+#line 208 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 198 "libxlu_disk_l.l"
+#line 209 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 17:
@@ -1354,7 +1359,7 @@ case 17:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 199 "libxlu_disk_l.l"
+#line 210 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 18:
@@ -1362,7 +1367,7 @@ case 18:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 200 "libxlu_disk_l.l"
+#line 211 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 19:
@@ -1370,7 +1375,7 @@ case 19:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 201 "libxlu_disk_l.l"
+#line 212 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 20:
@@ -1378,13 +1383,13 @@ case 20:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 202 "libxlu_disk_l.l"
+#line 213 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 21:
 /* rule 21 can match eol */
 YY_RULE_SETUP
-#line 204 "libxlu_disk_l.l"
+#line 215 "libxlu_disk_l.l"
 {
 		  xlu__disk_err(DPC,yytext,"unknown deprecated disk prefix");
 		  return 0;
@@ -1394,7 +1399,7 @@ YY_RULE_SETUP
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 211 "libxlu_disk_l.l"
+#line 222 "libxlu_disk_l.l"
 {
     STRIP(',');
 
@@ -1423,7 +1428,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 237 "libxlu_disk_l.l"
+#line 248 "libxlu_disk_l.l"
 {
     BEGIN(LEXERR);
     yymore();
@@ -1431,17 +1436,17 @@ YY_RULE_SETUP
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 241 "libxlu_disk_l.l"
+#line 252 "libxlu_disk_l.l"
 {
     xlu__disk_err(DPC,yytext,"bad disk syntax"); return 0;
 }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
 	YY_BREAK
-#line 1445 "libxlu_disk_l.c"
+#line 1450 "libxlu_disk_l.c"
 			case YY_STATE_EOF(INITIAL):
 			case YY_STATE_EOF(LEXERR):
 				yyterminate();
@@ -1705,7 +1710,7 @@ static int yy_get_next_buffer (yyscan_t 
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 256 )
+			if ( yy_current_state >= 251 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1729,11 +1734,11 @@ static int yy_get_next_buffer (yyscan_t 
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 256 )
+		if ( yy_current_state >= 251 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 255);
+	yy_is_jam = (yy_current_state == 250);
 	if ( ! yy_is_jam )
 		*yyg->yy_state_ptr++ = yy_current_state;
 
@@ -2533,4 +2538,4 @@ void xlu__disk_yyfree (void * ptr , yysc
 
 #define YYTABLES_NAME "yytables"
 
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_l.h
--- a/tools/libxl/libxlu_disk_l.h	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.h	Mon Aug 06 12:28:03 2012 +0100
@@ -3,8 +3,12 @@
 #define xlu__disk_yyIN_HEADER 1
 
 #line 6 "libxlu_disk_l.h"
+#line 31 "libxlu_disk_l.l"
+#include "libxl_osdeps.h" /* must come before any other headers */
 
-#line 8 "libxlu_disk_l.h"
+
+
+#line 12 "libxlu_disk_l.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -340,8 +344,8 @@ extern int xlu__disk_yylex (yyscan_t yys
 #undef YY_DECL
 #endif
 
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
 
-#line 346 "libxlu_disk_l.h"
+#line 350 "libxlu_disk_l.h"
 #undef xlu__disk_yyIN_HEADER
 #endif /* xlu__disk_yyHEADER_H */
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_l.l
--- a/tools/libxl/libxlu_disk_l.l	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.l	Mon Aug 06 12:28:03 2012 +0100
@@ -27,6 +27,10 @@
  * syntax's "target=" should be used.
  */
 
+%top{
+#include "libxl_osdeps.h" /* must come before any other headers */
+}
+
 %{
 #include "libxlu_disk_i.h"
 
@@ -188,11 +192,18 @@ target=.*	{ STRIP(','); SAVESTRING("targ
                     setformat(DPC, yytext);
                  }
 
-iscsi:|e?nbd:drbd:/.* {
-		    STRIP(':');
+(iscsi|e?nbd|drbd):/.* {
+                    char *newscript;
+                    STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `script=...'");
-		    SAVESTRING("script", script, yytext);
-		}
+                    if (asprintf(&newscript, "block-%s", yytext) < 0) {
+                            xlu__disk_err(DPC,yytext,"unable to format script");
+                            return 0;
+                    }
+                    savestring(DPC, "script respecified",
+                               &DPC->disk->script, newscript);
+                    free(newscript);
+                }
 
 tapdisk:/.*	{ DPC->had_depr_prefix=1; DEPRECATE(0); }
 tap2?:/.*	{ DPC->had_depr_prefix=1; DEPRECATE(0); }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:33 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:33 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT7-0005nC-RQ; Tue, 07 Aug 2012 20:33:33 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT5-0005iA-L3
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:32 +0000
Received: from [85.158.138.51:33279] by server-8.bemta-3.messagelabs.com id
	A2/FE-25919-A9B71205; Tue, 07 Aug 2012 20:33:30 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1344371604!24551653!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2694 invoked from network); 7 Aug 2012 20:33:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:26 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-00042B-Ph
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSy-0003Mx-Nz
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:24 +0000
Message-Id: <E1SyqSy-0003Mx-Nz@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:24 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: support custom block hotplug
	scripts
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1344252483 -3600
# Node ID 353bc0801b11ee28855cad50ffc7b8afe0efa556
# Parent  60f2c7b74741776d1a25fe2618fb17b570996ce5
libxl: support custom block hotplug scripts

These are provided using the "script=" syntax described in
docs/misc/xl-disk-configuration.txt.

The existing hotplug scripts currently conflate two different
concepts, namely that of making a datapath available in the backend
domain (logging into iSCSI LUNs and the like) and that of actually
connecting that datapath to a Xen backend path (e.g. writing
"physical-device" node in xenstore to bring up blkback).

For this reason the script support implemented here is only supported
in conjunction with backendtype=phy.

Eventually we hope to rework the hotplug scripts to separate the to
concepts, but that is not 4.2 material.

In addition there are some other subtleties:

 - Previously in the blktap case we would add "script = .../blktap" to
   the backend flex array, but then jumped to the PHY case which added
   "script = .../block" too. The block one takes precendence since it
   comes second.

   This was, accidentally, correct. The blktap script is for blktap1
   devices and not blktap2 devices. libxl completely manages the
   blktap2 side of things without resorting to hotplug scripts and
   creates a blkback device directly.  Therefore the "block" script is
   always the correct one to call. Custom script are not supported in
   this context.

 - libxl should not write the "physical-device" node. This is the
   responsibility of the block script. Writing the "physical-device"
   node in libxl basically completely short-cuts the standard block
   hotplug script which uses "physical-device" to know if it has run
   already or not.

   In the case of more complex scripts libxl cannot know the right
   value to write here anyway, in particular the device may not exist
   until after the script is called.

   This change has the side effect of re-enabling the checks for
   device sharing aspect of the default block script, which I have tested
   and which now cause libxl to properly abort now that libxl properly
   checks for hotplug script errors.

   There is no sharing check for blktap2 since even if you reuse the
   same vhd the resulting tap device is different. I would have preferred
   to simply write the "physical-device" node for the blktap2 case but
   the hotplug script infrastructure is not currently setup to handle
   LIBXL__DEVICE_KIND_VBD
   devices without a hotplug script (backendtype phy and tap both end
   up as KIND_VBD). Changing this was more surgery than I was happy doing
   for 4.2 and therefore I have simply hardcoded to the block script for
   the LIBXL_DISK_BACKEND_TAP case.

 - libxl__device_disk_set_backend running against a phy device with a
   script cannot stat the device to check its properties since it may
   not exist until the script is run. Therefore I have special cased
   this in disk_try_backend to simply assume that backend == phy is
   always ok if a script was
   configured.  Similarly the other backend types are always rejected
   if a script was configured.

   Note that the reason for implementing the default script behaviour
   in device_disk_add instead of libxl__device_disk_setdefault is
   because we need to be able to tell when the script was
   user-supplied rather than defaulted by libxl in order to correctly
   implement the above. The setdefault function must be idempotent so
   we cannot simply update disk->script.

   I suspect that for 4.3 a script member should be added to
   libxl__device, this would also help in the case above of handling
   devices with no script in a consistent manner. This is not 4.2
   material.

 - When the block script falls through and shells out to a block-$type
   script it used to pass "$node" however the only place this was
   assigned was in the remove+phy case (in which case it contains the
   file:// derived /dev/loopN device), and in that case the script
   exits without falling through to the block-$type case.

   Since libxl never creates a type other than phy this never happens
   in practice anyway and we now call the correct block-$type script
   directly.  But fix it up anyway since it is confusing.

 - The block-nbd and block-enbd scripts which we supply appear to be
   broken WRT the hotplug calling convention, in that they seem to
   expect a command line parameter (perhaps the $node described above)
   rather than reading the appropriate node from xenstore.

   I rather suspect this was broken by 7774:e2e7f47e6f79 in November
   2005. I think it is safe to say no one is using these scripts! I
   haven't fixed this here. It would be good to track down some working
   scripts and either incorproate them or defer to them in their existing
   home (e.g. if they live somewhere useful like the nbd tools
   package).

 - Added a few block script related entries to check-xl-disk-parse
   from http://backdrift.org/xen-block-iscsi-script-with-multipath-support
   and http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html /
   http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html (and
   snuck in another interesting empty CDROM case)

   This highlighted two bugs in the libxlu disk parser handling of the
   deprecated "<script>:" prefix:

   - It was failing to prefix with "block-" to construct the actual
     script name

   - The regex for matching iscsi or drdb or e?nbd was incorrect

 - Use libxl__abs_path for the nic script too. Just because the
   existing code nearly tricked me into repeating the mistake

I have tested with a custom block script which uses "lvchange -a" to
dynamically add remove the referenced device (simulates iSCSI
login/logout without requiring me to faff around setting up an iSCSI
target). I also tested on a blktap2 system.

I haven't directly tested anything more complex like iscsi: or nbd:
other than what check-xl-disk-parse exercises.

[ Recommit of correct version of 25727:a8d708fcb347, which was mangled
  during commit.  Sorry. -iwj ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 60f2c7b74741 -r 353bc0801b11 docs/misc/xl-disk-configuration.txt
--- a/docs/misc/xl-disk-configuration.txt	Mon Aug 06 12:25:06 2012 +0100
+++ b/docs/misc/xl-disk-configuration.txt	Mon Aug 06 12:28:03 2012 +0100
@@ -160,7 +160,10 @@ script=<script>
 ---------------
 
 Specifies that <target> is not a normal host path, but rather
-information to be interpreted by /etc/xen/scripts/block-<script>.
+information to be interpreted by the executable program <script>,
+(looked for in /etc/xen/scripts, if it doesn't contain a slash).
+
+These scripts are normally called "block-<script>".
 
 
 
@@ -204,7 +207,7 @@ Supported values:      iscsi:  nbd:  enb
 In xend and old versions of libxl it was necessary to specify the
 "script" (see above) with a prefix.  For compatibility, these four
 prefixes are recognised as specifying the corresponding script.  They
-are equivalent to "script=<script>".
+are equivalent to "script=block-<script>".
 
 
 <deprecated-prefix>:
diff -r 60f2c7b74741 -r 353bc0801b11 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/hotplug/Linux/block	Mon Aug 06 12:28:03 2012 +0100
@@ -342,4 +342,4 @@ esac
 
 # If we've reached here, $t is neither phy nor file, so fire a helper script.
 [ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \
-  ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node
+  ${XEN_SCRIPT_DIR}/block-"$t" "$command"
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/check-xl-disk-parse
--- a/tools/libxl/check-xl-disk-parse	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/check-xl-disk-parse	Mon Aug 06 12:28:03 2012 +0100
@@ -142,5 +142,44 @@ disk: {
 
 EOF
 one 0 vdev=hdc,access=r,devtype=cdrom,format=empty
+one 0 vdev=hdc,access=r,devtype=cdrom
+
+expected <<EOF
+disk: {
+    "backend_domid": 0,
+    "pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost",
+    "vdev": "xvda",
+    "backend": "unknown",
+    "format": "raw",
+    "script": "block-iscsi",
+    "removable": 0,
+    "readwrite": 1,
+    "is_cdrom": 0
+}
+
+EOF
+
+# http://backdrift.org/xen-block-iscsi-script-with-multipath-support
+one 0 iscsi:iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost,xvda,w
+one 0 vdev=xvda,access=w,script=block-iscsi,target=iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost
+
+expected <<EOF
+disk: {
+    "backend_domid": 0,
+    "pdev_path": "app01",
+    "vdev": "hda",
+    "backend": "unknown",
+    "format": "raw",
+    "script": "block-drbd",
+    "removable": 0,
+    "readwrite": 1,
+    "is_cdrom": 0
+}
+
+EOF
+
+# http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html
+# http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html
+one 0 drbd:app01,hda,w
 
 complete
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxl.c	Mon Aug 06 12:28:03 2012 +0100
@@ -1796,9 +1796,9 @@ static void device_disk_add(libxl__egc *
     STATE_AO_GC(aodev->ao);
     flexarray_t *front = NULL;
     flexarray_t *back = NULL;
-    char *dev;
+    char *dev, *script;
     libxl__device *device;
-    int major, minor, rc;
+    int rc;
     libxl_ctx *ctx = gc->owner;
     xs_transaction_t t = XBT_NULL;
 
@@ -1833,13 +1833,6 @@ static void device_disk_add(libxl__egc *
             goto out_free;
         }
 
-        if (disk->script) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts"
-                       " not yet supported, sorry");
-            rc = ERROR_INVAL;
-            goto out_free;
-        }
-
         GCNEW(device);
         rc = libxl__device_from_disk(gc, domid, disk, device);
         if (rc != 0) {
@@ -1851,18 +1844,16 @@ static void device_disk_add(libxl__egc *
         switch (disk->backend) {
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
+
+                script = libxl__abs_path(gc, disk->script ?: "block",
+                                         libxl__xen_script_dir_path());
+
         do_backend_phy:
-                libxl__device_physdisk_major_minor(dev, &major, &minor);
-                flexarray_append(back, "physical-device");
-                flexarray_append(back, libxl__sprintf(gc, "%x:%x", major, minor));
-
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                flexarray_append(back, "script");
-                flexarray_append(back, GCSPRINTF("%s/%s",
-                                                 libxl__xen_script_dir_path(),
-                                                 "block"));
+                assert(script);
+                flexarray_append_pair(back, "script", script);
 
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
@@ -1879,10 +1870,12 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                flexarray_append(back, "script");
-                flexarray_append(back, GCSPRINTF("%s/%s",
-                                                 libxl__xen_script_dir_path(),
-                                                 "blktap"));
+                /*
+                 * tap devices do not support custom block scripts and
+                 * always use the plain block script.
+                 */
+                script = libxl__abs_path(gc, "block",
+                                         libxl__xen_script_dir_path());
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;
@@ -2582,13 +2575,10 @@ void libxl__device_nic_add(libxl__egc *e
     flexarray_append(back, "1");
     flexarray_append(back, "state");
     flexarray_append(back, libxl__sprintf(gc, "%d", 1));
-    if (nic->script) {
-        flexarray_append(back, "script");
-        flexarray_append(back, nic->script[0]=='/' ? nic->script
-                         : libxl__sprintf(gc, "%s/%s",
-                                          libxl__xen_script_dir_path(),
-                                          nic->script));
-    }
+    if (nic->script)
+        flexarray_append_pair(back, "script",
+                              libxl__abs_path(gc, nic->script,
+                                              libxl__xen_script_dir_path()));
 
     if (nic->ifname) {
         flexarray_append(back, "vifname");
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxl_device.c	Mon Aug 06 12:28:03 2012 +0100
@@ -147,18 +147,26 @@ typedef struct {
 } disk_try_backend_args;
 
 static int disk_try_backend(disk_try_backend_args *a,
-                            libxl_disk_backend backend) {
+                            libxl_disk_backend backend)
+ {
+    libxl__gc *gc = a->gc;
     /* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or
      * backend on success */
-    libxl_ctx *ctx = libxl__gc_owner(a->gc);
+    libxl_ctx *ctx = libxl__gc_owner(gc);
+
     switch (backend) {
-
     case LIBXL_DISK_BACKEND_PHY:
         if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW ||
               a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) {
             goto bad_format;
         }
 
+        if (a->disk->script) {
+            LOG(DEBUG, "Disk vdev=%s, uses script=... assuming phy backend",
+                a->disk->vdev);
+            return backend;
+        }
+
         if (libxl__try_phy_backend(a->stab.st_mode))
             return backend;
 
@@ -168,6 +176,8 @@ static int disk_try_backend(disk_try_bac
         return 0;
 
     case LIBXL_DISK_BACKEND_TAP:
+        if (a->disk->script) goto bad_script;
+
         if (!libxl__blktap_enabled(a->gc)) {
             LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
                        " unsuitable because blktap not available",
@@ -181,6 +191,7 @@ static int disk_try_backend(disk_try_bac
         return backend;
 
     case LIBXL_DISK_BACKEND_QDISK:
+        if (a->disk->script) goto bad_script;
         return backend;
 
     default:
@@ -198,6 +209,11 @@ static int disk_try_backend(disk_try_bac
                libxl_disk_backend_to_string(backend),
                libxl_disk_format_to_string(a->disk->format));
     return 0;
+
+ bad_script:
+    LOG(DEBUG, "Disk vdev=%s, backend %s not compatible with script=...",
+        a->disk->vdev, libxl_disk_backend_to_string(backend));
+    return 0;
 }
 
 int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
@@ -220,7 +236,7 @@ int libxl__device_disk_set_backend(libxl
             return ERROR_INVAL;
         }
         memset(&a.stab, 0, sizeof(a.stab));
-    } else {
+    } else if (!disk->script) {
         if (stat(disk->pdev_path, &a.stab)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s "
                              "failed to stat: %s",
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_i.h
--- a/tools/libxl/libxlu_disk_i.h	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxlu_disk_i.h	Mon Aug 06 12:28:03 2012 +0100
@@ -1,8 +1,6 @@
 #ifndef LIBXLU_DISK_I_H
 #define LIBXLU_DISK_I_H
 
-#include "libxl_osdeps.h" /* must come before any other headers */
-
 #include "libxlu_internal.h"
 
 
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_l.c
--- a/tools/libxl/libxlu_disk_l.c	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.c	Mon Aug 06 12:28:03 2012 +0100
@@ -1,6 +1,10 @@
 #line 2 "libxlu_disk_l.c"
+#line 31 "libxlu_disk_l.l"
+#include "libxl_osdeps.h" /* must come before any other headers */
 
-#line 4 "libxlu_disk_l.c"
+
+
+#line 8 "libxlu_disk_l.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -366,7 +370,7 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_acclist[456] =
+static yyconst flex_int16_t yy_acclist[447] =
     {   0,
        24,   24,   26,   22,   23,   25, 8193,   22,   23,   25,
     16385, 8193,   22,   25,16385,   22,   23,   25,   23,   25,
@@ -379,77 +383,76 @@ static yyconst flex_int16_t yy_acclist[4
      8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
 
-       22,   24, 8193,   22, 8193,   22, 8193, 8213,   22, 8213,
-       22, 8213,   12,   22,   22,   22,   22,   22,   22,   22,
+       22,   22,   24, 8193,   22, 8193,   22, 8193, 8213,   22,
+     8213,   22, 8213,   12,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-     8213,   22, 8213,   22, 8213,   12,   22,   17, 8213,   22,
-    16405,   22,   22,   22,   22,   22,   22,   22, 8213,   22,
-    16405,   20, 8213,   22,16405,   22, 8205, 8213,   22,16397,
-    16405,   22,   22, 8208, 8213,   22,16400,16405,   22,   22,
-       22,   22,   17, 8213,   22,   17, 8213,   22,   17,   22,
-       17, 8213,   22,    3,   22,   22,   19, 8213,   22,16405,
-       22,   22,   22,   22,   20, 8213,   22,   20, 8213,   22,
+       22,   22, 8213,   22, 8213,   22, 8213,   12,   22,   17,
+     8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
+     8206, 8213,   22,16398,16405,   20, 8213,   22,16405,   22,
+     8205, 8213,   22,16397,16405,   22,   22, 8208, 8213,   22,
+    16400,16405,   22,   22,   22,   22,   17, 8213,   22,   17,
+     8213,   22,   17,   22,   17, 8213,   22,    3,   22,   22,
+       19, 8213,   22,16405,   22,   22, 8206, 8213,   22, 8206,
 
-       20,   22,   20, 8213, 8205, 8213,   22, 8205, 8213,   22,
-     8205,   22, 8205, 8213,   22, 8208, 8213,   22, 8208, 8213,
-       22, 8208,   22, 8208, 8213,   22,   22,    9,   22,   17,
-     8213,   22,   17, 8213,   22,   17, 8213,   17,   22,   17,
-       22,    3,   22,   22,   19, 8213,   22,   19, 8213,   22,
-       19,   22,   19, 8213,   22,   18, 8213,   22,16405, 8206,
-     8213,   22,16398,16405,   22,   20, 8213,   22,   20, 8213,
-       22,   20, 8213,   20,   22,   20, 8205, 8213,   22, 8205,
-     8213,   22, 8205, 8213, 8205,   22, 8205,   22, 8208, 8213,
-       22, 8208, 8213,   22, 8208, 8213, 8208,   22, 8208,   22,
+     8213,   22, 8206,   22, 8206, 8213,   20, 8213,   22,   20,
+     8213,   22,   20,   22,   20, 8213, 8205, 8213,   22, 8205,
+     8213,   22, 8205,   22, 8205, 8213,   22, 8208, 8213,   22,
+     8208, 8213,   22, 8208,   22, 8208, 8213,   22,   22,    9,
+       22,   17, 8213,   22,   17, 8213,   22,   17, 8213,   17,
+       22,   17,   22,    3,   22,   22,   19, 8213,   22,   19,
+     8213,   22,   19,   22,   19, 8213,   22,   18, 8213,   22,
+    16405, 8206, 8213,   22, 8206, 8213,   22, 8206, 8213, 8206,
+       22, 8206,   20, 8213,   22,   20, 8213,   22,   20, 8213,
+       20,   22,   20, 8205, 8213,   22, 8205, 8213,   22, 8205,
 
-       22,    9,   12,    9,    7,   22,   22,   19, 8213,   22,
-       19, 8213,   22,   19, 8213,   19,   22,   19,    2,   18,
-     8213,   22,   18, 8213,   22,   18,   22,   18, 8213, 8206,
-     8213,   22, 8206, 8213,   22, 8206,   22, 8206, 8213,   22,
-       10,   22,   11,    9,    9,   12,    7,   12,    7,   22,
-        6,    2,   12,    2,   18, 8213,   22,   18, 8213,   22,
-       18, 8213,   18,   22,   18, 8206, 8213,   22, 8206, 8213,
-       22, 8206, 8213, 8206,   22, 8206,   22,   10,   12,   10,
-       15, 8213,   22,16405,   11,   12,   11,    7,    7,   12,
-       22,    6,   12,    6,    6,   12,    6,   12,    2,    2,
+     8213, 8205,   22, 8205,   22, 8208, 8213,   22, 8208, 8213,
+       22, 8208, 8213, 8208,   22, 8208,   22,   22,    9,   12,
+        9,    7,   22,   22,   19, 8213,   22,   19, 8213,   22,
+       19, 8213,   19,   22,   19,    2,   18, 8213,   22,   18,
+     8213,   22,   18,   22,   18, 8213,   10,   22,   11,    9,
+        9,   12,    7,   12,    7,   22,    6,    2,   12,    2,
+       18, 8213,   22,   18, 8213,   22,   18, 8213,   18,   22,
+       18,   10,   12,   10,   15, 8213,   22,16405,   11,   12,
+       11,    7,    7,   12,   22,    6,   12,    6,    6,   12,
+        6,   12,    2,    2,   12,   10,   10,   12,   15, 8213,
 
-       12, 8206,   22,16398,   10,   10,   12,   15, 8213,   22,
-       15, 8213,   22,   15,   22,   15, 8213,   11,   12,   22,
-        6,    6,   12,    6,    6,   15, 8213,   22,   15, 8213,
-       22,   15, 8213,   15,   22,   15,   22,    6,    6,    8,
-        6,    5,    6,    8,   12,    8,    4,    6,    5,    6,
-        8,    8,   12,    4,    6
+       22,   15, 8213,   22,   15,   22,   15, 8213,   11,   12,
+       22,    6,    6,   12,    6,    6,   15, 8213,   22,   15,
+     8213,   22,   15, 8213,   15,   22,   15,   22,    6,    6,
+        8,    6,    5,    6,    8,   12,    8,    4,    6,    5,
+        6,    8,    8,   12,    4,    6
     } ;
 
-static yyconst flex_int16_t yy_accept[257] =
+static yyconst flex_int16_t yy_accept[252] =
     {   0,
         1,    1,    1,    2,    3,    4,    7,   12,   16,   19,
        21,   24,   27,   30,   33,   36,   39,   42,   45,   48,
        51,   54,   57,   60,   63,   66,   68,   69,   70,   71,
        73,   76,   78,   79,   80,   81,   84,   84,   85,   86,
        87,   88,   89,   90,   91,   92,   93,   94,   95,   96,
-       97,   98,   99,  100,  101,  102,  103,  105,  107,  108,
-      110,  112,  113,  114,  115,  116,  117,  118,  119,  120,
+       97,   98,   99,  100,  101,  102,  103,  104,  106,  108,
+      109,  111,  113,  114,  115,  116,  117,  118,  119,  120,
       121,  122,  123,  124,  125,  126,  127,  128,  129,  130,
-      131,  133,  135,  136,  137,  138,  142,  143,  144,  145,
-      146,  147,  148,  149,  152,  156,  157,  162,  163,  164,
+      131,  132,  133,  135,  137,  138,  139,  140,  144,  145,
+      146,  147,  148,  149,  150,  151,  156,  160,  161,  166,
 
-      169,  170,  171,  172,  173,  176,  179,  181,  183,  184,
-      186,  187,  191,  192,  193,  194,  195,  198,  201,  203,
-      205,  208,  211,  213,  215,  216,  219,  222,  224,  226,
-      227,  228,  229,  230,  233,  236,  238,  240,  241,  242,
-      244,  245,  248,  251,  253,  255,  256,  260,  265,  266,
-      269,  272,  274,  276,  277,  280,  283,  285,  287,  288,
-      289,  292,  295,  297,  299,  300,  301,  302,  304,  305,
-      306,  307,  308,  311,  314,  316,  318,  319,  320,  323,
-      326,  328,  330,  333,  336,  338,  340,  341,  342,  343,
-      344,  345,  347,  349,  350,  351,  352,  354,  355,  358,
+      167,  168,  173,  174,  175,  176,  177,  180,  183,  185,
+      187,  188,  190,  191,  195,  196,  197,  200,  203,  205,
+      207,  210,  213,  215,  217,  220,  223,  225,  227,  228,
+      231,  234,  236,  238,  239,  240,  241,  242,  245,  248,
+      250,  252,  253,  254,  256,  257,  260,  263,  265,  267,
+      268,  272,  275,  278,  280,  282,  283,  286,  289,  291,
+      293,  294,  297,  300,  302,  304,  305,  306,  309,  312,
+      314,  316,  317,  318,  319,  321,  322,  323,  324,  325,
+      328,  331,  333,  335,  336,  337,  340,  343,  345,  347,
+      348,  349,  350,  351,  353,  355,  356,  357,  358,  360,
 
-      361,  363,  365,  366,  369,  372,  374,  376,  377,  378,
-      380,  381,  385,  387,  388,  389,  391,  392,  394,  395,
-      397,  399,  400,  402,  405,  406,  408,  411,  414,  416,
-      418,  420,  421,  422,  424,  425,  426,  429,  432,  434,
-      436,  437,  438,  439,  440,  441,  442,  444,  446,  447,
-      449,  451,  452,  454,  456,  456
+      361,  364,  367,  369,  371,  372,  374,  375,  379,  381,
+      382,  383,  385,  386,  388,  389,  391,  393,  394,  396,
+      397,  399,  402,  405,  407,  409,  411,  412,  413,  415,
+      416,  417,  420,  423,  425,  427,  428,  429,  430,  431,
+      432,  433,  435,  437,  438,  440,  442,  443,  445,  447,
+      447
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -492,244 +495,238 @@ static yyconst flex_int32_t yy_meta[34] 
         1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[313] =
+static yyconst flex_int16_t yy_base[308] =
     {   0,
-        0,    0,  572,  560,  559,  551,   32,   35,  662,  662,
-       44,   62,   30,   40,   32,   50,  533,   49,   47,   59,
-       68,  525,   69,  517,   72,    0,  662,  515,  662,   83,
-       91,    0,    0,  100,  501,  109,    0,   78,   51,   86,
-       89,   74,   96,  105,  109,  110,  111,  112,  117,   73,
-      119,  118,  121,  120,  122,    0,  134,    0,    0,  138,
-        0,    0,  495,  130,  144,  129,  143,  145,  146,  147,
-      148,  149,  153,  154,  155,  158,  161,  165,  166,  170,
-      180,    0,    0,  662,  171,  201,  176,  175,  178,  183,
-      465,  182,  190,  455,  212,  188,  221,  208,  224,  234,
+        0,    0,  546,  538,  533,  521,   32,   35,  656,  656,
+       44,   62,   30,   41,   50,   51,  507,   64,   47,   66,
+       67,  499,   68,  487,   72,    0,  656,  465,  656,   87,
+       91,    0,    0,  100,  452,  109,    0,   74,   95,   87,
+       32,   96,  105,  110,   77,   97,   40,  113,  116,  112,
+      118,  120,  121,  122,  123,  125,    0,  137,    0,    0,
+      147,    0,    0,  449,  129,  126,  134,  143,  145,  147,
+      148,  149,  151,  153,  156,  160,  155,  167,  162,  175,
+      168,  159,  188,    0,    0,  656,  166,  197,  179,  185,
+      176,  200,  435,  186,  193,  216,  225,  205,  234,  221,
 
-      209,  230,  236,  221,  244,    0,  247,    0,  184,  248,
-      244,  269,  231,  247,  251,  258,  272,    0,  279,    0,
-      283,    0,  286,    0,  255,  290,    0,  293,    0,  270,
-      281,  455,  254,  297,    0,    0,    0,    0,  294,  662,
-      295,  308,    0,  310,    0,  257,  319,  328,  304,  331,
-        0,    0,    0,    0,  335,    0,    0,    0,    0,  316,
-      338,    0,    0,    0,    0,  333,  336,  447,  662,  429,
-      338,  340,  348,    0,    0,    0,    0,  428,  351,    0,
-      355,    0,  359,    0,  362,    0,  357,  427,  308,  369,
-      426,  662,  425,  662,  346,  365,  423,  662,  371,    0,
+      237,  247,  204,  230,  244,  213,  254,    0,  256,    0,
+      251,  258,  254,  279,  256,  259,  267,    0,  269,    0,
+      286,    0,  288,    0,  290,    0,  297,    0,  267,  299,
+        0,  301,    0,  288,  297,  421,  302,  310,    0,    0,
+        0,    0,  305,  656,  307,  319,    0,  321,    0,  322,
+      332,  335,    0,    0,    0,    0,  339,    0,    0,    0,
+        0,  342,    0,    0,    0,    0,  340,  349,    0,    0,
+        0,    0,  337,  345,  420,  656,  419,  346,  350,  358,
+        0,    0,    0,    0,  418,  360,    0,  362,    0,  417,
+      319,  369,  416,  656,  415,  656,  276,  364,  414,  656,
 
-        0,    0,    0,  378,    0,    0,    0,    0,  380,  421,
-      662,  388,  420,    0,  419,  662,  373,  418,  662,  372,
-      382,  417,  662,  398,  416,  662,  400,    0,  402,    0,
-        0,  385,  415,  662,  390,  275,  409,    0,    0,    0,
-        0,  405,  404,  406,  264,  412,  224,  129,  662,   87,
-      662,   47,  662,  662,  662,  434,  438,  441,  445,  449,
-      453,  457,  461,  465,  469,  473,  477,  481,  485,  489,
-      493,  497,  501,  505,  509,  513,  517,  521,  525,  529,
-      533,  537,  541,  545,  549,  553,  557,  561,  565,  569,
-      573,  577,  581,  585,  589,  593,  597,  601,  605,  609,
+      375,    0,    0,    0,    0,  413,  656,  384,  412,    0,
+      410,  656,  370,  409,  656,  370,  378,  408,  656,  366,
+      656,  394,    0,  396,    0,    0,  380,  316,  656,  377,
+      387,  398,    0,    0,    0,    0,  399,  402,  407,  271,
+      406,  228,  200,  656,  175,  656,   77,  656,  656,  656,
+      428,  432,  435,  439,  443,  447,  451,  455,  459,  463,
+      467,  471,  475,  479,  483,  487,  491,  495,  499,  503,
+      507,  511,  515,  519,  523,  527,  531,  535,  539,  543,
+      547,  551,  555,  559,  563,  567,  571,  575,  579,  583,
+      587,  591,  595,  599,  603,  607,  611,  615,  619,  623,
 
-      613,  617,  621,  625,  629,  633,  637,  641,  645,  649,
-      653,  657
+      627,  631,  635,  639,  643,  647,  651
     } ;
 
-static yyconst flex_int16_t yy_def[313] =
+static yyconst flex_int16_t yy_def[308] =
     {   0,
-      255,    1,  256,  256,  255,  257,  258,  258,  255,  255,
-      259,  259,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  260,  255,  257,  255,  261,
-      258,  262,  262,  263,   12,  257,  264,   12,   12,   12,
+      250,    1,  251,  251,  250,  252,  253,  253,  250,  250,
+      254,  254,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  255,  250,  252,  250,  256,
+      253,  257,  257,  258,   12,  252,  259,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  260,  261,  262,  262,  265,
-      266,  266,  255,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,  255,  256,  257,  257,
+      260,  261,  261,  250,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-      265,  266,  266,  255,   12,  267,   12,   12,   12,   12,
-       12,   12,   12,   36,  268,   12,  269,   12,   12,  270,
+       12,   12,  260,  261,  261,  250,   12,  262,   12,   12,
+       12,   12,   12,   12,   12,  263,  264,   12,  265,   12,
 
-       12,   12,   12,   12,  271,  272,  267,  272,   12,   12,
-       12,  273,   12,   12,   12,  257,  274,  275,  268,  275,
-      276,  277,  269,  277,   12,  278,  279,  270,  279,   12,
-       12,  280,   12,  271,  272,  272,  281,  281,   12,  255,
-       12,  282,  283,  273,  283,   12,  284,  285,  257,  274,
-      275,  275,  286,  286,  276,  277,  277,  287,  287,   12,
-      278,  279,  279,  288,  288,   12,   12,  289,  255,  290,
-       12,   12,  282,  283,  283,  291,  291,  292,  293,  294,
-      284,  294,  295,  296,  285,  296,  257,  297,   12,  298,
-      289,  255,  299,  255,   12,  300,  301,  255,  293,  294,
+       12,  266,   12,   12,   12,   12,  267,  268,  262,  268,
+       12,   12,   12,  269,   12,   12,  270,  271,  263,  271,
+      272,  273,  264,  273,  274,  275,  265,  275,   12,  276,
+      277,  266,  277,   12,   12,  278,   12,  267,  268,  268,
+      279,  279,   12,  250,   12,  280,  281,  269,  281,   12,
+      282,  270,  271,  271,  283,  283,  272,  273,  273,  284,
+      284,  274,  275,  275,  285,  285,   12,  276,  277,  277,
+      286,  286,   12,   12,  287,  250,  288,   12,   12,  280,
+      281,  281,  289,  289,  290,  291,  292,  282,  292,  293,
+       12,  294,  287,  250,  295,  250,   12,  296,  297,  250,
 
-      294,  302,  302,  295,  296,  296,  303,  303,  257,  304,
-      255,  305,  306,  306,  299,  255,   12,  307,  255,  307,
-      307,  301,  255,  285,  304,  255,  308,  309,  305,  309,
-      306,   12,  307,  255,  307,  307,  308,  309,  309,  310,
-      310,   12,  307,  307,  311,  307,  307,  312,  255,  307,
-      255,  312,  255,  255,    0,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      291,  292,  292,  298,  298,  299,  250,  300,  301,  301,
+      295,  250,   12,  302,  250,  302,  302,  297,  250,  299,
+      250,  303,  304,  300,  304,  301,   12,  302,  250,  302,
+      302,  303,  304,  304,  305,  305,   12,  302,  302,  306,
+      302,  302,  307,  250,  302,  250,  307,  250,  250,    0,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
 
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255
+      250,  250,  250,  250,  250,  250,  250
     } ;
 
-static yyconst flex_int16_t yy_nxt[696] =
+static yyconst flex_int16_t yy_nxt[690] =
     {   0,
         6,    7,    8,    9,    6,    6,    6,    6,   10,   11,
        12,   13,   14,   15,   16,   17,   17,   18,   17,   17,
        17,   17,   19,   17,   20,   21,   22,   23,   24,   17,
        25,   17,   17,   31,   31,   32,   31,   31,   32,   35,
        33,   35,   41,   33,   28,   28,   28,   29,   34,   35,
-      249,   36,   37,   42,   43,   38,   35,   48,   35,   35,
-       35,   39,   28,   28,   28,   29,   34,   44,   35,   36,
-       37,   40,   46,   45,   65,   49,   47,   35,   35,   50,
-       52,   35,   35,   35,   54,   28,   58,   35,   55,   64,
-      254,   59,   31,   31,   32,   35,   75,   66,   35,   33,
+       35,   36,   37,   73,   42,   38,   35,   49,   68,   35,
+       35,   39,   28,   28,   28,   29,   34,   43,   45,   36,
+       37,   40,   44,   35,   46,   35,   35,   35,   51,   53,
+      244,   35,   50,   35,   55,   65,   35,   47,   56,   28,
+       59,   48,   31,   31,   32,   60,   35,   71,   67,   33,
 
-       28,   28,   28,   29,   68,   35,   48,   28,   37,   60,
-       60,   60,   61,   60,   35,   67,   60,   62,   35,   35,
-       35,   35,   72,   71,   73,   69,   35,   35,   35,   35,
-       35,   35,  253,   80,   76,   70,   28,   58,   35,   35,
-       28,   82,   59,   85,   77,   78,   83,   79,   87,   74,
-       76,   86,   35,   35,   35,   35,   35,   35,   35,   90,
-       94,   95,   35,   35,   35,   97,   88,   35,   91,   92,
-       35,   99,  100,   89,   35,   35,   93,  101,   98,   35,
-       35,  102,   28,   82,   35,   35,   96,   35,   83,  109,
-      112,   35,   35,   35,   76,   97,  110,   35,  104,   35,
+       28,   28,   28,   29,   35,   35,   35,   28,   37,   61,
+       61,   61,   62,   61,   35,   70,   61,   63,   66,   35,
+       49,   35,   35,   72,   74,   35,   69,   35,   75,   35,
+       35,   35,   35,   88,   35,   35,   82,   78,   35,   28,
+       59,   77,   87,   35,   76,   60,   80,   79,   81,   28,
+       84,   78,   35,   89,   35,   85,   35,   35,   35,   75,
+       35,   92,   35,   96,   35,   35,   90,   97,   35,   35,
+       93,   35,   94,   91,   99,   35,   35,   35,  249,  100,
+       95,  101,  102,  104,   35,   35,   98,  103,   35,  105,
+       28,   84,  111,  106,   35,   35,   85,  107,  107,   61,
 
-      103,  105,  105,   60,  106,  105,  139,  115,  105,  108,
-      111,  114,  117,  117,   60,  118,  117,   35,   35,  117,
-      120,  121,  121,   60,  122,  121,  130,  251,  121,  124,
-       35,  100,  125,   35,  126,  126,   60,  127,  126,   35,
-       35,  126,  129,  131,  132,   35,   28,  135,  133,   28,
-      137,  140,  136,   35,  147,  138,   35,   35,  148,  146,
-       35,   29,  170,   35,   35,  178,   35,  249,  141,  142,
-      142,   60,  143,  142,   28,  151,  142,  145,  219,   35,
-      152,   28,  153,  160,  149,   28,  156,  154,   28,  158,
-       35,  157,   28,  162,  159,   28,  164,  166,  163,   28,
+      108,  107,   35,  248,  107,  110,  112,  114,  113,   35,
+       75,   78,   99,   35,   35,  116,  117,  117,   61,  118,
+      117,  134,   35,  117,  120,  121,  121,   61,  122,  121,
+       35,  246,  121,  124,  125,  125,   61,  126,  125,   35,
+      137,  125,  128,  135,  102,  129,   35,  130,  130,   61,
+      131,  130,  136,   35,  130,  133,   28,  139,   28,  141,
+       35,  144,  140,   35,  142,   35,  151,   35,   35,   28,
+      153,   28,  155,  143,  244,  154,   35,  156,  145,  146,
+      146,   61,  147,  146,  150,   35,  146,  149,   28,  158,
+       28,  160,   28,  163,  159,  167,  161,   35,  164,   28,
 
-      135,  165,  244,   35,   35,  136,  171,   29,  172,  167,
-       28,  174,   28,  176,  187,  212,  175,   35,  177,  179,
-      179,   60,  180,  179,  188,   35,  179,  182,  183,  183,
-       60,  184,  183,   28,  151,  183,  186,   28,  156,  152,
-       28,  162,   35,  157,  190,   35,  163,   35,  196,   35,
-       28,  174,  189,   28,  200,   35,  175,   28,  202,  201,
-       29,   28,  205,  203,   28,  207,  195,  206,  219,  209,
-      208,   63,  214,   28,  200,  234,  220,  221,  217,  201,
-       28,  205,   35,   29,  235,  234,  206,  224,  227,  227,
-       60,  228,  227,  219,   35,  227,  230,  232,  242,  236,
+      165,   28,  169,   28,  171,  166,   35,  170,  213,  172,
+      177,   35,   28,  139,   35,  173,   35,  178,  140,  215,
+      179,   28,  181,   28,  183,  174,  208,  182,   35,  184,
+      185,   35,  186,  186,   61,  187,  186,   28,  153,  186,
+      189,   28,  158,  154,   28,  163,   35,  159,  190,   35,
+      164,   28,  169,  192,   35,   35,  191,  170,  198,   35,
+       28,  181,   28,  202,   28,  204,  182,  215,  203,  207,
+      205,   64,  210,  229,  197,  216,  217,   28,  202,   35,
+      215,  229,  230,  203,  222,  222,   61,  223,  222,   35,
+      215,  222,  225,  237,  227,  231,   28,  233,   28,  235,
 
-       28,  207,   28,  238,   28,  240,  208,  219,  239,  219,
-      241,   28,  238,  245,   35,  219,  243,  239,  219,  211,
-      198,  234,  194,  231,  226,  247,  223,  246,  216,  169,
-      211,  198,  194,  250,   26,   26,   26,   26,   28,   28,
-       28,   30,   30,   30,   30,   35,   35,   35,   35,   56,
-      192,   56,   56,   57,   57,   57,   57,   59,  169,   59,
-       59,   34,   34,   34,   34,   63,   63,  116,   63,   81,
-       81,   81,   81,   83,  113,   83,   83,  107,  107,  107,
-      107,  119,  119,  119,  119,  123,  123,  123,  123,  128,
-      128,  128,  128,  134,  134,  134,  134,  136,   84,  136,
+       28,  233,  234,  238,  236,  215,  234,  240,   35,  215,
+      215,  200,  229,  196,  239,  226,  221,  219,  212,  176,
+      207,  200,  196,  194,  176,  241,  242,  245,   26,   26,
+       26,   26,   28,   28,   28,   30,   30,   30,   30,   35,
+       35,   35,   35,   57,  115,   57,   57,   58,   58,   58,
+       58,   60,   86,   60,   60,   34,   34,   34,   34,   64,
+       64,   35,   64,   83,   83,   83,   83,   85,   29,   85,
+       85,  109,  109,  109,  109,  119,  119,  119,  119,  123,
+      123,  123,  123,  127,  127,  127,  127,  132,  132,  132,
+      132,  138,  138,  138,  138,  140,   54,  140,  140,  148,
 
-      136,  144,  144,  144,  144,  150,  150,  150,  150,  152,
-       35,  152,  152,  155,  155,  155,  155,  157,   29,  157,
-      157,  161,  161,  161,  161,  163,   53,  163,  163,  168,
-      168,  168,  168,  138,   51,  138,  138,  173,  173,  173,
-      173,  175,   35,  175,  175,  181,  181,  181,  181,  185,
-      185,  185,  185,  154,   29,  154,  154,  159,  255,  159,
-      159,  165,   27,  165,  165,  191,  191,  191,  191,  193,
-      193,  193,  193,  177,   27,  177,  177,  197,  197,  197,
-      197,  199,  199,  199,  199,  201,  255,  201,  201,  204,
-      204,  204,  204,  206,  255,  206,  206,  210,  210,  210,
+      148,  148,  148,  152,  152,  152,  152,  154,   52,  154,
+      154,  157,  157,  157,  157,  159,   35,  159,  159,  162,
+      162,  162,  162,  164,   29,  164,  164,  168,  168,  168,
+      168,  170,  250,  170,  170,  175,  175,  175,  175,  142,
+       27,  142,  142,  180,  180,  180,  180,  182,   27,  182,
+      182,  188,  188,  188,  188,  156,  250,  156,  156,  161,
+      250,  161,  161,  166,  250,  166,  166,  172,  250,  172,
+      172,  193,  193,  193,  193,  195,  195,  195,  195,  184,
+      250,  184,  184,  199,  199,  199,  199,  201,  201,  201,
+      201,  203,  250,  203,  203,  206,  206,  206,  206,  209,
 
-      210,  213,  213,  213,  213,  215,  215,  215,  215,  218,
-      218,  218,  218,  222,  222,  222,  222,  203,  255,  203,
-      203,  208,  255,  208,  208,  225,  225,  225,  225,  229,
-      229,  229,  229,  214,  255,  214,  214,  233,  233,  233,
-      233,  237,  237,  237,  237,  239,  255,  239,  239,  241,
-      255,  241,  241,  248,  248,  248,  248,  252,  252,  252,
-      252,    5,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255
-
+      209,  209,  209,  211,  211,  211,  211,  214,  214,  214,
+      214,  218,  218,  218,  218,  205,  250,  205,  205,  220,
+      220,  220,  220,  224,  224,  224,  224,  210,  250,  210,
+      210,  228,  228,  228,  228,  232,  232,  232,  232,  234,
+      250,  234,  234,  236,  250,  236,  236,  243,  243,  243,
+      243,  247,  247,  247,  247,    5,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250
     } ;
 
-static yyconst flex_int16_t yy_chk[696] =
+static yyconst flex_int16_t yy_chk[690] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    7,    7,    7,    8,    8,    8,   13,
-        7,   15,   13,    8,   11,   11,   11,   11,   11,   14,
-      252,   11,   11,   14,   15,   11,   19,   19,   18,   16,
-       39,   11,   12,   12,   12,   12,   12,   16,   20,   12,
-       12,   12,   18,   16,   39,   20,   18,   21,   23,   21,
-       23,   25,   50,   42,   25,   30,   30,   38,   25,   38,
-      250,   30,   31,   31,   31,   40,   50,   40,   41,   31,
+        7,   41,   13,    8,   11,   11,   11,   11,   11,   47,
+       14,   11,   11,   47,   14,   11,   19,   19,   41,   15,
+       16,   11,   12,   12,   12,   12,   12,   14,   16,   12,
+       12,   12,   15,   18,   16,   20,   21,   23,   21,   23,
+      247,   25,   20,   38,   25,   38,   45,   18,   25,   30,
+       30,   18,   31,   31,   31,   30,   40,   45,   40,   31,
 
-       34,   34,   34,   34,   42,   43,   43,   34,   34,   36,
-       36,   36,   36,   36,   44,   41,   36,   36,   45,   46,
-       47,   48,   47,   46,   48,   44,   49,   52,   51,   54,
-       53,   55,  248,   54,   55,   45,   57,   57,   66,   64,
-       60,   60,   57,   64,   52,   53,   60,   53,   66,   49,
-       51,   65,   67,   65,   68,   69,   70,   71,   72,   69,
-       73,   74,   73,   74,   75,   76,   67,   76,   70,   71,
-       77,   78,   78,   68,   78,   79,   72,   78,   77,   80,
-       85,   79,   81,   81,   88,   87,   75,   89,   81,   87,
-       90,   92,   90,  109,   96,   96,   88,   96,   85,   93,
+       34,   34,   34,   34,   39,   42,   46,   34,   34,   36,
+       36,   36,   36,   36,   43,   43,   36,   36,   39,   44,
+       44,   50,   48,   46,   48,   49,   42,   51,   49,   52,
+       53,   54,   55,   66,   56,   66,   55,   56,   65,   58,
+       58,   51,   65,   67,   50,   58,   54,   53,   54,   61,
+       61,   52,   68,   67,   69,   61,   70,   71,   72,   70,
+       73,   71,   74,   75,   77,   75,   68,   76,   82,   76,
+       72,   79,   73,   69,   78,   87,   78,   81,  245,   79,
+       74,   80,   80,   81,   80,   91,   77,   80,   89,   82,
+       83,   83,   89,   87,   90,   94,   83,   88,   88,   88,
 
-       80,   86,   86,   86,   86,   86,  109,   93,   86,   86,
-       89,   92,   95,   95,   95,   95,   95,   98,  101,   95,
-       95,   97,   97,   97,   97,   97,  101,  247,   97,   97,
-      104,   99,   98,   99,  100,  100,  100,  100,  100,  102,
-      113,  100,  100,  102,  103,  103,  105,  105,  104,  107,
-      107,  110,  105,  111,  114,  107,  114,  110,  115,  113,
-      115,  116,  133,  133,  125,  146,  146,  245,  111,  112,
-      112,  112,  112,  112,  117,  117,  112,  112,  236,  130,
-      117,  119,  119,  125,  116,  121,  121,  119,  123,  123,
-      131,  121,  126,  126,  123,  128,  128,  130,  126,  134,
+       88,   88,   95,  243,   88,   88,   90,   92,   91,   92,
+       95,   98,   98,  103,   98,   94,   96,   96,   96,   96,
+       96,  103,  106,   96,   96,   97,   97,   97,   97,   97,
+      100,  242,   97,   97,   99,   99,   99,   99,   99,  104,
+      106,   99,   99,  104,  101,  100,  101,  102,  102,  102,
+      102,  102,  105,  105,  102,  102,  107,  107,  109,  109,
+      111,  112,  107,  113,  109,  115,  116,  112,  116,  117,
+      117,  119,  119,  111,  240,  117,  129,  119,  113,  114,
+      114,  114,  114,  114,  115,  197,  114,  114,  121,  121,
+      123,  123,  125,  125,  121,  129,  123,  134,  125,  127,
 
-      134,  128,  236,  139,  141,  134,  139,  149,  141,  131,
-      142,  142,  144,  144,  149,  189,  142,  189,  144,  147,
-      147,  147,  147,  147,  160,  160,  147,  147,  148,  148,
-      148,  148,  148,  150,  150,  148,  148,  155,  155,  150,
-      161,  161,  166,  155,  167,  167,  161,  171,  172,  172,
-      173,  173,  166,  179,  179,  195,  173,  181,  181,  179,
-      187,  183,  183,  181,  185,  185,  171,  183,  196,  187,
-      185,  190,  190,  199,  199,  220,  196,  196,  195,  199,
-      204,  204,  217,  209,  220,  221,  204,  209,  212,  212,
-      212,  212,  212,  235,  232,  212,  212,  217,  232,  221,
+      127,  130,  130,  132,  132,  127,  135,  130,  197,  132,
+      137,  137,  138,  138,  143,  134,  145,  143,  138,  228,
+      145,  146,  146,  148,  148,  135,  191,  146,  191,  148,
+      150,  150,  151,  151,  151,  151,  151,  152,  152,  151,
+      151,  157,  157,  152,  162,  162,  173,  157,  167,  167,
+      162,  168,  168,  174,  174,  178,  173,  168,  179,  179,
+      180,  180,  186,  186,  188,  188,  180,  198,  186,  220,
+      188,  192,  192,  216,  178,  198,  198,  201,  201,  213,
+      230,  217,  216,  201,  208,  208,  208,  208,  208,  227,
+      231,  208,  208,  227,  213,  217,  222,  222,  224,  224,
 
-      224,  224,  227,  227,  229,  229,  224,  243,  227,  244,
-      229,  237,  237,  242,  242,  246,  235,  237,  233,  225,
-      222,  218,  215,  213,  210,  244,  197,  243,  193,  191,
-      188,  178,  170,  246,  256,  256,  256,  256,  257,  257,
-      257,  258,  258,  258,  258,  259,  259,  259,  259,  260,
-      168,  260,  260,  261,  261,  261,  261,  262,  132,  262,
-      262,  263,  263,  263,  263,  264,  264,   94,  264,  265,
-      265,  265,  265,  266,   91,  266,  266,  267,  267,  267,
-      267,  268,  268,  268,  268,  269,  269,  269,  269,  270,
-      270,  270,  270,  271,  271,  271,  271,  272,   63,  272,
+      232,  232,  222,  230,  224,  238,  232,  237,  237,  241,
+      239,  218,  214,  211,  231,  209,  206,  199,  195,  193,
+      190,  185,  177,  175,  136,  238,  239,  241,  251,  251,
+      251,  251,  252,  252,  252,  253,  253,  253,  253,  254,
+      254,  254,  254,  255,   93,  255,  255,  256,  256,  256,
+      256,  257,   64,  257,  257,  258,  258,  258,  258,  259,
+      259,   35,  259,  260,  260,  260,  260,  261,   28,  261,
+      261,  262,  262,  262,  262,  263,  263,  263,  263,  264,
+      264,  264,  264,  265,  265,  265,  265,  266,  266,  266,
+      266,  267,  267,  267,  267,  268,   24,  268,  268,  269,
 
-      272,  273,  273,  273,  273,  274,  274,  274,  274,  275,
-       35,  275,  275,  276,  276,  276,  276,  277,   28,  277,
-      277,  278,  278,  278,  278,  279,   24,  279,  279,  280,
-      280,  280,  280,  281,   22,  281,  281,  282,  282,  282,
-      282,  283,   17,  283,  283,  284,  284,  284,  284,  285,
-      285,  285,  285,  286,    6,  286,  286,  287,    5,  287,
-      287,  288,    4,  288,  288,  289,  289,  289,  289,  290,
-      290,  290,  290,  291,    3,  291,  291,  292,  292,  292,
-      292,  293,  293,  293,  293,  294,    0,  294,  294,  295,
-      295,  295,  295,  296,    0,  296,  296,  297,  297,  297,
+      269,  269,  269,  270,  270,  270,  270,  271,   22,  271,
+      271,  272,  272,  272,  272,  273,   17,  273,  273,  274,
+      274,  274,  274,  275,    6,  275,  275,  276,  276,  276,
+      276,  277,    5,  277,  277,  278,  278,  278,  278,  279,
+        4,  279,  279,  280,  280,  280,  280,  281,    3,  281,
+      281,  282,  282,  282,  282,  283,    0,  283,  283,  284,
+        0,  284,  284,  285,    0,  285,  285,  286,    0,  286,
+      286,  287,  287,  287,  287,  288,  288,  288,  288,  289,
+        0,  289,  289,  290,  290,  290,  290,  291,  291,  291,
+      291,  292,    0,  292,  292,  293,  293,  293,  293,  294,
 
-      297,  298,  298,  298,  298,  299,  299,  299,  299,  300,
-      300,  300,  300,  301,  301,  301,  301,  302,    0,  302,
-      302,  303,    0,  303,  303,  304,  304,  304,  304,  305,
-      305,  305,  305,  306,    0,  306,  306,  307,  307,  307,
-      307,  308,  308,  308,  308,  309,    0,  309,  309,  310,
-        0,  310,  310,  311,  311,  311,  311,  312,  312,  312,
-      312,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255
-
+      294,  294,  294,  295,  295,  295,  295,  296,  296,  296,
+      296,  297,  297,  297,  297,  298,    0,  298,  298,  299,
+      299,  299,  299,  300,  300,  300,  300,  301,    0,  301,
+      301,  302,  302,  302,  302,  303,  303,  303,  303,  304,
+        0,  304,  304,  305,    0,  305,  305,  306,  306,  306,
+      306,  307,  307,  307,  307,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250
     } ;
 
 #define YY_TRAILING_MASK 0x2000
@@ -776,7 +773,8 @@ goto find_rule; \
  * syntax; if the target string has to contain "," or ":" the new
  * syntax's "target=" should be used.
  */
-#line 31 "libxlu_disk_l.l"
+
+#line 35 "libxlu_disk_l.l"
 #include "libxlu_disk_i.h"
 
 #define YY_NO_INPUT
@@ -885,7 +883,7 @@ static int vdev_and_devtype(DiskParseCon
 #define DPC ((DiskParseContext*)yyextra)
 
 
-#line 889 "libxlu_disk_l.c"
+#line 887 "libxlu_disk_l.c"
 
 #define INITIAL 0
 #define LEXERR 1
@@ -1121,12 +1119,12 @@ YY_DECL
 	register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 151 "libxlu_disk_l.l"
+#line 155 "libxlu_disk_l.l"
 
 
  /*----- the scanner rules which do the parsing -----*/
 
-#line 1130 "libxlu_disk_l.c"
+#line 1128 "libxlu_disk_l.c"
 
 	if ( !yyg->yy_init )
 		{
@@ -1190,14 +1188,14 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 256 )
+				if ( yy_current_state >= 251 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			*yyg->yy_state_ptr++ = yy_current_state;
 			++yy_cp;
 			}
-		while ( yy_current_state != 255 );
+		while ( yy_current_state != 250 );
 
 yy_find_action:
 		yy_current_state = *--yyg->yy_state_ptr;
@@ -1247,72 +1245,72 @@ do_action:	/* This label is used only to
 case 1:
 /* rule 1 can match eol */
 YY_RULE_SETUP
-#line 155 "libxlu_disk_l.l"
+#line 159 "libxlu_disk_l.l"
 { /* ignore whitespace before parameters */ }
 	YY_BREAK
 /* ordinary parameters setting enums or strings */
 case 2:
 /* rule 2 can match eol */
 YY_RULE_SETUP
-#line 159 "libxlu_disk_l.l"
+#line 163 "libxlu_disk_l.l"
 { STRIP(','); setformat(DPC, FROMEQUALS); }
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 161 "libxlu_disk_l.l"
+#line 165 "libxlu_disk_l.l"
 { DPC->disk->is_cdrom = 1; }
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 162 "libxlu_disk_l.l"
+#line 166 "libxlu_disk_l.l"
 { DPC->disk->is_cdrom = 1; }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 163 "libxlu_disk_l.l"
+#line 167 "libxlu_disk_l.l"
 { DPC->disk->is_cdrom = 0; }
 	YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 164 "libxlu_disk_l.l"
+#line 168 "libxlu_disk_l.l"
 { xlu__disk_err(DPC,yytext,"unknown value for type"); }
 	YY_BREAK
 case 7:
 /* rule 7 can match eol */
 YY_RULE_SETUP
-#line 166 "libxlu_disk_l.l"
+#line 170 "libxlu_disk_l.l"
 { STRIP(','); setaccess(DPC, FROMEQUALS); }
 	YY_BREAK
 case 8:
 /* rule 8 can match eol */
 YY_RULE_SETUP
-#line 167 "libxlu_disk_l.l"
+#line 171 "libxlu_disk_l.l"
 { STRIP(','); setbackendtype(DPC,FROMEQUALS); }
 	YY_BREAK
 case 9:
 /* rule 9 can match eol */
 YY_RULE_SETUP
-#line 169 "libxlu_disk_l.l"
+#line 173 "libxlu_disk_l.l"
 { STRIP(','); SAVESTRING("vdev", vdev, FROMEQUALS); }
 	YY_BREAK
 case 10:
 /* rule 10 can match eol */
 YY_RULE_SETUP
-#line 170 "libxlu_disk_l.l"
+#line 174 "libxlu_disk_l.l"
 { STRIP(','); SAVESTRING("script", script, FROMEQUALS); }
 	YY_BREAK
 /* the target magic parameter, eats the rest of the string */
 case 11:
 YY_RULE_SETUP
-#line 174 "libxlu_disk_l.l"
+#line 178 "libxlu_disk_l.l"
 { STRIP(','); SAVESTRING("target", pdev_path, FROMEQUALS); }
 	YY_BREAK
 /* unknown parameters */
 case 12:
 /* rule 12 can match eol */
 YY_RULE_SETUP
-#line 178 "libxlu_disk_l.l"
+#line 182 "libxlu_disk_l.l"
 { xlu__disk_err(DPC,yytext,"unknown parameter"); }
 	YY_BREAK
 /* deprecated prefixes */
@@ -1320,7 +1318,7 @@ YY_RULE_SETUP
    * matched the whole string, so these patterns take precedence */
 case 13:
 YY_RULE_SETUP
-#line 185 "libxlu_disk_l.l"
+#line 189 "libxlu_disk_l.l"
 {
                     STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `[format=]...,'");
@@ -1329,24 +1327,31 @@ YY_RULE_SETUP
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 191 "libxlu_disk_l.l"
+#line 195 "libxlu_disk_l.l"
 {
-		    STRIP(':');
+                    char *newscript;
+                    STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `script=...'");
-		    SAVESTRING("script", script, yytext);
-		}
+                    if (asprintf(&newscript, "block-%s", yytext) < 0) {
+                            xlu__disk_err(DPC,yytext,"unable to format script");
+                            return 0;
+                    }
+                    savestring(DPC, "script respecified",
+                               &DPC->disk->script, newscript);
+                    free(newscript);
+                }
 	YY_BREAK
 case 15:
 *yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
 yyg->yy_c_buf_p = yy_cp = yy_bp + 8;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 197 "libxlu_disk_l.l"
+#line 208 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 198 "libxlu_disk_l.l"
+#line 209 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 17:
@@ -1354,7 +1359,7 @@ case 17:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 199 "libxlu_disk_l.l"
+#line 210 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 18:
@@ -1362,7 +1367,7 @@ case 18:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 200 "libxlu_disk_l.l"
+#line 211 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 19:
@@ -1370,7 +1375,7 @@ case 19:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 201 "libxlu_disk_l.l"
+#line 212 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 20:
@@ -1378,13 +1383,13 @@ case 20:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 202 "libxlu_disk_l.l"
+#line 213 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 21:
 /* rule 21 can match eol */
 YY_RULE_SETUP
-#line 204 "libxlu_disk_l.l"
+#line 215 "libxlu_disk_l.l"
 {
 		  xlu__disk_err(DPC,yytext,"unknown deprecated disk prefix");
 		  return 0;
@@ -1394,7 +1399,7 @@ YY_RULE_SETUP
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 211 "libxlu_disk_l.l"
+#line 222 "libxlu_disk_l.l"
 {
     STRIP(',');
 
@@ -1423,7 +1428,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 237 "libxlu_disk_l.l"
+#line 248 "libxlu_disk_l.l"
 {
     BEGIN(LEXERR);
     yymore();
@@ -1431,17 +1436,17 @@ YY_RULE_SETUP
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 241 "libxlu_disk_l.l"
+#line 252 "libxlu_disk_l.l"
 {
     xlu__disk_err(DPC,yytext,"bad disk syntax"); return 0;
 }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
 	YY_BREAK
-#line 1445 "libxlu_disk_l.c"
+#line 1450 "libxlu_disk_l.c"
 			case YY_STATE_EOF(INITIAL):
 			case YY_STATE_EOF(LEXERR):
 				yyterminate();
@@ -1705,7 +1710,7 @@ static int yy_get_next_buffer (yyscan_t 
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 256 )
+			if ( yy_current_state >= 251 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1729,11 +1734,11 @@ static int yy_get_next_buffer (yyscan_t 
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 256 )
+		if ( yy_current_state >= 251 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 255);
+	yy_is_jam = (yy_current_state == 250);
 	if ( ! yy_is_jam )
 		*yyg->yy_state_ptr++ = yy_current_state;
 
@@ -2533,4 +2538,4 @@ void xlu__disk_yyfree (void * ptr , yysc
 
 #define YYTABLES_NAME "yytables"
 
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_l.h
--- a/tools/libxl/libxlu_disk_l.h	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.h	Mon Aug 06 12:28:03 2012 +0100
@@ -3,8 +3,12 @@
 #define xlu__disk_yyIN_HEADER 1
 
 #line 6 "libxlu_disk_l.h"
+#line 31 "libxlu_disk_l.l"
+#include "libxl_osdeps.h" /* must come before any other headers */
 
-#line 8 "libxlu_disk_l.h"
+
+
+#line 12 "libxlu_disk_l.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -340,8 +344,8 @@ extern int xlu__disk_yylex (yyscan_t yys
 #undef YY_DECL
 #endif
 
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
 
-#line 346 "libxlu_disk_l.h"
+#line 350 "libxlu_disk_l.h"
 #undef xlu__disk_yyIN_HEADER
 #endif /* xlu__disk_yyHEADER_H */
diff -r 60f2c7b74741 -r 353bc0801b11 tools/libxl/libxlu_disk_l.l
--- a/tools/libxl/libxlu_disk_l.l	Mon Aug 06 12:25:06 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.l	Mon Aug 06 12:28:03 2012 +0100
@@ -27,6 +27,10 @@
  * syntax's "target=" should be used.
  */
 
+%top{
+#include "libxl_osdeps.h" /* must come before any other headers */
+}
+
 %{
 #include "libxlu_disk_i.h"
 
@@ -188,11 +192,18 @@ target=.*	{ STRIP(','); SAVESTRING("targ
                     setformat(DPC, yytext);
                  }
 
-iscsi:|e?nbd:drbd:/.* {
-		    STRIP(':');
+(iscsi|e?nbd|drbd):/.* {
+                    char *newscript;
+                    STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `script=...'");
-		    SAVESTRING("script", script, yytext);
-		}
+                    if (asprintf(&newscript, "block-%s", yytext) < 0) {
+                            xlu__disk_err(DPC,yytext,"unable to format script");
+                            return 0;
+                    }
+                    savestring(DPC, "script respecified",
+                               &DPC->disk->script, newscript);
+                    free(newscript);
+                }
 
 tapdisk:/.*	{ DPC->had_depr_prefix=1; DEPRECATE(0); }
 tap2?:/.*	{ DPC->had_depr_prefix=1; DEPRECATE(0); }

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:35 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT9-0005pI-1Q; Tue, 07 Aug 2012 20:33:35 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT7-0005e6-Fb
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:33 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1344371606!2611599!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21829 invoked from network); 7 Aug 2012 20:33:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:26 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-00042M-R0
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-0003NR-Pi
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Message-Id: <E1SyqSz-0003NR-Pi@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:25 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Although the "Intel Virtualization
	Technology FlexMigration
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Matt Wilson <msw@amazon.com>
# Date 1344322193 -7200
# Node ID ca1db6da64e9a54cc6a5fc378dcdcea0a5715403
# Parent  a5f4efac996f030ba2f572b93ddbbcd1eff5ade7
Although the "Intel Virtualization Technology FlexMigration
Application Note" (http://www.intel.com/Assets/PDF/manual/323850.pdf)
does not document support for extended model 2H model DH (Intel Xeon
Processor E5 Family), empirical evidence shows that the same MSR
addresses can be used for cpuid masking as exdended model 2H model AH
(Intel Xen Processor E3-1200 Family).

Signed-off-by: Matt Wilson <msw@amazon.com>
Acked-by: Nakajima, Jun <jun.nakajima@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r a5f4efac996f -r ca1db6da64e9 xen/arch/x86/cpu/intel.c
--- a/xen/arch/x86/cpu/intel.c	Tue Aug 07 08:16:37 2012 +0200
+++ b/xen/arch/x86/cpu/intel.c	Tue Aug 07 08:49:53 2012 +0200
@@ -104,7 +104,7 @@ static void __devinit set_cpuidmask(cons
 			return;
 		extra = "xsave ";
 		break;
-	case 0x2a:
+	case 0x2a: case 0x2d:
 		wrmsr(MSR_INTEL_CPUID1_FEATURE_MASK_V2,
 		      opt_cpuid_mask_ecx,
 		      opt_cpuid_mask_edx);

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:35 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqT9-0005pI-1Q; Tue, 07 Aug 2012 20:33:35 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT7-0005e6-Fb
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:33 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1344371606!2611599!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21829 invoked from network); 7 Aug 2012 20:33:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:26 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-00042M-R0
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSz-0003NR-Pi
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:25 +0000
Message-Id: <E1SyqSz-0003NR-Pi@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:25 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Although the "Intel Virtualization
	Technology FlexMigration
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Matt Wilson <msw@amazon.com>
# Date 1344322193 -7200
# Node ID ca1db6da64e9a54cc6a5fc378dcdcea0a5715403
# Parent  a5f4efac996f030ba2f572b93ddbbcd1eff5ade7
Although the "Intel Virtualization Technology FlexMigration
Application Note" (http://www.intel.com/Assets/PDF/manual/323850.pdf)
does not document support for extended model 2H model DH (Intel Xeon
Processor E5 Family), empirical evidence shows that the same MSR
addresses can be used for cpuid masking as exdended model 2H model AH
(Intel Xen Processor E3-1200 Family).

Signed-off-by: Matt Wilson <msw@amazon.com>
Acked-by: Nakajima, Jun <jun.nakajima@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r a5f4efac996f -r ca1db6da64e9 xen/arch/x86/cpu/intel.c
--- a/xen/arch/x86/cpu/intel.c	Tue Aug 07 08:16:37 2012 +0200
+++ b/xen/arch/x86/cpu/intel.c	Tue Aug 07 08:49:53 2012 +0200
@@ -104,7 +104,7 @@ static void __devinit set_cpuidmask(cons
 			return;
 		extra = "xsave ";
 		break;
-	case 0x2a:
+	case 0x2a: case 0x2d:
 		wrmsr(MSR_INTEL_CPUID1_FEATURE_MASK_V2,
 		      opt_cpuid_mask_ecx,
 		      opt_cpuid_mask_edx);

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:36 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqTA-0005qy-4S; Tue, 07 Aug 2012 20:33:36 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT8-0005eq-8l
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:34 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1344371592!1897312!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5395 invoked from network); 7 Aug 2012 20:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSj-00040a-UV
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSj-0003G6-Ig
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:09 +0000
Message-Id: <E1SyqSj-0003G6-Ig@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nestedhvm: return the pfec from the
	pagetable walk.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1343915093 -3600
# Node ID 983ea7521badb3e05d3379044fb283732ef558d6
# Parent  c323f1af7e677e791d13f7d6a62abeec55a4a2d5
nestedhvm: return the pfec from the pagetable walk.

Don't clobber it with the pfec from teh p2m walk behind it; the guest
will not expect (or be able to handle) error codes that come from the
p2m table, which it can't see or control.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r c323f1af7e67 -r 983ea7521bad xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Thu Aug 02 14:38:09 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Thu Aug 02 14:44:53 2012 +0100
@@ -1581,6 +1581,7 @@ unsigned long paging_gva_to_gfn(struct v
         unsigned long gfn;
         struct p2m_domain *p2m;
         const struct paging_mode *mode;
+        uint32_t pfec_21 = *pfec;
         uint64_t ncr3 = nhvm_vcpu_hostcr3(v);
 
         /* translate l2 guest va into l2 guest gfn */
@@ -1590,7 +1591,7 @@ unsigned long paging_gva_to_gfn(struct v
 
         /* translate l2 guest gfn into l1 guest gfn */
         return hostmode->p2m_ga_to_gfn(v, hostp2m, ncr3,
-                                       gfn << PAGE_SHIFT, pfec, NULL);
+                                       gfn << PAGE_SHIFT, &pfec_21, NULL);
     }
 
     return hostmode->gva_to_gfn(v, hostp2m, va, pfec);

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:36 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqTA-0005qy-4S; Tue, 07 Aug 2012 20:33:36 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqT8-0005eq-8l
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:34 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1344371592!1897312!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5395 invoked from network); 7 Aug 2012 20:33:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSj-00040a-UV
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSj-0003G6-Ig
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:09 +0000
Message-Id: <E1SyqSj-0003G6-Ig@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nestedhvm: return the pfec from the
	pagetable walk.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1343915093 -3600
# Node ID 983ea7521badb3e05d3379044fb283732ef558d6
# Parent  c323f1af7e677e791d13f7d6a62abeec55a4a2d5
nestedhvm: return the pfec from the pagetable walk.

Don't clobber it with the pfec from teh p2m walk behind it; the guest
will not expect (or be able to handle) error codes that come from the
p2m table, which it can't see or control.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r c323f1af7e67 -r 983ea7521bad xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Thu Aug 02 14:38:09 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Thu Aug 02 14:44:53 2012 +0100
@@ -1581,6 +1581,7 @@ unsigned long paging_gva_to_gfn(struct v
         unsigned long gfn;
         struct p2m_domain *p2m;
         const struct paging_mode *mode;
+        uint32_t pfec_21 = *pfec;
         uint64_t ncr3 = nhvm_vcpu_hostcr3(v);
 
         /* translate l2 guest va into l2 guest gfn */
@@ -1590,7 +1591,7 @@ unsigned long paging_gva_to_gfn(struct v
 
         /* translate l2 guest gfn into l1 guest gfn */
         return hostmode->p2m_ga_to_gfn(v, hostp2m, ncr3,
-                                       gfn << PAGE_SHIFT, pfec, NULL);
+                                       gfn << PAGE_SHIFT, &pfec_21, NULL);
     }
 
     return hostmode->gva_to_gfn(v, hostp2m, va, pfec);

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:38 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:38 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqTC-0005uZ-7w; Tue, 07 Aug 2012 20:33:38 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqTA-0005hi-6t
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:36 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1344371603!12747239!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24207 invoked from network); 7 Aug 2012 20:33:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:25 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-00041v-KD
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-0003MS-Ij
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Message-Id: <E1SyqSx-0003MS-Ij@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:23 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Backed out changeset a8d708fcb347
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1344252286 -3600
# Node ID ce0079dc8c52d5335d78b24c4c6e0a36d4780061
# Parent  a8d708fcb3474b7fc112de37b3064e9213d4de92
Backed out changeset a8d708fcb347

25727:a8d708fcb347 was mangled during commit.  Back it out so that we
can commit it properly.

Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r a8d708fcb347 -r ce0079dc8c52 docs/misc/xl-disk-configuration.txt
--- a/docs/misc/xl-disk-configuration.txt	Fri Aug 03 11:59:12 2012 +0100
+++ b/docs/misc/xl-disk-configuration.txt	Mon Aug 06 12:24:46 2012 +0100
@@ -160,10 +160,7 @@ script=<script>
 ---------------
 
 Specifies that <target> is not a normal host path, but rather
-information to be interpreted by the executable program <script>,
-(looked for in /etc/xen/scripts, if it doesn't contain a slash).
-
-These scripts are normally called "block-<script>".
+information to be interpreted by /etc/xen/scripts/block-<script>.
 
 
 
@@ -207,7 +204,7 @@ Supported values:      iscsi:  nbd:  enb
 In xend and old versions of libxl it was necessary to specify the
 "script" (see above) with a prefix.  For compatibility, these four
 prefixes are recognised as specifying the corresponding script.  They
-are equivalent to "script=block-<script>".
+are equivalent to "script=<script>".
 
 
 <deprecated-prefix>:
diff -r a8d708fcb347 -r ce0079dc8c52 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/hotplug/Linux/block	Mon Aug 06 12:24:46 2012 +0100
@@ -342,4 +342,4 @@ esac
 
 # If we've reached here, $t is neither phy nor file, so fire a helper script.
 [ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \
-  ${XEN_SCRIPT_DIR}/block-"$t" "$command"
+  ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/check-xl-disk-parse
--- a/tools/libxl/check-xl-disk-parse	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/check-xl-disk-parse	Mon Aug 06 12:24:46 2012 +0100
@@ -142,44 +142,5 @@ disk: {
 
 EOF
 one 0 vdev=hdc,access=r,devtype=cdrom,format=empty
-one 0 vdev=hdc,access=r,devtype=cdrom
-
-expected <<EOF
-disk: {
-    "backend_domid": 0,
-    "pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost",
-    "vdev": "xvda",
-    "backend": "unknown",
-    "format": "raw",
-    "script": "block-iscsi",
-    "removable": 0,
-    "readwrite": 1,
-    "is_cdrom": 0
-}
-
-EOF
-
-# http://backdrift.org/xen-block-iscsi-script-with-multipath-support
-one 0 iscsi:iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost,xvda,w
-one 0 vdev=xvda,access=w,script=block-iscsi,target=iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost
-
-expected <<EOF
-disk: {
-    "backend_domid": 0,
-    "pdev_path": "app01",
-    "vdev": "hda",
-    "backend": "unknown",
-    "format": "raw",
-    "script": "block-drbd",
-    "removable": 0,
-    "readwrite": 1,
-    "is_cdrom": 0
-}
-
-EOF
-
-# http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html
-# http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html
-one 0 drbd:app01,hda,w
 
 complete
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxl.c	Mon Aug 06 12:24:46 2012 +0100
@@ -1796,9 +1796,9 @@ static void device_disk_add(libxl__egc *
     STATE_AO_GC(aodev->ao);
     flexarray_t *front = NULL;
     flexarray_t *back = NULL;
-    char *dev, *script;
+    char *dev;
     libxl__device *device;
-    int rc;
+    int major, minor, rc;
     libxl_ctx *ctx = gc->owner;
     xs_transaction_t t = XBT_NULL;
 
@@ -1833,6 +1833,13 @@ static void device_disk_add(libxl__egc *
             goto out_free;
         }
 
+        if (disk->script) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts"
+                       " not yet supported, sorry");
+            rc = ERROR_INVAL;
+            goto out_free;
+        }
+
         GCNEW(device);
         rc = libxl__device_from_disk(gc, domid, disk, device);
         if (rc != 0) {
@@ -1844,16 +1851,18 @@ static void device_disk_add(libxl__egc *
         switch (disk->backend) {
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
-
-                script = libxl__abs_path(gc, disk->script ?: "block",
-                                         libxl__xen_script_dir_path());
-
         do_backend_phy:
+                libxl__device_physdisk_major_minor(dev, &major, &minor);
+                flexarray_append(back, "physical-device");
+                flexarray_append(back, libxl__sprintf(gc, "%x:%x", major, minor));
+
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                assert(script);
-                flexarray_append_pair(back, "script", script);
+                flexarray_append(back, "script");
+                flexarray_append(back, GCSPRINTF("%s/%s",
+                                                 libxl__xen_script_dir_path(),
+                                                 "block"));
 
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
@@ -1870,12 +1879,10 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                /*
-                 * tap devices do not support custom block scripts and
-                 * always use the plain block script.
-                 */
-                script = libxl__abs_path(gc, "block",
-                                         libxl__xen_script_dir_path());
+                flexarray_append(back, "script");
+                flexarray_append(back, GCSPRINTF("%s/%s",
+                                                 libxl__xen_script_dir_path(),
+                                                 "blktap"));
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;
@@ -2575,10 +2582,13 @@ void libxl__device_nic_add(libxl__egc *e
     flexarray_append(back, "1");
     flexarray_append(back, "state");
     flexarray_append(back, libxl__sprintf(gc, "%d", 1));
-    if (nic->script)
-        flexarray_append_pair(back, "script",
-                              libxl__abs_path(gc, nic->script,
-                                              libxl__xen_script_dir_path()));
+    if (nic->script) {
+        flexarray_append(back, "script");
+        flexarray_append(back, nic->script[0]=='/' ? nic->script
+                         : libxl__sprintf(gc, "%s/%s",
+                                          libxl__xen_script_dir_path(),
+                                          nic->script));
+    }
 
     if (nic->ifname) {
         flexarray_append(back, "vifname");
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxl_device.c	Mon Aug 06 12:24:46 2012 +0100
@@ -147,26 +147,18 @@ typedef struct {
 } disk_try_backend_args;
 
 static int disk_try_backend(disk_try_backend_args *a,
-                            libxl_disk_backend backend)
- {
-    libxl__gc *gc = a->gc;
+                            libxl_disk_backend backend) {
     /* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or
      * backend on success */
-    libxl_ctx *ctx = libxl__gc_owner(gc);
+    libxl_ctx *ctx = libxl__gc_owner(a->gc);
+    switch (backend) {
 
-    switch (backend) {
     case LIBXL_DISK_BACKEND_PHY:
         if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW ||
               a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) {
             goto bad_format;
         }
 
-        if (a->disk->script) {
-            LOG(DEBUG, "Disk vdev=%s, uses script=... assuming phy backend",
-                a->disk->vdev);
-            return backend;
-        }
-
         if (libxl__try_phy_backend(a->stab.st_mode))
             return backend;
 
@@ -176,8 +168,6 @@ static int disk_try_backend(disk_try_bac
         return 0;
 
     case LIBXL_DISK_BACKEND_TAP:
-        if (a->disk->script) goto bad_script;
-
         if (!libxl__blktap_enabled(a->gc)) {
             LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
                        " unsuitable because blktap not available",
@@ -191,7 +181,6 @@ static int disk_try_backend(disk_try_bac
         return backend;
 
     case LIBXL_DISK_BACKEND_QDISK:
-        if (a->disk->script) goto bad_script;
         return backend;
 
     default:
@@ -209,11 +198,6 @@ static int disk_try_backend(disk_try_bac
                libxl_disk_backend_to_string(backend),
                libxl_disk_format_to_string(a->disk->format));
     return 0;
-
- bad_script:
-    LOG(DEBUG, "Disk vdev=%s, backend %s not compatible with script=...",
-        a->disk->vdev, libxl_disk_backend_to_string(backend));
-    return 0;
 }
 
 int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
@@ -236,7 +220,7 @@ int libxl__device_disk_set_backend(libxl
             return ERROR_INVAL;
         }
         memset(&a.stab, 0, sizeof(a.stab));
-    } else if (!disk->script) {
+    } else {
         if (stat(disk->pdev_path, &a.stab)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s "
                              "failed to stat: %s",
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxlu_disk_i.h
--- a/tools/libxl/libxlu_disk_i.h	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxlu_disk_i.h	Mon Aug 06 12:24:46 2012 +0100
@@ -1,6 +1,8 @@
 #ifndef LIBXLU_DISK_I_H
 #define LIBXLU_DISK_I_H
 
+#include "libxl_osdeps.h" /* must come before any other headers */
+
 #include "libxlu_internal.h"
 
 
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxlu_disk_l.c
--- a/tools/libxl/libxlu_disk_l.c	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.c	Mon Aug 06 12:24:46 2012 +0100
@@ -1,10 +1,6 @@
 #line 2 "libxlu_disk_l.c"
-#line 31 "libxlu_disk_l.l"
-#include "libxl_osdeps.h" /* must come before any other headers */
 
-
-
-#line 8 "libxlu_disk_l.c"
+#line 4 "libxlu_disk_l.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -383,76 +379,77 @@ static yyconst flex_int16_t yy_acclist[4
      8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
 
-       22,   22,   24, 8193,   22, 8193,   22, 8193, 8213,   22,
-     8213,   22, 8213,   12,   22,   22,   22,   22,   22,   22,
+       22,   24, 8193,   22, 8193,   22, 8193, 8213,   22, 8213,
+       22, 8213,   12,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-       22,   22, 8213,   22, 8213,   22, 8213,   12,   22,   17,
-     8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
-     8206, 8213,   22,16398,16405,   20, 8213,   22,16405,   22,
-     8205, 8213,   22,16397,16405,   22,   22, 8208, 8213,   22,
-    16400,16405,   22,   22,   22,   22,   17, 8213,   22,   17,
-     8213,   22,   17,   22,   17, 8213,   22,    3,   22,   22,
-       19, 8213,   22,16405,   22,   22, 8206, 8213,   22, 8206,
+     8213,   22, 8213,   22, 8213,   12,   22,   17, 8213,   22,
+    16405,   22,   22,   22,   22,   22,   22,   22, 8213,   22,
+    16405,   20, 8213,   22,16405,   22, 8205, 8213,   22,16397,
+    16405,   22,   22, 8208, 8213,   22,16400,16405,   22,   22,
+       22,   22,   17, 8213,   22,   17, 8213,   22,   17,   22,
+       17, 8213,   22,    3,   22,   22,   19, 8213,   22,16405,
+       22,   22,   22,   22,   20, 8213,   22,   20, 8213,   22,
 
-     8213,   22, 8206,   22, 8206, 8213,   20, 8213,   22,   20,
-     8213,   22,   20,   22,   20, 8213, 8205, 8213,   22, 8205,
-     8213,   22, 8205,   22, 8205, 8213,   22, 8208, 8213,   22,
-     8208, 8213,   22, 8208,   22, 8208, 8213,   22,   22,    9,
-       22,   17, 8213,   22,   17, 8213,   22,   17, 8213,   17,
-       22,   17,   22,    3,   22,   22,   19, 8213,   22,   19,
-     8213,   22,   19,   22,   19, 8213,   22,   18, 8213,   22,
-    16405, 8206, 8213,   22, 8206, 8213,   22, 8206, 8213, 8206,
-       22, 8206,   20, 8213,   22,   20, 8213,   22,   20, 8213,
-       20,   22,   20, 8205, 8213,   22, 8205, 8213,   22, 8205,
+       20,   22,   20, 8213, 8205, 8213,   22, 8205, 8213,   22,
+     8205,   22, 8205, 8213,   22, 8208, 8213,   22, 8208, 8213,
+       22, 8208,   22, 8208, 8213,   22,   22,    9,   22,   17,
+     8213,   22,   17, 8213,   22,   17, 8213,   17,   22,   17,
+       22,    3,   22,   22,   19, 8213,   22,   19, 8213,   22,
+       19,   22,   19, 8213,   22,   18, 8213,   22,16405, 8206,
+     8213,   22,16398,16405,   22,   20, 8213,   22,   20, 8213,
+       22,   20, 8213,   20,   22,   20, 8205, 8213,   22, 8205,
+     8213,   22, 8205, 8213, 8205,   22, 8205,   22, 8208, 8213,
+       22, 8208, 8213,   22, 8208, 8213, 8208,   22, 8208,   22,
 
-     8213, 8205,   22, 8205,   22, 8208, 8213,   22, 8208, 8213,
-       22, 8208, 8213, 8208,   22, 8208,   22,   22,    9,   12,
-        9,    7,   22,   22,   19, 8213,   22,   19, 8213,   22,
-       19, 8213,   19,   22,   19,    2,   18, 8213,   22,   18,
-     8213,   22,   18,   22,   18, 8213,   10,   22,   11,    9,
-        9,   12,    7,   12,    7,   22,    6,    2,   12,    2,
-       18, 8213,   22,   18, 8213,   22,   18, 8213,   18,   22,
-       18,   10,   12,   10,   15, 8213,   22,16405,   11,   12,
-       11,    7,    7,   12,   22,    6,   12,    6,    6,   12,
-        6,   12,    2,    2,   12,   10,   10,   12,   15, 8213,
+       22,    9,   12,    9,    7,   22,   22,   19, 8213,   22,
+       19, 8213,   22,   19, 8213,   19,   22,   19,    2,   18,
+     8213,   22,   18, 8213,   22,   18,   22,   18, 8213, 8206,
+     8213,   22, 8206, 8213,   22, 8206,   22, 8206, 8213,   22,
+       10,   22,   11,    9,    9,   12,    7,   12,    7,   22,
+        6,    2,   12,    2,   18, 8213,   22,   18, 8213,   22,
+       18, 8213,   18,   22,   18, 8206, 8213,   22, 8206, 8213,
+       22, 8206, 8213, 8206,   22, 8206,   22,   10,   12,   10,
+       15, 8213,   22,16405,   11,   12,   11,    7,    7,   12,
+       22,    6,   12,    6,    6,   12,    6,   12,    2,    2,
 
-       22,   15, 8213,   22,   15,   22,   15, 8213,   11,   12,
-       22,    6,    6,   12,    6,    6,   15, 8213,   22,   15,
-     8213,   22,   15, 8213,   15,   22,   15,   22,    6,    6,
-        8,    6,    5,    6,    8,   12,    8,    4,    6,    5,
-        6,    8,    8,   12,    4,    6
+       12, 8206,   22,16398,   10,   10,   12,   15, 8213,   22,
+       15, 8213,   22,   15,   22,   15, 8213,   11,   12,   22,
+        6,    6,   12,    6,    6,   15, 8213,   22,   15, 8213,
+       22,   15, 8213,   15,   22,   15,   22,    6,    6,    8,
+        6,    5,    6,    8,   12,    8,    4,    6,    5,    6,
+        8,    8,   12,    4,    6
     } ;
 
-static yyconst flex_int16_t yy_accept[252] =
+static yyconst flex_int16_t yy_accept[257] =
     {   0,
         1,    1,    1,    2,    3,    4,    7,   12,   16,   19,
        21,   24,   27,   30,   33,   36,   39,   42,   45,   48,
        51,   54,   57,   60,   63,   66,   68,   69,   70,   71,
        73,   76,   78,   79,   80,   81,   84,   84,   85,   86,
        87,   88,   89,   90,   91,   92,   93,   94,   95,   96,
-       97,   98,   99,  100,  101,  102,  103,  104,  106,  108,
-      109,  111,  113,  114,  115,  116,  117,  118,  119,  120,
+       97,   98,   99,  100,  101,  102,  103,  105,  107,  108,
+      110,  112,  113,  114,  115,  116,  117,  118,  119,  120,
       121,  122,  123,  124,  125,  126,  127,  128,  129,  130,
-      131,  132,  133,  135,  137,  138,  139,  140,  144,  145,
-      146,  147,  148,  149,  150,  151,  156,  160,  161,  166,
+      131,  133,  135,  136,  137,  138,  142,  143,  144,  145,
+      146,  147,  148,  149,  152,  156,  157,  162,  163,  164,
 
-      167,  168,  173,  174,  175,  176,  177,  180,  183,  185,
-      187,  188,  190,  191,  195,  196,  197,  200,  203,  205,
-      207,  210,  213,  215,  217,  220,  223,  225,  227,  228,
-      231,  234,  236,  238,  239,  240,  241,  242,  245,  248,
-      250,  252,  253,  254,  256,  257,  260,  263,  265,  267,
-      268,  272,  275,  278,  280,  282,  283,  286,  289,  291,
-      293,  294,  297,  300,  302,  304,  305,  306,  309,  312,
-      314,  316,  317,  318,  319,  321,  322,  323,  324,  325,
-      328,  331,  333,  335,  336,  337,  340,  343,  345,  347,
-      348,  349,  350,  351,  353,  355,  356,  357,  358,  360,
+      169,  170,  171,  172,  173,  176,  179,  181,  183,  184,
+      186,  187,  191,  192,  193,  194,  195,  198,  201,  203,
+      205,  208,  211,  213,  215,  216,  219,  222,  224,  226,
+      227,  228,  229,  230,  233,  236,  238,  240,  241,  242,
+      244,  245,  248,  251,  253,  255,  256,  260,  265,  266,
+      269,  272,  274,  276,  277,  280,  283,  285,  287,  288,
+      289,  292,  295,  297,  299,  300,  301,  302,  304,  305,
+      306,  307,  308,  311,  314,  316,  318,  319,  320,  323,
+      326,  328,  330,  333,  336,  338,  340,  341,  342,  343,
+      344,  345,  347,  349,  350,  351,  352,  354,  355,  358,
 
-      361,  364,  367,  369,  371,  372,  374,  375,  379,  381,
-      382,  383,  385,  386,  388,  389,  391,  393,  394,  396,
-      397,  399,  402,  405,  407,  409,  411,  412,  413,  415,
-      416,  417,  420,  423,  425,  427,  428,  429,  430,  431,
-      432,  433,  435,  437,  438,  440,  442,  443,  445,  447,
-      447
+      361,  363,  365,  366,  369,  372,  374,  376,  377,  378,
+      380,  381,  385,  387,  388,  389,  391,  392,  394,  395,
+      397,  399,  400,  402,  405,  406,  408,  411,  414,  416,
+      418,  420,  421,  422,  424,  425,  426,  429,  432,  434,
+      436,  437,  438,  439,  440,  441,  442,  444,  446,  447,
+      449,  451,  452,  454,  456,  456
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -495,238 +492,244 @@ static yyconst flex_int32_t yy_meta[34] 
         1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[308] =
+static yyconst flex_int16_t yy_base[313] =
     {   0,
-        0,    0,  546,  538,  533,  521,   32,   35,  656,  656,
-       44,   62,   30,   41,   50,   51,  507,   64,   47,   66,
-       67,  499,   68,  487,   72,    0,  656,  465,  656,   87,
-       91,    0,    0,  100,  452,  109,    0,   74,   95,   87,
-       32,   96,  105,  110,   77,   97,   40,  113,  116,  112,
-      118,  120,  121,  122,  123,  125,    0,  137,    0,    0,
-      147,    0,    0,  449,  129,  126,  134,  143,  145,  147,
-      148,  149,  151,  153,  156,  160,  155,  167,  162,  175,
-      168,  159,  188,    0,    0,  656,  166,  197,  179,  185,
-      176,  200,  435,  186,  193,  216,  225,  205,  234,  221,
+        0,    0,  572,  560,  559,  551,   32,   35,  662,  662,
+       44,   62,   30,   40,   32,   50,  533,   49,   47,   59,
+       68,  525,   69,  517,   72,    0,  662,  515,  662,   83,
+       91,    0,    0,  100,  501,  109,    0,   78,   51,   86,
+       89,   74,   96,  105,  109,  110,  111,  112,  117,   73,
+      119,  118,  121,  120,  122,    0,  134,    0,    0,  138,
+        0,    0,  495,  130,  144,  129,  143,  145,  146,  147,
+      148,  149,  153,  154,  155,  158,  161,  165,  166,  170,
+      180,    0,    0,  662,  171,  201,  176,  175,  178,  183,
+      465,  182,  190,  455,  212,  188,  221,  208,  224,  234,
 
-      237,  247,  204,  230,  244,  213,  254,    0,  256,    0,
-      251,  258,  254,  279,  256,  259,  267,    0,  269,    0,
-      286,    0,  288,    0,  290,    0,  297,    0,  267,  299,
-        0,  301,    0,  288,  297,  421,  302,  310,    0,    0,
-        0,    0,  305,  656,  307,  319,    0,  321,    0,  322,
-      332,  335,    0,    0,    0,    0,  339,    0,    0,    0,
-        0,  342,    0,    0,    0,    0,  340,  349,    0,    0,
-        0,    0,  337,  345,  420,  656,  419,  346,  350,  358,
-        0,    0,    0,    0,  418,  360,    0,  362,    0,  417,
-      319,  369,  416,  656,  415,  656,  276,  364,  414,  656,
+      209,  230,  236,  221,  244,    0,  247,    0,  184,  248,
+      244,  269,  231,  247,  251,  258,  272,    0,  279,    0,
+      283,    0,  286,    0,  255,  290,    0,  293,    0,  270,
+      281,  455,  254,  297,    0,    0,    0,    0,  294,  662,
+      295,  308,    0,  310,    0,  257,  319,  328,  304,  331,
+        0,    0,    0,    0,  335,    0,    0,    0,    0,  316,
+      338,    0,    0,    0,    0,  333,  336,  447,  662,  429,
+      338,  340,  348,    0,    0,    0,    0,  428,  351,    0,
+      355,    0,  359,    0,  362,    0,  357,  427,  308,  369,
+      426,  662,  425,  662,  346,  365,  423,  662,  371,    0,
 
-      375,    0,    0,    0,    0,  413,  656,  384,  412,    0,
-      410,  656,  370,  409,  656,  370,  378,  408,  656,  366,
-      656,  394,    0,  396,    0,    0,  380,  316,  656,  377,
-      387,  398,    0,    0,    0,    0,  399,  402,  407,  271,
-      406,  228,  200,  656,  175,  656,   77,  656,  656,  656,
-      428,  432,  435,  439,  443,  447,  451,  455,  459,  463,
-      467,  471,  475,  479,  483,  487,  491,  495,  499,  503,
-      507,  511,  515,  519,  523,  527,  531,  535,  539,  543,
-      547,  551,  555,  559,  563,  567,  571,  575,  579,  583,
-      587,  591,  595,  599,  603,  607,  611,  615,  619,  623,
+        0,    0,    0,  378,    0,    0,    0,    0,  380,  421,
+      662,  388,  420,    0,  419,  662,  373,  418,  662,  372,
+      382,  417,  662,  398,  416,  662,  400,    0,  402,    0,
+        0,  385,  415,  662,  390,  275,  409,    0,    0,    0,
+        0,  405,  404,  406,  264,  412,  224,  129,  662,   87,
+      662,   47,  662,  662,  662,  434,  438,  441,  445,  449,
+      453,  457,  461,  465,  469,  473,  477,  481,  485,  489,
+      493,  497,  501,  505,  509,  513,  517,  521,  525,  529,
+      533,  537,  541,  545,  549,  553,  557,  561,  565,  569,
+      573,  577,  581,  585,  589,  593,  597,  601,  605,  609,
 
-      627,  631,  635,  639,  643,  647,  651
+      613,  617,  621,  625,  629,  633,  637,  641,  645,  649,
+      653,  657
     } ;
 
-static yyconst flex_int16_t yy_def[308] =
+static yyconst flex_int16_t yy_def[313] =
     {   0,
-      250,    1,  251,  251,  250,  252,  253,  253,  250,  250,
-      254,  254,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  255,  250,  252,  250,  256,
-      253,  257,  257,  258,   12,  252,  259,   12,   12,   12,
+      255,    1,  256,  256,  255,  257,  258,  258,  255,  255,
+      259,  259,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  260,  255,  257,  255,  261,
+      258,  262,  262,  263,   12,  257,  264,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,   12,  255,  256,  257,  257,
-      260,  261,  261,  250,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  260,  261,  262,  262,  265,
+      266,  266,  255,   12,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,  260,  261,  261,  250,   12,  262,   12,   12,
-       12,   12,   12,   12,   12,  263,  264,   12,  265,   12,
+      265,  266,  266,  255,   12,  267,   12,   12,   12,   12,
+       12,   12,   12,   36,  268,   12,  269,   12,   12,  270,
 
-       12,  266,   12,   12,   12,   12,  267,  268,  262,  268,
-       12,   12,   12,  269,   12,   12,  270,  271,  263,  271,
-      272,  273,  264,  273,  274,  275,  265,  275,   12,  276,
-      277,  266,  277,   12,   12,  278,   12,  267,  268,  268,
-      279,  279,   12,  250,   12,  280,  281,  269,  281,   12,
-      282,  270,  271,  271,  283,  283,  272,  273,  273,  284,
-      284,  274,  275,  275,  285,  285,   12,  276,  277,  277,
-      286,  286,   12,   12,  287,  250,  288,   12,   12,  280,
-      281,  281,  289,  289,  290,  291,  292,  282,  292,  293,
-       12,  294,  287,  250,  295,  250,   12,  296,  297,  250,
+       12,   12,   12,   12,  271,  272,  267,  272,   12,   12,
+       12,  273,   12,   12,   12,  257,  274,  275,  268,  275,
+      276,  277,  269,  277,   12,  278,  279,  270,  279,   12,
+       12,  280,   12,  271,  272,  272,  281,  281,   12,  255,
+       12,  282,  283,  273,  283,   12,  284,  285,  257,  274,
+      275,  275,  286,  286,  276,  277,  277,  287,  287,   12,
+      278,  279,  279,  288,  288,   12,   12,  289,  255,  290,
+       12,   12,  282,  283,  283,  291,  291,  292,  293,  294,
+      284,  294,  295,  296,  285,  296,  257,  297,   12,  298,
+      289,  255,  299,  255,   12,  300,  301,  255,  293,  294,
 
-      291,  292,  292,  298,  298,  299,  250,  300,  301,  301,
-      295,  250,   12,  302,  250,  302,  302,  297,  250,  299,
-      250,  303,  304,  300,  304,  301,   12,  302,  250,  302,
-      302,  303,  304,  304,  305,  305,   12,  302,  302,  306,
-      302,  302,  307,  250,  302,  250,  307,  250,  250,    0,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      294,  302,  302,  295,  296,  296,  303,  303,  257,  304,
+      255,  305,  306,  306,  299,  255,   12,  307,  255,  307,
+      307,  301,  255,  285,  304,  255,  308,  309,  305,  309,
+      306,   12,  307,  255,  307,  307,  308,  309,  309,  310,
+      310,   12,  307,  307,  311,  307,  307,  312,  255,  307,
+      255,  312,  255,  255,    0,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 
-      250,  250,  250,  250,  250,  250,  250
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255
     } ;
 
-static yyconst flex_int16_t yy_nxt[690] =
+static yyconst flex_int16_t yy_nxt[696] =
     {   0,
         6,    7,    8,    9,    6,    6,    6,    6,   10,   11,
        12,   13,   14,   15,   16,   17,   17,   18,   17,   17,
        17,   17,   19,   17,   20,   21,   22,   23,   24,   17,
        25,   17,   17,   31,   31,   32,   31,   31,   32,   35,
        33,   35,   41,   33,   28,   28,   28,   29,   34,   35,
-       35,   36,   37,   73,   42,   38,   35,   49,   68,   35,
-       35,   39,   28,   28,   28,   29,   34,   43,   45,   36,
-       37,   40,   44,   35,   46,   35,   35,   35,   51,   53,
-      244,   35,   50,   35,   55,   65,   35,   47,   56,   28,
-       59,   48,   31,   31,   32,   60,   35,   71,   67,   33,
+      249,   36,   37,   42,   43,   38,   35,   48,   35,   35,
+       35,   39,   28,   28,   28,   29,   34,   44,   35,   36,
+       37,   40,   46,   45,   65,   49,   47,   35,   35,   50,
+       52,   35,   35,   35,   54,   28,   58,   35,   55,   64,
+      254,   59,   31,   31,   32,   35,   75,   66,   35,   33,
 
-       28,   28,   28,   29,   35,   35,   35,   28,   37,   61,
-       61,   61,   62,   61,   35,   70,   61,   63,   66,   35,
-       49,   35,   35,   72,   74,   35,   69,   35,   75,   35,
-       35,   35,   35,   88,   35,   35,   82,   78,   35,   28,
-       59,   77,   87,   35,   76,   60,   80,   79,   81,   28,
-       84,   78,   35,   89,   35,   85,   35,   35,   35,   75,
-       35,   92,   35,   96,   35,   35,   90,   97,   35,   35,
-       93,   35,   94,   91,   99,   35,   35,   35,  249,  100,
-       95,  101,  102,  104,   35,   35,   98,  103,   35,  105,
-       28,   84,  111,  106,   35,   35,   85,  107,  107,   61,
+       28,   28,   28,   29,   68,   35,   48,   28,   37,   60,
+       60,   60,   61,   60,   35,   67,   60,   62,   35,   35,
+       35,   35,   72,   71,   73,   69,   35,   35,   35,   35,
+       35,   35,  253,   80,   76,   70,   28,   58,   35,   35,
+       28,   82,   59,   85,   77,   78,   83,   79,   87,   74,
+       76,   86,   35,   35,   35,   35,   35,   35,   35,   90,
+       94,   95,   35,   35,   35,   97,   88,   35,   91,   92,
+       35,   99,  100,   89,   35,   35,   93,  101,   98,   35,
+       35,  102,   28,   82,   35,   35,   96,   35,   83,  109,
+      112,   35,   35,   35,   76,   97,  110,   35,  104,   35,
 
-      108,  107,   35,  248,  107,  110,  112,  114,  113,   35,
-       75,   78,   99,   35,   35,  116,  117,  117,   61,  118,
-      117,  134,   35,  117,  120,  121,  121,   61,  122,  121,
-       35,  246,  121,  124,  125,  125,   61,  126,  125,   35,
-      137,  125,  128,  135,  102,  129,   35,  130,  130,   61,
-      131,  130,  136,   35,  130,  133,   28,  139,   28,  141,
-       35,  144,  140,   35,  142,   35,  151,   35,   35,   28,
-      153,   28,  155,  143,  244,  154,   35,  156,  145,  146,
-      146,   61,  147,  146,  150,   35,  146,  149,   28,  158,
-       28,  160,   28,  163,  159,  167,  161,   35,  164,   28,
+      103,  105,  105,   60,  106,  105,  139,  115,  105,  108,
+      111,  114,  117,  117,   60,  118,  117,   35,   35,  117,
+      120,  121,  121,   60,  122,  121,  130,  251,  121,  124,
+       35,  100,  125,   35,  126,  126,   60,  127,  126,   35,
+       35,  126,  129,  131,  132,   35,   28,  135,  133,   28,
+      137,  140,  136,   35,  147,  138,   35,   35,  148,  146,
+       35,   29,  170,   35,   35,  178,   35,  249,  141,  142,
+      142,   60,  143,  142,   28,  151,  142,  145,  219,   35,
+      152,   28,  153,  160,  149,   28,  156,  154,   28,  158,
+       35,  157,   28,  162,  159,   28,  164,  166,  163,   28,
 
-      165,   28,  169,   28,  171,  166,   35,  170,  213,  172,
-      177,   35,   28,  139,   35,  173,   35,  178,  140,  215,
-      179,   28,  181,   28,  183,  174,  208,  182,   35,  184,
-      185,   35,  186,  186,   61,  187,  186,   28,  153,  186,
-      189,   28,  158,  154,   28,  163,   35,  159,  190,   35,
-      164,   28,  169,  192,   35,   35,  191,  170,  198,   35,
-       28,  181,   28,  202,   28,  204,  182,  215,  203,  207,
-      205,   64,  210,  229,  197,  216,  217,   28,  202,   35,
-      215,  229,  230,  203,  222,  222,   61,  223,  222,   35,
-      215,  222,  225,  237,  227,  231,   28,  233,   28,  235,
+      135,  165,  244,   35,   35,  136,  171,   29,  172,  167,
+       28,  174,   28,  176,  187,  212,  175,   35,  177,  179,
+      179,   60,  180,  179,  188,   35,  179,  182,  183,  183,
+       60,  184,  183,   28,  151,  183,  186,   28,  156,  152,
+       28,  162,   35,  157,  190,   35,  163,   35,  196,   35,
+       28,  174,  189,   28,  200,   35,  175,   28,  202,  201,
+       29,   28,  205,  203,   28,  207,  195,  206,  219,  209,
+      208,   63,  214,   28,  200,  234,  220,  221,  217,  201,
+       28,  205,   35,   29,  235,  234,  206,  224,  227,  227,
+       60,  228,  227,  219,   35,  227,  230,  232,  242,  236,
 
-       28,  233,  234,  238,  236,  215,  234,  240,   35,  215,
-      215,  200,  229,  196,  239,  226,  221,  219,  212,  176,
-      207,  200,  196,  194,  176,  241,  242,  245,   26,   26,
-       26,   26,   28,   28,   28,   30,   30,   30,   30,   35,
-       35,   35,   35,   57,  115,   57,   57,   58,   58,   58,
-       58,   60,   86,   60,   60,   34,   34,   34,   34,   64,
-       64,   35,   64,   83,   83,   83,   83,   85,   29,   85,
-       85,  109,  109,  109,  109,  119,  119,  119,  119,  123,
-      123,  123,  123,  127,  127,  127,  127,  132,  132,  132,
-      132,  138,  138,  138,  138,  140,   54,  140,  140,  148,
+       28,  207,   28,  238,   28,  240,  208,  219,  239,  219,
+      241,   28,  238,  245,   35,  219,  243,  239,  219,  211,
+      198,  234,  194,  231,  226,  247,  223,  246,  216,  169,
+      211,  198,  194,  250,   26,   26,   26,   26,   28,   28,
+       28,   30,   30,   30,   30,   35,   35,   35,   35,   56,
+      192,   56,   56,   57,   57,   57,   57,   59,  169,   59,
+       59,   34,   34,   34,   34,   63,   63,  116,   63,   81,
+       81,   81,   81,   83,  113,   83,   83,  107,  107,  107,
+      107,  119,  119,  119,  119,  123,  123,  123,  123,  128,
+      128,  128,  128,  134,  134,  134,  134,  136,   84,  136,
 
-      148,  148,  148,  152,  152,  152,  152,  154,   52,  154,
-      154,  157,  157,  157,  157,  159,   35,  159,  159,  162,
-      162,  162,  162,  164,   29,  164,  164,  168,  168,  168,
-      168,  170,  250,  170,  170,  175,  175,  175,  175,  142,
-       27,  142,  142,  180,  180,  180,  180,  182,   27,  182,
-      182,  188,  188,  188,  188,  156,  250,  156,  156,  161,
-      250,  161,  161,  166,  250,  166,  166,  172,  250,  172,
-      172,  193,  193,  193,  193,  195,  195,  195,  195,  184,
-      250,  184,  184,  199,  199,  199,  199,  201,  201,  201,
-      201,  203,  250,  203,  203,  206,  206,  206,  206,  209,
+      136,  144,  144,  144,  144,  150,  150,  150,  150,  152,
+       35,  152,  152,  155,  155,  155,  155,  157,   29,  157,
+      157,  161,  161,  161,  161,  163,   53,  163,  163,  168,
+      168,  168,  168,  138,   51,  138,  138,  173,  173,  173,
+      173,  175,   35,  175,  175,  181,  181,  181,  181,  185,
+      185,  185,  185,  154,   29,  154,  154,  159,  255,  159,
+      159,  165,   27,  165,  165,  191,  191,  191,  191,  193,
+      193,  193,  193,  177,   27,  177,  177,  197,  197,  197,
+      197,  199,  199,  199,  199,  201,  255,  201,  201,  204,
+      204,  204,  204,  206,  255,  206,  206,  210,  210,  210,
 
-      209,  209,  209,  211,  211,  211,  211,  214,  214,  214,
-      214,  218,  218,  218,  218,  205,  250,  205,  205,  220,
-      220,  220,  220,  224,  224,  224,  224,  210,  250,  210,
-      210,  228,  228,  228,  228,  232,  232,  232,  232,  234,
-      250,  234,  234,  236,  250,  236,  236,  243,  243,  243,
-      243,  247,  247,  247,  247,    5,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250
+      210,  213,  213,  213,  213,  215,  215,  215,  215,  218,
+      218,  218,  218,  222,  222,  222,  222,  203,  255,  203,
+      203,  208,  255,  208,  208,  225,  225,  225,  225,  229,
+      229,  229,  229,  214,  255,  214,  214,  233,  233,  233,
+      233,  237,  237,  237,  237,  239,  255,  239,  239,  241,
+      255,  241,  241,  248,  248,  248,  248,  252,  252,  252,
+      252,    5,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255
+
     } ;
 
-static yyconst flex_int16_t yy_chk[690] =
+static yyconst flex_int16_t yy_chk[696] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    7,    7,    7,    8,    8,    8,   13,
-        7,   41,   13,    8,   11,   11,   11,   11,   11,   47,
-       14,   11,   11,   47,   14,   11,   19,   19,   41,   15,
-       16,   11,   12,   12,   12,   12,   12,   14,   16,   12,
-       12,   12,   15,   18,   16,   20,   21,   23,   21,   23,
-      247,   25,   20,   38,   25,   38,   45,   18,   25,   30,
-       30,   18,   31,   31,   31,   30,   40,   45,   40,   31,
+        7,   15,   13,    8,   11,   11,   11,   11,   11,   14,
+      252,   11,   11,   14,   15,   11,   19,   19,   18,   16,
+       39,   11,   12,   12,   12,   12,   12,   16,   20,   12,
+       12,   12,   18,   16,   39,   20,   18,   21,   23,   21,
+       23,   25,   50,   42,   25,   30,   30,   38,   25,   38,
+      250,   30,   31,   31,   31,   40,   50,   40,   41,   31,
 
-       34,   34,   34,   34,   39,   42,   46,   34,   34,   36,
-       36,   36,   36,   36,   43,   43,   36,   36,   39,   44,
-       44,   50,   48,   46,   48,   49,   42,   51,   49,   52,
-       53,   54,   55,   66,   56,   66,   55,   56,   65,   58,
-       58,   51,   65,   67,   50,   58,   54,   53,   54,   61,
-       61,   52,   68,   67,   69,   61,   70,   71,   72,   70,
-       73,   71,   74,   75,   77,   75,   68,   76,   82,   76,
-       72,   79,   73,   69,   78,   87,   78,   81,  245,   79,
-       74,   80,   80,   81,   80,   91,   77,   80,   89,   82,
-       83,   83,   89,   87,   90,   94,   83,   88,   88,   88,
+       34,   34,   34,   34,   42,   43,   43,   34,   34,   36,
+       36,   36,   36,   36,   44,   41,   36,   36,   45,   46,
+       47,   48,   47,   46,   48,   44,   49,   52,   51,   54,
+       53,   55,  248,   54,   55,   45,   57,   57,   66,   64,
+       60,   60,   57,   64,   52,   53,   60,   53,   66,   49,
+       51,   65,   67,   65,   68,   69,   70,   71,   72,   69,
+       73,   74,   73,   74,   75,   76,   67,   76,   70,   71,
+       77,   78,   78,   68,   78,   79,   72,   78,   77,   80,
+       85,   79,   81,   81,   88,   87,   75,   89,   81,   87,
+       90,   92,   90,  109,   96,   96,   88,   96,   85,   93,
 
-       88,   88,   95,  243,   88,   88,   90,   92,   91,   92,
-       95,   98,   98,  103,   98,   94,   96,   96,   96,   96,
-       96,  103,  106,   96,   96,   97,   97,   97,   97,   97,
-      100,  242,   97,   97,   99,   99,   99,   99,   99,  104,
-      106,   99,   99,  104,  101,  100,  101,  102,  102,  102,
-      102,  102,  105,  105,  102,  102,  107,  107,  109,  109,
-      111,  112,  107,  113,  109,  115,  116,  112,  116,  117,
-      117,  119,  119,  111,  240,  117,  129,  119,  113,  114,
-      114,  114,  114,  114,  115,  197,  114,  114,  121,  121,
-      123,  123,  125,  125,  121,  129,  123,  134,  125,  127,
+       80,   86,   86,   86,   86,   86,  109,   93,   86,   86,
+       89,   92,   95,   95,   95,   95,   95,   98,  101,   95,
+       95,   97,   97,   97,   97,   97,  101,  247,   97,   97,
+      104,   99,   98,   99,  100,  100,  100,  100,  100,  102,
+      113,  100,  100,  102,  103,  103,  105,  105,  104,  107,
+      107,  110,  105,  111,  114,  107,  114,  110,  115,  113,
+      115,  116,  133,  133,  125,  146,  146,  245,  111,  112,
+      112,  112,  112,  112,  117,  117,  112,  112,  236,  130,
+      117,  119,  119,  125,  116,  121,  121,  119,  123,  123,
+      131,  121,  126,  126,  123,  128,  128,  130,  126,  134,
 
-      127,  130,  130,  132,  132,  127,  135,  130,  197,  132,
-      137,  137,  138,  138,  143,  134,  145,  143,  138,  228,
-      145,  146,  146,  148,  148,  135,  191,  146,  191,  148,
-      150,  150,  151,  151,  151,  151,  151,  152,  152,  151,
-      151,  157,  157,  152,  162,  162,  173,  157,  167,  167,
-      162,  168,  168,  174,  174,  178,  173,  168,  179,  179,
-      180,  180,  186,  186,  188,  188,  180,  198,  186,  220,
-      188,  192,  192,  216,  178,  198,  198,  201,  201,  213,
-      230,  217,  216,  201,  208,  208,  208,  208,  208,  227,
-      231,  208,  208,  227,  213,  217,  222,  222,  224,  224,
+      134,  128,  236,  139,  141,  134,  139,  149,  141,  131,
+      142,  142,  144,  144,  149,  189,  142,  189,  144,  147,
+      147,  147,  147,  147,  160,  160,  147,  147,  148,  148,
+      148,  148,  148,  150,  150,  148,  148,  155,  155,  150,
+      161,  161,  166,  155,  167,  167,  161,  171,  172,  172,
+      173,  173,  166,  179,  179,  195,  173,  181,  181,  179,
+      187,  183,  183,  181,  185,  185,  171,  183,  196,  187,
+      185,  190,  190,  199,  199,  220,  196,  196,  195,  199,
+      204,  204,  217,  209,  220,  221,  204,  209,  212,  212,
+      212,  212,  212,  235,  232,  212,  212,  217,  232,  221,
 
-      232,  232,  222,  230,  224,  238,  232,  237,  237,  241,
-      239,  218,  214,  211,  231,  209,  206,  199,  195,  193,
-      190,  185,  177,  175,  136,  238,  239,  241,  251,  251,
-      251,  251,  252,  252,  252,  253,  253,  253,  253,  254,
-      254,  254,  254,  255,   93,  255,  255,  256,  256,  256,
-      256,  257,   64,  257,  257,  258,  258,  258,  258,  259,
-      259,   35,  259,  260,  260,  260,  260,  261,   28,  261,
-      261,  262,  262,  262,  262,  263,  263,  263,  263,  264,
-      264,  264,  264,  265,  265,  265,  265,  266,  266,  266,
-      266,  267,  267,  267,  267,  268,   24,  268,  268,  269,
+      224,  224,  227,  227,  229,  229,  224,  243,  227,  244,
+      229,  237,  237,  242,  242,  246,  235,  237,  233,  225,
+      222,  218,  215,  213,  210,  244,  197,  243,  193,  191,
+      188,  178,  170,  246,  256,  256,  256,  256,  257,  257,
+      257,  258,  258,  258,  258,  259,  259,  259,  259,  260,
+      168,  260,  260,  261,  261,  261,  261,  262,  132,  262,
+      262,  263,  263,  263,  263,  264,  264,   94,  264,  265,
+      265,  265,  265,  266,   91,  266,  266,  267,  267,  267,
+      267,  268,  268,  268,  268,  269,  269,  269,  269,  270,
+      270,  270,  270,  271,  271,  271,  271,  272,   63,  272,
 
-      269,  269,  269,  270,  270,  270,  270,  271,   22,  271,
-      271,  272,  272,  272,  272,  273,   17,  273,  273,  274,
-      274,  274,  274,  275,    6,  275,  275,  276,  276,  276,
-      276,  277,    5,  277,  277,  278,  278,  278,  278,  279,
-        4,  279,  279,  280,  280,  280,  280,  281,    3,  281,
-      281,  282,  282,  282,  282,  283,    0,  283,  283,  284,
-        0,  284,  284,  285,    0,  285,  285,  286,    0,  286,
-      286,  287,  287,  287,  287,  288,  288,  288,  288,  289,
-        0,  289,  289,  290,  290,  290,  290,  291,  291,  291,
-      291,  292,    0,  292,  292,  293,  293,  293,  293,  294,
+      272,  273,  273,  273,  273,  274,  274,  274,  274,  275,
+       35,  275,  275,  276,  276,  276,  276,  277,   28,  277,
+      277,  278,  278,  278,  278,  279,   24,  279,  279,  280,
+      280,  280,  280,  281,   22,  281,  281,  282,  282,  282,
+      282,  283,   17,  283,  283,  284,  284,  284,  284,  285,
+      285,  285,  285,  286,    6,  286,  286,  287,    5,  287,
+      287,  288,    4,  288,  288,  289,  289,  289,  289,  290,
+      290,  290,  290,  291,    3,  291,  291,  292,  292,  292,
+      292,  293,  293,  293,  293,  294,    0,  294,  294,  295,
+      295,  295,  295,  296,    0,  296,  296,  297,  297,  297,
 
-      294,  294,  294,  295,  295,  295,  295,  296,  296,  296,
-      296,  297,  297,  297,  297,  298,    0,  298,  298,  299,
-      299,  299,  299,  300,  300,  300,  300,  301,    0,  301,
-      301,  302,  302,  302,  302,  303,  303,  303,  303,  304,
-        0,  304,  304,  305,    0,  305,  305,  306,  306,  306,
-      306,  307,  307,  307,  307,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250
+      297,  298,  298,  298,  298,  299,  299,  299,  299,  300,
+      300,  300,  300,  301,  301,  301,  301,  302,    0,  302,
+      302,  303,    0,  303,  303,  304,  304,  304,  304,  305,
+      305,  305,  305,  306,    0,  306,  306,  307,  307,  307,
+      307,  308,  308,  308,  308,  309,    0,  309,  309,  310,
+        0,  310,  310,  311,  311,  311,  311,  312,  312,  312,
+      312,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255
+
     } ;
 
 #define YY_TRAILING_MASK 0x2000
@@ -773,8 +776,7 @@ goto find_rule; \
  * syntax; if the target string has to contain "," or ":" the new
  * syntax's "target=" should be used.
  */
-
-#line 35 "libxlu_disk_l.l"
+#line 31 "libxlu_disk_l.l"
 #include "libxlu_disk_i.h"
 
 #define YY_NO_INPUT
@@ -883,7 +885,7 @@ static int vdev_and_devtype(DiskParseCon
 #define DPC ((DiskParseContext*)yyextra)
 
 
-#line 887 "libxlu_disk_l.c"
+#line 889 "libxlu_disk_l.c"
 
 #define INITIAL 0
 #define LEXERR 1
@@ -1119,12 +1121,12 @@ YY_DECL
 	register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 155 "libxlu_disk_l.l"
+#line 151 "libxlu_disk_l.l"
 
 
  /*----- the scanner rules which do the parsing -----*/
 
-#line 1128 "libxlu_disk_l.c"
+#line 1130 "libxlu_disk_l.c"
 
 	if ( !yyg->yy_init )
 		{
@@ -1318,7 +1320,7 @@ YY_RULE_SETUP
    * matched the whole string, so these patterns take precedence */
 case 13:
 YY_RULE_SETUP
-#line 189 "libxlu_disk_l.l"
+#line 185 "libxlu_disk_l.l"
 {
                     STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `[format=]...,'");
@@ -1352,7 +1354,7 @@ case 17:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 210 "libxlu_disk_l.l"
+#line 199 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 18:
@@ -1360,7 +1362,7 @@ case 18:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 211 "libxlu_disk_l.l"
+#line 200 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 19:
@@ -1368,7 +1370,7 @@ case 19:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 212 "libxlu_disk_l.l"
+#line 201 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 20:
@@ -1392,7 +1394,7 @@ YY_RULE_SETUP
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 222 "libxlu_disk_l.l"
+#line 211 "libxlu_disk_l.l"
 {
     STRIP(',');
 
@@ -1421,7 +1423,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 248 "libxlu_disk_l.l"
+#line 237 "libxlu_disk_l.l"
 {
     BEGIN(LEXERR);
     yymore();
@@ -2531,4 +2533,4 @@ void xlu__disk_yyfree (void * ptr , yysc
 
 #define YYTABLES_NAME "yytables"
 
-#line 255 "libxlu_disk_l.l"
+#line 244 "libxlu_disk_l.l"
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxlu_disk_l.h
--- a/tools/libxl/libxlu_disk_l.h	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.h	Mon Aug 06 12:24:46 2012 +0100
@@ -3,12 +3,8 @@
 #define xlu__disk_yyIN_HEADER 1
 
 #line 6 "libxlu_disk_l.h"
-#line 31 "libxlu_disk_l.l"
-#include "libxl_osdeps.h" /* must come before any other headers */
 
-
-
-#line 12 "libxlu_disk_l.h"
+#line 8 "libxlu_disk_l.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -344,8 +340,8 @@ extern int xlu__disk_yylex (yyscan_t yys
 #undef YY_DECL
 #endif
 
-#line 255 "libxlu_disk_l.l"
+#line 244 "libxlu_disk_l.l"
 
-#line 350 "libxlu_disk_l.h"
+#line 346 "libxlu_disk_l.h"
 #undef xlu__disk_yyIN_HEADER
 #endif /* xlu__disk_yyHEADER_H */
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxlu_disk_l.l
--- a/tools/libxl/libxlu_disk_l.l	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.l	Mon Aug 06 12:24:46 2012 +0100
@@ -27,10 +27,6 @@
  * syntax's "target=" should be used.
  */
 
-%top{
-#include "libxl_osdeps.h" /* must come before any other headers */
-}
-
 %{
 #include "libxlu_disk_i.h"
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:38 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:38 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqTC-0005uZ-7w; Tue, 07 Aug 2012 20:33:38 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqTA-0005hi-6t
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:36 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1344371603!12747239!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24207 invoked from network); 7 Aug 2012 20:33:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:25 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-00041v-KD
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSx-0003MS-Ij
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:23 +0000
Message-Id: <E1SyqSx-0003MS-Ij@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:23 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Backed out changeset a8d708fcb347
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1344252286 -3600
# Node ID ce0079dc8c52d5335d78b24c4c6e0a36d4780061
# Parent  a8d708fcb3474b7fc112de37b3064e9213d4de92
Backed out changeset a8d708fcb347

25727:a8d708fcb347 was mangled during commit.  Back it out so that we
can commit it properly.

Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r a8d708fcb347 -r ce0079dc8c52 docs/misc/xl-disk-configuration.txt
--- a/docs/misc/xl-disk-configuration.txt	Fri Aug 03 11:59:12 2012 +0100
+++ b/docs/misc/xl-disk-configuration.txt	Mon Aug 06 12:24:46 2012 +0100
@@ -160,10 +160,7 @@ script=<script>
 ---------------
 
 Specifies that <target> is not a normal host path, but rather
-information to be interpreted by the executable program <script>,
-(looked for in /etc/xen/scripts, if it doesn't contain a slash).
-
-These scripts are normally called "block-<script>".
+information to be interpreted by /etc/xen/scripts/block-<script>.
 
 
 
@@ -207,7 +204,7 @@ Supported values:      iscsi:  nbd:  enb
 In xend and old versions of libxl it was necessary to specify the
 "script" (see above) with a prefix.  For compatibility, these four
 prefixes are recognised as specifying the corresponding script.  They
-are equivalent to "script=block-<script>".
+are equivalent to "script=<script>".
 
 
 <deprecated-prefix>:
diff -r a8d708fcb347 -r ce0079dc8c52 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/hotplug/Linux/block	Mon Aug 06 12:24:46 2012 +0100
@@ -342,4 +342,4 @@ esac
 
 # If we've reached here, $t is neither phy nor file, so fire a helper script.
 [ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \
-  ${XEN_SCRIPT_DIR}/block-"$t" "$command"
+  ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/check-xl-disk-parse
--- a/tools/libxl/check-xl-disk-parse	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/check-xl-disk-parse	Mon Aug 06 12:24:46 2012 +0100
@@ -142,44 +142,5 @@ disk: {
 
 EOF
 one 0 vdev=hdc,access=r,devtype=cdrom,format=empty
-one 0 vdev=hdc,access=r,devtype=cdrom
-
-expected <<EOF
-disk: {
-    "backend_domid": 0,
-    "pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost",
-    "vdev": "xvda",
-    "backend": "unknown",
-    "format": "raw",
-    "script": "block-iscsi",
-    "removable": 0,
-    "readwrite": 1,
-    "is_cdrom": 0
-}
-
-EOF
-
-# http://backdrift.org/xen-block-iscsi-script-with-multipath-support
-one 0 iscsi:iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost,xvda,w
-one 0 vdev=xvda,access=w,script=block-iscsi,target=iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost
-
-expected <<EOF
-disk: {
-    "backend_domid": 0,
-    "pdev_path": "app01",
-    "vdev": "hda",
-    "backend": "unknown",
-    "format": "raw",
-    "script": "block-drbd",
-    "removable": 0,
-    "readwrite": 1,
-    "is_cdrom": 0
-}
-
-EOF
-
-# http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html
-# http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html
-one 0 drbd:app01,hda,w
 
 complete
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxl.c	Mon Aug 06 12:24:46 2012 +0100
@@ -1796,9 +1796,9 @@ static void device_disk_add(libxl__egc *
     STATE_AO_GC(aodev->ao);
     flexarray_t *front = NULL;
     flexarray_t *back = NULL;
-    char *dev, *script;
+    char *dev;
     libxl__device *device;
-    int rc;
+    int major, minor, rc;
     libxl_ctx *ctx = gc->owner;
     xs_transaction_t t = XBT_NULL;
 
@@ -1833,6 +1833,13 @@ static void device_disk_add(libxl__egc *
             goto out_free;
         }
 
+        if (disk->script) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts"
+                       " not yet supported, sorry");
+            rc = ERROR_INVAL;
+            goto out_free;
+        }
+
         GCNEW(device);
         rc = libxl__device_from_disk(gc, domid, disk, device);
         if (rc != 0) {
@@ -1844,16 +1851,18 @@ static void device_disk_add(libxl__egc *
         switch (disk->backend) {
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
-
-                script = libxl__abs_path(gc, disk->script ?: "block",
-                                         libxl__xen_script_dir_path());
-
         do_backend_phy:
+                libxl__device_physdisk_major_minor(dev, &major, &minor);
+                flexarray_append(back, "physical-device");
+                flexarray_append(back, libxl__sprintf(gc, "%x:%x", major, minor));
+
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                assert(script);
-                flexarray_append_pair(back, "script", script);
+                flexarray_append(back, "script");
+                flexarray_append(back, GCSPRINTF("%s/%s",
+                                                 libxl__xen_script_dir_path(),
+                                                 "block"));
 
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
@@ -1870,12 +1879,10 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                /*
-                 * tap devices do not support custom block scripts and
-                 * always use the plain block script.
-                 */
-                script = libxl__abs_path(gc, "block",
-                                         libxl__xen_script_dir_path());
+                flexarray_append(back, "script");
+                flexarray_append(back, GCSPRINTF("%s/%s",
+                                                 libxl__xen_script_dir_path(),
+                                                 "blktap"));
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;
@@ -2575,10 +2582,13 @@ void libxl__device_nic_add(libxl__egc *e
     flexarray_append(back, "1");
     flexarray_append(back, "state");
     flexarray_append(back, libxl__sprintf(gc, "%d", 1));
-    if (nic->script)
-        flexarray_append_pair(back, "script",
-                              libxl__abs_path(gc, nic->script,
-                                              libxl__xen_script_dir_path()));
+    if (nic->script) {
+        flexarray_append(back, "script");
+        flexarray_append(back, nic->script[0]=='/' ? nic->script
+                         : libxl__sprintf(gc, "%s/%s",
+                                          libxl__xen_script_dir_path(),
+                                          nic->script));
+    }
 
     if (nic->ifname) {
         flexarray_append(back, "vifname");
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxl_device.c	Mon Aug 06 12:24:46 2012 +0100
@@ -147,26 +147,18 @@ typedef struct {
 } disk_try_backend_args;
 
 static int disk_try_backend(disk_try_backend_args *a,
-                            libxl_disk_backend backend)
- {
-    libxl__gc *gc = a->gc;
+                            libxl_disk_backend backend) {
     /* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or
      * backend on success */
-    libxl_ctx *ctx = libxl__gc_owner(gc);
+    libxl_ctx *ctx = libxl__gc_owner(a->gc);
+    switch (backend) {
 
-    switch (backend) {
     case LIBXL_DISK_BACKEND_PHY:
         if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW ||
               a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) {
             goto bad_format;
         }
 
-        if (a->disk->script) {
-            LOG(DEBUG, "Disk vdev=%s, uses script=... assuming phy backend",
-                a->disk->vdev);
-            return backend;
-        }
-
         if (libxl__try_phy_backend(a->stab.st_mode))
             return backend;
 
@@ -176,8 +168,6 @@ static int disk_try_backend(disk_try_bac
         return 0;
 
     case LIBXL_DISK_BACKEND_TAP:
-        if (a->disk->script) goto bad_script;
-
         if (!libxl__blktap_enabled(a->gc)) {
             LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
                        " unsuitable because blktap not available",
@@ -191,7 +181,6 @@ static int disk_try_backend(disk_try_bac
         return backend;
 
     case LIBXL_DISK_BACKEND_QDISK:
-        if (a->disk->script) goto bad_script;
         return backend;
 
     default:
@@ -209,11 +198,6 @@ static int disk_try_backend(disk_try_bac
                libxl_disk_backend_to_string(backend),
                libxl_disk_format_to_string(a->disk->format));
     return 0;
-
- bad_script:
-    LOG(DEBUG, "Disk vdev=%s, backend %s not compatible with script=...",
-        a->disk->vdev, libxl_disk_backend_to_string(backend));
-    return 0;
 }
 
 int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
@@ -236,7 +220,7 @@ int libxl__device_disk_set_backend(libxl
             return ERROR_INVAL;
         }
         memset(&a.stab, 0, sizeof(a.stab));
-    } else if (!disk->script) {
+    } else {
         if (stat(disk->pdev_path, &a.stab)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s "
                              "failed to stat: %s",
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxlu_disk_i.h
--- a/tools/libxl/libxlu_disk_i.h	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxlu_disk_i.h	Mon Aug 06 12:24:46 2012 +0100
@@ -1,6 +1,8 @@
 #ifndef LIBXLU_DISK_I_H
 #define LIBXLU_DISK_I_H
 
+#include "libxl_osdeps.h" /* must come before any other headers */
+
 #include "libxlu_internal.h"
 
 
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxlu_disk_l.c
--- a/tools/libxl/libxlu_disk_l.c	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.c	Mon Aug 06 12:24:46 2012 +0100
@@ -1,10 +1,6 @@
 #line 2 "libxlu_disk_l.c"
-#line 31 "libxlu_disk_l.l"
-#include "libxl_osdeps.h" /* must come before any other headers */
 
-
-
-#line 8 "libxlu_disk_l.c"
+#line 4 "libxlu_disk_l.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -383,76 +379,77 @@ static yyconst flex_int16_t yy_acclist[4
      8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
 
-       22,   22,   24, 8193,   22, 8193,   22, 8193, 8213,   22,
-     8213,   22, 8213,   12,   22,   22,   22,   22,   22,   22,
+       22,   24, 8193,   22, 8193,   22, 8193, 8213,   22, 8213,
+       22, 8213,   12,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-       22,   22, 8213,   22, 8213,   22, 8213,   12,   22,   17,
-     8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
-     8206, 8213,   22,16398,16405,   20, 8213,   22,16405,   22,
-     8205, 8213,   22,16397,16405,   22,   22, 8208, 8213,   22,
-    16400,16405,   22,   22,   22,   22,   17, 8213,   22,   17,
-     8213,   22,   17,   22,   17, 8213,   22,    3,   22,   22,
-       19, 8213,   22,16405,   22,   22, 8206, 8213,   22, 8206,
+     8213,   22, 8213,   22, 8213,   12,   22,   17, 8213,   22,
+    16405,   22,   22,   22,   22,   22,   22,   22, 8213,   22,
+    16405,   20, 8213,   22,16405,   22, 8205, 8213,   22,16397,
+    16405,   22,   22, 8208, 8213,   22,16400,16405,   22,   22,
+       22,   22,   17, 8213,   22,   17, 8213,   22,   17,   22,
+       17, 8213,   22,    3,   22,   22,   19, 8213,   22,16405,
+       22,   22,   22,   22,   20, 8213,   22,   20, 8213,   22,
 
-     8213,   22, 8206,   22, 8206, 8213,   20, 8213,   22,   20,
-     8213,   22,   20,   22,   20, 8213, 8205, 8213,   22, 8205,
-     8213,   22, 8205,   22, 8205, 8213,   22, 8208, 8213,   22,
-     8208, 8213,   22, 8208,   22, 8208, 8213,   22,   22,    9,
-       22,   17, 8213,   22,   17, 8213,   22,   17, 8213,   17,
-       22,   17,   22,    3,   22,   22,   19, 8213,   22,   19,
-     8213,   22,   19,   22,   19, 8213,   22,   18, 8213,   22,
-    16405, 8206, 8213,   22, 8206, 8213,   22, 8206, 8213, 8206,
-       22, 8206,   20, 8213,   22,   20, 8213,   22,   20, 8213,
-       20,   22,   20, 8205, 8213,   22, 8205, 8213,   22, 8205,
+       20,   22,   20, 8213, 8205, 8213,   22, 8205, 8213,   22,
+     8205,   22, 8205, 8213,   22, 8208, 8213,   22, 8208, 8213,
+       22, 8208,   22, 8208, 8213,   22,   22,    9,   22,   17,
+     8213,   22,   17, 8213,   22,   17, 8213,   17,   22,   17,
+       22,    3,   22,   22,   19, 8213,   22,   19, 8213,   22,
+       19,   22,   19, 8213,   22,   18, 8213,   22,16405, 8206,
+     8213,   22,16398,16405,   22,   20, 8213,   22,   20, 8213,
+       22,   20, 8213,   20,   22,   20, 8205, 8213,   22, 8205,
+     8213,   22, 8205, 8213, 8205,   22, 8205,   22, 8208, 8213,
+       22, 8208, 8213,   22, 8208, 8213, 8208,   22, 8208,   22,
 
-     8213, 8205,   22, 8205,   22, 8208, 8213,   22, 8208, 8213,
-       22, 8208, 8213, 8208,   22, 8208,   22,   22,    9,   12,
-        9,    7,   22,   22,   19, 8213,   22,   19, 8213,   22,
-       19, 8213,   19,   22,   19,    2,   18, 8213,   22,   18,
-     8213,   22,   18,   22,   18, 8213,   10,   22,   11,    9,
-        9,   12,    7,   12,    7,   22,    6,    2,   12,    2,
-       18, 8213,   22,   18, 8213,   22,   18, 8213,   18,   22,
-       18,   10,   12,   10,   15, 8213,   22,16405,   11,   12,
-       11,    7,    7,   12,   22,    6,   12,    6,    6,   12,
-        6,   12,    2,    2,   12,   10,   10,   12,   15, 8213,
+       22,    9,   12,    9,    7,   22,   22,   19, 8213,   22,
+       19, 8213,   22,   19, 8213,   19,   22,   19,    2,   18,
+     8213,   22,   18, 8213,   22,   18,   22,   18, 8213, 8206,
+     8213,   22, 8206, 8213,   22, 8206,   22, 8206, 8213,   22,
+       10,   22,   11,    9,    9,   12,    7,   12,    7,   22,
+        6,    2,   12,    2,   18, 8213,   22,   18, 8213,   22,
+       18, 8213,   18,   22,   18, 8206, 8213,   22, 8206, 8213,
+       22, 8206, 8213, 8206,   22, 8206,   22,   10,   12,   10,
+       15, 8213,   22,16405,   11,   12,   11,    7,    7,   12,
+       22,    6,   12,    6,    6,   12,    6,   12,    2,    2,
 
-       22,   15, 8213,   22,   15,   22,   15, 8213,   11,   12,
-       22,    6,    6,   12,    6,    6,   15, 8213,   22,   15,
-     8213,   22,   15, 8213,   15,   22,   15,   22,    6,    6,
-        8,    6,    5,    6,    8,   12,    8,    4,    6,    5,
-        6,    8,    8,   12,    4,    6
+       12, 8206,   22,16398,   10,   10,   12,   15, 8213,   22,
+       15, 8213,   22,   15,   22,   15, 8213,   11,   12,   22,
+        6,    6,   12,    6,    6,   15, 8213,   22,   15, 8213,
+       22,   15, 8213,   15,   22,   15,   22,    6,    6,    8,
+        6,    5,    6,    8,   12,    8,    4,    6,    5,    6,
+        8,    8,   12,    4,    6
     } ;
 
-static yyconst flex_int16_t yy_accept[252] =
+static yyconst flex_int16_t yy_accept[257] =
     {   0,
         1,    1,    1,    2,    3,    4,    7,   12,   16,   19,
        21,   24,   27,   30,   33,   36,   39,   42,   45,   48,
        51,   54,   57,   60,   63,   66,   68,   69,   70,   71,
        73,   76,   78,   79,   80,   81,   84,   84,   85,   86,
        87,   88,   89,   90,   91,   92,   93,   94,   95,   96,
-       97,   98,   99,  100,  101,  102,  103,  104,  106,  108,
-      109,  111,  113,  114,  115,  116,  117,  118,  119,  120,
+       97,   98,   99,  100,  101,  102,  103,  105,  107,  108,
+      110,  112,  113,  114,  115,  116,  117,  118,  119,  120,
       121,  122,  123,  124,  125,  126,  127,  128,  129,  130,
-      131,  132,  133,  135,  137,  138,  139,  140,  144,  145,
-      146,  147,  148,  149,  150,  151,  156,  160,  161,  166,
+      131,  133,  135,  136,  137,  138,  142,  143,  144,  145,
+      146,  147,  148,  149,  152,  156,  157,  162,  163,  164,
 
-      167,  168,  173,  174,  175,  176,  177,  180,  183,  185,
-      187,  188,  190,  191,  195,  196,  197,  200,  203,  205,
-      207,  210,  213,  215,  217,  220,  223,  225,  227,  228,
-      231,  234,  236,  238,  239,  240,  241,  242,  245,  248,
-      250,  252,  253,  254,  256,  257,  260,  263,  265,  267,
-      268,  272,  275,  278,  280,  282,  283,  286,  289,  291,
-      293,  294,  297,  300,  302,  304,  305,  306,  309,  312,
-      314,  316,  317,  318,  319,  321,  322,  323,  324,  325,
-      328,  331,  333,  335,  336,  337,  340,  343,  345,  347,
-      348,  349,  350,  351,  353,  355,  356,  357,  358,  360,
+      169,  170,  171,  172,  173,  176,  179,  181,  183,  184,
+      186,  187,  191,  192,  193,  194,  195,  198,  201,  203,
+      205,  208,  211,  213,  215,  216,  219,  222,  224,  226,
+      227,  228,  229,  230,  233,  236,  238,  240,  241,  242,
+      244,  245,  248,  251,  253,  255,  256,  260,  265,  266,
+      269,  272,  274,  276,  277,  280,  283,  285,  287,  288,
+      289,  292,  295,  297,  299,  300,  301,  302,  304,  305,
+      306,  307,  308,  311,  314,  316,  318,  319,  320,  323,
+      326,  328,  330,  333,  336,  338,  340,  341,  342,  343,
+      344,  345,  347,  349,  350,  351,  352,  354,  355,  358,
 
-      361,  364,  367,  369,  371,  372,  374,  375,  379,  381,
-      382,  383,  385,  386,  388,  389,  391,  393,  394,  396,
-      397,  399,  402,  405,  407,  409,  411,  412,  413,  415,
-      416,  417,  420,  423,  425,  427,  428,  429,  430,  431,
-      432,  433,  435,  437,  438,  440,  442,  443,  445,  447,
-      447
+      361,  363,  365,  366,  369,  372,  374,  376,  377,  378,
+      380,  381,  385,  387,  388,  389,  391,  392,  394,  395,
+      397,  399,  400,  402,  405,  406,  408,  411,  414,  416,
+      418,  420,  421,  422,  424,  425,  426,  429,  432,  434,
+      436,  437,  438,  439,  440,  441,  442,  444,  446,  447,
+      449,  451,  452,  454,  456,  456
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -495,238 +492,244 @@ static yyconst flex_int32_t yy_meta[34] 
         1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[308] =
+static yyconst flex_int16_t yy_base[313] =
     {   0,
-        0,    0,  546,  538,  533,  521,   32,   35,  656,  656,
-       44,   62,   30,   41,   50,   51,  507,   64,   47,   66,
-       67,  499,   68,  487,   72,    0,  656,  465,  656,   87,
-       91,    0,    0,  100,  452,  109,    0,   74,   95,   87,
-       32,   96,  105,  110,   77,   97,   40,  113,  116,  112,
-      118,  120,  121,  122,  123,  125,    0,  137,    0,    0,
-      147,    0,    0,  449,  129,  126,  134,  143,  145,  147,
-      148,  149,  151,  153,  156,  160,  155,  167,  162,  175,
-      168,  159,  188,    0,    0,  656,  166,  197,  179,  185,
-      176,  200,  435,  186,  193,  216,  225,  205,  234,  221,
+        0,    0,  572,  560,  559,  551,   32,   35,  662,  662,
+       44,   62,   30,   40,   32,   50,  533,   49,   47,   59,
+       68,  525,   69,  517,   72,    0,  662,  515,  662,   83,
+       91,    0,    0,  100,  501,  109,    0,   78,   51,   86,
+       89,   74,   96,  105,  109,  110,  111,  112,  117,   73,
+      119,  118,  121,  120,  122,    0,  134,    0,    0,  138,
+        0,    0,  495,  130,  144,  129,  143,  145,  146,  147,
+      148,  149,  153,  154,  155,  158,  161,  165,  166,  170,
+      180,    0,    0,  662,  171,  201,  176,  175,  178,  183,
+      465,  182,  190,  455,  212,  188,  221,  208,  224,  234,
 
-      237,  247,  204,  230,  244,  213,  254,    0,  256,    0,
-      251,  258,  254,  279,  256,  259,  267,    0,  269,    0,
-      286,    0,  288,    0,  290,    0,  297,    0,  267,  299,
-        0,  301,    0,  288,  297,  421,  302,  310,    0,    0,
-        0,    0,  305,  656,  307,  319,    0,  321,    0,  322,
-      332,  335,    0,    0,    0,    0,  339,    0,    0,    0,
-        0,  342,    0,    0,    0,    0,  340,  349,    0,    0,
-        0,    0,  337,  345,  420,  656,  419,  346,  350,  358,
-        0,    0,    0,    0,  418,  360,    0,  362,    0,  417,
-      319,  369,  416,  656,  415,  656,  276,  364,  414,  656,
+      209,  230,  236,  221,  244,    0,  247,    0,  184,  248,
+      244,  269,  231,  247,  251,  258,  272,    0,  279,    0,
+      283,    0,  286,    0,  255,  290,    0,  293,    0,  270,
+      281,  455,  254,  297,    0,    0,    0,    0,  294,  662,
+      295,  308,    0,  310,    0,  257,  319,  328,  304,  331,
+        0,    0,    0,    0,  335,    0,    0,    0,    0,  316,
+      338,    0,    0,    0,    0,  333,  336,  447,  662,  429,
+      338,  340,  348,    0,    0,    0,    0,  428,  351,    0,
+      355,    0,  359,    0,  362,    0,  357,  427,  308,  369,
+      426,  662,  425,  662,  346,  365,  423,  662,  371,    0,
 
-      375,    0,    0,    0,    0,  413,  656,  384,  412,    0,
-      410,  656,  370,  409,  656,  370,  378,  408,  656,  366,
-      656,  394,    0,  396,    0,    0,  380,  316,  656,  377,
-      387,  398,    0,    0,    0,    0,  399,  402,  407,  271,
-      406,  228,  200,  656,  175,  656,   77,  656,  656,  656,
-      428,  432,  435,  439,  443,  447,  451,  455,  459,  463,
-      467,  471,  475,  479,  483,  487,  491,  495,  499,  503,
-      507,  511,  515,  519,  523,  527,  531,  535,  539,  543,
-      547,  551,  555,  559,  563,  567,  571,  575,  579,  583,
-      587,  591,  595,  599,  603,  607,  611,  615,  619,  623,
+        0,    0,    0,  378,    0,    0,    0,    0,  380,  421,
+      662,  388,  420,    0,  419,  662,  373,  418,  662,  372,
+      382,  417,  662,  398,  416,  662,  400,    0,  402,    0,
+        0,  385,  415,  662,  390,  275,  409,    0,    0,    0,
+        0,  405,  404,  406,  264,  412,  224,  129,  662,   87,
+      662,   47,  662,  662,  662,  434,  438,  441,  445,  449,
+      453,  457,  461,  465,  469,  473,  477,  481,  485,  489,
+      493,  497,  501,  505,  509,  513,  517,  521,  525,  529,
+      533,  537,  541,  545,  549,  553,  557,  561,  565,  569,
+      573,  577,  581,  585,  589,  593,  597,  601,  605,  609,
 
-      627,  631,  635,  639,  643,  647,  651
+      613,  617,  621,  625,  629,  633,  637,  641,  645,  649,
+      653,  657
     } ;
 
-static yyconst flex_int16_t yy_def[308] =
+static yyconst flex_int16_t yy_def[313] =
     {   0,
-      250,    1,  251,  251,  250,  252,  253,  253,  250,  250,
-      254,  254,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  255,  250,  252,  250,  256,
-      253,  257,  257,  258,   12,  252,  259,   12,   12,   12,
+      255,    1,  256,  256,  255,  257,  258,  258,  255,  255,
+      259,  259,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  260,  255,  257,  255,  261,
+      258,  262,  262,  263,   12,  257,  264,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,   12,  255,  256,  257,  257,
-      260,  261,  261,  250,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  260,  261,  262,  262,  265,
+      266,  266,  255,   12,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,  260,  261,  261,  250,   12,  262,   12,   12,
-       12,   12,   12,   12,   12,  263,  264,   12,  265,   12,
+      265,  266,  266,  255,   12,  267,   12,   12,   12,   12,
+       12,   12,   12,   36,  268,   12,  269,   12,   12,  270,
 
-       12,  266,   12,   12,   12,   12,  267,  268,  262,  268,
-       12,   12,   12,  269,   12,   12,  270,  271,  263,  271,
-      272,  273,  264,  273,  274,  275,  265,  275,   12,  276,
-      277,  266,  277,   12,   12,  278,   12,  267,  268,  268,
-      279,  279,   12,  250,   12,  280,  281,  269,  281,   12,
-      282,  270,  271,  271,  283,  283,  272,  273,  273,  284,
-      284,  274,  275,  275,  285,  285,   12,  276,  277,  277,
-      286,  286,   12,   12,  287,  250,  288,   12,   12,  280,
-      281,  281,  289,  289,  290,  291,  292,  282,  292,  293,
-       12,  294,  287,  250,  295,  250,   12,  296,  297,  250,
+       12,   12,   12,   12,  271,  272,  267,  272,   12,   12,
+       12,  273,   12,   12,   12,  257,  274,  275,  268,  275,
+      276,  277,  269,  277,   12,  278,  279,  270,  279,   12,
+       12,  280,   12,  271,  272,  272,  281,  281,   12,  255,
+       12,  282,  283,  273,  283,   12,  284,  285,  257,  274,
+      275,  275,  286,  286,  276,  277,  277,  287,  287,   12,
+      278,  279,  279,  288,  288,   12,   12,  289,  255,  290,
+       12,   12,  282,  283,  283,  291,  291,  292,  293,  294,
+      284,  294,  295,  296,  285,  296,  257,  297,   12,  298,
+      289,  255,  299,  255,   12,  300,  301,  255,  293,  294,
 
-      291,  292,  292,  298,  298,  299,  250,  300,  301,  301,
-      295,  250,   12,  302,  250,  302,  302,  297,  250,  299,
-      250,  303,  304,  300,  304,  301,   12,  302,  250,  302,
-      302,  303,  304,  304,  305,  305,   12,  302,  302,  306,
-      302,  302,  307,  250,  302,  250,  307,  250,  250,    0,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      294,  302,  302,  295,  296,  296,  303,  303,  257,  304,
+      255,  305,  306,  306,  299,  255,   12,  307,  255,  307,
+      307,  301,  255,  285,  304,  255,  308,  309,  305,  309,
+      306,   12,  307,  255,  307,  307,  308,  309,  309,  310,
+      310,   12,  307,  307,  311,  307,  307,  312,  255,  307,
+      255,  312,  255,  255,    0,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
 
-      250,  250,  250,  250,  250,  250,  250
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255
     } ;
 
-static yyconst flex_int16_t yy_nxt[690] =
+static yyconst flex_int16_t yy_nxt[696] =
     {   0,
         6,    7,    8,    9,    6,    6,    6,    6,   10,   11,
        12,   13,   14,   15,   16,   17,   17,   18,   17,   17,
        17,   17,   19,   17,   20,   21,   22,   23,   24,   17,
        25,   17,   17,   31,   31,   32,   31,   31,   32,   35,
        33,   35,   41,   33,   28,   28,   28,   29,   34,   35,
-       35,   36,   37,   73,   42,   38,   35,   49,   68,   35,
-       35,   39,   28,   28,   28,   29,   34,   43,   45,   36,
-       37,   40,   44,   35,   46,   35,   35,   35,   51,   53,
-      244,   35,   50,   35,   55,   65,   35,   47,   56,   28,
-       59,   48,   31,   31,   32,   60,   35,   71,   67,   33,
+      249,   36,   37,   42,   43,   38,   35,   48,   35,   35,
+       35,   39,   28,   28,   28,   29,   34,   44,   35,   36,
+       37,   40,   46,   45,   65,   49,   47,   35,   35,   50,
+       52,   35,   35,   35,   54,   28,   58,   35,   55,   64,
+      254,   59,   31,   31,   32,   35,   75,   66,   35,   33,
 
-       28,   28,   28,   29,   35,   35,   35,   28,   37,   61,
-       61,   61,   62,   61,   35,   70,   61,   63,   66,   35,
-       49,   35,   35,   72,   74,   35,   69,   35,   75,   35,
-       35,   35,   35,   88,   35,   35,   82,   78,   35,   28,
-       59,   77,   87,   35,   76,   60,   80,   79,   81,   28,
-       84,   78,   35,   89,   35,   85,   35,   35,   35,   75,
-       35,   92,   35,   96,   35,   35,   90,   97,   35,   35,
-       93,   35,   94,   91,   99,   35,   35,   35,  249,  100,
-       95,  101,  102,  104,   35,   35,   98,  103,   35,  105,
-       28,   84,  111,  106,   35,   35,   85,  107,  107,   61,
+       28,   28,   28,   29,   68,   35,   48,   28,   37,   60,
+       60,   60,   61,   60,   35,   67,   60,   62,   35,   35,
+       35,   35,   72,   71,   73,   69,   35,   35,   35,   35,
+       35,   35,  253,   80,   76,   70,   28,   58,   35,   35,
+       28,   82,   59,   85,   77,   78,   83,   79,   87,   74,
+       76,   86,   35,   35,   35,   35,   35,   35,   35,   90,
+       94,   95,   35,   35,   35,   97,   88,   35,   91,   92,
+       35,   99,  100,   89,   35,   35,   93,  101,   98,   35,
+       35,  102,   28,   82,   35,   35,   96,   35,   83,  109,
+      112,   35,   35,   35,   76,   97,  110,   35,  104,   35,
 
-      108,  107,   35,  248,  107,  110,  112,  114,  113,   35,
-       75,   78,   99,   35,   35,  116,  117,  117,   61,  118,
-      117,  134,   35,  117,  120,  121,  121,   61,  122,  121,
-       35,  246,  121,  124,  125,  125,   61,  126,  125,   35,
-      137,  125,  128,  135,  102,  129,   35,  130,  130,   61,
-      131,  130,  136,   35,  130,  133,   28,  139,   28,  141,
-       35,  144,  140,   35,  142,   35,  151,   35,   35,   28,
-      153,   28,  155,  143,  244,  154,   35,  156,  145,  146,
-      146,   61,  147,  146,  150,   35,  146,  149,   28,  158,
-       28,  160,   28,  163,  159,  167,  161,   35,  164,   28,
+      103,  105,  105,   60,  106,  105,  139,  115,  105,  108,
+      111,  114,  117,  117,   60,  118,  117,   35,   35,  117,
+      120,  121,  121,   60,  122,  121,  130,  251,  121,  124,
+       35,  100,  125,   35,  126,  126,   60,  127,  126,   35,
+       35,  126,  129,  131,  132,   35,   28,  135,  133,   28,
+      137,  140,  136,   35,  147,  138,   35,   35,  148,  146,
+       35,   29,  170,   35,   35,  178,   35,  249,  141,  142,
+      142,   60,  143,  142,   28,  151,  142,  145,  219,   35,
+      152,   28,  153,  160,  149,   28,  156,  154,   28,  158,
+       35,  157,   28,  162,  159,   28,  164,  166,  163,   28,
 
-      165,   28,  169,   28,  171,  166,   35,  170,  213,  172,
-      177,   35,   28,  139,   35,  173,   35,  178,  140,  215,
-      179,   28,  181,   28,  183,  174,  208,  182,   35,  184,
-      185,   35,  186,  186,   61,  187,  186,   28,  153,  186,
-      189,   28,  158,  154,   28,  163,   35,  159,  190,   35,
-      164,   28,  169,  192,   35,   35,  191,  170,  198,   35,
-       28,  181,   28,  202,   28,  204,  182,  215,  203,  207,
-      205,   64,  210,  229,  197,  216,  217,   28,  202,   35,
-      215,  229,  230,  203,  222,  222,   61,  223,  222,   35,
-      215,  222,  225,  237,  227,  231,   28,  233,   28,  235,
+      135,  165,  244,   35,   35,  136,  171,   29,  172,  167,
+       28,  174,   28,  176,  187,  212,  175,   35,  177,  179,
+      179,   60,  180,  179,  188,   35,  179,  182,  183,  183,
+       60,  184,  183,   28,  151,  183,  186,   28,  156,  152,
+       28,  162,   35,  157,  190,   35,  163,   35,  196,   35,
+       28,  174,  189,   28,  200,   35,  175,   28,  202,  201,
+       29,   28,  205,  203,   28,  207,  195,  206,  219,  209,
+      208,   63,  214,   28,  200,  234,  220,  221,  217,  201,
+       28,  205,   35,   29,  235,  234,  206,  224,  227,  227,
+       60,  228,  227,  219,   35,  227,  230,  232,  242,  236,
 
-       28,  233,  234,  238,  236,  215,  234,  240,   35,  215,
-      215,  200,  229,  196,  239,  226,  221,  219,  212,  176,
-      207,  200,  196,  194,  176,  241,  242,  245,   26,   26,
-       26,   26,   28,   28,   28,   30,   30,   30,   30,   35,
-       35,   35,   35,   57,  115,   57,   57,   58,   58,   58,
-       58,   60,   86,   60,   60,   34,   34,   34,   34,   64,
-       64,   35,   64,   83,   83,   83,   83,   85,   29,   85,
-       85,  109,  109,  109,  109,  119,  119,  119,  119,  123,
-      123,  123,  123,  127,  127,  127,  127,  132,  132,  132,
-      132,  138,  138,  138,  138,  140,   54,  140,  140,  148,
+       28,  207,   28,  238,   28,  240,  208,  219,  239,  219,
+      241,   28,  238,  245,   35,  219,  243,  239,  219,  211,
+      198,  234,  194,  231,  226,  247,  223,  246,  216,  169,
+      211,  198,  194,  250,   26,   26,   26,   26,   28,   28,
+       28,   30,   30,   30,   30,   35,   35,   35,   35,   56,
+      192,   56,   56,   57,   57,   57,   57,   59,  169,   59,
+       59,   34,   34,   34,   34,   63,   63,  116,   63,   81,
+       81,   81,   81,   83,  113,   83,   83,  107,  107,  107,
+      107,  119,  119,  119,  119,  123,  123,  123,  123,  128,
+      128,  128,  128,  134,  134,  134,  134,  136,   84,  136,
 
-      148,  148,  148,  152,  152,  152,  152,  154,   52,  154,
-      154,  157,  157,  157,  157,  159,   35,  159,  159,  162,
-      162,  162,  162,  164,   29,  164,  164,  168,  168,  168,
-      168,  170,  250,  170,  170,  175,  175,  175,  175,  142,
-       27,  142,  142,  180,  180,  180,  180,  182,   27,  182,
-      182,  188,  188,  188,  188,  156,  250,  156,  156,  161,
-      250,  161,  161,  166,  250,  166,  166,  172,  250,  172,
-      172,  193,  193,  193,  193,  195,  195,  195,  195,  184,
-      250,  184,  184,  199,  199,  199,  199,  201,  201,  201,
-      201,  203,  250,  203,  203,  206,  206,  206,  206,  209,
+      136,  144,  144,  144,  144,  150,  150,  150,  150,  152,
+       35,  152,  152,  155,  155,  155,  155,  157,   29,  157,
+      157,  161,  161,  161,  161,  163,   53,  163,  163,  168,
+      168,  168,  168,  138,   51,  138,  138,  173,  173,  173,
+      173,  175,   35,  175,  175,  181,  181,  181,  181,  185,
+      185,  185,  185,  154,   29,  154,  154,  159,  255,  159,
+      159,  165,   27,  165,  165,  191,  191,  191,  191,  193,
+      193,  193,  193,  177,   27,  177,  177,  197,  197,  197,
+      197,  199,  199,  199,  199,  201,  255,  201,  201,  204,
+      204,  204,  204,  206,  255,  206,  206,  210,  210,  210,
 
-      209,  209,  209,  211,  211,  211,  211,  214,  214,  214,
-      214,  218,  218,  218,  218,  205,  250,  205,  205,  220,
-      220,  220,  220,  224,  224,  224,  224,  210,  250,  210,
-      210,  228,  228,  228,  228,  232,  232,  232,  232,  234,
-      250,  234,  234,  236,  250,  236,  236,  243,  243,  243,
-      243,  247,  247,  247,  247,    5,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250
+      210,  213,  213,  213,  213,  215,  215,  215,  215,  218,
+      218,  218,  218,  222,  222,  222,  222,  203,  255,  203,
+      203,  208,  255,  208,  208,  225,  225,  225,  225,  229,
+      229,  229,  229,  214,  255,  214,  214,  233,  233,  233,
+      233,  237,  237,  237,  237,  239,  255,  239,  239,  241,
+      255,  241,  241,  248,  248,  248,  248,  252,  252,  252,
+      252,    5,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255
+
     } ;
 
-static yyconst flex_int16_t yy_chk[690] =
+static yyconst flex_int16_t yy_chk[696] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    7,    7,    7,    8,    8,    8,   13,
-        7,   41,   13,    8,   11,   11,   11,   11,   11,   47,
-       14,   11,   11,   47,   14,   11,   19,   19,   41,   15,
-       16,   11,   12,   12,   12,   12,   12,   14,   16,   12,
-       12,   12,   15,   18,   16,   20,   21,   23,   21,   23,
-      247,   25,   20,   38,   25,   38,   45,   18,   25,   30,
-       30,   18,   31,   31,   31,   30,   40,   45,   40,   31,
+        7,   15,   13,    8,   11,   11,   11,   11,   11,   14,
+      252,   11,   11,   14,   15,   11,   19,   19,   18,   16,
+       39,   11,   12,   12,   12,   12,   12,   16,   20,   12,
+       12,   12,   18,   16,   39,   20,   18,   21,   23,   21,
+       23,   25,   50,   42,   25,   30,   30,   38,   25,   38,
+      250,   30,   31,   31,   31,   40,   50,   40,   41,   31,
 
-       34,   34,   34,   34,   39,   42,   46,   34,   34,   36,
-       36,   36,   36,   36,   43,   43,   36,   36,   39,   44,
-       44,   50,   48,   46,   48,   49,   42,   51,   49,   52,
-       53,   54,   55,   66,   56,   66,   55,   56,   65,   58,
-       58,   51,   65,   67,   50,   58,   54,   53,   54,   61,
-       61,   52,   68,   67,   69,   61,   70,   71,   72,   70,
-       73,   71,   74,   75,   77,   75,   68,   76,   82,   76,
-       72,   79,   73,   69,   78,   87,   78,   81,  245,   79,
-       74,   80,   80,   81,   80,   91,   77,   80,   89,   82,
-       83,   83,   89,   87,   90,   94,   83,   88,   88,   88,
+       34,   34,   34,   34,   42,   43,   43,   34,   34,   36,
+       36,   36,   36,   36,   44,   41,   36,   36,   45,   46,
+       47,   48,   47,   46,   48,   44,   49,   52,   51,   54,
+       53,   55,  248,   54,   55,   45,   57,   57,   66,   64,
+       60,   60,   57,   64,   52,   53,   60,   53,   66,   49,
+       51,   65,   67,   65,   68,   69,   70,   71,   72,   69,
+       73,   74,   73,   74,   75,   76,   67,   76,   70,   71,
+       77,   78,   78,   68,   78,   79,   72,   78,   77,   80,
+       85,   79,   81,   81,   88,   87,   75,   89,   81,   87,
+       90,   92,   90,  109,   96,   96,   88,   96,   85,   93,
 
-       88,   88,   95,  243,   88,   88,   90,   92,   91,   92,
-       95,   98,   98,  103,   98,   94,   96,   96,   96,   96,
-       96,  103,  106,   96,   96,   97,   97,   97,   97,   97,
-      100,  242,   97,   97,   99,   99,   99,   99,   99,  104,
-      106,   99,   99,  104,  101,  100,  101,  102,  102,  102,
-      102,  102,  105,  105,  102,  102,  107,  107,  109,  109,
-      111,  112,  107,  113,  109,  115,  116,  112,  116,  117,
-      117,  119,  119,  111,  240,  117,  129,  119,  113,  114,
-      114,  114,  114,  114,  115,  197,  114,  114,  121,  121,
-      123,  123,  125,  125,  121,  129,  123,  134,  125,  127,
+       80,   86,   86,   86,   86,   86,  109,   93,   86,   86,
+       89,   92,   95,   95,   95,   95,   95,   98,  101,   95,
+       95,   97,   97,   97,   97,   97,  101,  247,   97,   97,
+      104,   99,   98,   99,  100,  100,  100,  100,  100,  102,
+      113,  100,  100,  102,  103,  103,  105,  105,  104,  107,
+      107,  110,  105,  111,  114,  107,  114,  110,  115,  113,
+      115,  116,  133,  133,  125,  146,  146,  245,  111,  112,
+      112,  112,  112,  112,  117,  117,  112,  112,  236,  130,
+      117,  119,  119,  125,  116,  121,  121,  119,  123,  123,
+      131,  121,  126,  126,  123,  128,  128,  130,  126,  134,
 
-      127,  130,  130,  132,  132,  127,  135,  130,  197,  132,
-      137,  137,  138,  138,  143,  134,  145,  143,  138,  228,
-      145,  146,  146,  148,  148,  135,  191,  146,  191,  148,
-      150,  150,  151,  151,  151,  151,  151,  152,  152,  151,
-      151,  157,  157,  152,  162,  162,  173,  157,  167,  167,
-      162,  168,  168,  174,  174,  178,  173,  168,  179,  179,
-      180,  180,  186,  186,  188,  188,  180,  198,  186,  220,
-      188,  192,  192,  216,  178,  198,  198,  201,  201,  213,
-      230,  217,  216,  201,  208,  208,  208,  208,  208,  227,
-      231,  208,  208,  227,  213,  217,  222,  222,  224,  224,
+      134,  128,  236,  139,  141,  134,  139,  149,  141,  131,
+      142,  142,  144,  144,  149,  189,  142,  189,  144,  147,
+      147,  147,  147,  147,  160,  160,  147,  147,  148,  148,
+      148,  148,  148,  150,  150,  148,  148,  155,  155,  150,
+      161,  161,  166,  155,  167,  167,  161,  171,  172,  172,
+      173,  173,  166,  179,  179,  195,  173,  181,  181,  179,
+      187,  183,  183,  181,  185,  185,  171,  183,  196,  187,
+      185,  190,  190,  199,  199,  220,  196,  196,  195,  199,
+      204,  204,  217,  209,  220,  221,  204,  209,  212,  212,
+      212,  212,  212,  235,  232,  212,  212,  217,  232,  221,
 
-      232,  232,  222,  230,  224,  238,  232,  237,  237,  241,
-      239,  218,  214,  211,  231,  209,  206,  199,  195,  193,
-      190,  185,  177,  175,  136,  238,  239,  241,  251,  251,
-      251,  251,  252,  252,  252,  253,  253,  253,  253,  254,
-      254,  254,  254,  255,   93,  255,  255,  256,  256,  256,
-      256,  257,   64,  257,  257,  258,  258,  258,  258,  259,
-      259,   35,  259,  260,  260,  260,  260,  261,   28,  261,
-      261,  262,  262,  262,  262,  263,  263,  263,  263,  264,
-      264,  264,  264,  265,  265,  265,  265,  266,  266,  266,
-      266,  267,  267,  267,  267,  268,   24,  268,  268,  269,
+      224,  224,  227,  227,  229,  229,  224,  243,  227,  244,
+      229,  237,  237,  242,  242,  246,  235,  237,  233,  225,
+      222,  218,  215,  213,  210,  244,  197,  243,  193,  191,
+      188,  178,  170,  246,  256,  256,  256,  256,  257,  257,
+      257,  258,  258,  258,  258,  259,  259,  259,  259,  260,
+      168,  260,  260,  261,  261,  261,  261,  262,  132,  262,
+      262,  263,  263,  263,  263,  264,  264,   94,  264,  265,
+      265,  265,  265,  266,   91,  266,  266,  267,  267,  267,
+      267,  268,  268,  268,  268,  269,  269,  269,  269,  270,
+      270,  270,  270,  271,  271,  271,  271,  272,   63,  272,
 
-      269,  269,  269,  270,  270,  270,  270,  271,   22,  271,
-      271,  272,  272,  272,  272,  273,   17,  273,  273,  274,
-      274,  274,  274,  275,    6,  275,  275,  276,  276,  276,
-      276,  277,    5,  277,  277,  278,  278,  278,  278,  279,
-        4,  279,  279,  280,  280,  280,  280,  281,    3,  281,
-      281,  282,  282,  282,  282,  283,    0,  283,  283,  284,
-        0,  284,  284,  285,    0,  285,  285,  286,    0,  286,
-      286,  287,  287,  287,  287,  288,  288,  288,  288,  289,
-        0,  289,  289,  290,  290,  290,  290,  291,  291,  291,
-      291,  292,    0,  292,  292,  293,  293,  293,  293,  294,
+      272,  273,  273,  273,  273,  274,  274,  274,  274,  275,
+       35,  275,  275,  276,  276,  276,  276,  277,   28,  277,
+      277,  278,  278,  278,  278,  279,   24,  279,  279,  280,
+      280,  280,  280,  281,   22,  281,  281,  282,  282,  282,
+      282,  283,   17,  283,  283,  284,  284,  284,  284,  285,
+      285,  285,  285,  286,    6,  286,  286,  287,    5,  287,
+      287,  288,    4,  288,  288,  289,  289,  289,  289,  290,
+      290,  290,  290,  291,    3,  291,  291,  292,  292,  292,
+      292,  293,  293,  293,  293,  294,    0,  294,  294,  295,
+      295,  295,  295,  296,    0,  296,  296,  297,  297,  297,
 
-      294,  294,  294,  295,  295,  295,  295,  296,  296,  296,
-      296,  297,  297,  297,  297,  298,    0,  298,  298,  299,
-      299,  299,  299,  300,  300,  300,  300,  301,    0,  301,
-      301,  302,  302,  302,  302,  303,  303,  303,  303,  304,
-        0,  304,  304,  305,    0,  305,  305,  306,  306,  306,
-      306,  307,  307,  307,  307,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
-      250,  250,  250,  250,  250,  250,  250,  250,  250
+      297,  298,  298,  298,  298,  299,  299,  299,  299,  300,
+      300,  300,  300,  301,  301,  301,  301,  302,    0,  302,
+      302,  303,    0,  303,  303,  304,  304,  304,  304,  305,
+      305,  305,  305,  306,    0,  306,  306,  307,  307,  307,
+      307,  308,  308,  308,  308,  309,    0,  309,  309,  310,
+        0,  310,  310,  311,  311,  311,  311,  312,  312,  312,
+      312,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255
+
     } ;
 
 #define YY_TRAILING_MASK 0x2000
@@ -773,8 +776,7 @@ goto find_rule; \
  * syntax; if the target string has to contain "," or ":" the new
  * syntax's "target=" should be used.
  */
-
-#line 35 "libxlu_disk_l.l"
+#line 31 "libxlu_disk_l.l"
 #include "libxlu_disk_i.h"
 
 #define YY_NO_INPUT
@@ -883,7 +885,7 @@ static int vdev_and_devtype(DiskParseCon
 #define DPC ((DiskParseContext*)yyextra)
 
 
-#line 887 "libxlu_disk_l.c"
+#line 889 "libxlu_disk_l.c"
 
 #define INITIAL 0
 #define LEXERR 1
@@ -1119,12 +1121,12 @@ YY_DECL
 	register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 155 "libxlu_disk_l.l"
+#line 151 "libxlu_disk_l.l"
 
 
  /*----- the scanner rules which do the parsing -----*/
 
-#line 1128 "libxlu_disk_l.c"
+#line 1130 "libxlu_disk_l.c"
 
 	if ( !yyg->yy_init )
 		{
@@ -1318,7 +1320,7 @@ YY_RULE_SETUP
    * matched the whole string, so these patterns take precedence */
 case 13:
 YY_RULE_SETUP
-#line 189 "libxlu_disk_l.l"
+#line 185 "libxlu_disk_l.l"
 {
                     STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `[format=]...,'");
@@ -1352,7 +1354,7 @@ case 17:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 210 "libxlu_disk_l.l"
+#line 199 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 18:
@@ -1360,7 +1362,7 @@ case 18:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 211 "libxlu_disk_l.l"
+#line 200 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 19:
@@ -1368,7 +1370,7 @@ case 19:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 212 "libxlu_disk_l.l"
+#line 201 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 20:
@@ -1392,7 +1394,7 @@ YY_RULE_SETUP
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 222 "libxlu_disk_l.l"
+#line 211 "libxlu_disk_l.l"
 {
     STRIP(',');
 
@@ -1421,7 +1423,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 248 "libxlu_disk_l.l"
+#line 237 "libxlu_disk_l.l"
 {
     BEGIN(LEXERR);
     yymore();
@@ -2531,4 +2533,4 @@ void xlu__disk_yyfree (void * ptr , yysc
 
 #define YYTABLES_NAME "yytables"
 
-#line 255 "libxlu_disk_l.l"
+#line 244 "libxlu_disk_l.l"
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxlu_disk_l.h
--- a/tools/libxl/libxlu_disk_l.h	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.h	Mon Aug 06 12:24:46 2012 +0100
@@ -3,12 +3,8 @@
 #define xlu__disk_yyIN_HEADER 1
 
 #line 6 "libxlu_disk_l.h"
-#line 31 "libxlu_disk_l.l"
-#include "libxl_osdeps.h" /* must come before any other headers */
 
-
-
-#line 12 "libxlu_disk_l.h"
+#line 8 "libxlu_disk_l.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -344,8 +340,8 @@ extern int xlu__disk_yylex (yyscan_t yys
 #undef YY_DECL
 #endif
 
-#line 255 "libxlu_disk_l.l"
+#line 244 "libxlu_disk_l.l"
 
-#line 350 "libxlu_disk_l.h"
+#line 346 "libxlu_disk_l.h"
 #undef xlu__disk_yyIN_HEADER
 #endif /* xlu__disk_yyHEADER_H */
diff -r a8d708fcb347 -r ce0079dc8c52 tools/libxl/libxlu_disk_l.l
--- a/tools/libxl/libxlu_disk_l.l	Fri Aug 03 11:59:12 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.l	Mon Aug 06 12:24:46 2012 +0100
@@ -27,10 +27,6 @@
  * syntax's "target=" should be used.
  */
 
-%top{
-#include "libxl_osdeps.h" /* must come before any other headers */
-}
-
 %{
 #include "libxlu_disk_i.h"
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:38 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:38 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqTC-0005un-BR; Tue, 07 Aug 2012 20:33:38 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqTA-0005qu-GC
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:36 +0000
Received: from [85.158.143.99:43847] by server-1.bemta-4.messagelabs.com id
	1D/EB-24392-F9B71205; Tue, 07 Aug 2012 20:33:35 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1344371601!25420538!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22402 invoked from network); 7 Aug 2012 20:33:22 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:22 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSv-00041e-GL
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSv-0003LU-EQ
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:21 +0000
Message-Id: <E1SyqSv-0003LU-EQ@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:20 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: support custom block hotplug
	scripts
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343991552 -3600
# Node ID a8d708fcb3474b7fc112de37b3064e9213d4de92
# Parent  4a1dde3b9dfe4572d222847cbe37a355d81b1986
libxl: support custom block hotplug scripts

These are provided using the "script=" syntax described in
docs/misc/xl-disk-configuration.txt.

The existing hotplug scripts currently conflate two different
concepts, namely that of making a datapath available in the backend
domain (logging into iSCSI LUNs and the like) and that of actually
connecting that datapath to a Xen backend path (e.g. writing
"physical-device" node in xenstore to bring up blkback).

For this reason the script support implemented here is only supported
in conjunction with backendtype=phy.

Eventually we hope to rework the hotplug scripts to separate the to
concepts, but that is not 4.2 material.

In addition there are some other subtleties:

 - Previously in the blktap case we would add "script = .../blktap" to
   the backend flex array, but then jumped to the PHY case which added
   "script = .../block" too. The block one takes precendence since it
   comes second.

   This was, accidentally, correct. The blktap script is for blktap1
   devices and not blktap2 devices. libxl completely manages the
   blktap2 side of things without resorting to hotplug scripts and
   creates a blkback device directly.  Therefore the "block" script is
   always the correct one to call. Custom script are not supported in
   this context.

 - libxl should not write the "physical-device" node. This is the
   responsibility of the block script. Writing the "physical-device"
   node in libxl basically completely short-cuts the standard block
   hotplug script which uses "physical-device" to know if it has run
   already or not.

   In the case of more complex scripts libxl cannot know the right
   value to write here anyway, in particular the device may not exist
   until after the script is called.

   This change has the side effect of re-enabling the checks for
   device sharing aspect of the default block script, which I have tested
   and which now cause libxl to properly abort now that libxl properly
   checks for hotplug script errors.

   There is no sharing check for blktap2 since even if you reuse the
   same vhd the resulting tap device is different. I would have preferred
   to simply write the "physical-device" node for the blktap2 case but
   the hotplug script infrastructure is not currently setup to handle
   LIBXL__DEVICE_KIND_VBD
   devices without a hotplug script (backendtype phy and tap both end
   up as KIND_VBD). Changing this was more surgery than I was happy doing
   for 4.2 and therefore I have simply hardcoded to the block script for
   the LIBXL_DISK_BACKEND_TAP case.

 - libxl__device_disk_set_backend running against a phy device with a
   script cannot stat the device to check its properties since it may
   not exist until the script is run. Therefore I have special cased
   this in disk_try_backend to simply assume that backend == phy is
   always ok if a script was
   configured.  Similarly the other backend types are always rejected
   if a script was configured.

   Note that the reason for implementing the default script behaviour
   in device_disk_add instead of libxl__device_disk_setdefault is
   because we need to be able to tell when the script was
   user-supplied rather than defaulted by libxl in order to correctly
   implement the above. The setdefault function must be idempotent so
   we cannot simply update disk->script.

   I suspect that for 4.3 a script member should be added to
   libxl__device, this would also help in the case above of handling
   devices with no script in a consistent manner. This is not 4.2
   material.

 - When the block script falls through and shells out to a block-$type
   script it used to pass "$node" however the only place this was
   assigned was in the remove+phy case (in which case it contains the
   file:// derived /dev/loopN device), and in that case the script
   exits without falling through to the block-$type case.

   Since libxl never creates a type other than phy this never happens
   in practice anyway and we now call the correct block-$type script
   directly.  But fix it up anyway since it is confusing.

 - The block-nbd and block-enbd scripts which we supply appear to be
   broken WRT the hotplug calling convention, in that they seem to
   expect a command line parameter (perhaps the $node described above)
   rather than reading the appropriate node from xenstore.

   I rather suspect this was broken by 7774:e2e7f47e6f79 in November
   2005. I think it is safe to say no one is using these scripts! I
   haven't fixed this here. It would be good to track down some working
   scripts and either incorproate them or defer to them in their existing
   home (e.g. if they live somewhere useful like the nbd tools
   package).

 - Added a few block script related entries to check-xl-disk-parse
   from http://backdrift.org/xen-block-iscsi-script-with-multipath-support
   and http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html /
   http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html (and
   snuck in another interesting empty CDROM case)

   This highlighted two bugs in the libxlu disk parser handling of the
   deprecated "<script>:" prefix:

   - It was failing to prefix with "block-" to construct the actual
     script name

   - The regex for matching iscsi or drdb or e?nbd was incorrect

 - Use libxl__abs_path for the nic script too. Just because the
   existing code nearly tricked me into repeating the mistake

I have tested with a custom block script which uses "lvchange -a" to
dynamically add remove the referenced device (simulates iSCSI
login/logout without requiring me to faff around setting up an iSCSI
target). I also tested on a blktap2 system.

I haven't directly tested anything more complex like iscsi: or nbd:
other than what check-xl-disk-parse exercises.

[ reran flex/bison -iwj ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 4a1dde3b9dfe -r a8d708fcb347 docs/misc/xl-disk-configuration.txt
--- a/docs/misc/xl-disk-configuration.txt	Fri Aug 03 11:57:10 2012 +0100
+++ b/docs/misc/xl-disk-configuration.txt	Fri Aug 03 11:59:12 2012 +0100
@@ -160,7 +160,10 @@ script=<script>
 ---------------
 
 Specifies that <target> is not a normal host path, but rather
-information to be interpreted by /etc/xen/scripts/block-<script>.
+information to be interpreted by the executable program <script>,
+(looked for in /etc/xen/scripts, if it doesn't contain a slash).
+
+These scripts are normally called "block-<script>".
 
 
 
@@ -204,7 +207,7 @@ Supported values:      iscsi:  nbd:  enb
 In xend and old versions of libxl it was necessary to specify the
 "script" (see above) with a prefix.  For compatibility, these four
 prefixes are recognised as specifying the corresponding script.  They
-are equivalent to "script=<script>".
+are equivalent to "script=block-<script>".
 
 
 <deprecated-prefix>:
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/hotplug/Linux/block	Fri Aug 03 11:59:12 2012 +0100
@@ -342,4 +342,4 @@ esac
 
 # If we've reached here, $t is neither phy nor file, so fire a helper script.
 [ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \
-  ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node
+  ${XEN_SCRIPT_DIR}/block-"$t" "$command"
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/check-xl-disk-parse
--- a/tools/libxl/check-xl-disk-parse	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/check-xl-disk-parse	Fri Aug 03 11:59:12 2012 +0100
@@ -142,5 +142,44 @@ disk: {
 
 EOF
 one 0 vdev=hdc,access=r,devtype=cdrom,format=empty
+one 0 vdev=hdc,access=r,devtype=cdrom
+
+expected <<EOF
+disk: {
+    "backend_domid": 0,
+    "pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost",
+    "vdev": "xvda",
+    "backend": "unknown",
+    "format": "raw",
+    "script": "block-iscsi",
+    "removable": 0,
+    "readwrite": 1,
+    "is_cdrom": 0
+}
+
+EOF
+
+# http://backdrift.org/xen-block-iscsi-script-with-multipath-support
+one 0 iscsi:iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost,xvda,w
+one 0 vdev=xvda,access=w,script=block-iscsi,target=iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost
+
+expected <<EOF
+disk: {
+    "backend_domid": 0,
+    "pdev_path": "app01",
+    "vdev": "hda",
+    "backend": "unknown",
+    "format": "raw",
+    "script": "block-drbd",
+    "removable": 0,
+    "readwrite": 1,
+    "is_cdrom": 0
+}
+
+EOF
+
+# http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html
+# http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html
+one 0 drbd:app01,hda,w
 
 complete
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Aug 03 11:59:12 2012 +0100
@@ -1796,9 +1796,9 @@ static void device_disk_add(libxl__egc *
     STATE_AO_GC(aodev->ao);
     flexarray_t *front = NULL;
     flexarray_t *back = NULL;
-    char *dev;
+    char *dev, *script;
     libxl__device *device;
-    int major, minor, rc;
+    int rc;
     libxl_ctx *ctx = gc->owner;
     xs_transaction_t t = XBT_NULL;
 
@@ -1833,13 +1833,6 @@ static void device_disk_add(libxl__egc *
             goto out_free;
         }
 
-        if (disk->script) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts"
-                       " not yet supported, sorry");
-            rc = ERROR_INVAL;
-            goto out_free;
-        }
-
         GCNEW(device);
         rc = libxl__device_from_disk(gc, domid, disk, device);
         if (rc != 0) {
@@ -1851,18 +1844,16 @@ static void device_disk_add(libxl__egc *
         switch (disk->backend) {
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
+
+                script = libxl__abs_path(gc, disk->script ?: "block",
+                                         libxl__xen_script_dir_path());
+
         do_backend_phy:
-                libxl__device_physdisk_major_minor(dev, &major, &minor);
-                flexarray_append(back, "physical-device");
-                flexarray_append(back, libxl__sprintf(gc, "%x:%x", major, minor));
-
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                flexarray_append(back, "script");
-                flexarray_append(back, GCSPRINTF("%s/%s",
-                                                 libxl__xen_script_dir_path(),
-                                                 "block"));
+                assert(script);
+                flexarray_append_pair(back, "script", script);
 
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
@@ -1879,10 +1870,12 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                flexarray_append(back, "script");
-                flexarray_append(back, GCSPRINTF("%s/%s",
-                                                 libxl__xen_script_dir_path(),
-                                                 "blktap"));
+                /*
+                 * tap devices do not support custom block scripts and
+                 * always use the plain block script.
+                 */
+                script = libxl__abs_path(gc, "block",
+                                         libxl__xen_script_dir_path());
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;
@@ -2582,13 +2575,10 @@ void libxl__device_nic_add(libxl__egc *e
     flexarray_append(back, "1");
     flexarray_append(back, "state");
     flexarray_append(back, libxl__sprintf(gc, "%d", 1));
-    if (nic->script) {
-        flexarray_append(back, "script");
-        flexarray_append(back, nic->script[0]=='/' ? nic->script
-                         : libxl__sprintf(gc, "%s/%s",
-                                          libxl__xen_script_dir_path(),
-                                          nic->script));
-    }
+    if (nic->script)
+        flexarray_append_pair(back, "script",
+                              libxl__abs_path(gc, nic->script,
+                                              libxl__xen_script_dir_path()));
 
     if (nic->ifname) {
         flexarray_append(back, "vifname");
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 11:59:12 2012 +0100
@@ -147,18 +147,26 @@ typedef struct {
 } disk_try_backend_args;
 
 static int disk_try_backend(disk_try_backend_args *a,
-                            libxl_disk_backend backend) {
+                            libxl_disk_backend backend)
+ {
+    libxl__gc *gc = a->gc;
     /* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or
      * backend on success */
-    libxl_ctx *ctx = libxl__gc_owner(a->gc);
+    libxl_ctx *ctx = libxl__gc_owner(gc);
+
     switch (backend) {
-
     case LIBXL_DISK_BACKEND_PHY:
         if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW ||
               a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) {
             goto bad_format;
         }
 
+        if (a->disk->script) {
+            LOG(DEBUG, "Disk vdev=%s, uses script=... assuming phy backend",
+                a->disk->vdev);
+            return backend;
+        }
+
         if (libxl__try_phy_backend(a->stab.st_mode))
             return backend;
 
@@ -168,6 +176,8 @@ static int disk_try_backend(disk_try_bac
         return 0;
 
     case LIBXL_DISK_BACKEND_TAP:
+        if (a->disk->script) goto bad_script;
+
         if (!libxl__blktap_enabled(a->gc)) {
             LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
                        " unsuitable because blktap not available",
@@ -181,6 +191,7 @@ static int disk_try_backend(disk_try_bac
         return backend;
 
     case LIBXL_DISK_BACKEND_QDISK:
+        if (a->disk->script) goto bad_script;
         return backend;
 
     default:
@@ -198,6 +209,11 @@ static int disk_try_backend(disk_try_bac
                libxl_disk_backend_to_string(backend),
                libxl_disk_format_to_string(a->disk->format));
     return 0;
+
+ bad_script:
+    LOG(DEBUG, "Disk vdev=%s, backend %s not compatible with script=...",
+        a->disk->vdev, libxl_disk_backend_to_string(backend));
+    return 0;
 }
 
 int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
@@ -220,7 +236,7 @@ int libxl__device_disk_set_backend(libxl
             return ERROR_INVAL;
         }
         memset(&a.stab, 0, sizeof(a.stab));
-    } else {
+    } else if (!disk->script) {
         if (stat(disk->pdev_path, &a.stab)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s "
                              "failed to stat: %s",
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxlu_disk_i.h
--- a/tools/libxl/libxlu_disk_i.h	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxlu_disk_i.h	Fri Aug 03 11:59:12 2012 +0100
@@ -1,8 +1,6 @@
 #ifndef LIBXLU_DISK_I_H
 #define LIBXLU_DISK_I_H
 
-#include "libxl_osdeps.h" /* must come before any other headers */
-
 #include "libxlu_internal.h"
 
 
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxlu_disk_l.c
--- a/tools/libxl/libxlu_disk_l.c	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.c	Fri Aug 03 11:59:12 2012 +0100
@@ -1,6 +1,10 @@
 #line 2 "libxlu_disk_l.c"
+#line 31 "libxlu_disk_l.l"
+#include "libxl_osdeps.h" /* must come before any other headers */
 
-#line 4 "libxlu_disk_l.c"
+
+
+#line 8 "libxlu_disk_l.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -379,77 +383,76 @@ static yyconst flex_int16_t yy_acclist[4
      8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
 
-       22,   24, 8193,   22, 8193,   22, 8193, 8213,   22, 8213,
-       22, 8213,   12,   22,   22,   22,   22,   22,   22,   22,
+       22,   22,   24, 8193,   22, 8193,   22, 8193, 8213,   22,
+     8213,   22, 8213,   12,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-     8213,   22, 8213,   22, 8213,   12,   22,   17, 8213,   22,
-    16405,   22,   22,   22,   22,   22,   22,   22, 8213,   22,
-    16405,   20, 8213,   22,16405,   22, 8205, 8213,   22,16397,
-    16405,   22,   22, 8208, 8213,   22,16400,16405,   22,   22,
-       22,   22,   17, 8213,   22,   17, 8213,   22,   17,   22,
-       17, 8213,   22,    3,   22,   22,   19, 8213,   22,16405,
-       22,   22,   22,   22,   20, 8213,   22,   20, 8213,   22,
+       22,   22, 8213,   22, 8213,   22, 8213,   12,   22,   17,
+     8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
+     8206, 8213,   22,16398,16405,   20, 8213,   22,16405,   22,
+     8205, 8213,   22,16397,16405,   22,   22, 8208, 8213,   22,
+    16400,16405,   22,   22,   22,   22,   17, 8213,   22,   17,
+     8213,   22,   17,   22,   17, 8213,   22,    3,   22,   22,
+       19, 8213,   22,16405,   22,   22, 8206, 8213,   22, 8206,
 
-       20,   22,   20, 8213, 8205, 8213,   22, 8205, 8213,   22,
-     8205,   22, 8205, 8213,   22, 8208, 8213,   22, 8208, 8213,
-       22, 8208,   22, 8208, 8213,   22,   22,    9,   22,   17,
-     8213,   22,   17, 8213,   22,   17, 8213,   17,   22,   17,
-       22,    3,   22,   22,   19, 8213,   22,   19, 8213,   22,
-       19,   22,   19, 8213,   22,   18, 8213,   22,16405, 8206,
-     8213,   22,16398,16405,   22,   20, 8213,   22,   20, 8213,
-       22,   20, 8213,   20,   22,   20, 8205, 8213,   22, 8205,
-     8213,   22, 8205, 8213, 8205,   22, 8205,   22, 8208, 8213,
-       22, 8208, 8213,   22, 8208, 8213, 8208,   22, 8208,   22,
+     8213,   22, 8206,   22, 8206, 8213,   20, 8213,   22,   20,
+     8213,   22,   20,   22,   20, 8213, 8205, 8213,   22, 8205,
+     8213,   22, 8205,   22, 8205, 8213,   22, 8208, 8213,   22,
+     8208, 8213,   22, 8208,   22, 8208, 8213,   22,   22,    9,
+       22,   17, 8213,   22,   17, 8213,   22,   17, 8213,   17,
+       22,   17,   22,    3,   22,   22,   19, 8213,   22,   19,
+     8213,   22,   19,   22,   19, 8213,   22,   18, 8213,   22,
+    16405, 8206, 8213,   22, 8206, 8213,   22, 8206, 8213, 8206,
+       22, 8206,   20, 8213,   22,   20, 8213,   22,   20, 8213,
+       20,   22,   20, 8205, 8213,   22, 8205, 8213,   22, 8205,
 
-       22,    9,   12,    9,    7,   22,   22,   19, 8213,   22,
-       19, 8213,   22,   19, 8213,   19,   22,   19,    2,   18,
-     8213,   22,   18, 8213,   22,   18,   22,   18, 8213, 8206,
-     8213,   22, 8206, 8213,   22, 8206,   22, 8206, 8213,   22,
-       10,   22,   11,    9,    9,   12,    7,   12,    7,   22,
-        6,    2,   12,    2,   18, 8213,   22,   18, 8213,   22,
-       18, 8213,   18,   22,   18, 8206, 8213,   22, 8206, 8213,
-       22, 8206, 8213, 8206,   22, 8206,   22,   10,   12,   10,
-       15, 8213,   22,16405,   11,   12,   11,    7,    7,   12,
-       22,    6,   12,    6,    6,   12,    6,   12,    2,    2,
+     8213, 8205,   22, 8205,   22, 8208, 8213,   22, 8208, 8213,
+       22, 8208, 8213, 8208,   22, 8208,   22,   22,    9,   12,
+        9,    7,   22,   22,   19, 8213,   22,   19, 8213,   22,
+       19, 8213,   19,   22,   19,    2,   18, 8213,   22,   18,
+     8213,   22,   18,   22,   18, 8213,   10,   22,   11,    9,
+        9,   12,    7,   12,    7,   22,    6,    2,   12,    2,
+       18, 8213,   22,   18, 8213,   22,   18, 8213,   18,   22,
+       18,   10,   12,   10,   15, 8213,   22,16405,   11,   12,
+       11,    7,    7,   12,   22,    6,   12,    6,    6,   12,
+        6,   12,    2,    2,   12,   10,   10,   12,   15, 8213,
 
-       12, 8206,   22,16398,   10,   10,   12,   15, 8213,   22,
-       15, 8213,   22,   15,   22,   15, 8213,   11,   12,   22,
-        6,    6,   12,    6,    6,   15, 8213,   22,   15, 8213,
-       22,   15, 8213,   15,   22,   15,   22,    6,    6,    8,
-        6,    5,    6,    8,   12,    8,    4,    6,    5,    6,
-        8,    8,   12,    4,    6
+       22,   15, 8213,   22,   15,   22,   15, 8213,   11,   12,
+       22,    6,    6,   12,    6,    6,   15, 8213,   22,   15,
+     8213,   22,   15, 8213,   15,   22,   15,   22,    6,    6,
+        8,    6,    5,    6,    8,   12,    8,    4,    6,    5,
+        6,    8,    8,   12,    4,    6
     } ;
 
-static yyconst flex_int16_t yy_accept[257] =
+static yyconst flex_int16_t yy_accept[252] =
     {   0,
         1,    1,    1,    2,    3,    4,    7,   12,   16,   19,
        21,   24,   27,   30,   33,   36,   39,   42,   45,   48,
        51,   54,   57,   60,   63,   66,   68,   69,   70,   71,
        73,   76,   78,   79,   80,   81,   84,   84,   85,   86,
        87,   88,   89,   90,   91,   92,   93,   94,   95,   96,
-       97,   98,   99,  100,  101,  102,  103,  105,  107,  108,
-      110,  112,  113,  114,  115,  116,  117,  118,  119,  120,
+       97,   98,   99,  100,  101,  102,  103,  104,  106,  108,
+      109,  111,  113,  114,  115,  116,  117,  118,  119,  120,
       121,  122,  123,  124,  125,  126,  127,  128,  129,  130,
-      131,  133,  135,  136,  137,  138,  142,  143,  144,  145,
-      146,  147,  148,  149,  152,  156,  157,  162,  163,  164,
+      131,  132,  133,  135,  137,  138,  139,  140,  144,  145,
+      146,  147,  148,  149,  150,  151,  156,  160,  161,  166,
 
-      169,  170,  171,  172,  173,  176,  179,  181,  183,  184,
-      186,  187,  191,  192,  193,  194,  195,  198,  201,  203,
-      205,  208,  211,  213,  215,  216,  219,  222,  224,  226,
-      227,  228,  229,  230,  233,  236,  238,  240,  241,  242,
-      244,  245,  248,  251,  253,  255,  256,  260,  265,  266,
-      269,  272,  274,  276,  277,  280,  283,  285,  287,  288,
-      289,  292,  295,  297,  299,  300,  301,  302,  304,  305,
-      306,  307,  308,  311,  314,  316,  318,  319,  320,  323,
-      326,  328,  330,  333,  336,  338,  340,  341,  342,  343,
-      344,  345,  347,  349,  350,  351,  352,  354,  355,  358,
+      167,  168,  173,  174,  175,  176,  177,  180,  183,  185,
+      187,  188,  190,  191,  195,  196,  197,  200,  203,  205,
+      207,  210,  213,  215,  217,  220,  223,  225,  227,  228,
+      231,  234,  236,  238,  239,  240,  241,  242,  245,  248,
+      250,  252,  253,  254,  256,  257,  260,  263,  265,  267,
+      268,  272,  275,  278,  280,  282,  283,  286,  289,  291,
+      293,  294,  297,  300,  302,  304,  305,  306,  309,  312,
+      314,  316,  317,  318,  319,  321,  322,  323,  324,  325,
+      328,  331,  333,  335,  336,  337,  340,  343,  345,  347,
+      348,  349,  350,  351,  353,  355,  356,  357,  358,  360,
 
-      361,  363,  365,  366,  369,  372,  374,  376,  377,  378,
-      380,  381,  385,  387,  388,  389,  391,  392,  394,  395,
-      397,  399,  400,  402,  405,  406,  408,  411,  414,  416,
-      418,  420,  421,  422,  424,  425,  426,  429,  432,  434,
-      436,  437,  438,  439,  440,  441,  442,  444,  446,  447,
-      449,  451,  452,  454,  456,  456
+      361,  364,  367,  369,  371,  372,  374,  375,  379,  381,
+      382,  383,  385,  386,  388,  389,  391,  393,  394,  396,
+      397,  399,  402,  405,  407,  409,  411,  412,  413,  415,
+      416,  417,  420,  423,  425,  427,  428,  429,  430,  431,
+      432,  433,  435,  437,  438,  440,  442,  443,  445,  447,
+      447
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -492,244 +495,238 @@ static yyconst flex_int32_t yy_meta[34] 
         1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[313] =
+static yyconst flex_int16_t yy_base[308] =
     {   0,
-        0,    0,  572,  560,  559,  551,   32,   35,  662,  662,
-       44,   62,   30,   40,   32,   50,  533,   49,   47,   59,
-       68,  525,   69,  517,   72,    0,  662,  515,  662,   83,
-       91,    0,    0,  100,  501,  109,    0,   78,   51,   86,
-       89,   74,   96,  105,  109,  110,  111,  112,  117,   73,
-      119,  118,  121,  120,  122,    0,  134,    0,    0,  138,
-        0,    0,  495,  130,  144,  129,  143,  145,  146,  147,
-      148,  149,  153,  154,  155,  158,  161,  165,  166,  170,
-      180,    0,    0,  662,  171,  201,  176,  175,  178,  183,
-      465,  182,  190,  455,  212,  188,  221,  208,  224,  234,
+        0,    0,  546,  538,  533,  521,   32,   35,  656,  656,
+       44,   62,   30,   41,   50,   51,  507,   64,   47,   66,
+       67,  499,   68,  487,   72,    0,  656,  465,  656,   87,
+       91,    0,    0,  100,  452,  109,    0,   74,   95,   87,
+       32,   96,  105,  110,   77,   97,   40,  113,  116,  112,
+      118,  120,  121,  122,  123,  125,    0,  137,    0,    0,
+      147,    0,    0,  449,  129,  126,  134,  143,  145,  147,
+      148,  149,  151,  153,  156,  160,  155,  167,  162,  175,
+      168,  159,  188,    0,    0,  656,  166,  197,  179,  185,
+      176,  200,  435,  186,  193,  216,  225,  205,  234,  221,
 
-      209,  230,  236,  221,  244,    0,  247,    0,  184,  248,
-      244,  269,  231,  247,  251,  258,  272,    0,  279,    0,
-      283,    0,  286,    0,  255,  290,    0,  293,    0,  270,
-      281,  455,  254,  297,    0,    0,    0,    0,  294,  662,
-      295,  308,    0,  310,    0,  257,  319,  328,  304,  331,
-        0,    0,    0,    0,  335,    0,    0,    0,    0,  316,
-      338,    0,    0,    0,    0,  333,  336,  447,  662,  429,
-      338,  340,  348,    0,    0,    0,    0,  428,  351,    0,
-      355,    0,  359,    0,  362,    0,  357,  427,  308,  369,
-      426,  662,  425,  662,  346,  365,  423,  662,  371,    0,
+      237,  247,  204,  230,  244,  213,  254,    0,  256,    0,
+      251,  258,  254,  279,  256,  259,  267,    0,  269,    0,
+      286,    0,  288,    0,  290,    0,  297,    0,  267,  299,
+        0,  301,    0,  288,  297,  421,  302,  310,    0,    0,
+        0,    0,  305,  656,  307,  319,    0,  321,    0,  322,
+      332,  335,    0,    0,    0,    0,  339,    0,    0,    0,
+        0,  342,    0,    0,    0,    0,  340,  349,    0,    0,
+        0,    0,  337,  345,  420,  656,  419,  346,  350,  358,
+        0,    0,    0,    0,  418,  360,    0,  362,    0,  417,
+      319,  369,  416,  656,  415,  656,  276,  364,  414,  656,
 
-        0,    0,    0,  378,    0,    0,    0,    0,  380,  421,
-      662,  388,  420,    0,  419,  662,  373,  418,  662,  372,
-      382,  417,  662,  398,  416,  662,  400,    0,  402,    0,
-        0,  385,  415,  662,  390,  275,  409,    0,    0,    0,
-        0,  405,  404,  406,  264,  412,  224,  129,  662,   87,
-      662,   47,  662,  662,  662,  434,  438,  441,  445,  449,
-      453,  457,  461,  465,  469,  473,  477,  481,  485,  489,
-      493,  497,  501,  505,  509,  513,  517,  521,  525,  529,
-      533,  537,  541,  545,  549,  553,  557,  561,  565,  569,
-      573,  577,  581,  585,  589,  593,  597,  601,  605,  609,
+      375,    0,    0,    0,    0,  413,  656,  384,  412,    0,
+      410,  656,  370,  409,  656,  370,  378,  408,  656,  366,
+      656,  394,    0,  396,    0,    0,  380,  316,  656,  377,
+      387,  398,    0,    0,    0,    0,  399,  402,  407,  271,
+      406,  228,  200,  656,  175,  656,   77,  656,  656,  656,
+      428,  432,  435,  439,  443,  447,  451,  455,  459,  463,
+      467,  471,  475,  479,  483,  487,  491,  495,  499,  503,
+      507,  511,  515,  519,  523,  527,  531,  535,  539,  543,
+      547,  551,  555,  559,  563,  567,  571,  575,  579,  583,
+      587,  591,  595,  599,  603,  607,  611,  615,  619,  623,
 
-      613,  617,  621,  625,  629,  633,  637,  641,  645,  649,
-      653,  657
+      627,  631,  635,  639,  643,  647,  651
     } ;
 
-static yyconst flex_int16_t yy_def[313] =
+static yyconst flex_int16_t yy_def[308] =
     {   0,
-      255,    1,  256,  256,  255,  257,  258,  258,  255,  255,
-      259,  259,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  260,  255,  257,  255,  261,
-      258,  262,  262,  263,   12,  257,  264,   12,   12,   12,
+      250,    1,  251,  251,  250,  252,  253,  253,  250,  250,
+      254,  254,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  255,  250,  252,  250,  256,
+      253,  257,  257,  258,   12,  252,  259,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  260,  261,  262,  262,  265,
-      266,  266,  255,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,  255,  256,  257,  257,
+      260,  261,  261,  250,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-      265,  266,  266,  255,   12,  267,   12,   12,   12,   12,
-       12,   12,   12,   36,  268,   12,  269,   12,   12,  270,
+       12,   12,  260,  261,  261,  250,   12,  262,   12,   12,
+       12,   12,   12,   12,   12,  263,  264,   12,  265,   12,
 
-       12,   12,   12,   12,  271,  272,  267,  272,   12,   12,
-       12,  273,   12,   12,   12,  257,  274,  275,  268,  275,
-      276,  277,  269,  277,   12,  278,  279,  270,  279,   12,
-       12,  280,   12,  271,  272,  272,  281,  281,   12,  255,
-       12,  282,  283,  273,  283,   12,  284,  285,  257,  274,
-      275,  275,  286,  286,  276,  277,  277,  287,  287,   12,
-      278,  279,  279,  288,  288,   12,   12,  289,  255,  290,
-       12,   12,  282,  283,  283,  291,  291,  292,  293,  294,
-      284,  294,  295,  296,  285,  296,  257,  297,   12,  298,
-      289,  255,  299,  255,   12,  300,  301,  255,  293,  294,
+       12,  266,   12,   12,   12,   12,  267,  268,  262,  268,
+       12,   12,   12,  269,   12,   12,  270,  271,  263,  271,
+      272,  273,  264,  273,  274,  275,  265,  275,   12,  276,
+      277,  266,  277,   12,   12,  278,   12,  267,  268,  268,
+      279,  279,   12,  250,   12,  280,  281,  269,  281,   12,
+      282,  270,  271,  271,  283,  283,  272,  273,  273,  284,
+      284,  274,  275,  275,  285,  285,   12,  276,  277,  277,
+      286,  286,   12,   12,  287,  250,  288,   12,   12,  280,
+      281,  281,  289,  289,  290,  291,  292,  282,  292,  293,
+       12,  294,  287,  250,  295,  250,   12,  296,  297,  250,
 
-      294,  302,  302,  295,  296,  296,  303,  303,  257,  304,
-      255,  305,  306,  306,  299,  255,   12,  307,  255,  307,
-      307,  301,  255,  285,  304,  255,  308,  309,  305,  309,
-      306,   12,  307,  255,  307,  307,  308,  309,  309,  310,
-      310,   12,  307,  307,  311,  307,  307,  312,  255,  307,
-      255,  312,  255,  255,    0,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      291,  292,  292,  298,  298,  299,  250,  300,  301,  301,
+      295,  250,   12,  302,  250,  302,  302,  297,  250,  299,
+      250,  303,  304,  300,  304,  301,   12,  302,  250,  302,
+      302,  303,  304,  304,  305,  305,   12,  302,  302,  306,
+      302,  302,  307,  250,  302,  250,  307,  250,  250,    0,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
 
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255
+      250,  250,  250,  250,  250,  250,  250
     } ;
 
-static yyconst flex_int16_t yy_nxt[696] =
+static yyconst flex_int16_t yy_nxt[690] =
     {   0,
         6,    7,    8,    9,    6,    6,    6,    6,   10,   11,
        12,   13,   14,   15,   16,   17,   17,   18,   17,   17,
        17,   17,   19,   17,   20,   21,   22,   23,   24,   17,
        25,   17,   17,   31,   31,   32,   31,   31,   32,   35,
        33,   35,   41,   33,   28,   28,   28,   29,   34,   35,
-      249,   36,   37,   42,   43,   38,   35,   48,   35,   35,
-       35,   39,   28,   28,   28,   29,   34,   44,   35,   36,
-       37,   40,   46,   45,   65,   49,   47,   35,   35,   50,
-       52,   35,   35,   35,   54,   28,   58,   35,   55,   64,
-      254,   59,   31,   31,   32,   35,   75,   66,   35,   33,
+       35,   36,   37,   73,   42,   38,   35,   49,   68,   35,
+       35,   39,   28,   28,   28,   29,   34,   43,   45,   36,
+       37,   40,   44,   35,   46,   35,   35,   35,   51,   53,
+      244,   35,   50,   35,   55,   65,   35,   47,   56,   28,
+       59,   48,   31,   31,   32,   60,   35,   71,   67,   33,
 
-       28,   28,   28,   29,   68,   35,   48,   28,   37,   60,
-       60,   60,   61,   60,   35,   67,   60,   62,   35,   35,
-       35,   35,   72,   71,   73,   69,   35,   35,   35,   35,
-       35,   35,  253,   80,   76,   70,   28,   58,   35,   35,
-       28,   82,   59,   85,   77,   78,   83,   79,   87,   74,
-       76,   86,   35,   35,   35,   35,   35,   35,   35,   90,
-       94,   95,   35,   35,   35,   97,   88,   35,   91,   92,
-       35,   99,  100,   89,   35,   35,   93,  101,   98,   35,
-       35,  102,   28,   82,   35,   35,   96,   35,   83,  109,
-      112,   35,   35,   35,   76,   97,  110,   35,  104,   35,
+       28,   28,   28,   29,   35,   35,   35,   28,   37,   61,
+       61,   61,   62,   61,   35,   70,   61,   63,   66,   35,
+       49,   35,   35,   72,   74,   35,   69,   35,   75,   35,
+       35,   35,   35,   88,   35,   35,   82,   78,   35,   28,
+       59,   77,   87,   35,   76,   60,   80,   79,   81,   28,
+       84,   78,   35,   89,   35,   85,   35,   35,   35,   75,
+       35,   92,   35,   96,   35,   35,   90,   97,   35,   35,
+       93,   35,   94,   91,   99,   35,   35,   35,  249,  100,
+       95,  101,  102,  104,   35,   35,   98,  103,   35,  105,
+       28,   84,  111,  106,   35,   35,   85,  107,  107,   61,
 
-      103,  105,  105,   60,  106,  105,  139,  115,  105,  108,
-      111,  114,  117,  117,   60,  118,  117,   35,   35,  117,
-      120,  121,  121,   60,  122,  121,  130,  251,  121,  124,
-       35,  100,  125,   35,  126,  126,   60,  127,  126,   35,
-       35,  126,  129,  131,  132,   35,   28,  135,  133,   28,
-      137,  140,  136,   35,  147,  138,   35,   35,  148,  146,
-       35,   29,  170,   35,   35,  178,   35,  249,  141,  142,
-      142,   60,  143,  142,   28,  151,  142,  145,  219,   35,
-      152,   28,  153,  160,  149,   28,  156,  154,   28,  158,
-       35,  157,   28,  162,  159,   28,  164,  166,  163,   28,
+      108,  107,   35,  248,  107,  110,  112,  114,  113,   35,
+       75,   78,   99,   35,   35,  116,  117,  117,   61,  118,
+      117,  134,   35,  117,  120,  121,  121,   61,  122,  121,
+       35,  246,  121,  124,  125,  125,   61,  126,  125,   35,
+      137,  125,  128,  135,  102,  129,   35,  130,  130,   61,
+      131,  130,  136,   35,  130,  133,   28,  139,   28,  141,
+       35,  144,  140,   35,  142,   35,  151,   35,   35,   28,
+      153,   28,  155,  143,  244,  154,   35,  156,  145,  146,
+      146,   61,  147,  146,  150,   35,  146,  149,   28,  158,
+       28,  160,   28,  163,  159,  167,  161,   35,  164,   28,
 
-      135,  165,  244,   35,   35,  136,  171,   29,  172,  167,
-       28,  174,   28,  176,  187,  212,  175,   35,  177,  179,
-      179,   60,  180,  179,  188,   35,  179,  182,  183,  183,
-       60,  184,  183,   28,  151,  183,  186,   28,  156,  152,
-       28,  162,   35,  157,  190,   35,  163,   35,  196,   35,
-       28,  174,  189,   28,  200,   35,  175,   28,  202,  201,
-       29,   28,  205,  203,   28,  207,  195,  206,  219,  209,
-      208,   63,  214,   28,  200,  234,  220,  221,  217,  201,
-       28,  205,   35,   29,  235,  234,  206,  224,  227,  227,
-       60,  228,  227,  219,   35,  227,  230,  232,  242,  236,
+      165,   28,  169,   28,  171,  166,   35,  170,  213,  172,
+      177,   35,   28,  139,   35,  173,   35,  178,  140,  215,
+      179,   28,  181,   28,  183,  174,  208,  182,   35,  184,
+      185,   35,  186,  186,   61,  187,  186,   28,  153,  186,
+      189,   28,  158,  154,   28,  163,   35,  159,  190,   35,
+      164,   28,  169,  192,   35,   35,  191,  170,  198,   35,
+       28,  181,   28,  202,   28,  204,  182,  215,  203,  207,
+      205,   64,  210,  229,  197,  216,  217,   28,  202,   35,
+      215,  229,  230,  203,  222,  222,   61,  223,  222,   35,
+      215,  222,  225,  237,  227,  231,   28,  233,   28,  235,
 
-       28,  207,   28,  238,   28,  240,  208,  219,  239,  219,
-      241,   28,  238,  245,   35,  219,  243,  239,  219,  211,
-      198,  234,  194,  231,  226,  247,  223,  246,  216,  169,
-      211,  198,  194,  250,   26,   26,   26,   26,   28,   28,
-       28,   30,   30,   30,   30,   35,   35,   35,   35,   56,
-      192,   56,   56,   57,   57,   57,   57,   59,  169,   59,
-       59,   34,   34,   34,   34,   63,   63,  116,   63,   81,
-       81,   81,   81,   83,  113,   83,   83,  107,  107,  107,
-      107,  119,  119,  119,  119,  123,  123,  123,  123,  128,
-      128,  128,  128,  134,  134,  134,  134,  136,   84,  136,
+       28,  233,  234,  238,  236,  215,  234,  240,   35,  215,
+      215,  200,  229,  196,  239,  226,  221,  219,  212,  176,
+      207,  200,  196,  194,  176,  241,  242,  245,   26,   26,
+       26,   26,   28,   28,   28,   30,   30,   30,   30,   35,
+       35,   35,   35,   57,  115,   57,   57,   58,   58,   58,
+       58,   60,   86,   60,   60,   34,   34,   34,   34,   64,
+       64,   35,   64,   83,   83,   83,   83,   85,   29,   85,
+       85,  109,  109,  109,  109,  119,  119,  119,  119,  123,
+      123,  123,  123,  127,  127,  127,  127,  132,  132,  132,
+      132,  138,  138,  138,  138,  140,   54,  140,  140,  148,
 
-      136,  144,  144,  144,  144,  150,  150,  150,  150,  152,
-       35,  152,  152,  155,  155,  155,  155,  157,   29,  157,
-      157,  161,  161,  161,  161,  163,   53,  163,  163,  168,
-      168,  168,  168,  138,   51,  138,  138,  173,  173,  173,
-      173,  175,   35,  175,  175,  181,  181,  181,  181,  185,
-      185,  185,  185,  154,   29,  154,  154,  159,  255,  159,
-      159,  165,   27,  165,  165,  191,  191,  191,  191,  193,
-      193,  193,  193,  177,   27,  177,  177,  197,  197,  197,
-      197,  199,  199,  199,  199,  201,  255,  201,  201,  204,
-      204,  204,  204,  206,  255,  206,  206,  210,  210,  210,
+      148,  148,  148,  152,  152,  152,  152,  154,   52,  154,
+      154,  157,  157,  157,  157,  159,   35,  159,  159,  162,
+      162,  162,  162,  164,   29,  164,  164,  168,  168,  168,
+      168,  170,  250,  170,  170,  175,  175,  175,  175,  142,
+       27,  142,  142,  180,  180,  180,  180,  182,   27,  182,
+      182,  188,  188,  188,  188,  156,  250,  156,  156,  161,
+      250,  161,  161,  166,  250,  166,  166,  172,  250,  172,
+      172,  193,  193,  193,  193,  195,  195,  195,  195,  184,
+      250,  184,  184,  199,  199,  199,  199,  201,  201,  201,
+      201,  203,  250,  203,  203,  206,  206,  206,  206,  209,
 
-      210,  213,  213,  213,  213,  215,  215,  215,  215,  218,
-      218,  218,  218,  222,  222,  222,  222,  203,  255,  203,
-      203,  208,  255,  208,  208,  225,  225,  225,  225,  229,
-      229,  229,  229,  214,  255,  214,  214,  233,  233,  233,
-      233,  237,  237,  237,  237,  239,  255,  239,  239,  241,
-      255,  241,  241,  248,  248,  248,  248,  252,  252,  252,
-      252,    5,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255
-
+      209,  209,  209,  211,  211,  211,  211,  214,  214,  214,
+      214,  218,  218,  218,  218,  205,  250,  205,  205,  220,
+      220,  220,  220,  224,  224,  224,  224,  210,  250,  210,
+      210,  228,  228,  228,  228,  232,  232,  232,  232,  234,
+      250,  234,  234,  236,  250,  236,  236,  243,  243,  243,
+      243,  247,  247,  247,  247,    5,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250
     } ;
 
-static yyconst flex_int16_t yy_chk[696] =
+static yyconst flex_int16_t yy_chk[690] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    7,    7,    7,    8,    8,    8,   13,
-        7,   15,   13,    8,   11,   11,   11,   11,   11,   14,
-      252,   11,   11,   14,   15,   11,   19,   19,   18,   16,
-       39,   11,   12,   12,   12,   12,   12,   16,   20,   12,
-       12,   12,   18,   16,   39,   20,   18,   21,   23,   21,
-       23,   25,   50,   42,   25,   30,   30,   38,   25,   38,
-      250,   30,   31,   31,   31,   40,   50,   40,   41,   31,
+        7,   41,   13,    8,   11,   11,   11,   11,   11,   47,
+       14,   11,   11,   47,   14,   11,   19,   19,   41,   15,
+       16,   11,   12,   12,   12,   12,   12,   14,   16,   12,
+       12,   12,   15,   18,   16,   20,   21,   23,   21,   23,
+      247,   25,   20,   38,   25,   38,   45,   18,   25,   30,
+       30,   18,   31,   31,   31,   30,   40,   45,   40,   31,
 
-       34,   34,   34,   34,   42,   43,   43,   34,   34,   36,
-       36,   36,   36,   36,   44,   41,   36,   36,   45,   46,
-       47,   48,   47,   46,   48,   44,   49,   52,   51,   54,
-       53,   55,  248,   54,   55,   45,   57,   57,   66,   64,
-       60,   60,   57,   64,   52,   53,   60,   53,   66,   49,
-       51,   65,   67,   65,   68,   69,   70,   71,   72,   69,
-       73,   74,   73,   74,   75,   76,   67,   76,   70,   71,
-       77,   78,   78,   68,   78,   79,   72,   78,   77,   80,
-       85,   79,   81,   81,   88,   87,   75,   89,   81,   87,
-       90,   92,   90,  109,   96,   96,   88,   96,   85,   93,
+       34,   34,   34,   34,   39,   42,   46,   34,   34,   36,
+       36,   36,   36,   36,   43,   43,   36,   36,   39,   44,
+       44,   50,   48,   46,   48,   49,   42,   51,   49,   52,
+       53,   54,   55,   66,   56,   66,   55,   56,   65,   58,
+       58,   51,   65,   67,   50,   58,   54,   53,   54,   61,
+       61,   52,   68,   67,   69,   61,   70,   71,   72,   70,
+       73,   71,   74,   75,   77,   75,   68,   76,   82,   76,
+       72,   79,   73,   69,   78,   87,   78,   81,  245,   79,
+       74,   80,   80,   81,   80,   91,   77,   80,   89,   82,
+       83,   83,   89,   87,   90,   94,   83,   88,   88,   88,
 
-       80,   86,   86,   86,   86,   86,  109,   93,   86,   86,
-       89,   92,   95,   95,   95,   95,   95,   98,  101,   95,
-       95,   97,   97,   97,   97,   97,  101,  247,   97,   97,
-      104,   99,   98,   99,  100,  100,  100,  100,  100,  102,
-      113,  100,  100,  102,  103,  103,  105,  105,  104,  107,
-      107,  110,  105,  111,  114,  107,  114,  110,  115,  113,
-      115,  116,  133,  133,  125,  146,  146,  245,  111,  112,
-      112,  112,  112,  112,  117,  117,  112,  112,  236,  130,
-      117,  119,  119,  125,  116,  121,  121,  119,  123,  123,
-      131,  121,  126,  126,  123,  128,  128,  130,  126,  134,
+       88,   88,   95,  243,   88,   88,   90,   92,   91,   92,
+       95,   98,   98,  103,   98,   94,   96,   96,   96,   96,
+       96,  103,  106,   96,   96,   97,   97,   97,   97,   97,
+      100,  242,   97,   97,   99,   99,   99,   99,   99,  104,
+      106,   99,   99,  104,  101,  100,  101,  102,  102,  102,
+      102,  102,  105,  105,  102,  102,  107,  107,  109,  109,
+      111,  112,  107,  113,  109,  115,  116,  112,  116,  117,
+      117,  119,  119,  111,  240,  117,  129,  119,  113,  114,
+      114,  114,  114,  114,  115,  197,  114,  114,  121,  121,
+      123,  123,  125,  125,  121,  129,  123,  134,  125,  127,
 
-      134,  128,  236,  139,  141,  134,  139,  149,  141,  131,
-      142,  142,  144,  144,  149,  189,  142,  189,  144,  147,
-      147,  147,  147,  147,  160,  160,  147,  147,  148,  148,
-      148,  148,  148,  150,  150,  148,  148,  155,  155,  150,
-      161,  161,  166,  155,  167,  167,  161,  171,  172,  172,
-      173,  173,  166,  179,  179,  195,  173,  181,  181,  179,
-      187,  183,  183,  181,  185,  185,  171,  183,  196,  187,
-      185,  190,  190,  199,  199,  220,  196,  196,  195,  199,
-      204,  204,  217,  209,  220,  221,  204,  209,  212,  212,
-      212,  212,  212,  235,  232,  212,  212,  217,  232,  221,
+      127,  130,  130,  132,  132,  127,  135,  130,  197,  132,
+      137,  137,  138,  138,  143,  134,  145,  143,  138,  228,
+      145,  146,  146,  148,  148,  135,  191,  146,  191,  148,
+      150,  150,  151,  151,  151,  151,  151,  152,  152,  151,
+      151,  157,  157,  152,  162,  162,  173,  157,  167,  167,
+      162,  168,  168,  174,  174,  178,  173,  168,  179,  179,
+      180,  180,  186,  186,  188,  188,  180,  198,  186,  220,
+      188,  192,  192,  216,  178,  198,  198,  201,  201,  213,
+      230,  217,  216,  201,  208,  208,  208,  208,  208,  227,
+      231,  208,  208,  227,  213,  217,  222,  222,  224,  224,
 
-      224,  224,  227,  227,  229,  229,  224,  243,  227,  244,
-      229,  237,  237,  242,  242,  246,  235,  237,  233,  225,
-      222,  218,  215,  213,  210,  244,  197,  243,  193,  191,
-      188,  178,  170,  246,  256,  256,  256,  256,  257,  257,
-      257,  258,  258,  258,  258,  259,  259,  259,  259,  260,
-      168,  260,  260,  261,  261,  261,  261,  262,  132,  262,
-      262,  263,  263,  263,  263,  264,  264,   94,  264,  265,
-      265,  265,  265,  266,   91,  266,  266,  267,  267,  267,
-      267,  268,  268,  268,  268,  269,  269,  269,  269,  270,
-      270,  270,  270,  271,  271,  271,  271,  272,   63,  272,
+      232,  232,  222,  230,  224,  238,  232,  237,  237,  241,
+      239,  218,  214,  211,  231,  209,  206,  199,  195,  193,
+      190,  185,  177,  175,  136,  238,  239,  241,  251,  251,
+      251,  251,  252,  252,  252,  253,  253,  253,  253,  254,
+      254,  254,  254,  255,   93,  255,  255,  256,  256,  256,
+      256,  257,   64,  257,  257,  258,  258,  258,  258,  259,
+      259,   35,  259,  260,  260,  260,  260,  261,   28,  261,
+      261,  262,  262,  262,  262,  263,  263,  263,  263,  264,
+      264,  264,  264,  265,  265,  265,  265,  266,  266,  266,
+      266,  267,  267,  267,  267,  268,   24,  268,  268,  269,
 
-      272,  273,  273,  273,  273,  274,  274,  274,  274,  275,
-       35,  275,  275,  276,  276,  276,  276,  277,   28,  277,
-      277,  278,  278,  278,  278,  279,   24,  279,  279,  280,
-      280,  280,  280,  281,   22,  281,  281,  282,  282,  282,
-      282,  283,   17,  283,  283,  284,  284,  284,  284,  285,
-      285,  285,  285,  286,    6,  286,  286,  287,    5,  287,
-      287,  288,    4,  288,  288,  289,  289,  289,  289,  290,
-      290,  290,  290,  291,    3,  291,  291,  292,  292,  292,
-      292,  293,  293,  293,  293,  294,    0,  294,  294,  295,
-      295,  295,  295,  296,    0,  296,  296,  297,  297,  297,
+      269,  269,  269,  270,  270,  270,  270,  271,   22,  271,
+      271,  272,  272,  272,  272,  273,   17,  273,  273,  274,
+      274,  274,  274,  275,    6,  275,  275,  276,  276,  276,
+      276,  277,    5,  277,  277,  278,  278,  278,  278,  279,
+        4,  279,  279,  280,  280,  280,  280,  281,    3,  281,
+      281,  282,  282,  282,  282,  283,    0,  283,  283,  284,
+        0,  284,  284,  285,    0,  285,  285,  286,    0,  286,
+      286,  287,  287,  287,  287,  288,  288,  288,  288,  289,
+        0,  289,  289,  290,  290,  290,  290,  291,  291,  291,
+      291,  292,    0,  292,  292,  293,  293,  293,  293,  294,
 
-      297,  298,  298,  298,  298,  299,  299,  299,  299,  300,
-      300,  300,  300,  301,  301,  301,  301,  302,    0,  302,
-      302,  303,    0,  303,  303,  304,  304,  304,  304,  305,
-      305,  305,  305,  306,    0,  306,  306,  307,  307,  307,
-      307,  308,  308,  308,  308,  309,    0,  309,  309,  310,
-        0,  310,  310,  311,  311,  311,  311,  312,  312,  312,
-      312,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255
-
+      294,  294,  294,  295,  295,  295,  295,  296,  296,  296,
+      296,  297,  297,  297,  297,  298,    0,  298,  298,  299,
+      299,  299,  299,  300,  300,  300,  300,  301,    0,  301,
+      301,  302,  302,  302,  302,  303,  303,  303,  303,  304,
+        0,  304,  304,  305,    0,  305,  305,  306,  306,  306,
+      306,  307,  307,  307,  307,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250
     } ;
 
 #define YY_TRAILING_MASK 0x2000
@@ -776,7 +773,8 @@ goto find_rule; \
  * syntax; if the target string has to contain "," or ":" the new
  * syntax's "target=" should be used.
  */
-#line 31 "libxlu_disk_l.l"
+
+#line 35 "libxlu_disk_l.l"
 #include "libxlu_disk_i.h"
 
 #define YY_NO_INPUT
@@ -885,7 +883,7 @@ static int vdev_and_devtype(DiskParseCon
 #define DPC ((DiskParseContext*)yyextra)
 
 
-#line 889 "libxlu_disk_l.c"
+#line 887 "libxlu_disk_l.c"
 
 #define INITIAL 0
 #define LEXERR 1
@@ -1121,12 +1119,12 @@ YY_DECL
 	register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 151 "libxlu_disk_l.l"
+#line 155 "libxlu_disk_l.l"
 
 
  /*----- the scanner rules which do the parsing -----*/
 
-#line 1130 "libxlu_disk_l.c"
+#line 1128 "libxlu_disk_l.c"
 
 	if ( !yyg->yy_init )
 		{
@@ -1320,7 +1318,7 @@ YY_RULE_SETUP
    * matched the whole string, so these patterns take precedence */
 case 13:
 YY_RULE_SETUP
-#line 185 "libxlu_disk_l.l"
+#line 189 "libxlu_disk_l.l"
 {
                     STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `[format=]...,'");
@@ -1354,7 +1352,7 @@ case 17:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 199 "libxlu_disk_l.l"
+#line 210 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 18:
@@ -1362,7 +1360,7 @@ case 18:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 200 "libxlu_disk_l.l"
+#line 211 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 19:
@@ -1370,7 +1368,7 @@ case 19:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 201 "libxlu_disk_l.l"
+#line 212 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 20:
@@ -1394,7 +1392,7 @@ YY_RULE_SETUP
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 211 "libxlu_disk_l.l"
+#line 222 "libxlu_disk_l.l"
 {
     STRIP(',');
 
@@ -1423,7 +1421,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 237 "libxlu_disk_l.l"
+#line 248 "libxlu_disk_l.l"
 {
     BEGIN(LEXERR);
     yymore();
@@ -2533,4 +2531,4 @@ void xlu__disk_yyfree (void * ptr , yysc
 
 #define YYTABLES_NAME "yytables"
 
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxlu_disk_l.h
--- a/tools/libxl/libxlu_disk_l.h	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.h	Fri Aug 03 11:59:12 2012 +0100
@@ -3,8 +3,12 @@
 #define xlu__disk_yyIN_HEADER 1
 
 #line 6 "libxlu_disk_l.h"
+#line 31 "libxlu_disk_l.l"
+#include "libxl_osdeps.h" /* must come before any other headers */
 
-#line 8 "libxlu_disk_l.h"
+
+
+#line 12 "libxlu_disk_l.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -340,8 +344,8 @@ extern int xlu__disk_yylex (yyscan_t yys
 #undef YY_DECL
 #endif
 
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
 
-#line 346 "libxlu_disk_l.h"
+#line 350 "libxlu_disk_l.h"
 #undef xlu__disk_yyIN_HEADER
 #endif /* xlu__disk_yyHEADER_H */
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxlu_disk_l.l
--- a/tools/libxl/libxlu_disk_l.l	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.l	Fri Aug 03 11:59:12 2012 +0100
@@ -27,6 +27,10 @@
  * syntax's "target=" should be used.
  */
 
+%top{
+#include "libxl_osdeps.h" /* must come before any other headers */
+}
+
 %{
 #include "libxlu_disk_i.h"
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 07 20:33:38 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 07 Aug 2012 20:33:38 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SyqTC-0005un-BR; Tue, 07 Aug 2012 20:33:38 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqTA-0005qu-GC
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:36 +0000
Received: from [85.158.143.99:43847] by server-1.bemta-4.messagelabs.com id
	1D/EB-24392-F9B71205; Tue, 07 Aug 2012 20:33:35 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1344371601!25420538!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22402 invoked from network); 7 Aug 2012 20:33:22 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	7 Aug 2012 20:33:22 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSv-00041e-GL
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SyqSv-0003LU-EQ
	for xen-changelog@lists.xensource.com; Tue, 07 Aug 2012 20:33:21 +0000
Message-Id: <E1SyqSv-0003LU-EQ@xenbits.xen.org>
Date: Tue, 07 Aug 2012 20:33:20 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: support custom block hotplug
	scripts
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1343991552 -3600
# Node ID a8d708fcb3474b7fc112de37b3064e9213d4de92
# Parent  4a1dde3b9dfe4572d222847cbe37a355d81b1986
libxl: support custom block hotplug scripts

These are provided using the "script=" syntax described in
docs/misc/xl-disk-configuration.txt.

The existing hotplug scripts currently conflate two different
concepts, namely that of making a datapath available in the backend
domain (logging into iSCSI LUNs and the like) and that of actually
connecting that datapath to a Xen backend path (e.g. writing
"physical-device" node in xenstore to bring up blkback).

For this reason the script support implemented here is only supported
in conjunction with backendtype=phy.

Eventually we hope to rework the hotplug scripts to separate the to
concepts, but that is not 4.2 material.

In addition there are some other subtleties:

 - Previously in the blktap case we would add "script = .../blktap" to
   the backend flex array, but then jumped to the PHY case which added
   "script = .../block" too. The block one takes precendence since it
   comes second.

   This was, accidentally, correct. The blktap script is for blktap1
   devices and not blktap2 devices. libxl completely manages the
   blktap2 side of things without resorting to hotplug scripts and
   creates a blkback device directly.  Therefore the "block" script is
   always the correct one to call. Custom script are not supported in
   this context.

 - libxl should not write the "physical-device" node. This is the
   responsibility of the block script. Writing the "physical-device"
   node in libxl basically completely short-cuts the standard block
   hotplug script which uses "physical-device" to know if it has run
   already or not.

   In the case of more complex scripts libxl cannot know the right
   value to write here anyway, in particular the device may not exist
   until after the script is called.

   This change has the side effect of re-enabling the checks for
   device sharing aspect of the default block script, which I have tested
   and which now cause libxl to properly abort now that libxl properly
   checks for hotplug script errors.

   There is no sharing check for blktap2 since even if you reuse the
   same vhd the resulting tap device is different. I would have preferred
   to simply write the "physical-device" node for the blktap2 case but
   the hotplug script infrastructure is not currently setup to handle
   LIBXL__DEVICE_KIND_VBD
   devices without a hotplug script (backendtype phy and tap both end
   up as KIND_VBD). Changing this was more surgery than I was happy doing
   for 4.2 and therefore I have simply hardcoded to the block script for
   the LIBXL_DISK_BACKEND_TAP case.

 - libxl__device_disk_set_backend running against a phy device with a
   script cannot stat the device to check its properties since it may
   not exist until the script is run. Therefore I have special cased
   this in disk_try_backend to simply assume that backend == phy is
   always ok if a script was
   configured.  Similarly the other backend types are always rejected
   if a script was configured.

   Note that the reason for implementing the default script behaviour
   in device_disk_add instead of libxl__device_disk_setdefault is
   because we need to be able to tell when the script was
   user-supplied rather than defaulted by libxl in order to correctly
   implement the above. The setdefault function must be idempotent so
   we cannot simply update disk->script.

   I suspect that for 4.3 a script member should be added to
   libxl__device, this would also help in the case above of handling
   devices with no script in a consistent manner. This is not 4.2
   material.

 - When the block script falls through and shells out to a block-$type
   script it used to pass "$node" however the only place this was
   assigned was in the remove+phy case (in which case it contains the
   file:// derived /dev/loopN device), and in that case the script
   exits without falling through to the block-$type case.

   Since libxl never creates a type other than phy this never happens
   in practice anyway and we now call the correct block-$type script
   directly.  But fix it up anyway since it is confusing.

 - The block-nbd and block-enbd scripts which we supply appear to be
   broken WRT the hotplug calling convention, in that they seem to
   expect a command line parameter (perhaps the $node described above)
   rather than reading the appropriate node from xenstore.

   I rather suspect this was broken by 7774:e2e7f47e6f79 in November
   2005. I think it is safe to say no one is using these scripts! I
   haven't fixed this here. It would be good to track down some working
   scripts and either incorproate them or defer to them in their existing
   home (e.g. if they live somewhere useful like the nbd tools
   package).

 - Added a few block script related entries to check-xl-disk-parse
   from http://backdrift.org/xen-block-iscsi-script-with-multipath-support
   and http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html /
   http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html (and
   snuck in another interesting empty CDROM case)

   This highlighted two bugs in the libxlu disk parser handling of the
   deprecated "<script>:" prefix:

   - It was failing to prefix with "block-" to construct the actual
     script name

   - The regex for matching iscsi or drdb or e?nbd was incorrect

 - Use libxl__abs_path for the nic script too. Just because the
   existing code nearly tricked me into repeating the mistake

I have tested with a custom block script which uses "lvchange -a" to
dynamically add remove the referenced device (simulates iSCSI
login/logout without requiring me to faff around setting up an iSCSI
target). I also tested on a blktap2 system.

I haven't directly tested anything more complex like iscsi: or nbd:
other than what check-xl-disk-parse exercises.

[ reran flex/bison -iwj ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 4a1dde3b9dfe -r a8d708fcb347 docs/misc/xl-disk-configuration.txt
--- a/docs/misc/xl-disk-configuration.txt	Fri Aug 03 11:57:10 2012 +0100
+++ b/docs/misc/xl-disk-configuration.txt	Fri Aug 03 11:59:12 2012 +0100
@@ -160,7 +160,10 @@ script=<script>
 ---------------
 
 Specifies that <target> is not a normal host path, but rather
-information to be interpreted by /etc/xen/scripts/block-<script>.
+information to be interpreted by the executable program <script>,
+(looked for in /etc/xen/scripts, if it doesn't contain a slash).
+
+These scripts are normally called "block-<script>".
 
 
 
@@ -204,7 +207,7 @@ Supported values:      iscsi:  nbd:  enb
 In xend and old versions of libxl it was necessary to specify the
 "script" (see above) with a prefix.  For compatibility, these four
 prefixes are recognised as specifying the corresponding script.  They
-are equivalent to "script=<script>".
+are equivalent to "script=block-<script>".
 
 
 <deprecated-prefix>:
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/hotplug/Linux/block
--- a/tools/hotplug/Linux/block	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/hotplug/Linux/block	Fri Aug 03 11:59:12 2012 +0100
@@ -342,4 +342,4 @@ esac
 
 # If we've reached here, $t is neither phy nor file, so fire a helper script.
 [ -x ${XEN_SCRIPT_DIR}/block-"$t" ] && \
-  ${XEN_SCRIPT_DIR}/block-"$t" "$command" $node
+  ${XEN_SCRIPT_DIR}/block-"$t" "$command"
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/check-xl-disk-parse
--- a/tools/libxl/check-xl-disk-parse	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/check-xl-disk-parse	Fri Aug 03 11:59:12 2012 +0100
@@ -142,5 +142,44 @@ disk: {
 
 EOF
 one 0 vdev=hdc,access=r,devtype=cdrom,format=empty
+one 0 vdev=hdc,access=r,devtype=cdrom
+
+expected <<EOF
+disk: {
+    "backend_domid": 0,
+    "pdev_path": "iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost",
+    "vdev": "xvda",
+    "backend": "unknown",
+    "format": "raw",
+    "script": "block-iscsi",
+    "removable": 0,
+    "readwrite": 1,
+    "is_cdrom": 0
+}
+
+EOF
+
+# http://backdrift.org/xen-block-iscsi-script-with-multipath-support
+one 0 iscsi:iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost,xvda,w
+one 0 vdev=xvda,access=w,script=block-iscsi,target=iqn.2001-05.com.equallogic:0-8a0906-23fe93404-c82797962054a96d-examplehost
+
+expected <<EOF
+disk: {
+    "backend_domid": 0,
+    "pdev_path": "app01",
+    "vdev": "hda",
+    "backend": "unknown",
+    "format": "raw",
+    "script": "block-drbd",
+    "removable": 0,
+    "readwrite": 1,
+    "is_cdrom": 0
+}
+
+EOF
+
+# http://lists.linbit.com/pipermail/drbd-user/2008-September/010221.html
+# http://www.drbd.org/users-guide-emb/s-xen-configure-domu.html
+one 0 drbd:app01,hda,w
 
 complete
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Aug 03 11:59:12 2012 +0100
@@ -1796,9 +1796,9 @@ static void device_disk_add(libxl__egc *
     STATE_AO_GC(aodev->ao);
     flexarray_t *front = NULL;
     flexarray_t *back = NULL;
-    char *dev;
+    char *dev, *script;
     libxl__device *device;
-    int major, minor, rc;
+    int rc;
     libxl_ctx *ctx = gc->owner;
     xs_transaction_t t = XBT_NULL;
 
@@ -1833,13 +1833,6 @@ static void device_disk_add(libxl__egc *
             goto out_free;
         }
 
-        if (disk->script) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts"
-                       " not yet supported, sorry");
-            rc = ERROR_INVAL;
-            goto out_free;
-        }
-
         GCNEW(device);
         rc = libxl__device_from_disk(gc, domid, disk, device);
         if (rc != 0) {
@@ -1851,18 +1844,16 @@ static void device_disk_add(libxl__egc *
         switch (disk->backend) {
             case LIBXL_DISK_BACKEND_PHY:
                 dev = disk->pdev_path;
+
+                script = libxl__abs_path(gc, disk->script ?: "block",
+                                         libxl__xen_script_dir_path());
+
         do_backend_phy:
-                libxl__device_physdisk_major_minor(dev, &major, &minor);
-                flexarray_append(back, "physical-device");
-                flexarray_append(back, libxl__sprintf(gc, "%x:%x", major, minor));
-
                 flexarray_append(back, "params");
                 flexarray_append(back, dev);
 
-                flexarray_append(back, "script");
-                flexarray_append(back, GCSPRINTF("%s/%s",
-                                                 libxl__xen_script_dir_path(),
-                                                 "block"));
+                assert(script);
+                flexarray_append_pair(back, "script", script);
 
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
                 break;
@@ -1879,10 +1870,12 @@ static void device_disk_add(libxl__egc *
                     libxl__device_disk_string_of_format(disk->format),
                     disk->pdev_path));
 
-                flexarray_append(back, "script");
-                flexarray_append(back, GCSPRINTF("%s/%s",
-                                                 libxl__xen_script_dir_path(),
-                                                 "blktap"));
+                /*
+                 * tap devices do not support custom block scripts and
+                 * always use the plain block script.
+                 */
+                script = libxl__abs_path(gc, "block",
+                                         libxl__xen_script_dir_path());
 
                 /* now create a phy device to export the device to the guest */
                 goto do_backend_phy;
@@ -2582,13 +2575,10 @@ void libxl__device_nic_add(libxl__egc *e
     flexarray_append(back, "1");
     flexarray_append(back, "state");
     flexarray_append(back, libxl__sprintf(gc, "%d", 1));
-    if (nic->script) {
-        flexarray_append(back, "script");
-        flexarray_append(back, nic->script[0]=='/' ? nic->script
-                         : libxl__sprintf(gc, "%s/%s",
-                                          libxl__xen_script_dir_path(),
-                                          nic->script));
-    }
+    if (nic->script)
+        flexarray_append_pair(back, "script",
+                              libxl__abs_path(gc, nic->script,
+                                              libxl__xen_script_dir_path()));
 
     if (nic->ifname) {
         flexarray_append(back, "vifname");
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxl_device.c	Fri Aug 03 11:59:12 2012 +0100
@@ -147,18 +147,26 @@ typedef struct {
 } disk_try_backend_args;
 
 static int disk_try_backend(disk_try_backend_args *a,
-                            libxl_disk_backend backend) {
+                            libxl_disk_backend backend)
+ {
+    libxl__gc *gc = a->gc;
     /* returns 0 (ie, DISK_BACKEND_UNKNOWN) on failure, or
      * backend on success */
-    libxl_ctx *ctx = libxl__gc_owner(a->gc);
+    libxl_ctx *ctx = libxl__gc_owner(gc);
+
     switch (backend) {
-
     case LIBXL_DISK_BACKEND_PHY:
         if (!(a->disk->format == LIBXL_DISK_FORMAT_RAW ||
               a->disk->format == LIBXL_DISK_FORMAT_EMPTY)) {
             goto bad_format;
         }
 
+        if (a->disk->script) {
+            LOG(DEBUG, "Disk vdev=%s, uses script=... assuming phy backend",
+                a->disk->vdev);
+            return backend;
+        }
+
         if (libxl__try_phy_backend(a->stab.st_mode))
             return backend;
 
@@ -168,6 +176,8 @@ static int disk_try_backend(disk_try_bac
         return 0;
 
     case LIBXL_DISK_BACKEND_TAP:
+        if (a->disk->script) goto bad_script;
+
         if (!libxl__blktap_enabled(a->gc)) {
             LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
                        " unsuitable because blktap not available",
@@ -181,6 +191,7 @@ static int disk_try_backend(disk_try_bac
         return backend;
 
     case LIBXL_DISK_BACKEND_QDISK:
+        if (a->disk->script) goto bad_script;
         return backend;
 
     default:
@@ -198,6 +209,11 @@ static int disk_try_backend(disk_try_bac
                libxl_disk_backend_to_string(backend),
                libxl_disk_format_to_string(a->disk->format));
     return 0;
+
+ bad_script:
+    LOG(DEBUG, "Disk vdev=%s, backend %s not compatible with script=...",
+        a->disk->vdev, libxl_disk_backend_to_string(backend));
+    return 0;
 }
 
 int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
@@ -220,7 +236,7 @@ int libxl__device_disk_set_backend(libxl
             return ERROR_INVAL;
         }
         memset(&a.stab, 0, sizeof(a.stab));
-    } else {
+    } else if (!disk->script) {
         if (stat(disk->pdev_path, &a.stab)) {
             LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "Disk vdev=%s "
                              "failed to stat: %s",
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxlu_disk_i.h
--- a/tools/libxl/libxlu_disk_i.h	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxlu_disk_i.h	Fri Aug 03 11:59:12 2012 +0100
@@ -1,8 +1,6 @@
 #ifndef LIBXLU_DISK_I_H
 #define LIBXLU_DISK_I_H
 
-#include "libxl_osdeps.h" /* must come before any other headers */
-
 #include "libxlu_internal.h"
 
 
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxlu_disk_l.c
--- a/tools/libxl/libxlu_disk_l.c	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.c	Fri Aug 03 11:59:12 2012 +0100
@@ -1,6 +1,10 @@
 #line 2 "libxlu_disk_l.c"
+#line 31 "libxlu_disk_l.l"
+#include "libxl_osdeps.h" /* must come before any other headers */
 
-#line 4 "libxlu_disk_l.c"
+
+
+#line 8 "libxlu_disk_l.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -379,77 +383,76 @@ static yyconst flex_int16_t yy_acclist[4
      8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
 
-       22,   24, 8193,   22, 8193,   22, 8193, 8213,   22, 8213,
-       22, 8213,   12,   22,   22,   22,   22,   22,   22,   22,
+       22,   22,   24, 8193,   22, 8193,   22, 8193, 8213,   22,
+     8213,   22, 8213,   12,   22,   22,   22,   22,   22,   22,
        22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
-     8213,   22, 8213,   22, 8213,   12,   22,   17, 8213,   22,
-    16405,   22,   22,   22,   22,   22,   22,   22, 8213,   22,
-    16405,   20, 8213,   22,16405,   22, 8205, 8213,   22,16397,
-    16405,   22,   22, 8208, 8213,   22,16400,16405,   22,   22,
-       22,   22,   17, 8213,   22,   17, 8213,   22,   17,   22,
-       17, 8213,   22,    3,   22,   22,   19, 8213,   22,16405,
-       22,   22,   22,   22,   20, 8213,   22,   20, 8213,   22,
+       22,   22, 8213,   22, 8213,   22, 8213,   12,   22,   17,
+     8213,   22,16405,   22,   22,   22,   22,   22,   22,   22,
+     8206, 8213,   22,16398,16405,   20, 8213,   22,16405,   22,
+     8205, 8213,   22,16397,16405,   22,   22, 8208, 8213,   22,
+    16400,16405,   22,   22,   22,   22,   17, 8213,   22,   17,
+     8213,   22,   17,   22,   17, 8213,   22,    3,   22,   22,
+       19, 8213,   22,16405,   22,   22, 8206, 8213,   22, 8206,
 
-       20,   22,   20, 8213, 8205, 8213,   22, 8205, 8213,   22,
-     8205,   22, 8205, 8213,   22, 8208, 8213,   22, 8208, 8213,
-       22, 8208,   22, 8208, 8213,   22,   22,    9,   22,   17,
-     8213,   22,   17, 8213,   22,   17, 8213,   17,   22,   17,
-       22,    3,   22,   22,   19, 8213,   22,   19, 8213,   22,
-       19,   22,   19, 8213,   22,   18, 8213,   22,16405, 8206,
-     8213,   22,16398,16405,   22,   20, 8213,   22,   20, 8213,
-       22,   20, 8213,   20,   22,   20, 8205, 8213,   22, 8205,
-     8213,   22, 8205, 8213, 8205,   22, 8205,   22, 8208, 8213,
-       22, 8208, 8213,   22, 8208, 8213, 8208,   22, 8208,   22,
+     8213,   22, 8206,   22, 8206, 8213,   20, 8213,   22,   20,
+     8213,   22,   20,   22,   20, 8213, 8205, 8213,   22, 8205,
+     8213,   22, 8205,   22, 8205, 8213,   22, 8208, 8213,   22,
+     8208, 8213,   22, 8208,   22, 8208, 8213,   22,   22,    9,
+       22,   17, 8213,   22,   17, 8213,   22,   17, 8213,   17,
+       22,   17,   22,    3,   22,   22,   19, 8213,   22,   19,
+     8213,   22,   19,   22,   19, 8213,   22,   18, 8213,   22,
+    16405, 8206, 8213,   22, 8206, 8213,   22, 8206, 8213, 8206,
+       22, 8206,   20, 8213,   22,   20, 8213,   22,   20, 8213,
+       20,   22,   20, 8205, 8213,   22, 8205, 8213,   22, 8205,
 
-       22,    9,   12,    9,    7,   22,   22,   19, 8213,   22,
-       19, 8213,   22,   19, 8213,   19,   22,   19,    2,   18,
-     8213,   22,   18, 8213,   22,   18,   22,   18, 8213, 8206,
-     8213,   22, 8206, 8213,   22, 8206,   22, 8206, 8213,   22,
-       10,   22,   11,    9,    9,   12,    7,   12,    7,   22,
-        6,    2,   12,    2,   18, 8213,   22,   18, 8213,   22,
-       18, 8213,   18,   22,   18, 8206, 8213,   22, 8206, 8213,
-       22, 8206, 8213, 8206,   22, 8206,   22,   10,   12,   10,
-       15, 8213,   22,16405,   11,   12,   11,    7,    7,   12,
-       22,    6,   12,    6,    6,   12,    6,   12,    2,    2,
+     8213, 8205,   22, 8205,   22, 8208, 8213,   22, 8208, 8213,
+       22, 8208, 8213, 8208,   22, 8208,   22,   22,    9,   12,
+        9,    7,   22,   22,   19, 8213,   22,   19, 8213,   22,
+       19, 8213,   19,   22,   19,    2,   18, 8213,   22,   18,
+     8213,   22,   18,   22,   18, 8213,   10,   22,   11,    9,
+        9,   12,    7,   12,    7,   22,    6,    2,   12,    2,
+       18, 8213,   22,   18, 8213,   22,   18, 8213,   18,   22,
+       18,   10,   12,   10,   15, 8213,   22,16405,   11,   12,
+       11,    7,    7,   12,   22,    6,   12,    6,    6,   12,
+        6,   12,    2,    2,   12,   10,   10,   12,   15, 8213,
 
-       12, 8206,   22,16398,   10,   10,   12,   15, 8213,   22,
-       15, 8213,   22,   15,   22,   15, 8213,   11,   12,   22,
-        6,    6,   12,    6,    6,   15, 8213,   22,   15, 8213,
-       22,   15, 8213,   15,   22,   15,   22,    6,    6,    8,
-        6,    5,    6,    8,   12,    8,    4,    6,    5,    6,
-        8,    8,   12,    4,    6
+       22,   15, 8213,   22,   15,   22,   15, 8213,   11,   12,
+       22,    6,    6,   12,    6,    6,   15, 8213,   22,   15,
+     8213,   22,   15, 8213,   15,   22,   15,   22,    6,    6,
+        8,    6,    5,    6,    8,   12,    8,    4,    6,    5,
+        6,    8,    8,   12,    4,    6
     } ;
 
-static yyconst flex_int16_t yy_accept[257] =
+static yyconst flex_int16_t yy_accept[252] =
     {   0,
         1,    1,    1,    2,    3,    4,    7,   12,   16,   19,
        21,   24,   27,   30,   33,   36,   39,   42,   45,   48,
        51,   54,   57,   60,   63,   66,   68,   69,   70,   71,
        73,   76,   78,   79,   80,   81,   84,   84,   85,   86,
        87,   88,   89,   90,   91,   92,   93,   94,   95,   96,
-       97,   98,   99,  100,  101,  102,  103,  105,  107,  108,
-      110,  112,  113,  114,  115,  116,  117,  118,  119,  120,
+       97,   98,   99,  100,  101,  102,  103,  104,  106,  108,
+      109,  111,  113,  114,  115,  116,  117,  118,  119,  120,
       121,  122,  123,  124,  125,  126,  127,  128,  129,  130,
-      131,  133,  135,  136,  137,  138,  142,  143,  144,  145,
-      146,  147,  148,  149,  152,  156,  157,  162,  163,  164,
+      131,  132,  133,  135,  137,  138,  139,  140,  144,  145,
+      146,  147,  148,  149,  150,  151,  156,  160,  161,  166,
 
-      169,  170,  171,  172,  173,  176,  179,  181,  183,  184,
-      186,  187,  191,  192,  193,  194,  195,  198,  201,  203,
-      205,  208,  211,  213,  215,  216,  219,  222,  224,  226,
-      227,  228,  229,  230,  233,  236,  238,  240,  241,  242,
-      244,  245,  248,  251,  253,  255,  256,  260,  265,  266,
-      269,  272,  274,  276,  277,  280,  283,  285,  287,  288,
-      289,  292,  295,  297,  299,  300,  301,  302,  304,  305,
-      306,  307,  308,  311,  314,  316,  318,  319,  320,  323,
-      326,  328,  330,  333,  336,  338,  340,  341,  342,  343,
-      344,  345,  347,  349,  350,  351,  352,  354,  355,  358,
+      167,  168,  173,  174,  175,  176,  177,  180,  183,  185,
+      187,  188,  190,  191,  195,  196,  197,  200,  203,  205,
+      207,  210,  213,  215,  217,  220,  223,  225,  227,  228,
+      231,  234,  236,  238,  239,  240,  241,  242,  245,  248,
+      250,  252,  253,  254,  256,  257,  260,  263,  265,  267,
+      268,  272,  275,  278,  280,  282,  283,  286,  289,  291,
+      293,  294,  297,  300,  302,  304,  305,  306,  309,  312,
+      314,  316,  317,  318,  319,  321,  322,  323,  324,  325,
+      328,  331,  333,  335,  336,  337,  340,  343,  345,  347,
+      348,  349,  350,  351,  353,  355,  356,  357,  358,  360,
 
-      361,  363,  365,  366,  369,  372,  374,  376,  377,  378,
-      380,  381,  385,  387,  388,  389,  391,  392,  394,  395,
-      397,  399,  400,  402,  405,  406,  408,  411,  414,  416,
-      418,  420,  421,  422,  424,  425,  426,  429,  432,  434,
-      436,  437,  438,  439,  440,  441,  442,  444,  446,  447,
-      449,  451,  452,  454,  456,  456
+      361,  364,  367,  369,  371,  372,  374,  375,  379,  381,
+      382,  383,  385,  386,  388,  389,  391,  393,  394,  396,
+      397,  399,  402,  405,  407,  409,  411,  412,  413,  415,
+      416,  417,  420,  423,  425,  427,  428,  429,  430,  431,
+      432,  433,  435,  437,  438,  440,  442,  443,  445,  447,
+      447
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -492,244 +495,238 @@ static yyconst flex_int32_t yy_meta[34] 
         1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[313] =
+static yyconst flex_int16_t yy_base[308] =
     {   0,
-        0,    0,  572,  560,  559,  551,   32,   35,  662,  662,
-       44,   62,   30,   40,   32,   50,  533,   49,   47,   59,
-       68,  525,   69,  517,   72,    0,  662,  515,  662,   83,
-       91,    0,    0,  100,  501,  109,    0,   78,   51,   86,
-       89,   74,   96,  105,  109,  110,  111,  112,  117,   73,
-      119,  118,  121,  120,  122,    0,  134,    0,    0,  138,
-        0,    0,  495,  130,  144,  129,  143,  145,  146,  147,
-      148,  149,  153,  154,  155,  158,  161,  165,  166,  170,
-      180,    0,    0,  662,  171,  201,  176,  175,  178,  183,
-      465,  182,  190,  455,  212,  188,  221,  208,  224,  234,
+        0,    0,  546,  538,  533,  521,   32,   35,  656,  656,
+       44,   62,   30,   41,   50,   51,  507,   64,   47,   66,
+       67,  499,   68,  487,   72,    0,  656,  465,  656,   87,
+       91,    0,    0,  100,  452,  109,    0,   74,   95,   87,
+       32,   96,  105,  110,   77,   97,   40,  113,  116,  112,
+      118,  120,  121,  122,  123,  125,    0,  137,    0,    0,
+      147,    0,    0,  449,  129,  126,  134,  143,  145,  147,
+      148,  149,  151,  153,  156,  160,  155,  167,  162,  175,
+      168,  159,  188,    0,    0,  656,  166,  197,  179,  185,
+      176,  200,  435,  186,  193,  216,  225,  205,  234,  221,
 
-      209,  230,  236,  221,  244,    0,  247,    0,  184,  248,
-      244,  269,  231,  247,  251,  258,  272,    0,  279,    0,
-      283,    0,  286,    0,  255,  290,    0,  293,    0,  270,
-      281,  455,  254,  297,    0,    0,    0,    0,  294,  662,
-      295,  308,    0,  310,    0,  257,  319,  328,  304,  331,
-        0,    0,    0,    0,  335,    0,    0,    0,    0,  316,
-      338,    0,    0,    0,    0,  333,  336,  447,  662,  429,
-      338,  340,  348,    0,    0,    0,    0,  428,  351,    0,
-      355,    0,  359,    0,  362,    0,  357,  427,  308,  369,
-      426,  662,  425,  662,  346,  365,  423,  662,  371,    0,
+      237,  247,  204,  230,  244,  213,  254,    0,  256,    0,
+      251,  258,  254,  279,  256,  259,  267,    0,  269,    0,
+      286,    0,  288,    0,  290,    0,  297,    0,  267,  299,
+        0,  301,    0,  288,  297,  421,  302,  310,    0,    0,
+        0,    0,  305,  656,  307,  319,    0,  321,    0,  322,
+      332,  335,    0,    0,    0,    0,  339,    0,    0,    0,
+        0,  342,    0,    0,    0,    0,  340,  349,    0,    0,
+        0,    0,  337,  345,  420,  656,  419,  346,  350,  358,
+        0,    0,    0,    0,  418,  360,    0,  362,    0,  417,
+      319,  369,  416,  656,  415,  656,  276,  364,  414,  656,
 
-        0,    0,    0,  378,    0,    0,    0,    0,  380,  421,
-      662,  388,  420,    0,  419,  662,  373,  418,  662,  372,
-      382,  417,  662,  398,  416,  662,  400,    0,  402,    0,
-        0,  385,  415,  662,  390,  275,  409,    0,    0,    0,
-        0,  405,  404,  406,  264,  412,  224,  129,  662,   87,
-      662,   47,  662,  662,  662,  434,  438,  441,  445,  449,
-      453,  457,  461,  465,  469,  473,  477,  481,  485,  489,
-      493,  497,  501,  505,  509,  513,  517,  521,  525,  529,
-      533,  537,  541,  545,  549,  553,  557,  561,  565,  569,
-      573,  577,  581,  585,  589,  593,  597,  601,  605,  609,
+      375,    0,    0,    0,    0,  413,  656,  384,  412,    0,
+      410,  656,  370,  409,  656,  370,  378,  408,  656,  366,
+      656,  394,    0,  396,    0,    0,  380,  316,  656,  377,
+      387,  398,    0,    0,    0,    0,  399,  402,  407,  271,
+      406,  228,  200,  656,  175,  656,   77,  656,  656,  656,
+      428,  432,  435,  439,  443,  447,  451,  455,  459,  463,
+      467,  471,  475,  479,  483,  487,  491,  495,  499,  503,
+      507,  511,  515,  519,  523,  527,  531,  535,  539,  543,
+      547,  551,  555,  559,  563,  567,  571,  575,  579,  583,
+      587,  591,  595,  599,  603,  607,  611,  615,  619,  623,
 
-      613,  617,  621,  625,  629,  633,  637,  641,  645,  649,
-      653,  657
+      627,  631,  635,  639,  643,  647,  651
     } ;
 
-static yyconst flex_int16_t yy_def[313] =
+static yyconst flex_int16_t yy_def[308] =
     {   0,
-      255,    1,  256,  256,  255,  257,  258,  258,  255,  255,
-      259,  259,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  260,  255,  257,  255,  261,
-      258,  262,  262,  263,   12,  257,  264,   12,   12,   12,
+      250,    1,  251,  251,  250,  252,  253,  253,  250,  250,
+      254,  254,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,  255,  250,  252,  250,  256,
+      253,  257,  257,  258,   12,  252,  259,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,   12,   12,  260,  261,  262,  262,  265,
-      266,  266,  255,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,  255,  256,  257,  257,
+      260,  261,  261,  250,   12,   12,   12,   12,   12,   12,
        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
-      265,  266,  266,  255,   12,  267,   12,   12,   12,   12,
-       12,   12,   12,   36,  268,   12,  269,   12,   12,  270,
+       12,   12,  260,  261,  261,  250,   12,  262,   12,   12,
+       12,   12,   12,   12,   12,  263,  264,   12,  265,   12,
 
-       12,   12,   12,   12,  271,  272,  267,  272,   12,   12,
-       12,  273,   12,   12,   12,  257,  274,  275,  268,  275,
-      276,  277,  269,  277,   12,  278,  279,  270,  279,   12,
-       12,  280,   12,  271,  272,  272,  281,  281,   12,  255,
-       12,  282,  283,  273,  283,   12,  284,  285,  257,  274,
-      275,  275,  286,  286,  276,  277,  277,  287,  287,   12,
-      278,  279,  279,  288,  288,   12,   12,  289,  255,  290,
-       12,   12,  282,  283,  283,  291,  291,  292,  293,  294,
-      284,  294,  295,  296,  285,  296,  257,  297,   12,  298,
-      289,  255,  299,  255,   12,  300,  301,  255,  293,  294,
+       12,  266,   12,   12,   12,   12,  267,  268,  262,  268,
+       12,   12,   12,  269,   12,   12,  270,  271,  263,  271,
+      272,  273,  264,  273,  274,  275,  265,  275,   12,  276,
+      277,  266,  277,   12,   12,  278,   12,  267,  268,  268,
+      279,  279,   12,  250,   12,  280,  281,  269,  281,   12,
+      282,  270,  271,  271,  283,  283,  272,  273,  273,  284,
+      284,  274,  275,  275,  285,  285,   12,  276,  277,  277,
+      286,  286,   12,   12,  287,  250,  288,   12,   12,  280,
+      281,  281,  289,  289,  290,  291,  292,  282,  292,  293,
+       12,  294,  287,  250,  295,  250,   12,  296,  297,  250,
 
-      294,  302,  302,  295,  296,  296,  303,  303,  257,  304,
-      255,  305,  306,  306,  299,  255,   12,  307,  255,  307,
-      307,  301,  255,  285,  304,  255,  308,  309,  305,  309,
-      306,   12,  307,  255,  307,  307,  308,  309,  309,  310,
-      310,   12,  307,  307,  311,  307,  307,  312,  255,  307,
-      255,  312,  255,  255,    0,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      291,  292,  292,  298,  298,  299,  250,  300,  301,  301,
+      295,  250,   12,  302,  250,  302,  302,  297,  250,  299,
+      250,  303,  304,  300,  304,  301,   12,  302,  250,  302,
+      302,  303,  304,  304,  305,  305,   12,  302,  302,  306,
+      302,  302,  307,  250,  302,  250,  307,  250,  250,    0,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
 
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255
+      250,  250,  250,  250,  250,  250,  250
     } ;
 
-static yyconst flex_int16_t yy_nxt[696] =
+static yyconst flex_int16_t yy_nxt[690] =
     {   0,
         6,    7,    8,    9,    6,    6,    6,    6,   10,   11,
        12,   13,   14,   15,   16,   17,   17,   18,   17,   17,
        17,   17,   19,   17,   20,   21,   22,   23,   24,   17,
        25,   17,   17,   31,   31,   32,   31,   31,   32,   35,
        33,   35,   41,   33,   28,   28,   28,   29,   34,   35,
-      249,   36,   37,   42,   43,   38,   35,   48,   35,   35,
-       35,   39,   28,   28,   28,   29,   34,   44,   35,   36,
-       37,   40,   46,   45,   65,   49,   47,   35,   35,   50,
-       52,   35,   35,   35,   54,   28,   58,   35,   55,   64,
-      254,   59,   31,   31,   32,   35,   75,   66,   35,   33,
+       35,   36,   37,   73,   42,   38,   35,   49,   68,   35,
+       35,   39,   28,   28,   28,   29,   34,   43,   45,   36,
+       37,   40,   44,   35,   46,   35,   35,   35,   51,   53,
+      244,   35,   50,   35,   55,   65,   35,   47,   56,   28,
+       59,   48,   31,   31,   32,   60,   35,   71,   67,   33,
 
-       28,   28,   28,   29,   68,   35,   48,   28,   37,   60,
-       60,   60,   61,   60,   35,   67,   60,   62,   35,   35,
-       35,   35,   72,   71,   73,   69,   35,   35,   35,   35,
-       35,   35,  253,   80,   76,   70,   28,   58,   35,   35,
-       28,   82,   59,   85,   77,   78,   83,   79,   87,   74,
-       76,   86,   35,   35,   35,   35,   35,   35,   35,   90,
-       94,   95,   35,   35,   35,   97,   88,   35,   91,   92,
-       35,   99,  100,   89,   35,   35,   93,  101,   98,   35,
-       35,  102,   28,   82,   35,   35,   96,   35,   83,  109,
-      112,   35,   35,   35,   76,   97,  110,   35,  104,   35,
+       28,   28,   28,   29,   35,   35,   35,   28,   37,   61,
+       61,   61,   62,   61,   35,   70,   61,   63,   66,   35,
+       49,   35,   35,   72,   74,   35,   69,   35,   75,   35,
+       35,   35,   35,   88,   35,   35,   82,   78,   35,   28,
+       59,   77,   87,   35,   76,   60,   80,   79,   81,   28,
+       84,   78,   35,   89,   35,   85,   35,   35,   35,   75,
+       35,   92,   35,   96,   35,   35,   90,   97,   35,   35,
+       93,   35,   94,   91,   99,   35,   35,   35,  249,  100,
+       95,  101,  102,  104,   35,   35,   98,  103,   35,  105,
+       28,   84,  111,  106,   35,   35,   85,  107,  107,   61,
 
-      103,  105,  105,   60,  106,  105,  139,  115,  105,  108,
-      111,  114,  117,  117,   60,  118,  117,   35,   35,  117,
-      120,  121,  121,   60,  122,  121,  130,  251,  121,  124,
-       35,  100,  125,   35,  126,  126,   60,  127,  126,   35,
-       35,  126,  129,  131,  132,   35,   28,  135,  133,   28,
-      137,  140,  136,   35,  147,  138,   35,   35,  148,  146,
-       35,   29,  170,   35,   35,  178,   35,  249,  141,  142,
-      142,   60,  143,  142,   28,  151,  142,  145,  219,   35,
-      152,   28,  153,  160,  149,   28,  156,  154,   28,  158,
-       35,  157,   28,  162,  159,   28,  164,  166,  163,   28,
+      108,  107,   35,  248,  107,  110,  112,  114,  113,   35,
+       75,   78,   99,   35,   35,  116,  117,  117,   61,  118,
+      117,  134,   35,  117,  120,  121,  121,   61,  122,  121,
+       35,  246,  121,  124,  125,  125,   61,  126,  125,   35,
+      137,  125,  128,  135,  102,  129,   35,  130,  130,   61,
+      131,  130,  136,   35,  130,  133,   28,  139,   28,  141,
+       35,  144,  140,   35,  142,   35,  151,   35,   35,   28,
+      153,   28,  155,  143,  244,  154,   35,  156,  145,  146,
+      146,   61,  147,  146,  150,   35,  146,  149,   28,  158,
+       28,  160,   28,  163,  159,  167,  161,   35,  164,   28,
 
-      135,  165,  244,   35,   35,  136,  171,   29,  172,  167,
-       28,  174,   28,  176,  187,  212,  175,   35,  177,  179,
-      179,   60,  180,  179,  188,   35,  179,  182,  183,  183,
-       60,  184,  183,   28,  151,  183,  186,   28,  156,  152,
-       28,  162,   35,  157,  190,   35,  163,   35,  196,   35,
-       28,  174,  189,   28,  200,   35,  175,   28,  202,  201,
-       29,   28,  205,  203,   28,  207,  195,  206,  219,  209,
-      208,   63,  214,   28,  200,  234,  220,  221,  217,  201,
-       28,  205,   35,   29,  235,  234,  206,  224,  227,  227,
-       60,  228,  227,  219,   35,  227,  230,  232,  242,  236,
+      165,   28,  169,   28,  171,  166,   35,  170,  213,  172,
+      177,   35,   28,  139,   35,  173,   35,  178,  140,  215,
+      179,   28,  181,   28,  183,  174,  208,  182,   35,  184,
+      185,   35,  186,  186,   61,  187,  186,   28,  153,  186,
+      189,   28,  158,  154,   28,  163,   35,  159,  190,   35,
+      164,   28,  169,  192,   35,   35,  191,  170,  198,   35,
+       28,  181,   28,  202,   28,  204,  182,  215,  203,  207,
+      205,   64,  210,  229,  197,  216,  217,   28,  202,   35,
+      215,  229,  230,  203,  222,  222,   61,  223,  222,   35,
+      215,  222,  225,  237,  227,  231,   28,  233,   28,  235,
 
-       28,  207,   28,  238,   28,  240,  208,  219,  239,  219,
-      241,   28,  238,  245,   35,  219,  243,  239,  219,  211,
-      198,  234,  194,  231,  226,  247,  223,  246,  216,  169,
-      211,  198,  194,  250,   26,   26,   26,   26,   28,   28,
-       28,   30,   30,   30,   30,   35,   35,   35,   35,   56,
-      192,   56,   56,   57,   57,   57,   57,   59,  169,   59,
-       59,   34,   34,   34,   34,   63,   63,  116,   63,   81,
-       81,   81,   81,   83,  113,   83,   83,  107,  107,  107,
-      107,  119,  119,  119,  119,  123,  123,  123,  123,  128,
-      128,  128,  128,  134,  134,  134,  134,  136,   84,  136,
+       28,  233,  234,  238,  236,  215,  234,  240,   35,  215,
+      215,  200,  229,  196,  239,  226,  221,  219,  212,  176,
+      207,  200,  196,  194,  176,  241,  242,  245,   26,   26,
+       26,   26,   28,   28,   28,   30,   30,   30,   30,   35,
+       35,   35,   35,   57,  115,   57,   57,   58,   58,   58,
+       58,   60,   86,   60,   60,   34,   34,   34,   34,   64,
+       64,   35,   64,   83,   83,   83,   83,   85,   29,   85,
+       85,  109,  109,  109,  109,  119,  119,  119,  119,  123,
+      123,  123,  123,  127,  127,  127,  127,  132,  132,  132,
+      132,  138,  138,  138,  138,  140,   54,  140,  140,  148,
 
-      136,  144,  144,  144,  144,  150,  150,  150,  150,  152,
-       35,  152,  152,  155,  155,  155,  155,  157,   29,  157,
-      157,  161,  161,  161,  161,  163,   53,  163,  163,  168,
-      168,  168,  168,  138,   51,  138,  138,  173,  173,  173,
-      173,  175,   35,  175,  175,  181,  181,  181,  181,  185,
-      185,  185,  185,  154,   29,  154,  154,  159,  255,  159,
-      159,  165,   27,  165,  165,  191,  191,  191,  191,  193,
-      193,  193,  193,  177,   27,  177,  177,  197,  197,  197,
-      197,  199,  199,  199,  199,  201,  255,  201,  201,  204,
-      204,  204,  204,  206,  255,  206,  206,  210,  210,  210,
+      148,  148,  148,  152,  152,  152,  152,  154,   52,  154,
+      154,  157,  157,  157,  157,  159,   35,  159,  159,  162,
+      162,  162,  162,  164,   29,  164,  164,  168,  168,  168,
+      168,  170,  250,  170,  170,  175,  175,  175,  175,  142,
+       27,  142,  142,  180,  180,  180,  180,  182,   27,  182,
+      182,  188,  188,  188,  188,  156,  250,  156,  156,  161,
+      250,  161,  161,  166,  250,  166,  166,  172,  250,  172,
+      172,  193,  193,  193,  193,  195,  195,  195,  195,  184,
+      250,  184,  184,  199,  199,  199,  199,  201,  201,  201,
+      201,  203,  250,  203,  203,  206,  206,  206,  206,  209,
 
-      210,  213,  213,  213,  213,  215,  215,  215,  215,  218,
-      218,  218,  218,  222,  222,  222,  222,  203,  255,  203,
-      203,  208,  255,  208,  208,  225,  225,  225,  225,  229,
-      229,  229,  229,  214,  255,  214,  214,  233,  233,  233,
-      233,  237,  237,  237,  237,  239,  255,  239,  239,  241,
-      255,  241,  241,  248,  248,  248,  248,  252,  252,  252,
-      252,    5,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255
-
+      209,  209,  209,  211,  211,  211,  211,  214,  214,  214,
+      214,  218,  218,  218,  218,  205,  250,  205,  205,  220,
+      220,  220,  220,  224,  224,  224,  224,  210,  250,  210,
+      210,  228,  228,  228,  228,  232,  232,  232,  232,  234,
+      250,  234,  234,  236,  250,  236,  236,  243,  243,  243,
+      243,  247,  247,  247,  247,    5,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250
     } ;
 
-static yyconst flex_int16_t yy_chk[696] =
+static yyconst flex_int16_t yy_chk[690] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    7,    7,    7,    8,    8,    8,   13,
-        7,   15,   13,    8,   11,   11,   11,   11,   11,   14,
-      252,   11,   11,   14,   15,   11,   19,   19,   18,   16,
-       39,   11,   12,   12,   12,   12,   12,   16,   20,   12,
-       12,   12,   18,   16,   39,   20,   18,   21,   23,   21,
-       23,   25,   50,   42,   25,   30,   30,   38,   25,   38,
-      250,   30,   31,   31,   31,   40,   50,   40,   41,   31,
+        7,   41,   13,    8,   11,   11,   11,   11,   11,   47,
+       14,   11,   11,   47,   14,   11,   19,   19,   41,   15,
+       16,   11,   12,   12,   12,   12,   12,   14,   16,   12,
+       12,   12,   15,   18,   16,   20,   21,   23,   21,   23,
+      247,   25,   20,   38,   25,   38,   45,   18,   25,   30,
+       30,   18,   31,   31,   31,   30,   40,   45,   40,   31,
 
-       34,   34,   34,   34,   42,   43,   43,   34,   34,   36,
-       36,   36,   36,   36,   44,   41,   36,   36,   45,   46,
-       47,   48,   47,   46,   48,   44,   49,   52,   51,   54,
-       53,   55,  248,   54,   55,   45,   57,   57,   66,   64,
-       60,   60,   57,   64,   52,   53,   60,   53,   66,   49,
-       51,   65,   67,   65,   68,   69,   70,   71,   72,   69,
-       73,   74,   73,   74,   75,   76,   67,   76,   70,   71,
-       77,   78,   78,   68,   78,   79,   72,   78,   77,   80,
-       85,   79,   81,   81,   88,   87,   75,   89,   81,   87,
-       90,   92,   90,  109,   96,   96,   88,   96,   85,   93,
+       34,   34,   34,   34,   39,   42,   46,   34,   34,   36,
+       36,   36,   36,   36,   43,   43,   36,   36,   39,   44,
+       44,   50,   48,   46,   48,   49,   42,   51,   49,   52,
+       53,   54,   55,   66,   56,   66,   55,   56,   65,   58,
+       58,   51,   65,   67,   50,   58,   54,   53,   54,   61,
+       61,   52,   68,   67,   69,   61,   70,   71,   72,   70,
+       73,   71,   74,   75,   77,   75,   68,   76,   82,   76,
+       72,   79,   73,   69,   78,   87,   78,   81,  245,   79,
+       74,   80,   80,   81,   80,   91,   77,   80,   89,   82,
+       83,   83,   89,   87,   90,   94,   83,   88,   88,   88,
 
-       80,   86,   86,   86,   86,   86,  109,   93,   86,   86,
-       89,   92,   95,   95,   95,   95,   95,   98,  101,   95,
-       95,   97,   97,   97,   97,   97,  101,  247,   97,   97,
-      104,   99,   98,   99,  100,  100,  100,  100,  100,  102,
-      113,  100,  100,  102,  103,  103,  105,  105,  104,  107,
-      107,  110,  105,  111,  114,  107,  114,  110,  115,  113,
-      115,  116,  133,  133,  125,  146,  146,  245,  111,  112,
-      112,  112,  112,  112,  117,  117,  112,  112,  236,  130,
-      117,  119,  119,  125,  116,  121,  121,  119,  123,  123,
-      131,  121,  126,  126,  123,  128,  128,  130,  126,  134,
+       88,   88,   95,  243,   88,   88,   90,   92,   91,   92,
+       95,   98,   98,  103,   98,   94,   96,   96,   96,   96,
+       96,  103,  106,   96,   96,   97,   97,   97,   97,   97,
+      100,  242,   97,   97,   99,   99,   99,   99,   99,  104,
+      106,   99,   99,  104,  101,  100,  101,  102,  102,  102,
+      102,  102,  105,  105,  102,  102,  107,  107,  109,  109,
+      111,  112,  107,  113,  109,  115,  116,  112,  116,  117,
+      117,  119,  119,  111,  240,  117,  129,  119,  113,  114,
+      114,  114,  114,  114,  115,  197,  114,  114,  121,  121,
+      123,  123,  125,  125,  121,  129,  123,  134,  125,  127,
 
-      134,  128,  236,  139,  141,  134,  139,  149,  141,  131,
-      142,  142,  144,  144,  149,  189,  142,  189,  144,  147,
-      147,  147,  147,  147,  160,  160,  147,  147,  148,  148,
-      148,  148,  148,  150,  150,  148,  148,  155,  155,  150,
-      161,  161,  166,  155,  167,  167,  161,  171,  172,  172,
-      173,  173,  166,  179,  179,  195,  173,  181,  181,  179,
-      187,  183,  183,  181,  185,  185,  171,  183,  196,  187,
-      185,  190,  190,  199,  199,  220,  196,  196,  195,  199,
-      204,  204,  217,  209,  220,  221,  204,  209,  212,  212,
-      212,  212,  212,  235,  232,  212,  212,  217,  232,  221,
+      127,  130,  130,  132,  132,  127,  135,  130,  197,  132,
+      137,  137,  138,  138,  143,  134,  145,  143,  138,  228,
+      145,  146,  146,  148,  148,  135,  191,  146,  191,  148,
+      150,  150,  151,  151,  151,  151,  151,  152,  152,  151,
+      151,  157,  157,  152,  162,  162,  173,  157,  167,  167,
+      162,  168,  168,  174,  174,  178,  173,  168,  179,  179,
+      180,  180,  186,  186,  188,  188,  180,  198,  186,  220,
+      188,  192,  192,  216,  178,  198,  198,  201,  201,  213,
+      230,  217,  216,  201,  208,  208,  208,  208,  208,  227,
+      231,  208,  208,  227,  213,  217,  222,  222,  224,  224,
 
-      224,  224,  227,  227,  229,  229,  224,  243,  227,  244,
-      229,  237,  237,  242,  242,  246,  235,  237,  233,  225,
-      222,  218,  215,  213,  210,  244,  197,  243,  193,  191,
-      188,  178,  170,  246,  256,  256,  256,  256,  257,  257,
-      257,  258,  258,  258,  258,  259,  259,  259,  259,  260,
-      168,  260,  260,  261,  261,  261,  261,  262,  132,  262,
-      262,  263,  263,  263,  263,  264,  264,   94,  264,  265,
-      265,  265,  265,  266,   91,  266,  266,  267,  267,  267,
-      267,  268,  268,  268,  268,  269,  269,  269,  269,  270,
-      270,  270,  270,  271,  271,  271,  271,  272,   63,  272,
+      232,  232,  222,  230,  224,  238,  232,  237,  237,  241,
+      239,  218,  214,  211,  231,  209,  206,  199,  195,  193,
+      190,  185,  177,  175,  136,  238,  239,  241,  251,  251,
+      251,  251,  252,  252,  252,  253,  253,  253,  253,  254,
+      254,  254,  254,  255,   93,  255,  255,  256,  256,  256,
+      256,  257,   64,  257,  257,  258,  258,  258,  258,  259,
+      259,   35,  259,  260,  260,  260,  260,  261,   28,  261,
+      261,  262,  262,  262,  262,  263,  263,  263,  263,  264,
+      264,  264,  264,  265,  265,  265,  265,  266,  266,  266,
+      266,  267,  267,  267,  267,  268,   24,  268,  268,  269,
 
-      272,  273,  273,  273,  273,  274,  274,  274,  274,  275,
-       35,  275,  275,  276,  276,  276,  276,  277,   28,  277,
-      277,  278,  278,  278,  278,  279,   24,  279,  279,  280,
-      280,  280,  280,  281,   22,  281,  281,  282,  282,  282,
-      282,  283,   17,  283,  283,  284,  284,  284,  284,  285,
-      285,  285,  285,  286,    6,  286,  286,  287,    5,  287,
-      287,  288,    4,  288,  288,  289,  289,  289,  289,  290,
-      290,  290,  290,  291,    3,  291,  291,  292,  292,  292,
-      292,  293,  293,  293,  293,  294,    0,  294,  294,  295,
-      295,  295,  295,  296,    0,  296,  296,  297,  297,  297,
+      269,  269,  269,  270,  270,  270,  270,  271,   22,  271,
+      271,  272,  272,  272,  272,  273,   17,  273,  273,  274,
+      274,  274,  274,  275,    6,  275,  275,  276,  276,  276,
+      276,  277,    5,  277,  277,  278,  278,  278,  278,  279,
+        4,  279,  279,  280,  280,  280,  280,  281,    3,  281,
+      281,  282,  282,  282,  282,  283,    0,  283,  283,  284,
+        0,  284,  284,  285,    0,  285,  285,  286,    0,  286,
+      286,  287,  287,  287,  287,  288,  288,  288,  288,  289,
+        0,  289,  289,  290,  290,  290,  290,  291,  291,  291,
+      291,  292,    0,  292,  292,  293,  293,  293,  293,  294,
 
-      297,  298,  298,  298,  298,  299,  299,  299,  299,  300,
-      300,  300,  300,  301,  301,  301,  301,  302,    0,  302,
-      302,  303,    0,  303,  303,  304,  304,  304,  304,  305,
-      305,  305,  305,  306,    0,  306,  306,  307,  307,  307,
-      307,  308,  308,  308,  308,  309,    0,  309,  309,  310,
-        0,  310,  310,  311,  311,  311,  311,  312,  312,  312,
-      312,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
-      255,  255,  255,  255,  255
-
+      294,  294,  294,  295,  295,  295,  295,  296,  296,  296,
+      296,  297,  297,  297,  297,  298,    0,  298,  298,  299,
+      299,  299,  299,  300,  300,  300,  300,  301,    0,  301,
+      301,  302,  302,  302,  302,  303,  303,  303,  303,  304,
+        0,  304,  304,  305,    0,  305,  305,  306,  306,  306,
+      306,  307,  307,  307,  307,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250
     } ;
 
 #define YY_TRAILING_MASK 0x2000
@@ -776,7 +773,8 @@ goto find_rule; \
  * syntax; if the target string has to contain "," or ":" the new
  * syntax's "target=" should be used.
  */
-#line 31 "libxlu_disk_l.l"
+
+#line 35 "libxlu_disk_l.l"
 #include "libxlu_disk_i.h"
 
 #define YY_NO_INPUT
@@ -885,7 +883,7 @@ static int vdev_and_devtype(DiskParseCon
 #define DPC ((DiskParseContext*)yyextra)
 
 
-#line 889 "libxlu_disk_l.c"
+#line 887 "libxlu_disk_l.c"
 
 #define INITIAL 0
 #define LEXERR 1
@@ -1121,12 +1119,12 @@ YY_DECL
 	register int yy_act;
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
 
-#line 151 "libxlu_disk_l.l"
+#line 155 "libxlu_disk_l.l"
 
 
  /*----- the scanner rules which do the parsing -----*/
 
-#line 1130 "libxlu_disk_l.c"
+#line 1128 "libxlu_disk_l.c"
 
 	if ( !yyg->yy_init )
 		{
@@ -1320,7 +1318,7 @@ YY_RULE_SETUP
    * matched the whole string, so these patterns take precedence */
 case 13:
 YY_RULE_SETUP
-#line 185 "libxlu_disk_l.l"
+#line 189 "libxlu_disk_l.l"
 {
                     STRIP(':');
                     DPC->had_depr_prefix=1; DEPRECATE("use `[format=]...,'");
@@ -1354,7 +1352,7 @@ case 17:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 4;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 199 "libxlu_disk_l.l"
+#line 210 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 18:
@@ -1362,7 +1360,7 @@ case 18:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 6;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 200 "libxlu_disk_l.l"
+#line 211 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 19:
@@ -1370,7 +1368,7 @@ case 19:
 yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 201 "libxlu_disk_l.l"
+#line 212 "libxlu_disk_l.l"
 { DPC->had_depr_prefix=1; DEPRECATE(0); }
 	YY_BREAK
 case 20:
@@ -1394,7 +1392,7 @@ YY_RULE_SETUP
 case 22:
 /* rule 22 can match eol */
 YY_RULE_SETUP
-#line 211 "libxlu_disk_l.l"
+#line 222 "libxlu_disk_l.l"
 {
     STRIP(',');
 
@@ -1423,7 +1421,7 @@ YY_RULE_SETUP
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 237 "libxlu_disk_l.l"
+#line 248 "libxlu_disk_l.l"
 {
     BEGIN(LEXERR);
     yymore();
@@ -2533,4 +2531,4 @@ void xlu__disk_yyfree (void * ptr , yysc
 
 #define YYTABLES_NAME "yytables"
 
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxlu_disk_l.h
--- a/tools/libxl/libxlu_disk_l.h	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.h	Fri Aug 03 11:59:12 2012 +0100
@@ -3,8 +3,12 @@
 #define xlu__disk_yyIN_HEADER 1
 
 #line 6 "libxlu_disk_l.h"
+#line 31 "libxlu_disk_l.l"
+#include "libxl_osdeps.h" /* must come before any other headers */
 
-#line 8 "libxlu_disk_l.h"
+
+
+#line 12 "libxlu_disk_l.h"
 
 #define  YY_INT_ALIGNED short int
 
@@ -340,8 +344,8 @@ extern int xlu__disk_yylex (yyscan_t yys
 #undef YY_DECL
 #endif
 
-#line 244 "libxlu_disk_l.l"
+#line 255 "libxlu_disk_l.l"
 
-#line 346 "libxlu_disk_l.h"
+#line 350 "libxlu_disk_l.h"
 #undef xlu__disk_yyIN_HEADER
 #endif /* xlu__disk_yyHEADER_H */
diff -r 4a1dde3b9dfe -r a8d708fcb347 tools/libxl/libxlu_disk_l.l
--- a/tools/libxl/libxlu_disk_l.l	Fri Aug 03 11:57:10 2012 +0100
+++ b/tools/libxl/libxlu_disk_l.l	Fri Aug 03 11:59:12 2012 +0100
@@ -27,6 +27,10 @@
  * syntax's "target=" should be used.
  */
 
+%top{
+#include "libxl_osdeps.h" /* must come before any other headers */
+}
+
 %{
 #include "libxlu_disk_i.h"
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 08 02:44:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Aug 2012 02:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SywFt-0005zd-7r; Wed, 08 Aug 2012 02:44:17 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SywFr-0005zR-RN
	for xen-changelog@lists.xensource.com; Wed, 08 Aug 2012 02:44:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-27.messagelabs.com!1344393848!11393966!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11041 invoked from network); 8 Aug 2012 02:44:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Aug 2012 02:44:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SywFk-0000So-ME
	for xen-changelog@lists.xensource.com; Wed, 08 Aug 2012 02:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SywFk-0003up-5F
	for xen-changelog@lists.xensource.com; Wed, 08 Aug 2012 02:44:08 +0000
Message-Id: <E1SywFk-0003up-5F@xenbits.xen.org>
Date: Wed, 08 Aug 2012 02:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1344361051 -3600
# Node ID 472fc515a46314c9b9ed759669ce10d01885a545
# Parent  8ecd9177d977941c0b9638a2ae0a567ce58e8920
QEMU_TAG update
---


diff -r 8ecd9177d977 -r 472fc515a463 Config.mk
--- a/Config.mk	Tue Aug 07 14:26:29 2012 +0100
+++ b/Config.mk	Tue Aug 07 18:37:31 2012 +0100
@@ -213,9 +213,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.2.0-rc1
-# Mon Jul 23 17:56:13 2012 +0100
-# qemu-traditional: fix no-return-in-nonvoid-function
+QEMU_TAG ?= d94efd9aa814f17f3243dae91476dc42b5ad052e
+# Tue Aug 7 18:17:27 2012 +0100
+# mapcache: Fix invalidate if memory requested was not bucket aligned
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.

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

From xen-changelog-bounces@lists.xen.org Wed Aug 08 02:44:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 08 Aug 2012 02:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SywFt-0005zd-7r; Wed, 08 Aug 2012 02:44:17 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SywFr-0005zR-RN
	for xen-changelog@lists.xensource.com; Wed, 08 Aug 2012 02:44:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-27.messagelabs.com!1344393848!11393966!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11041 invoked from network); 8 Aug 2012 02:44:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Aug 2012 02:44:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SywFk-0000So-ME
	for xen-changelog@lists.xensource.com; Wed, 08 Aug 2012 02:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SywFk-0003up-5F
	for xen-changelog@lists.xensource.com; Wed, 08 Aug 2012 02:44:08 +0000
Message-Id: <E1SywFk-0003up-5F@xenbits.xen.org>
Date: Wed, 08 Aug 2012 02:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1344361051 -3600
# Node ID 472fc515a46314c9b9ed759669ce10d01885a545
# Parent  8ecd9177d977941c0b9638a2ae0a567ce58e8920
QEMU_TAG update
---


diff -r 8ecd9177d977 -r 472fc515a463 Config.mk
--- a/Config.mk	Tue Aug 07 14:26:29 2012 +0100
+++ b/Config.mk	Tue Aug 07 18:37:31 2012 +0100
@@ -213,9 +213,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.2.0-rc1
-# Mon Jul 23 17:56:13 2012 +0100
-# qemu-traditional: fix no-return-in-nonvoid-function
+QEMU_TAG ?= d94efd9aa814f17f3243dae91476dc42b5ad052e
+# Tue Aug 7 18:17:27 2012 +0100
+# mapcache: Fix invalidate if memory requested was not bucket aligned
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.

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

From xen-changelog-bounces@lists.xen.org Thu Aug 09 07:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Aug 2012 07:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzMtl-0005P2-Re; Thu, 09 Aug 2012 07:11:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtk-0005Or-FP
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:12 +0000
Received: from [85.158.138.51:32624] by server-7.bemta-3.messagelabs.com id
	CC/EA-04660-F8263205; Thu, 09 Aug 2012 07:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-174.messagelabs.com!1344496270!19318133!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.3 required=7.0 tests=ML_MARKETING,
  UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5297 invoked from network); 9 Aug 2012 07:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Aug 2012 07:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMth-0004Yw-MJ
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMth-0003GD-Ad
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:09 +0000
Message-Id: <E1SzMth-0003GD-Ad@xenbits.xen.org>
Date: Thu, 09 Aug 2012 07:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Added signature for changeset
	f4c47bcc01e1
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344445355 -3600
# Node ID 24ac8a177376fdde72664d3b585a94927c478868
# Parent  9bb05a2360a86b56d857ec326f596478d45b1c69
Added signature for changeset f4c47bcc01e1
---


diff -r 9bb05a2360a8 -r 24ac8a177376 .hgsigs
--- a/.hgsigs	Wed Aug 08 18:02:27 2012 +0100
+++ b/.hgsigs	Wed Aug 08 18:02:35 2012 +0100
@@ -6,3 +6,4 @@ d2d27d989ebce4325575f871415337cc54891dde
 7b6791dbfecdb2eba6acd2c8bf0ced17d06746b2 0 iQEcBAABAgAGBQJNa9NOAAoJEIP+FMlX6CvZK+sH/REZ7jV0iWnDbvfPgdl/KlxEVvj4LsmLFAVBa0sEHa8ih+THp3C8Bso7izIs424y667QH6Pq+wAiB5TELOOHRsp6VV5AxYXuNF1Vw9xD9YGUQ5ECAIfc9gldfZZAv4QZayHOgdz4zRnMOrO1D8rqNDVO7BcgNutgf25WtrLsg+mxxyLjcA9Q5Q7a6dY1WSzzSf6beOW9MLh6Hy2pGTzO3CcS6M0Aa6sXZKisy7CWMOueAbwSmRBmw3il1oM62I44ovAJUxBvLTQZm0mNPzeq0IP59rLrGzdhZ76+iE47GK/zGjcC7o/jSQUy6xhuUwgcx3PdB8vzJzNsz6p8mIR+UKo=
 6241fa0ad1a939d2eba11bdec929564276f56a9e 0 iQEcBAABAgAGBQJNcSJqAAoJEIP+FMlX6CvZbxEH/206722t0t46MfPq0/buPpQDNiB0HtFZY79u1Yc8xGTo23rQ2NTG10JdCurN2pyxwFesiSIZ4Ua3zqpZ0EA2EN6xAFY9Vua4WEPNJwK8pxxWABcHI017QTidQs41bEaUn92yyfmixq6iYCGvR+b46KWbip/i9Z6vZpw0g3JyOaxgAhkA+p4w90yUIKUkjTrtiuqnI31MUQE0urwWAXQUj78knrqEu3wb91+me1KLH9WzReBB7tt3/GmaK4qSdnHNpIkulVK0XJYzFkJzFr5eHVeYTGFb25Sgir2sIN2gxaCPI3/p90akFMJKmeNV5XCmOQ5g2GWUZTff8LGF6Fk0Me8=
 8e620dc570ce42564c1630de5798e23909ee809c 0 iQEcBAABAgAGBQJQFqUYAAoJEIP+FMlX6CvZDGEH/jxUFG29okRASHY6XwFrJ4AU7tLyC8Bt2vAH3ZaA/h1Tn2GWkQXf4tzBAvvwWNBrm1hdj73OaB7dD2l2kvL551AhoSd4/5z+pPtpC72ItwFFTr3Ep9GRZEvEHculuei5IUzw1lxZuNCPCScBxQl+KI+dZHIeP0YO46VZTtG+EeBlj0SJ7JojKN4REd382eIgSLvpEFHCM6vqeCWM9FtDyomiMXdSosDLcWdFauFmV7cdWybA5WPj6bkJenABwX0A1V9uf225S0DTdO0t/7ncZ8h+wXTzqiixywA+lqza+u+HzNyopWmwiFcseFZjuHbKx6M2v0EvKPBcyTgdRZF/+Kg=
+f4c47bcc01e13cb2e3b4b71fd588d86278875442 0 iQEcBAABAgAGBQJQIpupAAoJEIP+FMlX6CvZnBwH/3qlibrquTmD2p3rcdVi/JkWixaKK3KH4Ows/76sAJYCdx9YkmtkgC4zyz5aph4Rfy7dYnQIUhbwNNdZNBDd0XOVkjQm0ZX1wQjv3yA3Eq9NOUDmfFWldF+oosOG3h/+MLm/36CkB7gFku1ENQ8kagytXe4rN3QdOiJ9Rz84BAv6nJoT/1OX+m+MlBs948orC23aNEfWxrsrv2s92v5fJcAfSLW/AtER2JnASIxWECJ/TOkuHtrO2QPoBymSnifM2R624L+ySwRxSxo+Owfpooje5eekk0ekifvdYtaJ3pOfoOCv8yGEtb7mXv62WowVkasUZa/q+rGdVpHuK0UlBjI=

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

From xen-changelog-bounces@lists.xen.org Thu Aug 09 07:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Aug 2012 07:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzMtl-0005P2-Re; Thu, 09 Aug 2012 07:11:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtk-0005Or-FP
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:12 +0000
Received: from [85.158.138.51:32624] by server-7.bemta-3.messagelabs.com id
	CC/EA-04660-F8263205; Thu, 09 Aug 2012 07:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-174.messagelabs.com!1344496270!19318133!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.3 required=7.0 tests=ML_MARKETING,
  UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5297 invoked from network); 9 Aug 2012 07:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Aug 2012 07:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMth-0004Yw-MJ
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMth-0003GD-Ad
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:09 +0000
Message-Id: <E1SzMth-0003GD-Ad@xenbits.xen.org>
Date: Thu, 09 Aug 2012 07:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Added signature for changeset
	f4c47bcc01e1
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344445355 -3600
# Node ID 24ac8a177376fdde72664d3b585a94927c478868
# Parent  9bb05a2360a86b56d857ec326f596478d45b1c69
Added signature for changeset f4c47bcc01e1
---


diff -r 9bb05a2360a8 -r 24ac8a177376 .hgsigs
--- a/.hgsigs	Wed Aug 08 18:02:27 2012 +0100
+++ b/.hgsigs	Wed Aug 08 18:02:35 2012 +0100
@@ -6,3 +6,4 @@ d2d27d989ebce4325575f871415337cc54891dde
 7b6791dbfecdb2eba6acd2c8bf0ced17d06746b2 0 iQEcBAABAgAGBQJNa9NOAAoJEIP+FMlX6CvZK+sH/REZ7jV0iWnDbvfPgdl/KlxEVvj4LsmLFAVBa0sEHa8ih+THp3C8Bso7izIs424y667QH6Pq+wAiB5TELOOHRsp6VV5AxYXuNF1Vw9xD9YGUQ5ECAIfc9gldfZZAv4QZayHOgdz4zRnMOrO1D8rqNDVO7BcgNutgf25WtrLsg+mxxyLjcA9Q5Q7a6dY1WSzzSf6beOW9MLh6Hy2pGTzO3CcS6M0Aa6sXZKisy7CWMOueAbwSmRBmw3il1oM62I44ovAJUxBvLTQZm0mNPzeq0IP59rLrGzdhZ76+iE47GK/zGjcC7o/jSQUy6xhuUwgcx3PdB8vzJzNsz6p8mIR+UKo=
 6241fa0ad1a939d2eba11bdec929564276f56a9e 0 iQEcBAABAgAGBQJNcSJqAAoJEIP+FMlX6CvZbxEH/206722t0t46MfPq0/buPpQDNiB0HtFZY79u1Yc8xGTo23rQ2NTG10JdCurN2pyxwFesiSIZ4Ua3zqpZ0EA2EN6xAFY9Vua4WEPNJwK8pxxWABcHI017QTidQs41bEaUn92yyfmixq6iYCGvR+b46KWbip/i9Z6vZpw0g3JyOaxgAhkA+p4w90yUIKUkjTrtiuqnI31MUQE0urwWAXQUj78knrqEu3wb91+me1KLH9WzReBB7tt3/GmaK4qSdnHNpIkulVK0XJYzFkJzFr5eHVeYTGFb25Sgir2sIN2gxaCPI3/p90akFMJKmeNV5XCmOQ5g2GWUZTff8LGF6Fk0Me8=
 8e620dc570ce42564c1630de5798e23909ee809c 0 iQEcBAABAgAGBQJQFqUYAAoJEIP+FMlX6CvZDGEH/jxUFG29okRASHY6XwFrJ4AU7tLyC8Bt2vAH3ZaA/h1Tn2GWkQXf4tzBAvvwWNBrm1hdj73OaB7dD2l2kvL551AhoSd4/5z+pPtpC72ItwFFTr3Ep9GRZEvEHculuei5IUzw1lxZuNCPCScBxQl+KI+dZHIeP0YO46VZTtG+EeBlj0SJ7JojKN4REd382eIgSLvpEFHCM6vqeCWM9FtDyomiMXdSosDLcWdFauFmV7cdWybA5WPj6bkJenABwX0A1V9uf225S0DTdO0t/7ncZ8h+wXTzqiixywA+lqza+u+HzNyopWmwiFcseFZjuHbKx6M2v0EvKPBcyTgdRZF/+Kg=
+f4c47bcc01e13cb2e3b4b71fd588d86278875442 0 iQEcBAABAgAGBQJQIpupAAoJEIP+FMlX6CvZnBwH/3qlibrquTmD2p3rcdVi/JkWixaKK3KH4Ows/76sAJYCdx9YkmtkgC4zyz5aph4Rfy7dYnQIUhbwNNdZNBDd0XOVkjQm0ZX1wQjv3yA3Eq9NOUDmfFWldF+oosOG3h/+MLm/36CkB7gFku1ENQ8kagytXe4rN3QdOiJ9Rz84BAv6nJoT/1OX+m+MlBs948orC23aNEfWxrsrv2s92v5fJcAfSLW/AtER2JnASIxWECJ/TOkuHtrO2QPoBymSnifM2R624L+ySwRxSxo+Owfpooje5eekk0ekifvdYtaJ3pOfoOCv8yGEtb7mXv62WowVkasUZa/q+rGdVpHuK0UlBjI=

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

From xen-changelog-bounces@lists.xen.org Thu Aug 09 07:11:34 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Aug 2012 07:11:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzMu3-0005QU-UV; Thu, 09 Aug 2012 07:11:31 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMu2-0005Pz-9s
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:30 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-27.messagelabs.com!1344496283!12269450!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5423 invoked from network); 9 Aug 2012 07:11:23 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Aug 2012 07:11:23 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtg-0004Yq-Mf
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtg-0003Fj-6v
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:08 +0000
Message-Id: <E1SzMtg-0003Fj-6v@xenbits.xen.org>
Date: Thu, 09 Aug 2012 07:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Update Xen version to 4.2.0-rc2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344445341 -3600
# Node ID f4c47bcc01e13cb2e3b4b71fd588d86278875442
# Parent  472fc515a46314c9b9ed759669ce10d01885a545
Update Xen version to 4.2.0-rc2
---


diff -r 472fc515a463 -r f4c47bcc01e1 Config.mk
--- a/Config.mk	Tue Aug 07 18:37:31 2012 +0100
+++ b/Config.mk	Wed Aug 08 18:02:21 2012 +0100
@@ -213,7 +213,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= d94efd9aa814f17f3243dae91476dc42b5ad052e
+QEMU_TAG ?= xen-4.2.0-rc2
 # Tue Aug 7 18:17:27 2012 +0100
 # mapcache: Fix invalidate if memory requested was not bucket aligned
 
diff -r 472fc515a463 -r f4c47bcc01e1 xen/Makefile
--- a/xen/Makefile	Tue Aug 07 18:37:31 2012 +0100
+++ b/xen/Makefile	Wed Aug 08 18:02:21 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .0-rc2-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .0-rc2$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Thu Aug 09 07:11:34 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Aug 2012 07:11:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzMu3-0005QU-UV; Thu, 09 Aug 2012 07:11:31 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMu2-0005Pz-9s
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:30 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-27.messagelabs.com!1344496283!12269450!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5423 invoked from network); 9 Aug 2012 07:11:23 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Aug 2012 07:11:23 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtg-0004Yq-Mf
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtg-0003Fj-6v
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:08 +0000
Message-Id: <E1SzMtg-0003Fj-6v@xenbits.xen.org>
Date: Thu, 09 Aug 2012 07:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Update Xen version to 4.2.0-rc2
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344445341 -3600
# Node ID f4c47bcc01e13cb2e3b4b71fd588d86278875442
# Parent  472fc515a46314c9b9ed759669ce10d01885a545
Update Xen version to 4.2.0-rc2
---


diff -r 472fc515a463 -r f4c47bcc01e1 Config.mk
--- a/Config.mk	Tue Aug 07 18:37:31 2012 +0100
+++ b/Config.mk	Wed Aug 08 18:02:21 2012 +0100
@@ -213,7 +213,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= d94efd9aa814f17f3243dae91476dc42b5ad052e
+QEMU_TAG ?= xen-4.2.0-rc2
 # Tue Aug 7 18:17:27 2012 +0100
 # mapcache: Fix invalidate if memory requested was not bucket aligned
 
diff -r 472fc515a463 -r f4c47bcc01e1 xen/Makefile
--- a/xen/Makefile	Tue Aug 07 18:37:31 2012 +0100
+++ b/xen/Makefile	Wed Aug 08 18:02:21 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .0-rc2-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .0-rc2$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Thu Aug 09 07:11:35 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Aug 2012 07:11:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzMu5-0005Qh-1B; Thu, 09 Aug 2012 07:11:33 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMu3-0005Q3-DA
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:31 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-27.messagelabs.com!1344496283!9836681!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19351 invoked from network); 9 Aug 2012 07:11:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Aug 2012 07:11:24 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtg-0004Ys-SL
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtg-0003Fy-Q5
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:08 +0000
Message-Id: <E1SzMtg-0003Fy-Q5@xenbits.xen.org>
Date: Thu, 09 Aug 2012 07:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Added tag 4.2.0-rc2 for changeset
	f4c47bcc01e1
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344445347 -3600
# Node ID 9bb05a2360a86b56d857ec326f596478d45b1c69
# Parent  f4c47bcc01e13cb2e3b4b71fd588d86278875442
Added tag 4.2.0-rc2 for changeset f4c47bcc01e1
---


diff -r f4c47bcc01e1 -r 9bb05a2360a8 .hgtags
--- a/.hgtags	Wed Aug 08 18:02:21 2012 +0100
+++ b/.hgtags	Wed Aug 08 18:02:27 2012 +0100
@@ -53,3 +53,4 @@ d2d27d989ebce4325575f871415337cc54891dde
 7b6791dbfecdb2eba6acd2c8bf0ced17d06746b2 4.1.0-rc6
 6241fa0ad1a939d2eba11bdec929564276f56a9e 4.1.0-branched
 8e620dc570ce42564c1630de5798e23909ee809c 4.2.0-rc1
+f4c47bcc01e13cb2e3b4b71fd588d86278875442 4.2.0-rc2

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

From xen-changelog-bounces@lists.xen.org Thu Aug 09 07:11:35 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Aug 2012 07:11:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzMu5-0005Qh-1B; Thu, 09 Aug 2012 07:11:33 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMu3-0005Q3-DA
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:31 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-27.messagelabs.com!1344496283!9836681!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19351 invoked from network); 9 Aug 2012 07:11:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Aug 2012 07:11:24 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtg-0004Ys-SL
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMtg-0003Fy-Q5
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:08 +0000
Message-Id: <E1SzMtg-0003Fy-Q5@xenbits.xen.org>
Date: Thu, 09 Aug 2012 07:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Added tag 4.2.0-rc2 for changeset
	f4c47bcc01e1
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344445347 -3600
# Node ID 9bb05a2360a86b56d857ec326f596478d45b1c69
# Parent  f4c47bcc01e13cb2e3b4b71fd588d86278875442
Added tag 4.2.0-rc2 for changeset f4c47bcc01e1
---


diff -r f4c47bcc01e1 -r 9bb05a2360a8 .hgtags
--- a/.hgtags	Wed Aug 08 18:02:21 2012 +0100
+++ b/.hgtags	Wed Aug 08 18:02:27 2012 +0100
@@ -53,3 +53,4 @@ d2d27d989ebce4325575f871415337cc54891dde
 7b6791dbfecdb2eba6acd2c8bf0ced17d06746b2 4.1.0-rc6
 6241fa0ad1a939d2eba11bdec929564276f56a9e 4.1.0-branched
 8e620dc570ce42564c1630de5798e23909ee809c 4.2.0-rc1
+f4c47bcc01e13cb2e3b4b71fd588d86278875442 4.2.0-rc2

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

From xen-changelog-bounces@lists.xen.org Thu Aug 09 07:11:47 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Aug 2012 07:11:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzMuF-0005SI-4N; Thu, 09 Aug 2012 07:11:43 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMuD-0005RV-DI
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:41 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-27.messagelabs.com!1344496286!11627466!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18734 invoked from network); 9 Aug 2012 07:11:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Aug 2012 07:11:27 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMti-0004Yz-4i
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMth-0003GS-T0
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:09 +0000
Message-Id: <E1SzMth-0003GS-T0@xenbits.xen.org>
Date: Thu, 09 Aug 2012 07:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Update Xen version to 4.2.0-rc3-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344445377 -3600
# Node ID d25406e25af444a40f7f9e6617dcd3305b00d63c
# Parent  24ac8a177376fdde72664d3b585a94927c478868
Update Xen version to 4.2.0-rc3-pre
---


diff -r 24ac8a177376 -r d25406e25af4 xen/Makefile
--- a/xen/Makefile	Wed Aug 08 18:02:35 2012 +0100
+++ b/xen/Makefile	Wed Aug 08 18:02:57 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .0-rc2$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .0-rc3-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Thu Aug 09 07:11:47 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 09 Aug 2012 07:11:47 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzMuF-0005SI-4N; Thu, 09 Aug 2012 07:11:43 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMuD-0005RV-DI
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:41 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-27.messagelabs.com!1344496286!11627466!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18734 invoked from network); 9 Aug 2012 07:11:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Aug 2012 07:11:27 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMti-0004Yz-4i
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzMth-0003GS-T0
	for xen-changelog@lists.xensource.com; Thu, 09 Aug 2012 07:11:09 +0000
Message-Id: <E1SzMth-0003GS-T0@xenbits.xen.org>
Date: Thu, 09 Aug 2012 07:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Update Xen version to 4.2.0-rc3-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344445377 -3600
# Node ID d25406e25af444a40f7f9e6617dcd3305b00d63c
# Parent  24ac8a177376fdde72664d3b585a94927c478868
Update Xen version to 4.2.0-rc3-pre
---


diff -r 24ac8a177376 -r d25406e25af4 xen/Makefile
--- a/xen/Makefile	Wed Aug 08 18:02:35 2012 +0100
+++ b/xen/Makefile	Wed Aug 08 18:02:57 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .0-rc2$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .0-rc3-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szfd5-0004Hf-7s; Fri, 10 Aug 2012 03:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd3-0004HO-18
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:13 +0000
Received: from [85.158.138.51:59328] by server-8.bemta-3.messagelabs.com id
	17/A1-29583-FCB74205; Fri, 10 Aug 2012 03:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1344568270!27578557!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8306 invoked from network); 10 Aug 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd0-0002ot-0X
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfcz-00083r-Ly
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:09 +0000
Message-Id: <E1Szfcz-00083r-Ly@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:09 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] xen: only check for shared pages
	while any exist on teardown
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1344523662 -3600
# Node ID 859205b36fe990b9767b6bdc90dd4b4f5a6591f2
# Parent  f8f8912b3de00ba4451894c29419ca95e13af38e
xen: only check for shared pages while any exist on teardown

Avoids worst case behavour when guest has a large p2m.

This is XSA-11 / CVE-2012-3433

Signed-off-by: Tim Deegan <tim@xen.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r f8f8912b3de0 -r 859205b36fe9 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Fri Aug 03 10:43:24 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Thu Aug 09 15:47:42 2012 +0100
@@ -2044,6 +2044,8 @@ void p2m_teardown(struct p2m_domain *p2m
 #ifdef __x86_64__
     for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ )
     {
+        if ( atomic_read(&d->shr_pages) == 0 )
+            break;
         mfn = p2m->get_entry(p2m, gfn, &t, &a, p2m_query);
         if ( mfn_valid(mfn) && (t == p2m_ram_shared) )
             BUG_ON(mem_sharing_unshare_page(p2m, gfn, MEM_SHARING_DESTROY_GFN));

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szfd5-0004Hf-7s; Fri, 10 Aug 2012 03:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd3-0004HO-18
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:13 +0000
Received: from [85.158.138.51:59328] by server-8.bemta-3.messagelabs.com id
	17/A1-29583-FCB74205; Fri, 10 Aug 2012 03:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-174.messagelabs.com!1344568270!27578557!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8306 invoked from network); 10 Aug 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd0-0002ot-0X
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfcz-00083r-Ly
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:09 +0000
Message-Id: <E1Szfcz-00083r-Ly@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:09 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] xen: only check for shared pages
	while any exist on teardown
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1344523662 -3600
# Node ID 859205b36fe990b9767b6bdc90dd4b4f5a6591f2
# Parent  f8f8912b3de00ba4451894c29419ca95e13af38e
xen: only check for shared pages while any exist on teardown

Avoids worst case behavour when guest has a large p2m.

This is XSA-11 / CVE-2012-3433

Signed-off-by: Tim Deegan <tim@xen.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r f8f8912b3de0 -r 859205b36fe9 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Fri Aug 03 10:43:24 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Thu Aug 09 15:47:42 2012 +0100
@@ -2044,6 +2044,8 @@ void p2m_teardown(struct p2m_domain *p2m
 #ifdef __x86_64__
     for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ )
     {
+        if ( atomic_read(&d->shr_pages) == 0 )
+            break;
         mfn = p2m->get_entry(p2m, gfn, &t, &a, p2m_query);
         if ( mfn_valid(mfn) && (t == p2m_ram_shared) )
             BUG_ON(mem_sharing_unshare_page(p2m, gfn, MEM_SHARING_DESTROY_GFN));

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szfd5-0004Ha-5C; Fri, 10 Aug 2012 03:11:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd3-0004HP-3D
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:13 +0000
Received: from [85.158.143.99:24931] by server-1.bemta-4.messagelabs.com id
	7B/61-20198-0DB74205; Fri, 10 Aug 2012 03:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-216.messagelabs.com!1344568270!26563754!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25857 invoked from network); 10 Aug 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd0-0002ow-Jo
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd0-000846-7V
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:10 +0000
Message-Id: <E1Szfd0-000846-7V@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:09 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] cpufreq: P state stats aren't
	available if there is no cpufreq driver
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User David Vrabel <david.vrabel@citrix.com>
# Date 1344527091 -3600
# Node ID 985fb467d180f8149c0f1041461b77b2078a2fcd
# Parent  859205b36fe990b9767b6bdc90dd4b4f5a6591f2
cpufreq: P state stats aren't available if there is no cpufreq driver

If there is no cpufreq driver (e.g., with an AMD Opteron 8212) then
reading the P state statistics causes a deadlock as an uninitialized
spinlock is locked in do_get_pm_info(). The spinlock is initialized in
cpufreq_statistic_init() which is not called if cpufreq_driver ==
NULL.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen-unstable changeset:   25706:7fd5facb6084
xen-unstable date:        Fri Aug 03 09:50:28 2012 +0200
---


diff -r 859205b36fe9 -r 985fb467d180 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Thu Aug 09 15:47:42 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c	Thu Aug 09 16:44:51 2012 +0100
@@ -68,6 +68,8 @@ int do_get_pm_info(struct xen_sysctl_get
     case PMSTAT_PX:
         if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
             return -ENODEV;
+        if ( !cpufreq_driver )
+            return -ENODEV;
         if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
             return -EINVAL;
         break;

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szfd5-0004Ha-5C; Fri, 10 Aug 2012 03:11:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd3-0004HP-3D
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:13 +0000
Received: from [85.158.143.99:24931] by server-1.bemta-4.messagelabs.com id
	7B/61-20198-0DB74205; Fri, 10 Aug 2012 03:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-216.messagelabs.com!1344568270!26563754!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25857 invoked from network); 10 Aug 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd0-0002ow-Jo
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd0-000846-7V
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:10 +0000
Message-Id: <E1Szfd0-000846-7V@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:09 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] cpufreq: P state stats aren't
	available if there is no cpufreq driver
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User David Vrabel <david.vrabel@citrix.com>
# Date 1344527091 -3600
# Node ID 985fb467d180f8149c0f1041461b77b2078a2fcd
# Parent  859205b36fe990b9767b6bdc90dd4b4f5a6591f2
cpufreq: P state stats aren't available if there is no cpufreq driver

If there is no cpufreq driver (e.g., with an AMD Opteron 8212) then
reading the P state statistics causes a deadlock as an uninitialized
spinlock is locked in do_get_pm_info(). The spinlock is initialized in
cpufreq_statistic_init() which is not called if cpufreq_driver ==
NULL.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen-unstable changeset:   25706:7fd5facb6084
xen-unstable date:        Fri Aug 03 09:50:28 2012 +0200
---


diff -r 859205b36fe9 -r 985fb467d180 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Thu Aug 09 15:47:42 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c	Thu Aug 09 16:44:51 2012 +0100
@@ -68,6 +68,8 @@ int do_get_pm_info(struct xen_sysctl_get
     case PMSTAT_PX:
         if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
             return -ENODEV;
+        if ( !cpufreq_driver )
+            return -ENODEV;
         if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
             return -EINVAL;
         break;

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szfd8-0004IB-DA; Fri, 10 Aug 2012 03:11:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd7-0004Ht-Vs
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:18 +0000
Received: from [85.158.143.35:33369] by server-3.bemta-4.messagelabs.com id
	5F/E4-31486-5DB74205; Fri, 10 Aug 2012 03:11:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1344568271!12635906!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12265 invoked from network); 10 Aug 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-0002p2-DC
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-00084a-8B
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Message-Id: <E1Szfd1-00084a-8B@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:10 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Added tag RELEASE-4.1.3 for
	changeset ce7195d2b80e
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527275 -3600
# Node ID 7cdd79dea62b76daf270c27d314889173f3dc757
# Parent  ce7195d2b80e4df9857e434fa29689fd678a2341
Added tag RELEASE-4.1.3 for changeset ce7195d2b80e
---


diff -r ce7195d2b80e -r 7cdd79dea62b .hgtags
--- a/.hgtags	Thu Aug 09 16:47:30 2012 +0100
+++ b/.hgtags	Thu Aug 09 16:47:55 2012 +0100
@@ -65,3 +65,4 @@ 3eca5bf65e6cca881d599c68f2305f865e0f9fd0
 da64f68730cf1c42c06919578e70d8bc01041051 4.1.3-rc1
 acbd3617691397911f34e4574d03385c08aec900 4.1.3-rc2
 5cdcfed7b5b129843e1602b5d43c7651de337092 4.1.3-rc3
+ce7195d2b80e4df9857e434fa29689fd678a2341 RELEASE-4.1.3

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szfd8-0004IB-DA; Fri, 10 Aug 2012 03:11:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd7-0004Ht-Vs
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:18 +0000
Received: from [85.158.143.35:33369] by server-3.bemta-4.messagelabs.com id
	5F/E4-31486-5DB74205; Fri, 10 Aug 2012 03:11:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-21.messagelabs.com!1344568271!12635906!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12265 invoked from network); 10 Aug 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-0002p2-DC
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-00084a-8B
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Message-Id: <E1Szfd1-00084a-8B@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:10 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Added tag RELEASE-4.1.3 for
	changeset ce7195d2b80e
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527275 -3600
# Node ID 7cdd79dea62b76daf270c27d314889173f3dc757
# Parent  ce7195d2b80e4df9857e434fa29689fd678a2341
Added tag RELEASE-4.1.3 for changeset ce7195d2b80e
---


diff -r ce7195d2b80e -r 7cdd79dea62b .hgtags
--- a/.hgtags	Thu Aug 09 16:47:30 2012 +0100
+++ b/.hgtags	Thu Aug 09 16:47:55 2012 +0100
@@ -65,3 +65,4 @@ 3eca5bf65e6cca881d599c68f2305f865e0f9fd0
 da64f68730cf1c42c06919578e70d8bc01041051 4.1.3-rc1
 acbd3617691397911f34e4574d03385c08aec900 4.1.3-rc2
 5cdcfed7b5b129843e1602b5d43c7651de337092 4.1.3-rc3
+ce7195d2b80e4df9857e434fa29689fd678a2341 RELEASE-4.1.3

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szfd8-0004I6-AV; Fri, 10 Aug 2012 03:11:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd7-0004Ht-GX
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:17 +0000
Received: from [85.158.143.35:45993] by server-3.bemta-4.messagelabs.com id
	AE/E4-31486-4DB74205; Fri, 10 Aug 2012 03:11:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1344568272!11811375!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18934 invoked from network); 10 Aug 2012 03:11:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-0002p5-Sk
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-00084r-OK
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Message-Id: <E1Szfd1-00084r-OK@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:11 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Added signature for changeset
	ce7195d2b80e
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527287 -3600
# Node ID 1225aff05dd202dec7136543f04d475a45b78551
# Parent  7cdd79dea62b76daf270c27d314889173f3dc757
Added signature for changeset ce7195d2b80e
---


diff -r 7cdd79dea62b -r 1225aff05dd2 .hgsigs
--- a/.hgsigs	Thu Aug 09 16:47:55 2012 +0100
+++ b/.hgsigs	Thu Aug 09 16:48:07 2012 +0100
@@ -18,3 +18,4 @@ 3eca5bf65e6cca881d599c68f2305f865e0f9fd0
 da64f68730cf1c42c06919578e70d8bc01041051 0 iQEcBAABAgAGBQJPp8OUAAoJEIP+FMlX6CvZRkEIAKp5iVEADZyijVw0Jwj1vUWKqHJYVONzNjzRcnavWAEzsuwbAxQ6QfMJIai2ThjF79M2w7fPXY03S/vCV4/bXVE9R9s2/IUmS9B6pK+DAhw3ExuNUfsxq9UZd3Iul6hWifjjouYnBmgUtpF7O5z4pfQ+r1+z58FpIYPrv39NARt5YW7tcPeUJh4gOJ0ugORc5CclZqLLiljjIbVY6DN+jJDzjqCAwbWLGbkVw4kEGAeWI6aP3/5ZDpnk9Yytp9GpZ8d3BpmlHaR/kY6xepmZUqBPFGKUGY437+1jKWGgUYPLt2RC0S88W4iLRW6b9HXd7u3bhrn36ERz8XZ10KqjH7A=
 acbd3617691397911f34e4574d03385c08aec900 0 iQEcBAABAgAGBQJP3zbaAAoJEIP+FMlX6CvZoMUH/1TQcdw+e/7BmxtXBnMIrpiTJ7/tffSBYurcoQFq1cTaJJgz5in8iq1JWHgru/ToYQ9PaWY0wVQcb1Yj40rCGNnASlSzQqgRQbYMmZpKd0+TESDtMkl6q1FXECrs8ag/HMHwkVYsgdAEmQ/7IouRK4kBOXXzSWhMRU24YkHdJAnQCcXD9L99Yjmrr5oxF/fgVG7WnhfTGlhpu7FaUeWlDjBRlIuw6HeNnXMwubAn569dGXyPdwJnbU0nCLRrQGjQn7DsmeN25gL4R5Pz+uhp4eeGB7ORYT/mj5+xeS2Cjb3XfptV3qAW2FJVYRLit7lp5cmsKvtBnr8mAO8GS0R+8Pg=
 5cdcfed7b5b129843e1602b5d43c7651de337092 0 iQEcBAABAgAGBQJQDB6TAAoJEIP+FMlX6CvZ+H8IAJbWR4PrKOt3gMpgEYdADts96vtduD3oet5C+l8FSlo0pDPtF32wPQ5tQz+Ll8OtCFckSIzobsw+9IMrZ38nRwP1UM2LgLUuo6WVVwYZ4DKVIntDrC1DV6Us1CmGiHiTHqPNDypBB2NponJ21rlD8zRY4Q661BgdKXVwqq5H6SDtxNRSn7RPDYnsIvavabr0fvcR38YOHVG4TvfXP+uge0UfEvIurGEBnTn25E0vadLG9la9SGKeEm8HuTDnzuxQmSic7tPdodQ0oQYQ5AAj+/mdW2B9uaCDsmOeP4udDNcV4yXxdLxNA2GkeSSJ/+U0hj2HBaHZvd+hvAeHBZGdMAU=
+ce7195d2b80e4df9857e434fa29689fd678a2341 0 iQEcBAABAgAGBQJQI9u1AAoJEIP+FMlX6CvZU88IAKKz8mw53zvvdEFaV39669d+SFATRyatb9OF6L1O6RQczsdxI7koyGyLL64V6NvpMB3RLFrh3dD+1ZIy4W13AWuDSnby45oIijHpcQqZ+Zt1ijxDj/wuViSC+4S+sdkgCDfmMyGb5a8XwnoKIWb6EOJVT8FFjuVJ3UsTXfujCyDdDeKoFH7ZGfq+r7k0DoANqkNi2AIhxUrw/h/9ydNffd4Gh/BUsHHcx5DEfXUplbT3pPUvq6o38rsqM80xZNR7lgL7chxFHjs94OOqX71gEZw0sR1hi+gbL8eJTIsep4kM4Z0aOYJJCqUFYv5C31Nn54GWECKJSNSWtBo8hIqLpI0=

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szfd8-0004I6-AV; Fri, 10 Aug 2012 03:11:18 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd7-0004Ht-GX
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:17 +0000
Received: from [85.158.143.35:45993] by server-3.bemta-4.messagelabs.com id
	AE/E4-31486-4DB74205; Fri, 10 Aug 2012 03:11:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1344568272!11811375!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18934 invoked from network); 10 Aug 2012 03:11:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:14 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-0002p5-Sk
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-00084r-OK
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Message-Id: <E1Szfd1-00084r-OK@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:11 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Added signature for changeset
	ce7195d2b80e
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527287 -3600
# Node ID 1225aff05dd202dec7136543f04d475a45b78551
# Parent  7cdd79dea62b76daf270c27d314889173f3dc757
Added signature for changeset ce7195d2b80e
---


diff -r 7cdd79dea62b -r 1225aff05dd2 .hgsigs
--- a/.hgsigs	Thu Aug 09 16:47:55 2012 +0100
+++ b/.hgsigs	Thu Aug 09 16:48:07 2012 +0100
@@ -18,3 +18,4 @@ 3eca5bf65e6cca881d599c68f2305f865e0f9fd0
 da64f68730cf1c42c06919578e70d8bc01041051 0 iQEcBAABAgAGBQJPp8OUAAoJEIP+FMlX6CvZRkEIAKp5iVEADZyijVw0Jwj1vUWKqHJYVONzNjzRcnavWAEzsuwbAxQ6QfMJIai2ThjF79M2w7fPXY03S/vCV4/bXVE9R9s2/IUmS9B6pK+DAhw3ExuNUfsxq9UZd3Iul6hWifjjouYnBmgUtpF7O5z4pfQ+r1+z58FpIYPrv39NARt5YW7tcPeUJh4gOJ0ugORc5CclZqLLiljjIbVY6DN+jJDzjqCAwbWLGbkVw4kEGAeWI6aP3/5ZDpnk9Yytp9GpZ8d3BpmlHaR/kY6xepmZUqBPFGKUGY437+1jKWGgUYPLt2RC0S88W4iLRW6b9HXd7u3bhrn36ERz8XZ10KqjH7A=
 acbd3617691397911f34e4574d03385c08aec900 0 iQEcBAABAgAGBQJP3zbaAAoJEIP+FMlX6CvZoMUH/1TQcdw+e/7BmxtXBnMIrpiTJ7/tffSBYurcoQFq1cTaJJgz5in8iq1JWHgru/ToYQ9PaWY0wVQcb1Yj40rCGNnASlSzQqgRQbYMmZpKd0+TESDtMkl6q1FXECrs8ag/HMHwkVYsgdAEmQ/7IouRK4kBOXXzSWhMRU24YkHdJAnQCcXD9L99Yjmrr5oxF/fgVG7WnhfTGlhpu7FaUeWlDjBRlIuw6HeNnXMwubAn569dGXyPdwJnbU0nCLRrQGjQn7DsmeN25gL4R5Pz+uhp4eeGB7ORYT/mj5+xeS2Cjb3XfptV3qAW2FJVYRLit7lp5cmsKvtBnr8mAO8GS0R+8Pg=
 5cdcfed7b5b129843e1602b5d43c7651de337092 0 iQEcBAABAgAGBQJQDB6TAAoJEIP+FMlX6CvZ+H8IAJbWR4PrKOt3gMpgEYdADts96vtduD3oet5C+l8FSlo0pDPtF32wPQ5tQz+Ll8OtCFckSIzobsw+9IMrZ38nRwP1UM2LgLUuo6WVVwYZ4DKVIntDrC1DV6Us1CmGiHiTHqPNDypBB2NponJ21rlD8zRY4Q661BgdKXVwqq5H6SDtxNRSn7RPDYnsIvavabr0fvcR38YOHVG4TvfXP+uge0UfEvIurGEBnTn25E0vadLG9la9SGKeEm8HuTDnzuxQmSic7tPdodQ0oQYQ5AAj+/mdW2B9uaCDsmOeP4udDNcV4yXxdLxNA2GkeSSJ/+U0hj2HBaHZvd+hvAeHBZGdMAU=
+ce7195d2b80e4df9857e434fa29689fd678a2341 0 iQEcBAABAgAGBQJQI9u1AAoJEIP+FMlX6CvZU88IAKKz8mw53zvvdEFaV39669d+SFATRyatb9OF6L1O6RQczsdxI7koyGyLL64V6NvpMB3RLFrh3dD+1ZIy4W13AWuDSnby45oIijHpcQqZ+Zt1ijxDj/wuViSC+4S+sdkgCDfmMyGb5a8XwnoKIWb6EOJVT8FFjuVJ3UsTXfujCyDdDeKoFH7ZGfq+r7k0DoANqkNi2AIhxUrw/h/9ydNffd4Gh/BUsHHcx5DEfXUplbT3pPUvq6o38rsqM80xZNR7lgL7chxFHjs94OOqX71gEZw0sR1hi+gbL8eJTIsep4kM4Z0aOYJJCqUFYv5C31Nn54GWECKJSNSWtBo8hIqLpI0=

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:43 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzfdV-0004NW-Gx; Fri, 10 Aug 2012 03:11:41 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzfdU-0004Ls-JA
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:40 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1344568289!11730472!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1948 invoked from network); 10 Aug 2012 03:11:31 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:31 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-0002oz-0W
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd0-00084L-OF
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:10 +0000
Message-Id: <E1Szfd0-00084L-OF@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:10 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Update Xen version to 4.1.3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527250 -3600
# Node ID ce7195d2b80e4df9857e434fa29689fd678a2341
# Parent  985fb467d180f8149c0f1041461b77b2078a2fcd
Update Xen version to 4.1.3
---


diff -r 985fb467d180 -r ce7195d2b80e Config.mk
--- a/Config.mk	Thu Aug 09 16:44:51 2012 +0100
+++ b/Config.mk	Thu Aug 09 16:47:30 2012 +0100
@@ -179,7 +179,7 @@ endif
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.1.3-rc3
+QEMU_TAG ?= xen-4.1.3
 # Mon Apr 2 17:55:05 2012 +0100
 # qemu-xen-traditional: QDISK fixes
 
diff -r 985fb467d180 -r ce7195d2b80e xen/Makefile
--- a/xen/Makefile	Thu Aug 09 16:44:51 2012 +0100
+++ b/xen/Makefile	Thu Aug 09 16:47:30 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 1
-export XEN_EXTRAVERSION ?= .3-rc4-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .3$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 03:11:43 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 03:11:43 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzfdV-0004NW-Gx; Fri, 10 Aug 2012 03:11:41 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzfdU-0004Ls-JA
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:40 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-27.messagelabs.com!1344568289!11730472!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.2; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1948 invoked from network); 10 Aug 2012 03:11:31 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 03:11:31 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd1-0002oz-0W
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szfd0-00084L-OF
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 03:11:10 +0000
Message-Id: <E1Szfd0-00084L-OF@xenbits.xen.org>
Date: Fri, 10 Aug 2012 03:11:10 +0000
From: Xen patchbot-4.1-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.1-testing] Update Xen version to 4.1.3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527250 -3600
# Node ID ce7195d2b80e4df9857e434fa29689fd678a2341
# Parent  985fb467d180f8149c0f1041461b77b2078a2fcd
Update Xen version to 4.1.3
---


diff -r 985fb467d180 -r ce7195d2b80e Config.mk
--- a/Config.mk	Thu Aug 09 16:44:51 2012 +0100
+++ b/Config.mk	Thu Aug 09 16:47:30 2012 +0100
@@ -179,7 +179,7 @@ endif
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.1.3-rc3
+QEMU_TAG ?= xen-4.1.3
 # Mon Apr 2 17:55:05 2012 +0100
 # qemu-xen-traditional: QDISK fixes
 
diff -r 985fb467d180 -r ce7195d2b80e xen/Makefile
--- a/xen/Makefile	Thu Aug 09 16:44:51 2012 +0100
+++ b/xen/Makefile	Thu Aug 09 16:47:30 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 1
-export XEN_EXTRAVERSION ?= .3-rc4-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .3$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3d-0003xH-KW; Fri, 10 Aug 2012 12:11:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3c-0003wa-Eg
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:12 +0000
Received: from [85.158.143.99:43365] by server-3.bemta-4.messagelabs.com id
	FD/6B-31486-F5AF4205; Fri, 10 Aug 2012 12:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-216.messagelabs.com!1344600670!20008527!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2333 invoked from network); 10 Aug 2012 12:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0000uk-V0
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0004TA-N4
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Message-Id: <E1Szo3Z-0004TA-N4@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Update Xen version to 4.0.4
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527243 -3600
# Node ID 8ea28053de39b361089603926353fa626abff3d7
# Parent  2bd0027ba0d11e14699f95cee47c147fdfb9a86f
Update Xen version to 4.0.4
---


diff -r 2bd0027ba0d1 -r 8ea28053de39 Config.mk
--- a/Config.mk	Thu Aug 09 16:45:12 2012 +0100
+++ b/Config.mk	Thu Aug 09 16:47:23 2012 +0100
@@ -178,7 +178,7 @@ endif
 # CONFIG_QEMU ?= ../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG := xen-4.0.4-rc3
+QEMU_TAG := xen-4.0.4
 # Thu Feb 2 13:47:06 2012 +0000
 # e1000: bounds packet size against buffer size
 
diff -r 2bd0027ba0d1 -r 8ea28053de39 xen/Makefile
--- a/xen/Makefile	Thu Aug 09 16:45:12 2012 +0100
+++ b/xen/Makefile	Thu Aug 09 16:47:23 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 0
-export XEN_EXTRAVERSION ?= .4-rc4-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3d-0003xH-KW; Fri, 10 Aug 2012 12:11:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3c-0003wa-Eg
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:12 +0000
Received: from [85.158.143.99:43365] by server-3.bemta-4.messagelabs.com id
	FD/6B-31486-F5AF4205; Fri, 10 Aug 2012 12:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-216.messagelabs.com!1344600670!20008527!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2333 invoked from network); 10 Aug 2012 12:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0000uk-V0
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0004TA-N4
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Message-Id: <E1Szo3Z-0004TA-N4@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Update Xen version to 4.0.4
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527243 -3600
# Node ID 8ea28053de39b361089603926353fa626abff3d7
# Parent  2bd0027ba0d11e14699f95cee47c147fdfb9a86f
Update Xen version to 4.0.4
---


diff -r 2bd0027ba0d1 -r 8ea28053de39 Config.mk
--- a/Config.mk	Thu Aug 09 16:45:12 2012 +0100
+++ b/Config.mk	Thu Aug 09 16:47:23 2012 +0100
@@ -178,7 +178,7 @@ endif
 # CONFIG_QEMU ?= ../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG := xen-4.0.4-rc3
+QEMU_TAG := xen-4.0.4
 # Thu Feb 2 13:47:06 2012 +0000
 # e1000: bounds packet size against buffer size
 
diff -r 2bd0027ba0d1 -r 8ea28053de39 xen/Makefile
--- a/xen/Makefile	Thu Aug 09 16:45:12 2012 +0100
+++ b/xen/Makefile	Thu Aug 09 16:47:23 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 0
-export XEN_EXTRAVERSION ?= .4-rc4-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .4$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3e-0003xj-Pr; Fri, 10 Aug 2012 12:11:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3d-0003wt-8m
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:13 +0000
Received: from [85.158.139.83:2736] by server-10.bemta-5.messagelabs.com id
	B3/CE-24472-06AF4205; Fri, 10 Aug 2012 12:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-182.messagelabs.com!1344600670!27734178!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28167 invoked from network); 10 Aug 2012 12:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3a-0000un-FR
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3a-0004TP-66
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:10 +0000
Message-Id: <E1Szo3a-0004TP-66@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Added tag RELEASE-4.0.4 for
	changeset 8ea28053de39
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527269 -3600
# Node ID abf8c57178aab643b040b14780bd7be0a6fb0222
# Parent  8ea28053de39b361089603926353fa626abff3d7
Added tag RELEASE-4.0.4 for changeset 8ea28053de39
---


diff -r 8ea28053de39 -r abf8c57178aa .hgtags
--- a/.hgtags	Thu Aug 09 16:47:23 2012 +0100
+++ b/.hgtags	Thu Aug 09 16:47:49 2012 +0100
@@ -67,3 +67,4 @@ 00b5807c08f266b11fe54de808bafc4f74dde972
 94fddf2a19482c88a60c07a1a085374586d207e8 4.0.4-rc1
 fe1ae79f1a7f0c25445a4753aa9367b312f81910 4.0.4-rc2
 9af8521e0411930143150aba53ea0c8bc61a678a 4.0.4-rc3
+8ea28053de39b361089603926353fa626abff3d7 RELEASE-4.0.4

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3e-0003xj-Pr; Fri, 10 Aug 2012 12:11:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3d-0003wt-8m
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:13 +0000
Received: from [85.158.139.83:2736] by server-10.bemta-5.messagelabs.com id
	B3/CE-24472-06AF4205; Fri, 10 Aug 2012 12:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-182.messagelabs.com!1344600670!27734178!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28167 invoked from network); 10 Aug 2012 12:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3a-0000un-FR
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3a-0004TP-66
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:10 +0000
Message-Id: <E1Szo3a-0004TP-66@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:09 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Added tag RELEASE-4.0.4 for
	changeset 8ea28053de39
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527269 -3600
# Node ID abf8c57178aab643b040b14780bd7be0a6fb0222
# Parent  8ea28053de39b361089603926353fa626abff3d7
Added tag RELEASE-4.0.4 for changeset 8ea28053de39
---


diff -r 8ea28053de39 -r abf8c57178aa .hgtags
--- a/.hgtags	Thu Aug 09 16:47:23 2012 +0100
+++ b/.hgtags	Thu Aug 09 16:47:49 2012 +0100
@@ -67,3 +67,4 @@ 00b5807c08f266b11fe54de808bafc4f74dde972
 94fddf2a19482c88a60c07a1a085374586d207e8 4.0.4-rc1
 fe1ae79f1a7f0c25445a4753aa9367b312f81910 4.0.4-rc2
 9af8521e0411930143150aba53ea0c8bc61a678a 4.0.4-rc3
+8ea28053de39b361089603926353fa626abff3d7 RELEASE-4.0.4

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3e-0003xe-NO; Fri, 10 Aug 2012 12:11:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3d-0003ws-5F
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:13 +0000
Received: from [85.158.143.99:2795] by server-2.bemta-4.messagelabs.com id
	26/6A-19021-06AF4205; Fri, 10 Aug 2012 12:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-216.messagelabs.com!1344600670!17910803!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12077 invoked from network); 10 Aug 2012 12:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3a-0000uq-Ng
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3a-0004Te-Kx
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:10 +0000
Message-Id: <E1Szo3a-0004Te-Kx@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:10 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Added signature for changeset
	8ea28053de39
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527299 -3600
# Node ID 228e6f382d5d239d969c04448e045e2b74077f10
# Parent  abf8c57178aab643b040b14780bd7be0a6fb0222
Added signature for changeset 8ea28053de39
---


diff -r abf8c57178aa -r 228e6f382d5d .hgsigs
--- a/.hgsigs	Thu Aug 09 16:47:49 2012 +0100
+++ b/.hgsigs	Thu Aug 09 16:48:19 2012 +0100
@@ -20,3 +20,4 @@ 00b5807c08f266b11fe54de808bafc4f74dde972
 94fddf2a19482c88a60c07a1a085374586d207e8 0 iQEcBAABAgAGBQJPp8P7AAoJEIP+FMlX6CvZticH/jEqpGGEdlhBftLU7IeQ+0y4E25rbwH4iPpcRFctOvjWi8AsNT3u87UYvP/IqPoCg5NlNIYzmm9GO5dRV+cfKrsNQ1zKB0LETUkElfo+RM1upwGzNc4Hct87Gu8TNGYOsXSovHH868vnZXN0ZylR0PcHMrawJaOi9bJP2GkKo9XKEkmx0Pq77VQCCRUijWSaBYhRKgAbJ3VTB1/qzXDrve2v4HXCg9vFILH6DPWz5M3EhIZQh3+IIcUVlWi/6WbPergm8moKU4TXZc7kpl/hO2x+/LnneA/v96PzyQIJcl/m3PcIBjiaB17UCxwSfkS4VUZjLtfL5rRAywcnjVYXOyY=
 fe1ae79f1a7f0c25445a4753aa9367b312f81910 0 iQEcBAABAgAGBQJP3zchAAoJEIP+FMlX6CvZib0H/A5jcY9NBbd4+QxPz67tdKMX1O0wVUvy160p9Nq1vQcbtrxcpVpR0o0/Ss2pbc9wJpBzcbKsBLxWffolkIxF7Dr5OiQU9Zu6lF1ou6WoJ9wscAWYvxjJY5KrS9cu2aTZged89WUJSJOZq96BujCp0bc3+jbin70Dn/Y9UvkghbUfb2x2ZJ2Tj3yxsfsogK6ShfN7xoyRhZSqCgczzcUQ72+HGJvqpMIvwUNkeKJzymM9nqbIKiP1HKK4rB97zCflwNgBrSJ4BNLQ49cJSFrbNB+X6p6MUXrNLrlBet19WR4C/wHMK9ovnOnSWgzg3mi3zlnJ/CcKOF+XmPHhg0kmi9M=
 9af8521e0411930143150aba53ea0c8bc61a678a 0 iQEcBAABAgAGBQJQDB67AAoJEIP+FMlX6CvZLkYIALNpZT7CykRqQBzYnWWG5lY7KTDU/HcOhv2cXr3RXX9f8cBNTS6oTA6UcJ8J+hb6w1fY78LKNPGKpgafB0Ceuq2p+uywupNvg/E68xzIsQhXxKiQhziPzMCsGaFfuUE2Ea0CQYizL5p2/xfV46NEXff5pgJnTPFAYlQ/OznIu5wAsQEj0jsy0a7R+ygkFIjiwu4cm8F57z0+9NUKPjtYgXDZXaoir61vYVdyjgRYlaFdPCXzY5neIq7JwaZxXEpU+aGd0biMeS0wu4cwFLC9knY5YDsrVbwhoYZvOakUOm9JOnDViZII5ohB9MAgguQ1tf4CeAtWpPVDxj/C7lSlDz8=
+8ea28053de39b361089603926353fa626abff3d7 0 iQEcBAABAgAGBQJQI9vCAAoJEIP+FMlX6CvZrUIH/20W5Ll1xxMBCnSQpNxXFkWSDBk868QMHK3tOjVHal5AAbrGcweEpASvEi7VhtTdPSyGKqICCGUeQx7HIAvwyxrJBvnlLflI2ZdC2WAip1WNmkqzejvWZE2uKVYtmMfFtslVBmHe+tNukyQmnVK46SvTbXk3ukrbXCdpV3L7qC4pqYrD5ZhWaqzwo5w75JsX7cJ1/r92VqsDQTcLEnk2hRIQwH3y+nnkluu+2Bq6L3KjkCexU8No1zLyZeJXmun19rhe3nloSvJ6BeCNn+gR/Tg6Cy7PxIHfs5ee3Cot61lIcvsl3rp9yRnNVEthzi56n+nDm4Sbnm7hR4IluO2YdWY=

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3e-0003xe-NO; Fri, 10 Aug 2012 12:11:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3d-0003ws-5F
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:13 +0000
Received: from [85.158.143.99:2795] by server-2.bemta-4.messagelabs.com id
	26/6A-19021-06AF4205; Fri, 10 Aug 2012 12:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-216.messagelabs.com!1344600670!17910803!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12077 invoked from network); 10 Aug 2012 12:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3a-0000uq-Ng
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3a-0004Te-Kx
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:10 +0000
Message-Id: <E1Szo3a-0004Te-Kx@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:10 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] Added signature for changeset
	8ea28053de39
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1344527299 -3600
# Node ID 228e6f382d5d239d969c04448e045e2b74077f10
# Parent  abf8c57178aab643b040b14780bd7be0a6fb0222
Added signature for changeset 8ea28053de39
---


diff -r abf8c57178aa -r 228e6f382d5d .hgsigs
--- a/.hgsigs	Thu Aug 09 16:47:49 2012 +0100
+++ b/.hgsigs	Thu Aug 09 16:48:19 2012 +0100
@@ -20,3 +20,4 @@ 00b5807c08f266b11fe54de808bafc4f74dde972
 94fddf2a19482c88a60c07a1a085374586d207e8 0 iQEcBAABAgAGBQJPp8P7AAoJEIP+FMlX6CvZticH/jEqpGGEdlhBftLU7IeQ+0y4E25rbwH4iPpcRFctOvjWi8AsNT3u87UYvP/IqPoCg5NlNIYzmm9GO5dRV+cfKrsNQ1zKB0LETUkElfo+RM1upwGzNc4Hct87Gu8TNGYOsXSovHH868vnZXN0ZylR0PcHMrawJaOi9bJP2GkKo9XKEkmx0Pq77VQCCRUijWSaBYhRKgAbJ3VTB1/qzXDrve2v4HXCg9vFILH6DPWz5M3EhIZQh3+IIcUVlWi/6WbPergm8moKU4TXZc7kpl/hO2x+/LnneA/v96PzyQIJcl/m3PcIBjiaB17UCxwSfkS4VUZjLtfL5rRAywcnjVYXOyY=
 fe1ae79f1a7f0c25445a4753aa9367b312f81910 0 iQEcBAABAgAGBQJP3zchAAoJEIP+FMlX6CvZib0H/A5jcY9NBbd4+QxPz67tdKMX1O0wVUvy160p9Nq1vQcbtrxcpVpR0o0/Ss2pbc9wJpBzcbKsBLxWffolkIxF7Dr5OiQU9Zu6lF1ou6WoJ9wscAWYvxjJY5KrS9cu2aTZged89WUJSJOZq96BujCp0bc3+jbin70Dn/Y9UvkghbUfb2x2ZJ2Tj3yxsfsogK6ShfN7xoyRhZSqCgczzcUQ72+HGJvqpMIvwUNkeKJzymM9nqbIKiP1HKK4rB97zCflwNgBrSJ4BNLQ49cJSFrbNB+X6p6MUXrNLrlBet19WR4C/wHMK9ovnOnSWgzg3mi3zlnJ/CcKOF+XmPHhg0kmi9M=
 9af8521e0411930143150aba53ea0c8bc61a678a 0 iQEcBAABAgAGBQJQDB67AAoJEIP+FMlX6CvZLkYIALNpZT7CykRqQBzYnWWG5lY7KTDU/HcOhv2cXr3RXX9f8cBNTS6oTA6UcJ8J+hb6w1fY78LKNPGKpgafB0Ceuq2p+uywupNvg/E68xzIsQhXxKiQhziPzMCsGaFfuUE2Ea0CQYizL5p2/xfV46NEXff5pgJnTPFAYlQ/OznIu5wAsQEj0jsy0a7R+ygkFIjiwu4cm8F57z0+9NUKPjtYgXDZXaoir61vYVdyjgRYlaFdPCXzY5neIq7JwaZxXEpU+aGd0biMeS0wu4cwFLC9knY5YDsrVbwhoYZvOakUOm9JOnDViZII5ohB9MAgguQ1tf4CeAtWpPVDxj/C7lSlDz8=
+8ea28053de39b361089603926353fa626abff3d7 0 iQEcBAABAgAGBQJQI9vCAAoJEIP+FMlX6CvZrUIH/20W5Ll1xxMBCnSQpNxXFkWSDBk868QMHK3tOjVHal5AAbrGcweEpASvEi7VhtTdPSyGKqICCGUeQx7HIAvwyxrJBvnlLflI2ZdC2WAip1WNmkqzejvWZE2uKVYtmMfFtslVBmHe+tNukyQmnVK46SvTbXk3ukrbXCdpV3L7qC4pqYrD5ZhWaqzwo5w75JsX7cJ1/r92VqsDQTcLEnk2hRIQwH3y+nnkluu+2Bq6L3KjkCexU8No1zLyZeJXmun19rhe3nloSvJ6BeCNn+gR/Tg6Cy7PxIHfs5ee3Cot61lIcvsl3rp9yRnNVEthzi56n+nDm4Sbnm7hR4IluO2YdWY=

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3k-00040r-VG; Fri, 10 Aug 2012 12:11:20 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3i-0003xB-Qo
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1344600669!1730001!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27429 invoked from network); 10 Aug 2012 12:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0000uh-CZ
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0004Ss-7w
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Message-Id: <E1Szo3Z-0004Ss-7w@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:08 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] cpufreq: P state stats aren't
	available if there is no cpufreq driver
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User David Vrabel <david.vrabel@citrix.com>
# Date 1344527112 -3600
# Node ID 2bd0027ba0d11e14699f95cee47c147fdfb9a86f
# Parent  a51c86b407d732dd66343dea7a6249d2649740c6
cpufreq: P state stats aren't available if there is no cpufreq driver

If there is no cpufreq driver (e.g., with an AMD Opteron 8212) then
reading the P state statistics causes a deadlock as an uninitialized
spinlock is locked in do_get_pm_info(). The spinlock is initialized in
cpufreq_statistic_init() which is not called if cpufreq_driver ==
NULL.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen-unstable changeset:   25706:7fd5facb6084
xen-unstable date:        Fri Aug 03 09:50:28 2012 +0200
---


diff -r a51c86b407d7 -r 2bd0027ba0d1 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Thu Aug 09 15:47:19 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c	Thu Aug 09 16:45:12 2012 +0100
@@ -68,6 +68,8 @@ int do_get_pm_info(struct xen_sysctl_get
     case PMSTAT_PX:
         if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
             return -ENODEV;
+        if ( !cpufreq_driver )
+            return -ENODEV;
         if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
             return -EINVAL;
         break;

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3k-00040r-VG; Fri, 10 Aug 2012 12:11:20 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3i-0003xB-Qo
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1344600669!1730001!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27429 invoked from network); 10 Aug 2012 12:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0000uh-CZ
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0004Ss-7w
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Message-Id: <E1Szo3Z-0004Ss-7w@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:08 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] cpufreq: P state stats aren't
	available if there is no cpufreq driver
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User David Vrabel <david.vrabel@citrix.com>
# Date 1344527112 -3600
# Node ID 2bd0027ba0d11e14699f95cee47c147fdfb9a86f
# Parent  a51c86b407d732dd66343dea7a6249d2649740c6
cpufreq: P state stats aren't available if there is no cpufreq driver

If there is no cpufreq driver (e.g., with an AMD Opteron 8212) then
reading the P state statistics causes a deadlock as an uninitialized
spinlock is locked in do_get_pm_info(). The spinlock is initialized in
cpufreq_statistic_init() which is not called if cpufreq_driver ==
NULL.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen-unstable changeset:   25706:7fd5facb6084
xen-unstable date:        Fri Aug 03 09:50:28 2012 +0200
---


diff -r a51c86b407d7 -r 2bd0027ba0d1 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Thu Aug 09 15:47:19 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c	Thu Aug 09 16:45:12 2012 +0100
@@ -68,6 +68,8 @@ int do_get_pm_info(struct xen_sysctl_get
     case PMSTAT_PX:
         if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
             return -ENODEV;
+        if ( !cpufreq_driver )
+            return -ENODEV;
         if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
             return -EINVAL;
         break;

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3k-00040l-Sn; Fri, 10 Aug 2012 12:11:20 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3i-0003yt-Kg
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:18 +0000
Received: from [85.158.143.35:26343] by server-1.bemta-4.messagelabs.com id
	13/0E-20198-56AF4205; Fri, 10 Aug 2012 12:11:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1344600669!15971696!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25451 invoked from network); 10 Aug 2012 12:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0000ue-1h
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Y-0004Sd-M8
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:08 +0000
Message-Id: <E1Szo3Y-0004Sd-M8@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:08 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] xen: only check for shared pages
	while any exist on teardown
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1344523639 -3600
# Node ID a51c86b407d732dd66343dea7a6249d2649740c6
# Parent  6d7ae840463c5d6d15c710199b3f4b2bb2a33000
xen: only check for shared pages while any exist on teardown

Avoids worst case behavour when guest has a large p2m.

This is XSA-11 / CVE-2012-3433

Signed-off-by: Tim Deegan <tim@xen.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 6d7ae840463c -r a51c86b407d7 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Mon Jul 30 13:39:47 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Thu Aug 09 15:47:19 2012 +0100
@@ -1725,6 +1725,8 @@ void p2m_teardown(struct domain *d)
 #ifdef __x86_64__
     for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ )
     {
+        if ( atomic_read(&d->shr_pages) == 0 )
+            break;
         mfn = p2m->get_entry(d, gfn, &t, p2m_query);
         if ( mfn_valid(mfn) && (t == p2m_ram_shared) )
             BUG_ON(mem_sharing_unshare_page(d, gfn, MEM_SHARING_DESTROY_GFN));

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 12:11:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 12:11:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1Szo3k-00040l-Sn; Fri, 10 Aug 2012 12:11:20 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3i-0003yt-Kg
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:18 +0000
Received: from [85.158.143.35:26343] by server-1.bemta-4.messagelabs.com id
	13/0E-20198-56AF4205; Fri, 10 Aug 2012 12:11:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-21.messagelabs.com!1344600669!15971696!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25451 invoked from network); 10 Aug 2012 12:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 12:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Z-0000ue-1h
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1Szo3Y-0004Sd-M8
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 12:11:08 +0000
Message-Id: <E1Szo3Y-0004Sd-M8@xenbits.xen.org>
Date: Fri, 10 Aug 2012 12:11:08 +0000
From: Xen patchbot-4.0-testing <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-4.0-testing] xen: only check for shared pages
	while any exist on teardown
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1344523639 -3600
# Node ID a51c86b407d732dd66343dea7a6249d2649740c6
# Parent  6d7ae840463c5d6d15c710199b3f4b2bb2a33000
xen: only check for shared pages while any exist on teardown

Avoids worst case behavour when guest has a large p2m.

This is XSA-11 / CVE-2012-3433

Signed-off-by: Tim Deegan <tim@xen.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 6d7ae840463c -r a51c86b407d7 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c	Mon Jul 30 13:39:47 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c	Thu Aug 09 15:47:19 2012 +0100
@@ -1725,6 +1725,8 @@ void p2m_teardown(struct domain *d)
 #ifdef __x86_64__
     for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ )
     {
+        if ( atomic_read(&d->shr_pages) == 0 )
+            break;
         mfn = p2m->get_entry(d, gfn, &t, p2m_query);
         if ( mfn_valid(mfn) && (t == p2m_ram_shared) )
             BUG_ON(mem_sharing_unshare_page(d, gfn, MEM_SHARING_DESTROY_GFN));

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 17:55:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 17:55:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SztQY-000693-8l; Fri, 10 Aug 2012 17:55:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SztQX-00068w-M4
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 17:55:13 +0000
Received: from [85.158.143.35:62426] by server-1.bemta-4.messagelabs.com id
	D1/17-07754-10B45205; Fri, 10 Aug 2012 17:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-21.messagelabs.com!1344621311!5016939!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3272 invoked from network); 10 Aug 2012 17:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 17:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SztQU-0005Dg-M1
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 17:55:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SztQU-0004Ib-90
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 17:55:10 +0000
Message-Id: <E1SztQU-0004Ib-90@xenbits.xen.org>
Date: Fri, 10 Aug 2012 17:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] make all (native) hypercalls
	consistently have "long" return type
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344585061 -7200
# Node ID 47080c96593702acd4145c5a1175b7d7f8f0679d
# Parent  d25406e25af444a40f7f9e6617dcd3305b00d63c
make all (native) hypercalls consistently have "long" return type

for common and x86 ones at least, to address the problem of storing
zero-extended values into the multicall result field otherwise.

Reported-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r d25406e25af4 -r 47080c965937 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/arch/x86/mm.c	Fri Aug 10 09:51:01 2012 +0200
@@ -2973,7 +2973,7 @@ static inline void fixunmap_domain_page(
 #define fixunmap_domain_page(ptr) ((void)(ptr))
 #endif
 
-int do_mmuext_op(
+long do_mmuext_op(
     XEN_GUEST_HANDLE(mmuext_op_t) uops,
     unsigned int count,
     XEN_GUEST_HANDLE(uint) pdone,
@@ -3437,7 +3437,7 @@ int do_mmuext_op(
     return rc;
 }
 
-int do_mmu_update(
+long do_mmu_update(
     XEN_GUEST_HANDLE(mmu_update_t) ureqs,
     unsigned int count,
     XEN_GUEST_HANDLE(uint) pdone,
@@ -4285,15 +4285,15 @@ static int __do_update_va_mapping(
     return rc;
 }
 
-int do_update_va_mapping(unsigned long va, u64 val64,
-                         unsigned long flags)
+long do_update_va_mapping(unsigned long va, u64 val64,
+                          unsigned long flags)
 {
     return __do_update_va_mapping(va, val64, flags, current->domain);
 }
 
-int do_update_va_mapping_otherdomain(unsigned long va, u64 val64,
-                                     unsigned long flags,
-                                     domid_t domid)
+long do_update_va_mapping_otherdomain(unsigned long va, u64 val64,
+                                      unsigned long flags,
+                                      domid_t domid)
 {
     struct domain *pg_owner;
     int rc;
diff -r d25406e25af4 -r 47080c965937 xen/common/compat/xenoprof.c
--- a/xen/common/compat/xenoprof.c	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/common/compat/xenoprof.c	Fri Aug 10 09:51:01 2012 +0200
@@ -5,6 +5,7 @@
 #include <compat/xenoprof.h>
 
 #define COMPAT
+#define ret_t int
 
 #define do_xenoprof_op compat_xenoprof_op
 
diff -r d25406e25af4 -r 47080c965937 xen/common/kexec.c
--- a/xen/common/kexec.c	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/common/kexec.c	Fri Aug 10 09:51:01 2012 +0200
@@ -845,8 +845,8 @@ static int kexec_exec(XEN_GUEST_HANDLE(v
     return -EINVAL; /* never reached */
 }
 
-int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg,
-                           int compat)
+static int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg,
+                                bool_t compat)
 {
     unsigned long flags;
     int ret = -EINVAL;
diff -r d25406e25af4 -r 47080c965937 xen/common/xenoprof.c
--- a/xen/common/xenoprof.c	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/common/xenoprof.c	Fri Aug 10 09:51:01 2012 +0200
@@ -607,6 +607,8 @@ static int xenoprof_op_init(XEN_GUEST_HA
     return (copy_to_guest(arg, &xenoprof_init, 1) ? -EFAULT : 0);
 }
 
+#define ret_t long
+
 #endif /* !COMPAT */
 
 static int xenoprof_op_get_buffer(XEN_GUEST_HANDLE(void) arg)
@@ -660,7 +662,7 @@ static int xenoprof_op_get_buffer(XEN_GU
                       || (op == XENOPROF_disable_virq)  \
                       || (op == XENOPROF_get_buffer))
  
-int do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg)
+ret_t do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg)
 {
     int ret = 0;
     
@@ -904,6 +906,7 @@ int do_xenoprof_op(int op, XEN_GUEST_HAN
 }
 
 #if defined(CONFIG_COMPAT) && !defined(COMPAT)
+#undef ret_t
 #include "compat/xenoprof.c"
 #endif
 
diff -r d25406e25af4 -r 47080c965937 xen/include/asm-x86/hypercall.h
--- a/xen/include/asm-x86/hypercall.h	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/include/asm-x86/hypercall.h	Fri Aug 10 09:51:01 2012 +0200
@@ -24,7 +24,7 @@ extern long
 do_set_trap_table(
     XEN_GUEST_HANDLE(const_trap_info_t) traps);
 
-extern int
+extern long
 do_mmu_update(
     XEN_GUEST_HANDLE(mmu_update_t) ureqs,
     unsigned int count,
@@ -62,7 +62,7 @@ do_update_descriptor(
 extern long
 do_mca(XEN_GUEST_HANDLE(xen_mc_t) u_xen_mc);
 
-extern int
+extern long
 do_update_va_mapping(
     unsigned long va,
     u64 val64,
@@ -72,14 +72,14 @@ extern long
 do_physdev_op(
     int cmd, XEN_GUEST_HANDLE(void) arg);
 
-extern int
+extern long
 do_update_va_mapping_otherdomain(
     unsigned long va,
     u64 val64,
     unsigned long flags,
     domid_t domid);
 
-extern int
+extern long
 do_mmuext_op(
     XEN_GUEST_HANDLE(mmuext_op_t) uops,
     unsigned int count,
@@ -90,10 +90,6 @@ extern unsigned long
 do_iret(
     void);
 
-extern int
-do_kexec(
-    unsigned long op, unsigned arg1, XEN_GUEST_HANDLE(void) uarg);
-
 #ifdef __x86_64__
 
 extern long
diff -r d25406e25af4 -r 47080c965937 xen/include/xen/hypercall.h
--- a/xen/include/xen/hypercall.h	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/include/xen/hypercall.h	Fri Aug 10 09:51:01 2012 +0200
@@ -137,7 +137,7 @@ extern long
 do_tmem_op(
     XEN_GUEST_HANDLE(tmem_op_t) uops);
 
-extern int
+extern long
 do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg);
 
 #ifdef CONFIG_COMPAT

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

From xen-changelog-bounces@lists.xen.org Fri Aug 10 17:55:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 10 Aug 2012 17:55:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SztQY-000693-8l; Fri, 10 Aug 2012 17:55:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SztQX-00068w-M4
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 17:55:13 +0000
Received: from [85.158.143.35:62426] by server-1.bemta-4.messagelabs.com id
	D1/17-07754-10B45205; Fri, 10 Aug 2012 17:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-21.messagelabs.com!1344621311!5016939!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3272 invoked from network); 10 Aug 2012 17:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	10 Aug 2012 17:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SztQU-0005Dg-M1
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 17:55:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SztQU-0004Ib-90
	for xen-changelog@lists.xensource.com; Fri, 10 Aug 2012 17:55:10 +0000
Message-Id: <E1SztQU-0004Ib-90@xenbits.xen.org>
Date: Fri, 10 Aug 2012 17:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] make all (native) hypercalls
	consistently have "long" return type
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344585061 -7200
# Node ID 47080c96593702acd4145c5a1175b7d7f8f0679d
# Parent  d25406e25af444a40f7f9e6617dcd3305b00d63c
make all (native) hypercalls consistently have "long" return type

for common and x86 ones at least, to address the problem of storing
zero-extended values into the multicall result field otherwise.

Reported-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r d25406e25af4 -r 47080c965937 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/arch/x86/mm.c	Fri Aug 10 09:51:01 2012 +0200
@@ -2973,7 +2973,7 @@ static inline void fixunmap_domain_page(
 #define fixunmap_domain_page(ptr) ((void)(ptr))
 #endif
 
-int do_mmuext_op(
+long do_mmuext_op(
     XEN_GUEST_HANDLE(mmuext_op_t) uops,
     unsigned int count,
     XEN_GUEST_HANDLE(uint) pdone,
@@ -3437,7 +3437,7 @@ int do_mmuext_op(
     return rc;
 }
 
-int do_mmu_update(
+long do_mmu_update(
     XEN_GUEST_HANDLE(mmu_update_t) ureqs,
     unsigned int count,
     XEN_GUEST_HANDLE(uint) pdone,
@@ -4285,15 +4285,15 @@ static int __do_update_va_mapping(
     return rc;
 }
 
-int do_update_va_mapping(unsigned long va, u64 val64,
-                         unsigned long flags)
+long do_update_va_mapping(unsigned long va, u64 val64,
+                          unsigned long flags)
 {
     return __do_update_va_mapping(va, val64, flags, current->domain);
 }
 
-int do_update_va_mapping_otherdomain(unsigned long va, u64 val64,
-                                     unsigned long flags,
-                                     domid_t domid)
+long do_update_va_mapping_otherdomain(unsigned long va, u64 val64,
+                                      unsigned long flags,
+                                      domid_t domid)
 {
     struct domain *pg_owner;
     int rc;
diff -r d25406e25af4 -r 47080c965937 xen/common/compat/xenoprof.c
--- a/xen/common/compat/xenoprof.c	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/common/compat/xenoprof.c	Fri Aug 10 09:51:01 2012 +0200
@@ -5,6 +5,7 @@
 #include <compat/xenoprof.h>
 
 #define COMPAT
+#define ret_t int
 
 #define do_xenoprof_op compat_xenoprof_op
 
diff -r d25406e25af4 -r 47080c965937 xen/common/kexec.c
--- a/xen/common/kexec.c	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/common/kexec.c	Fri Aug 10 09:51:01 2012 +0200
@@ -845,8 +845,8 @@ static int kexec_exec(XEN_GUEST_HANDLE(v
     return -EINVAL; /* never reached */
 }
 
-int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg,
-                           int compat)
+static int do_kexec_op_internal(unsigned long op, XEN_GUEST_HANDLE(void) uarg,
+                                bool_t compat)
 {
     unsigned long flags;
     int ret = -EINVAL;
diff -r d25406e25af4 -r 47080c965937 xen/common/xenoprof.c
--- a/xen/common/xenoprof.c	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/common/xenoprof.c	Fri Aug 10 09:51:01 2012 +0200
@@ -607,6 +607,8 @@ static int xenoprof_op_init(XEN_GUEST_HA
     return (copy_to_guest(arg, &xenoprof_init, 1) ? -EFAULT : 0);
 }
 
+#define ret_t long
+
 #endif /* !COMPAT */
 
 static int xenoprof_op_get_buffer(XEN_GUEST_HANDLE(void) arg)
@@ -660,7 +662,7 @@ static int xenoprof_op_get_buffer(XEN_GU
                       || (op == XENOPROF_disable_virq)  \
                       || (op == XENOPROF_get_buffer))
  
-int do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg)
+ret_t do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg)
 {
     int ret = 0;
     
@@ -904,6 +906,7 @@ int do_xenoprof_op(int op, XEN_GUEST_HAN
 }
 
 #if defined(CONFIG_COMPAT) && !defined(COMPAT)
+#undef ret_t
 #include "compat/xenoprof.c"
 #endif
 
diff -r d25406e25af4 -r 47080c965937 xen/include/asm-x86/hypercall.h
--- a/xen/include/asm-x86/hypercall.h	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/include/asm-x86/hypercall.h	Fri Aug 10 09:51:01 2012 +0200
@@ -24,7 +24,7 @@ extern long
 do_set_trap_table(
     XEN_GUEST_HANDLE(const_trap_info_t) traps);
 
-extern int
+extern long
 do_mmu_update(
     XEN_GUEST_HANDLE(mmu_update_t) ureqs,
     unsigned int count,
@@ -62,7 +62,7 @@ do_update_descriptor(
 extern long
 do_mca(XEN_GUEST_HANDLE(xen_mc_t) u_xen_mc);
 
-extern int
+extern long
 do_update_va_mapping(
     unsigned long va,
     u64 val64,
@@ -72,14 +72,14 @@ extern long
 do_physdev_op(
     int cmd, XEN_GUEST_HANDLE(void) arg);
 
-extern int
+extern long
 do_update_va_mapping_otherdomain(
     unsigned long va,
     u64 val64,
     unsigned long flags,
     domid_t domid);
 
-extern int
+extern long
 do_mmuext_op(
     XEN_GUEST_HANDLE(mmuext_op_t) uops,
     unsigned int count,
@@ -90,10 +90,6 @@ extern unsigned long
 do_iret(
     void);
 
-extern int
-do_kexec(
-    unsigned long op, unsigned arg1, XEN_GUEST_HANDLE(void) uarg);
-
 #ifdef __x86_64__
 
 extern long
diff -r d25406e25af4 -r 47080c965937 xen/include/xen/hypercall.h
--- a/xen/include/xen/hypercall.h	Wed Aug 08 18:02:57 2012 +0100
+++ b/xen/include/xen/hypercall.h	Fri Aug 10 09:51:01 2012 +0200
@@ -137,7 +137,7 @@ extern long
 do_tmem_op(
     XEN_GUEST_HANDLE(tmem_op_t) uops);
 
-extern int
+extern long
 do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg);
 
 #ifdef CONFIG_COMPAT

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

From xen-changelog-bounces@lists.xen.org Sat Aug 11 00:11:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Aug 2012 00:11:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzzIV-00022U-MW; Sat, 11 Aug 2012 00:11:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzzIU-00022K-Ma
	for xen-changelog@lists.xensource.com; Sat, 11 Aug 2012 00:11:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1344643870!8625033!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22237 invoked from network); 11 Aug 2012 00:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	11 Aug 2012 00:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzzIL-0001R9-LG
	for xen-changelog@lists.xensource.com; Sat, 11 Aug 2012 00:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzzIL-00058W-4w
	for xen-changelog@lists.xensource.com; Sat, 11 Aug 2012 00:11:09 +0000
Message-Id: <E1SzzIL-00058W-4w@xenbits.xen.org>
Date: Sat, 11 Aug 2012 00:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/cpuidle: clean up statistics
	reporting to user mode
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344602477 -7200
# Node ID dc4970af48a0a2d7a3e54233bc1aa5e0da0fe44a
# Parent  47080c96593702acd4145c5a1175b7d7f8f0679d
x86/cpuidle: clean up statistics reporting to user mode

First of all, when no ACPI Cx data was reported, make sure the usage
count passed back to user mode is not random.

Besides that, fold a lot of redundant code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 47080c965937 -r dc4970af48a0 xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c	Fri Aug 10 09:51:01 2012 +0200
+++ b/xen/arch/x86/acpi/cpu_idle.c	Fri Aug 10 14:41:17 2012 +0200
@@ -1100,36 +1100,23 @@ int pmstat_get_cx_stat(uint32_t cpuid, s
     }
 
     stat->last = power->last_state ? power->last_state->idx : 0;
-    stat->nr = power->count;
     stat->idle_time = get_cpu_idle_time(cpuid);
 
     /* mimic the stat when detail info hasn't been registered by dom0 */
     if ( pm_idle_save == NULL )
     {
-        /* C1 */
-        usage[1] = 1;
-        res[1] = stat->idle_time;
+        stat->nr = 2;
 
-        /* C0 */
-        res[0] = NOW() - res[1];
+        usage[1] = idle_usage = 1;
+        res[1] = idle_res = stat->idle_time;
 
-        if ( copy_to_guest_offset(stat->triggers, 0, &usage[0], 2) ||
-            copy_to_guest_offset(stat->residencies, 0, &res[0], 2) )
-            return -EFAULT;
+        memset(&hw_res, 0, sizeof(hw_res));
+    }
+    else
+    {
+        stat->nr = power->count;
 
-        stat->pc2 = 0;
-        stat->pc3 = 0;
-        stat->pc6 = 0;
-        stat->pc7 = 0;
-        stat->cc3 = 0;
-        stat->cc6 = 0;
-        stat->cc7 = 0;
-        return 0;
-    }
-
-    for ( i = power->count - 1; i >= 0; i-- )
-    {
-        if ( i != 0 )
+        for ( i = 1; i < power->count; i++ )
         {
             spin_lock_irq(&power->stat_lock);
             usage[i] = power->states[i].usage;
@@ -1139,19 +1126,17 @@ int pmstat_get_cx_stat(uint32_t cpuid, s
             idle_usage += usage[i];
             idle_res += res[i];
         }
-        else
-        {
-            usage[i] = idle_usage;
-            res[i] = NOW() - idle_res;
-        }
+
+        get_hw_residencies(cpuid, &hw_res);
     }
 
-    if ( copy_to_guest_offset(stat->triggers, 0, &usage[0], power->count) ||
-        copy_to_guest_offset(stat->residencies, 0, &res[0], power->count) )
+    usage[0] = idle_usage;
+    res[0] = NOW() - idle_res;
+
+    if ( copy_to_guest(stat->triggers, usage, stat->nr) ||
+         copy_to_guest(stat->residencies, res, stat->nr) )
         return -EFAULT;
 
-    get_hw_residencies(cpuid, &hw_res);
-
     stat->pc2 = hw_res.pc2;
     stat->pc3 = hw_res.pc3;
     stat->pc6 = hw_res.pc6;

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

From xen-changelog-bounces@lists.xen.org Sat Aug 11 00:11:31 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 11 Aug 2012 00:11:31 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1SzzIV-00022U-MW; Sat, 11 Aug 2012 00:11:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzzIU-00022K-Ma
	for xen-changelog@lists.xensource.com; Sat, 11 Aug 2012 00:11:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1344643870!8625033!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22237 invoked from network); 11 Aug 2012 00:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	11 Aug 2012 00:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzzIL-0001R9-LG
	for xen-changelog@lists.xensource.com; Sat, 11 Aug 2012 00:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1SzzIL-00058W-4w
	for xen-changelog@lists.xensource.com; Sat, 11 Aug 2012 00:11:09 +0000
Message-Id: <E1SzzIL-00058W-4w@xenbits.xen.org>
Date: Sat, 11 Aug 2012 00:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/cpuidle: clean up statistics
	reporting to user mode
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344602477 -7200
# Node ID dc4970af48a0a2d7a3e54233bc1aa5e0da0fe44a
# Parent  47080c96593702acd4145c5a1175b7d7f8f0679d
x86/cpuidle: clean up statistics reporting to user mode

First of all, when no ACPI Cx data was reported, make sure the usage
count passed back to user mode is not random.

Besides that, fold a lot of redundant code.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 47080c965937 -r dc4970af48a0 xen/arch/x86/acpi/cpu_idle.c
--- a/xen/arch/x86/acpi/cpu_idle.c	Fri Aug 10 09:51:01 2012 +0200
+++ b/xen/arch/x86/acpi/cpu_idle.c	Fri Aug 10 14:41:17 2012 +0200
@@ -1100,36 +1100,23 @@ int pmstat_get_cx_stat(uint32_t cpuid, s
     }
 
     stat->last = power->last_state ? power->last_state->idx : 0;
-    stat->nr = power->count;
     stat->idle_time = get_cpu_idle_time(cpuid);
 
     /* mimic the stat when detail info hasn't been registered by dom0 */
     if ( pm_idle_save == NULL )
     {
-        /* C1 */
-        usage[1] = 1;
-        res[1] = stat->idle_time;
+        stat->nr = 2;
 
-        /* C0 */
-        res[0] = NOW() - res[1];
+        usage[1] = idle_usage = 1;
+        res[1] = idle_res = stat->idle_time;
 
-        if ( copy_to_guest_offset(stat->triggers, 0, &usage[0], 2) ||
-            copy_to_guest_offset(stat->residencies, 0, &res[0], 2) )
-            return -EFAULT;
+        memset(&hw_res, 0, sizeof(hw_res));
+    }
+    else
+    {
+        stat->nr = power->count;
 
-        stat->pc2 = 0;
-        stat->pc3 = 0;
-        stat->pc6 = 0;
-        stat->pc7 = 0;
-        stat->cc3 = 0;
-        stat->cc6 = 0;
-        stat->cc7 = 0;
-        return 0;
-    }
-
-    for ( i = power->count - 1; i >= 0; i-- )
-    {
-        if ( i != 0 )
+        for ( i = 1; i < power->count; i++ )
         {
             spin_lock_irq(&power->stat_lock);
             usage[i] = power->states[i].usage;
@@ -1139,19 +1126,17 @@ int pmstat_get_cx_stat(uint32_t cpuid, s
             idle_usage += usage[i];
             idle_res += res[i];
         }
-        else
-        {
-            usage[i] = idle_usage;
-            res[i] = NOW() - idle_res;
-        }
+
+        get_hw_residencies(cpuid, &hw_res);
     }
 
-    if ( copy_to_guest_offset(stat->triggers, 0, &usage[0], power->count) ||
-        copy_to_guest_offset(stat->residencies, 0, &res[0], power->count) )
+    usage[0] = idle_usage;
+    res[0] = NOW() - idle_res;
+
+    if ( copy_to_guest(stat->triggers, usage, stat->nr) ||
+         copy_to_guest(stat->residencies, res, stat->nr) )
         return -EFAULT;
 
-    get_hw_residencies(cpuid, &hw_res);
-
     stat->pc2 = hw_res.pc2;
     stat->pc3 = hw_res.pc3;
     stat->pc6 = hw_res.pc6;

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

From xen-changelog-bounces@lists.xen.org Mon Aug 13 19:44:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Aug 2012 19:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T10Yl-0006I9-4O; Mon, 13 Aug 2012 19:44:19 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T10Yj-0006Hv-7t
	for xen-changelog@lists.xensource.com; Mon, 13 Aug 2012 19:44:17 +0000
Received: from [85.158.139.83:17779] by server-1.bemta-5.messagelabs.com id
	F8/72-09980-01959205; Mon, 13 Aug 2012 19:44:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-182.messagelabs.com!1344887049!25208518!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17732 invoked from network); 13 Aug 2012 19:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	13 Aug 2012 19:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T10Yb-0000Ue-8p
	for xen-changelog@lists.xensource.com; Mon, 13 Aug 2012 19:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T10Ya-0004N3-TY
	for xen-changelog@lists.xensource.com; Mon, 13 Aug 2012 19:44:08 +0000
Message-Id: <E1T10Ya-0004N3-TY@xenbits.xen.org>
Date: Mon, 13 Aug 2012 19:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: init.d/Linux/xencommons: load
	all known backend drivers
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1344863482 -3600
# Node ID 14788c9cb6456c10086c793656bd2d51cf795dc8
# Parent  dc4970af48a0a2d7a3e54233bc1aa5e0da0fe44a
tools: init.d/Linux/xencommons: load all known backend drivers

Load all known backend drivers fron xenlinux and pvops based dom0
kernels.  There is currently no code in xend or libxl to load these
drivers on demand.  Currently libxl has also no helpful error message if
a backend driver is missing.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r dc4970af48a0 -r 14788c9cb645 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons	Fri Aug 10 14:41:17 2012 +0200
+++ b/tools/hotplug/Linux/init.d/xencommons	Mon Aug 13 14:11:22 2012 +0100
@@ -59,8 +59,14 @@ do_start () {
 	modprobe xen-gntalloc 2>/dev/null
 	modprobe xen-blkback 2>/dev/null
 	modprobe xen-netback 2>/dev/null
+	modprobe xen-pciback 2>/dev/null
 	modprobe evtchn 2>/dev/null
 	modprobe gntdev 2>/dev/null
+	modprobe netbk 2>/dev/null
+	modprobe blkbk 2>/dev/null
+	modprobe xen-scsibk 2>/dev/null
+	modprobe usbbk 2>/dev/null
+	modprobe pciback 2>/dev/null
 	modprobe xen-acpi-processor 2>/dev/null
 	mkdir -p /var/run/xen
 

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

From xen-changelog-bounces@lists.xen.org Mon Aug 13 19:44:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 13 Aug 2012 19:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T10Yl-0006I9-4O; Mon, 13 Aug 2012 19:44:19 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T10Yj-0006Hv-7t
	for xen-changelog@lists.xensource.com; Mon, 13 Aug 2012 19:44:17 +0000
Received: from [85.158.139.83:17779] by server-1.bemta-5.messagelabs.com id
	F8/72-09980-01959205; Mon, 13 Aug 2012 19:44:16 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-182.messagelabs.com!1344887049!25208518!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17732 invoked from network); 13 Aug 2012 19:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	13 Aug 2012 19:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T10Yb-0000Ue-8p
	for xen-changelog@lists.xensource.com; Mon, 13 Aug 2012 19:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T10Ya-0004N3-TY
	for xen-changelog@lists.xensource.com; Mon, 13 Aug 2012 19:44:08 +0000
Message-Id: <E1T10Ya-0004N3-TY@xenbits.xen.org>
Date: Mon, 13 Aug 2012 19:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools: init.d/Linux/xencommons: load
	all known backend drivers
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1344863482 -3600
# Node ID 14788c9cb6456c10086c793656bd2d51cf795dc8
# Parent  dc4970af48a0a2d7a3e54233bc1aa5e0da0fe44a
tools: init.d/Linux/xencommons: load all known backend drivers

Load all known backend drivers fron xenlinux and pvops based dom0
kernels.  There is currently no code in xend or libxl to load these
drivers on demand.  Currently libxl has also no helpful error message if
a backend driver is missing.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r dc4970af48a0 -r 14788c9cb645 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons	Fri Aug 10 14:41:17 2012 +0200
+++ b/tools/hotplug/Linux/init.d/xencommons	Mon Aug 13 14:11:22 2012 +0100
@@ -59,8 +59,14 @@ do_start () {
 	modprobe xen-gntalloc 2>/dev/null
 	modprobe xen-blkback 2>/dev/null
 	modprobe xen-netback 2>/dev/null
+	modprobe xen-pciback 2>/dev/null
 	modprobe evtchn 2>/dev/null
 	modprobe gntdev 2>/dev/null
+	modprobe netbk 2>/dev/null
+	modprobe blkbk 2>/dev/null
+	modprobe xen-scsibk 2>/dev/null
+	modprobe usbbk 2>/dev/null
+	modprobe pciback 2>/dev/null
 	modprobe xen-acpi-processor 2>/dev/null
 	mkdir -p /var/run/xen
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 14 01:00:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 14 Aug 2012 01:00:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T15UV-00051u-0b; Tue, 14 Aug 2012 01:00:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UT-0004eu-FJ
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:13 +0000
Received: from [85.158.138.51:2998] by server-3.bemta-3.messagelabs.com id
	C5/C9-13809-C13A9205; Tue, 14 Aug 2012 01:00:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1344906010!28004473!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13767 invoked from network); 14 Aug 2012 01:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	14 Aug 2012 01:00:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UQ-0005Q5-5z
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UP-0003wm-Be
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:09 +0000
Message-Id: <E1T15UP-0003wm-Be@xenbits.xen.org>
Date: Tue, 14 Aug 2012 01:00:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix build for gcc prior to 4.3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1344877717 -3600
# Node ID 9d572b6b65f2da8a75c804a629739d36e4cafe31
# Parent  14788c9cb6456c10086c793656bd2d51cf795dc8
libxl: fix build for gcc prior to 4.3

So far all we (explicitly) require is gcc 3.4 or better, so we
shouldn't be unconditionally using features supported only by much
newer versions.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 14788c9cb645 -r 9d572b6b65f2 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Mon Aug 13 14:11:22 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Mon Aug 13 18:08:37 2012 +0100
@@ -55,8 +55,10 @@
 #ifdef LIBXL_H
 # error libxl.h should be included via libxl_internal.h, not separately
 #endif
-#define LIBXL_EXTERNAL_CALLERS_ONLY \
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+# define LIBXL_EXTERNAL_CALLERS_ONLY \
     __attribute__((warning("may not be called from within libxl")))
+#endif
 
 #include "libxl.h"
 #include "_paths.h"

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

From xen-changelog-bounces@lists.xen.org Tue Aug 14 01:00:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 14 Aug 2012 01:00:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T15UV-00051u-0b; Tue, 14 Aug 2012 01:00:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UT-0004eu-FJ
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:13 +0000
Received: from [85.158.138.51:2998] by server-3.bemta-3.messagelabs.com id
	C5/C9-13809-C13A9205; Tue, 14 Aug 2012 01:00:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1344906010!28004473!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13767 invoked from network); 14 Aug 2012 01:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	14 Aug 2012 01:00:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UQ-0005Q5-5z
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UP-0003wm-Be
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:09 +0000
Message-Id: <E1T15UP-0003wm-Be@xenbits.xen.org>
Date: Tue, 14 Aug 2012 01:00:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: fix build for gcc prior to 4.3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <JBeulich@suse.com>
# Date 1344877717 -3600
# Node ID 9d572b6b65f2da8a75c804a629739d36e4cafe31
# Parent  14788c9cb6456c10086c793656bd2d51cf795dc8
libxl: fix build for gcc prior to 4.3

So far all we (explicitly) require is gcc 3.4 or better, so we
shouldn't be unconditionally using features supported only by much
newer versions.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 14788c9cb645 -r 9d572b6b65f2 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Mon Aug 13 14:11:22 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Mon Aug 13 18:08:37 2012 +0100
@@ -55,8 +55,10 @@
 #ifdef LIBXL_H
 # error libxl.h should be included via libxl_internal.h, not separately
 #endif
-#define LIBXL_EXTERNAL_CALLERS_ONLY \
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+# define LIBXL_EXTERNAL_CALLERS_ONLY \
     __attribute__((warning("may not be called from within libxl")))
+#endif
 
 #include "libxl.h"
 #include "_paths.h"

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

From xen-changelog-bounces@lists.xen.org Tue Aug 14 01:00:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 14 Aug 2012 01:00:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T15Ua-0005ng-3S; Tue, 14 Aug 2012 01:00:20 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UZ-0004lp-2a
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1344906010!9055748!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31934 invoked from network); 14 Aug 2012 01:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	14 Aug 2012 01:00:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UQ-0005TM-Iu
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UQ-0003x5-6Y
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:10 +0000
Message-Id: <E1T15UQ-0003x5-6Y@xenbits.xen.org>
Date: Tue, 14 Aug 2012 01:00:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] config: Split debug build from debug
	symbols
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1344877773 -3600
# Node ID 33d596f46521ea852e90cf6dbdbf3680d104134c
# Parent  9d572b6b65f2da8a75c804a629739d36e4cafe31
config: Split debug build from debug symbols

RPM based packaging systems expect binaries to have debug symbols which get
placed in a separate debuginfo RPM.

Split the concept of a debug build up so that binaries can be built with
debugging symbols without having the other gubbins which $(debug) implies, most
notibly frame pointers.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 9d572b6b65f2 -r 33d596f46521 Config.mk
--- a/Config.mk	Mon Aug 13 18:08:37 2012 +0100
+++ b/Config.mk	Mon Aug 13 18:09:33 2012 +0100
@@ -11,6 +11,7 @@ realpath = $(wildcard $(foreach file,$(1
 
 # A debug build of Xen and tools?
 debug ?= y
+debug_symbols ?= $(debug)
 
 XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
                          -e s/i86pc/x86_32/ -e s/amd64/x86_64/ -e s/arm.*/arm/)
@@ -147,7 +148,7 @@ define buildmakevars2file-closure
 	$(call move-if-changed,$(1).tmp,$(1))
 endef
 
-ifeq ($(debug),y)
+ifeq ($(debug_symbols),y)
 CFLAGS += -g
 endif
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 14 01:00:26 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 14 Aug 2012 01:00:26 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T15Ua-0005ng-3S; Tue, 14 Aug 2012 01:00:20 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UZ-0004lp-2a
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1344906010!9055748!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31934 invoked from network); 14 Aug 2012 01:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	14 Aug 2012 01:00:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UQ-0005TM-Iu
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T15UQ-0003x5-6Y
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 01:00:10 +0000
Message-Id: <E1T15UQ-0003x5-6Y@xenbits.xen.org>
Date: Tue, 14 Aug 2012 01:00:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] config: Split debug build from debug
	symbols
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1344877773 -3600
# Node ID 33d596f46521ea852e90cf6dbdbf3680d104134c
# Parent  9d572b6b65f2da8a75c804a629739d36e4cafe31
config: Split debug build from debug symbols

RPM based packaging systems expect binaries to have debug symbols which get
placed in a separate debuginfo RPM.

Split the concept of a debug build up so that binaries can be built with
debugging symbols without having the other gubbins which $(debug) implies, most
notibly frame pointers.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 9d572b6b65f2 -r 33d596f46521 Config.mk
--- a/Config.mk	Mon Aug 13 18:08:37 2012 +0100
+++ b/Config.mk	Mon Aug 13 18:09:33 2012 +0100
@@ -11,6 +11,7 @@ realpath = $(wildcard $(foreach file,$(1
 
 # A debug build of Xen and tools?
 debug ?= y
+debug_symbols ?= $(debug)
 
 XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
                          -e s/i86pc/x86_32/ -e s/amd64/x86_64/ -e s/arm.*/arm/)
@@ -147,7 +148,7 @@ define buildmakevars2file-closure
 	$(call move-if-changed,$(1).tmp,$(1))
 endef
 
-ifeq ($(debug),y)
+ifeq ($(debug_symbols),y)
 CFLAGS += -g
 endif
 

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

From xen-changelog-bounces@lists.xen.org Tue Aug 14 15:18:44 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 14 Aug 2012 15:18:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1ItC-00073j-TJ; Tue, 14 Aug 2012 15:18:38 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T1ItB-00073e-8p
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 15:18:37 +0000
Received: from [85.158.143.35:44278] by server-1.bemta-4.messagelabs.com id
	22/CF-07754-C4C6A205; Tue, 14 Aug 2012 15:18:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1344957063!5546977!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.4 required=7.0 tests=INFO_TLD
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20842 invoked from network); 14 Aug 2012 15:11:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	14 Aug 2012 15:11:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T1Ilr-0006c2-6Y
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 15:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T1Ilr-0001Re-00
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 15:11:03 +0000
Date: Tue, 14 Aug 2012 15:11:03 +0000
Message-Id: <E1T1Ilr-0001Re-00@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] Revert "qemu-xen-traditional:
	use O_DIRECT to open disk images for IDE"
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit effd5676225761abdab90becac519716515c3be4
Author: Ian Jackson <ian.jackson@eu.citrix.com>
Date:   Tue Aug 14 15:57:49 2012 +0100

    Revert "qemu-xen-traditional: use O_DIRECT to open disk images for IDE"
    
    This reverts commit 1307e42a4b3c1102d75401bc0cffb4eb6c9b7a38.
    
    In fact after a lengthy discussion, we came up with the conclusion
    that WRITEBACK is OK for IDE.
    See: http://marc.info/?l=xen-devel&m=133311527009773
    
    Therefore revert this which was committed in error.
---
 xenstore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xenstore.c b/xenstore.c
index 8ab9ed4..1857160 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -643,7 +643,7 @@ void xenstore_parse_domain_config(int hvm_domid)
 	    }
             pstrcpy(bs->filename, sizeof(bs->filename), params);
 
-            flags = BDRV_O_NOCACHE;
+            flags = BDRV_O_CACHE_WB; /* snapshot and write-back */
             is_readonly = 0;
             if (pasprintf(&buf, "%s/mode", bpath) == -1)
                 continue;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Aug 14 15:18:44 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 14 Aug 2012 15:18:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1ItC-00073j-TJ; Tue, 14 Aug 2012 15:18:38 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T1ItB-00073e-8p
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 15:18:37 +0000
Received: from [85.158.143.35:44278] by server-1.bemta-4.messagelabs.com id
	22/CF-07754-C4C6A205; Tue, 14 Aug 2012 15:18:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1344957063!5546977!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.4 required=7.0 tests=INFO_TLD
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20842 invoked from network); 14 Aug 2012 15:11:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	14 Aug 2012 15:11:04 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T1Ilr-0006c2-6Y
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 15:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T1Ilr-0001Re-00
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 15:11:03 +0000
Date: Tue, 14 Aug 2012 15:11:03 +0000
Message-Id: <E1T1Ilr-0001Re-00@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] Revert "qemu-xen-traditional:
	use O_DIRECT to open disk images for IDE"
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit effd5676225761abdab90becac519716515c3be4
Author: Ian Jackson <ian.jackson@eu.citrix.com>
Date:   Tue Aug 14 15:57:49 2012 +0100

    Revert "qemu-xen-traditional: use O_DIRECT to open disk images for IDE"
    
    This reverts commit 1307e42a4b3c1102d75401bc0cffb4eb6c9b7a38.
    
    In fact after a lengthy discussion, we came up with the conclusion
    that WRITEBACK is OK for IDE.
    See: http://marc.info/?l=xen-devel&m=133311527009773
    
    Therefore revert this which was committed in error.
---
 xenstore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xenstore.c b/xenstore.c
index 8ab9ed4..1857160 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -643,7 +643,7 @@ void xenstore_parse_domain_config(int hvm_domid)
 	    }
             pstrcpy(bs->filename, sizeof(bs->filename), params);
 
-            flags = BDRV_O_NOCACHE;
+            flags = BDRV_O_CACHE_WB; /* snapshot and write-back */
             is_readonly = 0;
             if (pasprintf(&buf, "%s/mode", bpath) == -1)
                 continue;
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Tue Aug 14 17:55:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 14 Aug 2012 17:55:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1LKl-0003i3-K3; Tue, 14 Aug 2012 17:55:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1LKk-0003hx-Aw
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 17:55:14 +0000
Received: from [85.158.143.35:47626] by server-1.bemta-4.messagelabs.com id
	36/54-07754-1019A205; Tue, 14 Aug 2012 17:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1344966909!11861417!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2782 invoked from network); 14 Aug 2012 17:55:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	14 Aug 2012 17:55:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1LKf-0000Ns-5t
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 17:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1LKe-0005rS-Qd
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 17:55:08 +0000
Message-Id: <E1T1LKe-0005rS-Qd@xenbits.xen.org>
Date: Tue, 14 Aug 2012 17:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PoD: fix (un)locking after
	24772:28edc2b31a9b
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344932894 -7200
# Node ID dc56a9defa30312a46cfb6ddb578e64cfbc6bc8b
# Parent  33d596f46521ea852e90cf6dbdbf3680d104134c
x86/PoD: fix (un)locking after 24772:28edc2b31a9b

That c/s introduced a double unlock on the out-of-memory error path of
p2m_pod_demand_populate().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
---


diff -r 33d596f46521 -r dc56a9defa30 xen/arch/x86/mm/p2m-pod.c
--- a/xen/arch/x86/mm/p2m-pod.c	Mon Aug 13 18:09:33 2012 +0100
+++ b/xen/arch/x86/mm/p2m-pod.c	Tue Aug 14 10:28:14 2012 +0200
@@ -1075,6 +1075,7 @@ out_of_memory:
     printk("%s: Out of populate-on-demand memory! tot_pages %" PRIu32 " pod_entries %" PRIi32 "\n",
            __func__, d->tot_pages, p2m->pod.entry_count);
     domain_crash(d);
+    return -1;
 out_fail:
     pod_unlock(p2m);
     return -1;

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

From xen-changelog-bounces@lists.xen.org Tue Aug 14 17:55:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 14 Aug 2012 17:55:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1LKl-0003i3-K3; Tue, 14 Aug 2012 17:55:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1LKk-0003hx-Aw
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 17:55:14 +0000
Received: from [85.158.143.35:47626] by server-1.bemta-4.messagelabs.com id
	36/54-07754-1019A205; Tue, 14 Aug 2012 17:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-21.messagelabs.com!1344966909!11861417!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2782 invoked from network); 14 Aug 2012 17:55:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	14 Aug 2012 17:55:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1LKf-0000Ns-5t
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 17:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1LKe-0005rS-Qd
	for xen-changelog@lists.xensource.com; Tue, 14 Aug 2012 17:55:08 +0000
Message-Id: <E1T1LKe-0005rS-Qd@xenbits.xen.org>
Date: Tue, 14 Aug 2012 17:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PoD: fix (un)locking after
	24772:28edc2b31a9b
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1344932894 -7200
# Node ID dc56a9defa30312a46cfb6ddb578e64cfbc6bc8b
# Parent  33d596f46521ea852e90cf6dbdbf3680d104134c
x86/PoD: fix (un)locking after 24772:28edc2b31a9b

That c/s introduced a double unlock on the out-of-memory error path of
p2m_pod_demand_populate().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
---


diff -r 33d596f46521 -r dc56a9defa30 xen/arch/x86/mm/p2m-pod.c
--- a/xen/arch/x86/mm/p2m-pod.c	Mon Aug 13 18:09:33 2012 +0100
+++ b/xen/arch/x86/mm/p2m-pod.c	Tue Aug 14 10:28:14 2012 +0200
@@ -1075,6 +1075,7 @@ out_of_memory:
     printk("%s: Out of populate-on-demand memory! tot_pages %" PRIu32 " pod_entries %" PRIi32 "\n",
            __func__, d->tot_pages, p2m->pod.entry_count);
     domain_crash(d);
+    return -1;
 out_fail:
     pod_unlock(p2m);
     return -1;

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

From xen-changelog-bounces@lists.xen.org Wed Aug 15 12:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Aug 2012 12:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1cRN-00049Y-Tf; Wed, 15 Aug 2012 12:11:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1cRM-00049M-5U
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 12:11:12 +0000
Received: from [85.158.138.51:59299] by server-11.bemta-3.messagelabs.com id
	5E/44-23152-FD19B205; Wed, 15 Aug 2012 12:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-174.messagelabs.com!1345032669!20319196!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5506 invoked from network); 15 Aug 2012 12:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Aug 2012 12:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1cRI-0005cR-KD
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 12:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1cRI-0001v9-EB
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 12:11:08 +0000
Message-Id: <E1T1cRI-0001v9-EB@xenbits.xen.org>
Date: Wed, 15 Aug 2012 12:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1344956378 -3600
# Node ID af7143d97fa2f9954afca79528e482a192d3edd2
# Parent  dc56a9defa30312a46cfb6ddb578e64cfbc6bc8b
QEMU_TAG update
---


diff -r dc56a9defa30 -r af7143d97fa2 Config.mk
--- a/Config.mk	Tue Aug 14 10:28:14 2012 +0200
+++ b/Config.mk	Tue Aug 14 15:59:38 2012 +0100
@@ -214,9 +214,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.2.0-rc2
-# Tue Aug 7 18:17:27 2012 +0100
-# mapcache: Fix invalidate if memory requested was not bucket aligned
+QEMU_TAG ?= effd5676225761abdab90becac519716515c3be4
+# Tue Aug 14 15:57:49 2012 +0100
+# Revert "qemu-xen-traditional: use O_DIRECT to open disk images for IDE"
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.

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

From xen-changelog-bounces@lists.xen.org Wed Aug 15 12:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Aug 2012 12:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1cRN-00049Y-Tf; Wed, 15 Aug 2012 12:11:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1cRM-00049M-5U
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 12:11:12 +0000
Received: from [85.158.138.51:59299] by server-11.bemta-3.messagelabs.com id
	5E/44-23152-FD19B205; Wed, 15 Aug 2012 12:11:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-3.tower-174.messagelabs.com!1345032669!20319196!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5506 invoked from network); 15 Aug 2012 12:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Aug 2012 12:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1cRI-0005cR-KD
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 12:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1cRI-0001v9-EB
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 12:11:08 +0000
Message-Id: <E1T1cRI-0001v9-EB@xenbits.xen.org>
Date: Wed, 15 Aug 2012 12:11:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] QEMU_TAG update
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1344956378 -3600
# Node ID af7143d97fa2f9954afca79528e482a192d3edd2
# Parent  dc56a9defa30312a46cfb6ddb578e64cfbc6bc8b
QEMU_TAG update
---


diff -r dc56a9defa30 -r af7143d97fa2 Config.mk
--- a/Config.mk	Tue Aug 14 10:28:14 2012 +0200
+++ b/Config.mk	Tue Aug 14 15:59:38 2012 +0100
@@ -214,9 +214,9 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= xen-4.2.0-rc2
-# Tue Aug 7 18:17:27 2012 +0100
-# mapcache: Fix invalidate if memory requested was not bucket aligned
+QEMU_TAG ?= effd5676225761abdab90becac519716515c3be4
+# Tue Aug 14 15:57:49 2012 +0100
+# Revert "qemu-xen-traditional: use O_DIRECT to open disk images for IDE"
 
 # Short answer -- do not enable this unless you know what you are
 # doing and are prepared for some pain.

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

From xen-changelog-bounces@lists.xen.org Wed Aug 15 21:55:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Aug 2012 21:55:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1lYX-0007ub-Kk; Wed, 15 Aug 2012 21:55:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYW-0007uL-Lf
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:12 +0000
Received: from [85.158.143.99:6587] by server-1.bemta-4.messagelabs.com id
	FC/C1-07754-FBA1C205; Wed, 15 Aug 2012 21:55:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-216.messagelabs.com!1345067710!28405740!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4751 invoked from network); 15 Aug 2012 21:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Aug 2012 21:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYT-0004Ni-KM
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYS-0000B5-SK
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:08 +0000
Message-Id: <E1T1lYS-0000B5-SK@xenbits.xen.org>
Date: Wed, 15 Aug 2012 21:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64/EFI: add CFLAGS to check
	compile
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1345016534 -7200
# Node ID 02b4d5fedb7bac4f98964d32fd9ed1d17b1db4b1
# Parent  af7143d97fa2f9954afca79528e482a192d3edd2
x86-64/EFI: add CFLAGS to check compile

Without this, the compilation of check.c could fail due to compiler
features such as -fstack-protector being enabled, which causes a
missing __stack_chk_fail symbol error.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

Rather than using plain CFLAGS here, remove CFLAGS-y from them to
particularly get rid of the -MF argument referencing (the undefined
here) $(@F).

The use of CFLAGS at once allows dropping the explicit use of -Werror.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r af7143d97fa2 -r 02b4d5fedb7b xen/arch/x86/efi/Makefile
--- a/xen/arch/x86/efi/Makefile	Tue Aug 14 15:59:38 2012 +0100
+++ b/xen/arch/x86/efi/Makefile	Wed Aug 15 09:42:14 2012 +0200
@@ -5,7 +5,7 @@ obj-y += stub.o
 create = test -e $(1) || touch -t 199901010000 $(1)
 
 efi := $(filter y,$(x86_64)$(shell rm -f disabled))
-efi := $(if $(efi),$(shell $(CC) -c -Werror check.c 2>disabled && echo y))
+efi := $(if $(efi),$(shell $(CC) $(filter-out $(CFLAGS-y),$(CFLAGS)) -c check.c 2>disabled && echo y))
 efi := $(if $(efi),$(shell $(LD) -mi386pep --subsystem=10 -o check.efi check.o 2>disabled && echo y))
 efi := $(if $(efi),$(shell rm disabled)y,$(shell $(call create,boot.init.o); $(call create,runtime.o)))
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 15 21:55:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Aug 2012 21:55:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1lYX-0007ub-Kk; Wed, 15 Aug 2012 21:55:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYW-0007uL-Lf
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:12 +0000
Received: from [85.158.143.99:6587] by server-1.bemta-4.messagelabs.com id
	FC/C1-07754-FBA1C205; Wed, 15 Aug 2012 21:55:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-216.messagelabs.com!1345067710!28405740!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4751 invoked from network); 15 Aug 2012 21:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Aug 2012 21:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYT-0004Ni-KM
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYS-0000B5-SK
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:08 +0000
Message-Id: <E1T1lYS-0000B5-SK@xenbits.xen.org>
Date: Wed, 15 Aug 2012 21:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64/EFI: add CFLAGS to check
	compile
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1345016534 -7200
# Node ID 02b4d5fedb7bac4f98964d32fd9ed1d17b1db4b1
# Parent  af7143d97fa2f9954afca79528e482a192d3edd2
x86-64/EFI: add CFLAGS to check compile

Without this, the compilation of check.c could fail due to compiler
features such as -fstack-protector being enabled, which causes a
missing __stack_chk_fail symbol error.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

Rather than using plain CFLAGS here, remove CFLAGS-y from them to
particularly get rid of the -MF argument referencing (the undefined
here) $(@F).

The use of CFLAGS at once allows dropping the explicit use of -Werror.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r af7143d97fa2 -r 02b4d5fedb7b xen/arch/x86/efi/Makefile
--- a/xen/arch/x86/efi/Makefile	Tue Aug 14 15:59:38 2012 +0100
+++ b/xen/arch/x86/efi/Makefile	Wed Aug 15 09:42:14 2012 +0200
@@ -5,7 +5,7 @@ obj-y += stub.o
 create = test -e $(1) || touch -t 199901010000 $(1)
 
 efi := $(filter y,$(x86_64)$(shell rm -f disabled))
-efi := $(if $(efi),$(shell $(CC) -c -Werror check.c 2>disabled && echo y))
+efi := $(if $(efi),$(shell $(CC) $(filter-out $(CFLAGS-y),$(CFLAGS)) -c check.c 2>disabled && echo y))
 efi := $(if $(efi),$(shell $(LD) -mi386pep --subsystem=10 -o check.efi check.o 2>disabled && echo y))
 efi := $(if $(efi),$(shell rm disabled)y,$(shell $(call create,boot.init.o); $(call create,runtime.o)))
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 15 21:55:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Aug 2012 21:55:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1lYY-0007un-NB; Wed, 15 Aug 2012 21:55:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYX-0007uR-7T
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:13 +0000
Received: from [85.158.143.99:15788] by server-3.bemta-4.messagelabs.com id
	D0/59-09529-0CA1C205; Wed, 15 Aug 2012 21:55:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1345067710!25003551!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13327 invoked from network); 15 Aug 2012 21:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Aug 2012 21:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYU-0004Nl-5c
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYT-0000BK-Fo
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:09 +0000
Message-Id: <E1T1lYT-0000BK-Fo@xenbits.xen.org>
Date: Wed, 15 Aug 2012 21:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] acpi: Make sure valid CPU is passed
	to do_pm_op()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@amd.com>
# Date 1345016605 -7200
# Node ID 1df4fdbaade0848496a8b398edab98887751de20
# Parent  02b4d5fedb7bac4f98964d32fd9ed1d17b1db4b1
acpi: Make sure valid CPU is passed to do_pm_op()

Passing invalid CPU value to do_pm_op() will cause assertion
in cpu_online().

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>

Such checks would, at a first glance, then also be missing at the top
of various helper functions, but these check really were already
redundant with the check in do_pm_op(). Remove the redundant checks
for clarity and brevity.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 02b4d5fedb7b -r 1df4fdbaade0 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Wed Aug 15 09:42:14 2012 +0200
+++ b/xen/drivers/acpi/pmstat.c	Wed Aug 15 09:43:25 2012 +0200
@@ -201,8 +201,6 @@ static int get_cpufreq_para(struct xen_s
     struct list_head *pos;
     uint32_t cpu, i, j = 0;
 
-    if ( !op || !cpu_online(op->cpuid) )
-        return -EINVAL;
     pmpt = processor_pminfo[op->cpuid];
     policy = per_cpu(cpufreq_cpu_policy, op->cpuid);
 
@@ -305,9 +303,6 @@ static int set_cpufreq_gov(struct xen_sy
 {
     struct cpufreq_policy new_policy, *old_policy;
 
-    if ( !op || !cpu_online(op->cpuid) )
-        return -EINVAL;
-
     old_policy = per_cpu(cpufreq_cpu_policy, op->cpuid);
     if ( !old_policy )
         return -EINVAL;
@@ -326,8 +321,6 @@ static int set_cpufreq_para(struct xen_s
     int ret = 0;
     struct cpufreq_policy *policy;
 
-    if ( !op || !cpu_online(op->cpuid) )
-        return -EINVAL;
     policy = per_cpu(cpufreq_cpu_policy, op->cpuid);
 
     if ( !policy || !policy->governor )
@@ -404,22 +397,12 @@ static int set_cpufreq_para(struct xen_s
     return ret;
 }
 
-static int get_cpufreq_avgfreq(struct xen_sysctl_pm_op *op)
-{
-    if ( !op || !cpu_online(op->cpuid) )
-        return -EINVAL;
-
-    op->u.get_avgfreq = cpufreq_driver_getavg(op->cpuid, USR_GETAVG);
-
-    return 0;
-}
-
 int do_pm_op(struct xen_sysctl_pm_op *op)
 {
     int ret = 0;
     const struct processor_pminfo *pmpt;
 
-    if ( !op || !cpu_online(op->cpuid) )
+    if ( !op || op->cpuid >= nr_cpu_ids || !cpu_online(op->cpuid) )
         return -EINVAL;
     pmpt = processor_pminfo[op->cpuid];
 
@@ -455,7 +438,7 @@ int do_pm_op(struct xen_sysctl_pm_op *op
 
     case GET_CPUFREQ_AVGFREQ:
     {
-        ret = get_cpufreq_avgfreq(op);
+        op->u.get_avgfreq = cpufreq_driver_getavg(op->cpuid, USR_GETAVG);
         break;
     }
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 15 21:55:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Aug 2012 21:55:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1lYY-0007un-NB; Wed, 15 Aug 2012 21:55:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYX-0007uR-7T
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:13 +0000
Received: from [85.158.143.99:15788] by server-3.bemta-4.messagelabs.com id
	D0/59-09529-0CA1C205; Wed, 15 Aug 2012 21:55:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1345067710!25003551!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13327 invoked from network); 15 Aug 2012 21:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Aug 2012 21:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYU-0004Nl-5c
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYT-0000BK-Fo
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:09 +0000
Message-Id: <E1T1lYT-0000BK-Fo@xenbits.xen.org>
Date: Wed, 15 Aug 2012 21:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] acpi: Make sure valid CPU is passed
	to do_pm_op()
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@amd.com>
# Date 1345016605 -7200
# Node ID 1df4fdbaade0848496a8b398edab98887751de20
# Parent  02b4d5fedb7bac4f98964d32fd9ed1d17b1db4b1
acpi: Make sure valid CPU is passed to do_pm_op()

Passing invalid CPU value to do_pm_op() will cause assertion
in cpu_online().

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>

Such checks would, at a first glance, then also be missing at the top
of various helper functions, but these check really were already
redundant with the check in do_pm_op(). Remove the redundant checks
for clarity and brevity.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 02b4d5fedb7b -r 1df4fdbaade0 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c	Wed Aug 15 09:42:14 2012 +0200
+++ b/xen/drivers/acpi/pmstat.c	Wed Aug 15 09:43:25 2012 +0200
@@ -201,8 +201,6 @@ static int get_cpufreq_para(struct xen_s
     struct list_head *pos;
     uint32_t cpu, i, j = 0;
 
-    if ( !op || !cpu_online(op->cpuid) )
-        return -EINVAL;
     pmpt = processor_pminfo[op->cpuid];
     policy = per_cpu(cpufreq_cpu_policy, op->cpuid);
 
@@ -305,9 +303,6 @@ static int set_cpufreq_gov(struct xen_sy
 {
     struct cpufreq_policy new_policy, *old_policy;
 
-    if ( !op || !cpu_online(op->cpuid) )
-        return -EINVAL;
-
     old_policy = per_cpu(cpufreq_cpu_policy, op->cpuid);
     if ( !old_policy )
         return -EINVAL;
@@ -326,8 +321,6 @@ static int set_cpufreq_para(struct xen_s
     int ret = 0;
     struct cpufreq_policy *policy;
 
-    if ( !op || !cpu_online(op->cpuid) )
-        return -EINVAL;
     policy = per_cpu(cpufreq_cpu_policy, op->cpuid);
 
     if ( !policy || !policy->governor )
@@ -404,22 +397,12 @@ static int set_cpufreq_para(struct xen_s
     return ret;
 }
 
-static int get_cpufreq_avgfreq(struct xen_sysctl_pm_op *op)
-{
-    if ( !op || !cpu_online(op->cpuid) )
-        return -EINVAL;
-
-    op->u.get_avgfreq = cpufreq_driver_getavg(op->cpuid, USR_GETAVG);
-
-    return 0;
-}
-
 int do_pm_op(struct xen_sysctl_pm_op *op)
 {
     int ret = 0;
     const struct processor_pminfo *pmpt;
 
-    if ( !op || !cpu_online(op->cpuid) )
+    if ( !op || op->cpuid >= nr_cpu_ids || !cpu_online(op->cpuid) )
         return -EINVAL;
     pmpt = processor_pminfo[op->cpuid];
 
@@ -455,7 +438,7 @@ int do_pm_op(struct xen_sysctl_pm_op *op
 
     case GET_CPUFREQ_AVGFREQ:
     {
-        ret = get_cpufreq_avgfreq(op);
+        op->u.get_avgfreq = cpufreq_driver_getavg(op->cpuid, USR_GETAVG);
         break;
     }
 

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

From xen-changelog-bounces@lists.xen.org Wed Aug 15 21:55:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Aug 2012 21:55:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1lYY-0007us-PQ; Wed, 15 Aug 2012 21:55:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYX-0007uW-LU
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:13 +0000
Received: from [85.158.143.99:6630] by server-2.bemta-4.messagelabs.com id
	88/E3-31966-1CA1C205; Wed, 15 Aug 2012 21:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-216.messagelabs.com!1345067710!21998479!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9790 invoked from network); 15 Aug 2012 21:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Aug 2012 21:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYU-0004No-9x
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYU-0000BZ-7Y
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:10 +0000
Message-Id: <E1T1lYU-0000BZ-7Y@xenbits.xen.org>
Date: Wed, 15 Aug 2012 21:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] etherboot: Build fixes for gcc 4.7.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345020081 -3600
# Node ID 6d56e31fe1e1dc793379d662a36ff1731760eb0c
# Parent  1df4fdbaade0848496a8b398edab98887751de20
etherboot: Build fixes for gcc 4.7.

Signed-off-by: Keir Fraser <keir@xen.org>
---


diff -r 1df4fdbaade0 -r 6d56e31fe1e1 tools/firmware/etherboot/patches/build_fix_1.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/etherboot/patches/build_fix_1.patch	Wed Aug 15 09:41:21 2012 +0100
@@ -0,0 +1,28 @@
+Fix compile error in isabus_probe with gcc 4.7
+
+The copy of ipxe used during Xen tools build does not define
+ISA_PROBE_ADDRS. As a result isa_extra_probe_addrs[] has a size of 0.
+ISA_IOADDR() tries to access that empty array, which is detected by the
+newer gcc (or perhaps the warning was just turned into an error)
+
+drivers/bus/isa.c: In function 'isabus_probe':
+drivers/bus/isa.c:112:18: error: array subscript is above array bounds [-Werror=array-bounds]
+
+---
+ src/drivers/bus/isa.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+Index: ipxe/src/drivers/bus/isa.c
+===================================================================
+--- ipxe.orig/src/drivers/bus/isa.c
++++ ipxe/src/drivers/bus/isa.c
+@@ -97,6 +97,9 @@ static int isabus_probe ( struct root_de
+ 	int ioidx;
+ 	int rc;
+ 
++	if ( ISA_EXTRA_PROBE_ADDR_COUNT == 0 )
++		return 0;
++
+ 	for_each_table_entry ( driver, ISA_DRIVERS ) {
+ 		for ( ioidx = ISA_IOIDX_MIN ( driver ) ;
+ 		      ioidx <= ISA_IOIDX_MAX ( driver ) ; ioidx++ ) {
diff -r 1df4fdbaade0 -r 6d56e31fe1e1 tools/firmware/etherboot/patches/build_fix_2.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/etherboot/patches/build_fix_2.patch	Wed Aug 15 09:41:21 2012 +0100
@@ -0,0 +1,48 @@
+fix compile error in isabus_probe with gcc4.7
+
+The copy of ipxe used during Xen tools build fails to compile with gcc
+4.7:
+drivers/net/myri10ge.c: In function 'myri10ge_command':
+drivers/net/myri10ge.c:308:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
+drivers/net/myri10ge.c:310:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
+
+This patch simply turns the pad array into quantities of u32.
+If thats not the right fix due to hardware limitations, I can provide a
+different patch.
+
+---
+ src/drivers/net/myri10ge.c     |    6 +++---
+ src/drivers/net/myri10ge_mcp.h |    2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: ipxe/src/drivers/net/myri10ge.c
+===================================================================
+--- ipxe.orig/src/drivers/net/myri10ge.c
++++ ipxe/src/drivers/net/myri10ge.c
+@@ -304,10 +304,10 @@ static int myri10ge_command ( struct myr
+ 	command->response_addr.high = 0;
+ 	command->response_addr.low
+ 		= htonl ( virt_to_bus ( &priv->dma->command_response ) );
+-	for ( i=0; i<36; i+=4 )
+-		* ( uint32 * ) &command->pad[i] = 0;
++	for ( i=0; i<9; i++ )
++		command->pad[i] = 0;
+ 	wmb();
+-	* ( uint32 * ) &command->pad[36] = 0;
++	command->pad[9] = 0;
+ 
+ 	/* Wait up to 2 seconds for a response. */
+ 
+Index: ipxe/src/drivers/net/myri10ge_mcp.h
+===================================================================
+--- ipxe.orig/src/drivers/net/myri10ge_mcp.h
++++ ipxe/src/drivers/net/myri10ge_mcp.h
+@@ -80,7 +80,7 @@ struct mcp_cmd {
+   /* 16 */
+   struct mcp_dma_addr response_addr;
+   /* 24 */
+-  uint8_t pad[40];
++  uint32_t pad[10];
+ };
+ typedef struct mcp_cmd mcp_cmd_t;
+ 
diff -r 1df4fdbaade0 -r 6d56e31fe1e1 tools/firmware/etherboot/patches/build_fix_3.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/etherboot/patches/build_fix_3.patch	Wed Aug 15 09:41:21 2012 +0100
@@ -0,0 +1,13 @@
+diff --git a/src/drivers/infiniband/qib7322.c b/src/drivers/infiniband/qib7322.c
+index b66f8ef..d8a54c9 100644
+--- a/src/drivers/infiniband/qib7322.c
++++ b/src/drivers/infiniband/qib7322.c
+@@ -2120,7 +2120,7 @@ static int qib7322_ahb_write ( struct qib7322 *qib7322, unsigned int location,
+  */
+ static int qib7322_ahb_mod_reg ( struct qib7322 *qib7322, unsigned int location,
+ 				 uint32_t value, uint32_t mask ) {
+-	uint32_t old_value;
++	uint32_t old_value = 0;
+ 	uint32_t new_value;
+ 	int rc;
+ 
diff -r 1df4fdbaade0 -r 6d56e31fe1e1 tools/firmware/etherboot/patches/series
--- a/tools/firmware/etherboot/patches/series	Wed Aug 15 09:43:25 2012 +0200
+++ b/tools/firmware/etherboot/patches/series	Wed Aug 15 09:41:21 2012 +0100
@@ -1,1 +1,4 @@
 boot_prompt_option.patch
+build_fix_1.patch
+build_fix_2.patch
+build_fix_3.patch

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

From xen-changelog-bounces@lists.xen.org Wed Aug 15 21:55:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 15 Aug 2012 21:55:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T1lYY-0007us-PQ; Wed, 15 Aug 2012 21:55:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYX-0007uW-LU
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:13 +0000
Received: from [85.158.143.99:6630] by server-2.bemta-4.messagelabs.com id
	88/E3-31966-1CA1C205; Wed, 15 Aug 2012 21:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-216.messagelabs.com!1345067710!21998479!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9790 invoked from network); 15 Aug 2012 21:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	15 Aug 2012 21:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYU-0004No-9x
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T1lYU-0000BZ-7Y
	for xen-changelog@lists.xensource.com; Wed, 15 Aug 2012 21:55:10 +0000
Message-Id: <E1T1lYU-0000BZ-7Y@xenbits.xen.org>
Date: Wed, 15 Aug 2012 21:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] etherboot: Build fixes for gcc 4.7.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345020081 -3600
# Node ID 6d56e31fe1e1dc793379d662a36ff1731760eb0c
# Parent  1df4fdbaade0848496a8b398edab98887751de20
etherboot: Build fixes for gcc 4.7.

Signed-off-by: Keir Fraser <keir@xen.org>
---


diff -r 1df4fdbaade0 -r 6d56e31fe1e1 tools/firmware/etherboot/patches/build_fix_1.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/etherboot/patches/build_fix_1.patch	Wed Aug 15 09:41:21 2012 +0100
@@ -0,0 +1,28 @@
+Fix compile error in isabus_probe with gcc 4.7
+
+The copy of ipxe used during Xen tools build does not define
+ISA_PROBE_ADDRS. As a result isa_extra_probe_addrs[] has a size of 0.
+ISA_IOADDR() tries to access that empty array, which is detected by the
+newer gcc (or perhaps the warning was just turned into an error)
+
+drivers/bus/isa.c: In function 'isabus_probe':
+drivers/bus/isa.c:112:18: error: array subscript is above array bounds [-Werror=array-bounds]
+
+---
+ src/drivers/bus/isa.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+Index: ipxe/src/drivers/bus/isa.c
+===================================================================
+--- ipxe.orig/src/drivers/bus/isa.c
++++ ipxe/src/drivers/bus/isa.c
+@@ -97,6 +97,9 @@ static int isabus_probe ( struct root_de
+ 	int ioidx;
+ 	int rc;
+ 
++	if ( ISA_EXTRA_PROBE_ADDR_COUNT == 0 )
++		return 0;
++
+ 	for_each_table_entry ( driver, ISA_DRIVERS ) {
+ 		for ( ioidx = ISA_IOIDX_MIN ( driver ) ;
+ 		      ioidx <= ISA_IOIDX_MAX ( driver ) ; ioidx++ ) {
diff -r 1df4fdbaade0 -r 6d56e31fe1e1 tools/firmware/etherboot/patches/build_fix_2.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/etherboot/patches/build_fix_2.patch	Wed Aug 15 09:41:21 2012 +0100
@@ -0,0 +1,48 @@
+fix compile error in isabus_probe with gcc4.7
+
+The copy of ipxe used during Xen tools build fails to compile with gcc
+4.7:
+drivers/net/myri10ge.c: In function 'myri10ge_command':
+drivers/net/myri10ge.c:308:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
+drivers/net/myri10ge.c:310:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
+
+This patch simply turns the pad array into quantities of u32.
+If thats not the right fix due to hardware limitations, I can provide a
+different patch.
+
+---
+ src/drivers/net/myri10ge.c     |    6 +++---
+ src/drivers/net/myri10ge_mcp.h |    2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: ipxe/src/drivers/net/myri10ge.c
+===================================================================
+--- ipxe.orig/src/drivers/net/myri10ge.c
++++ ipxe/src/drivers/net/myri10ge.c
+@@ -304,10 +304,10 @@ static int myri10ge_command ( struct myr
+ 	command->response_addr.high = 0;
+ 	command->response_addr.low
+ 		= htonl ( virt_to_bus ( &priv->dma->command_response ) );
+-	for ( i=0; i<36; i+=4 )
+-		* ( uint32 * ) &command->pad[i] = 0;
++	for ( i=0; i<9; i++ )
++		command->pad[i] = 0;
+ 	wmb();
+-	* ( uint32 * ) &command->pad[36] = 0;
++	command->pad[9] = 0;
+ 
+ 	/* Wait up to 2 seconds for a response. */
+ 
+Index: ipxe/src/drivers/net/myri10ge_mcp.h
+===================================================================
+--- ipxe.orig/src/drivers/net/myri10ge_mcp.h
++++ ipxe/src/drivers/net/myri10ge_mcp.h
+@@ -80,7 +80,7 @@ struct mcp_cmd {
+   /* 16 */
+   struct mcp_dma_addr response_addr;
+   /* 24 */
+-  uint8_t pad[40];
++  uint32_t pad[10];
+ };
+ typedef struct mcp_cmd mcp_cmd_t;
+ 
diff -r 1df4fdbaade0 -r 6d56e31fe1e1 tools/firmware/etherboot/patches/build_fix_3.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/firmware/etherboot/patches/build_fix_3.patch	Wed Aug 15 09:41:21 2012 +0100
@@ -0,0 +1,13 @@
+diff --git a/src/drivers/infiniband/qib7322.c b/src/drivers/infiniband/qib7322.c
+index b66f8ef..d8a54c9 100644
+--- a/src/drivers/infiniband/qib7322.c
++++ b/src/drivers/infiniband/qib7322.c
+@@ -2120,7 +2120,7 @@ static int qib7322_ahb_write ( struct qib7322 *qib7322, unsigned int location,
+  */
+ static int qib7322_ahb_mod_reg ( struct qib7322 *qib7322, unsigned int location,
+ 				 uint32_t value, uint32_t mask ) {
+-	uint32_t old_value;
++	uint32_t old_value = 0;
+ 	uint32_t new_value;
+ 	int rc;
+ 
diff -r 1df4fdbaade0 -r 6d56e31fe1e1 tools/firmware/etherboot/patches/series
--- a/tools/firmware/etherboot/patches/series	Wed Aug 15 09:43:25 2012 +0200
+++ b/tools/firmware/etherboot/patches/series	Wed Aug 15 09:41:21 2012 +0100
@@ -1,1 +1,4 @@
 boot_prompt_option.patch
+build_fix_1.patch
+build_fix_2.patch
+build_fix_3.patch

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

From xen-changelog-bounces@lists.xen.org Thu Aug 16 16:55:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Aug 2012 16:55:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T23Ln-0002L4-8Z; Thu, 16 Aug 2012 16:55:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lm-0002Kz-9n
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:14 +0000
Received: from [85.158.143.99:44620] by server-1.bemta-4.messagelabs.com id
	25/48-07754-1F52D205; Thu, 16 Aug 2012 16:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1345136110!25132934!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23920 invoked from network); 16 Aug 2012 16:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Aug 2012 16:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lh-00028M-Ho
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lh-0005EG-3q
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:09 +0000
Message-Id: <E1T23Lh-0005EG-3q@xenbits.xen.org>
Date: Thu, 16 Aug 2012 16:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PoD: prevent guest from being
	destroyed upon early access to its memory
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2557942805203222644=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============2557942805203222644==
Content-Type: text/plain

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345104851 -7200
# Node ID be8ae5439a884a48f1287989232e379c5985cf00
# Parent  6d56e31fe1e1dc793379d662a36ff1731760eb0c
x86/PoD: prevent guest from being destroyed upon early access to its memory

When an external agent (e.g. a monitoring daemon) happens to access the
memory of a PoD guest prior to setting the PoD target, that access must
fail for there not being any page in the PoD cache, and only the space
above the low 2Mb gets scanned for victim pages (while only the low 2Mb
got real pages populated so far).

To accomodate for this
- set the PoD target first
- do all physmap population in PoD mode (i.e. not just large [2Mb or
  1Gb] pages)
- slightly lift the restrictions enforced by p2m_pod_set_mem_target()
  to accomodate for the changed tools behavior

Tested-by: Jürgen Groß <juergen.gross@ts.fujitsu.com>
           (in a 4.0.x based incarnation)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---


diff -r 6d56e31fe1e1 -r be8ae5439a88 tools/libxc/xc_hvm_build_x86.c
--- a/tools/libxc/xc_hvm_build_x86.c	Wed Aug 15 09:41:21 2012 +0100
+++ b/tools/libxc/xc_hvm_build_x86.c	Thu Aug 16 10:14:11 2012 +0200
@@ -160,7 +160,7 @@ static int setup_guest(xc_interface *xch
     int pod_mode = 0;
 
     if ( nr_pages > target_pages )
-        pod_mode = 1;
+        pod_mode = XENMEMF_populate_on_demand;
 
     memset(&elf, 0, sizeof(elf));
     if ( elf_init(&elf, image, image_size) != 0 )
@@ -197,6 +197,22 @@ static int setup_guest(xc_interface *xch
     for ( i = mmio_start >> PAGE_SHIFT; i < nr_pages; i++ )
         page_array[i] += mmio_size >> PAGE_SHIFT;
 
+    if ( pod_mode )
+    {
+        /*
+         * Subtract 0x20 from target_pages for the VGA "hole".  Xen will
+         * adjust the PoD cache size so that domain tot_pages will be
+         * target_pages - 0x20 after this call.
+         */
+        rc = xc_domain_set_pod_target(xch, dom, target_pages - 0x20,
+                                      NULL, NULL, NULL);
+        if ( rc != 0 )
+        {
+            PERROR("Could not set PoD target for HVM guest.\n");
+            goto error_out;
+        }
+    }
+
     /*
      * Allocate memory for HVM guest, skipping VGA hole 0xA0000-0xC0000.
      *
@@ -208,7 +224,7 @@ static int setup_guest(xc_interface *xch
      * ensure that we can be preempted and hence dom0 remains responsive.
      */
     rc = xc_domain_populate_physmap_exact(
-        xch, dom, 0xa0, 0, 0, &page_array[0x00]);
+        xch, dom, 0xa0, 0, pod_mode, &page_array[0x00]);
     cur_pages = 0xc0;
     stat_normal_pages = 0xc0;
     while ( (rc == 0) && (nr_pages > cur_pages) )
@@ -247,8 +263,7 @@ static int setup_guest(xc_interface *xch
                 sp_extents[i] = page_array[cur_pages+(i<<SUPERPAGE_1GB_SHIFT)];
 
             done = xc_domain_populate_physmap(xch, dom, nr_extents, SUPERPAGE_1GB_SHIFT,
-                                              pod_mode ? XENMEMF_populate_on_demand : 0,
-                                              sp_extents);
+                                              pod_mode, sp_extents);
 
             if ( done > 0 )
             {
@@ -285,8 +300,7 @@ static int setup_guest(xc_interface *xch
                     sp_extents[i] = page_array[cur_pages+(i<<SUPERPAGE_2MB_SHIFT)];
 
                 done = xc_domain_populate_physmap(xch, dom, nr_extents, SUPERPAGE_2MB_SHIFT,
-                                                  pod_mode ? XENMEMF_populate_on_demand : 0,
-                                                  sp_extents);
+                                                  pod_mode, sp_extents);
 
                 if ( done > 0 )
                 {
@@ -302,19 +316,12 @@ static int setup_guest(xc_interface *xch
         if ( count != 0 )
         {
             rc = xc_domain_populate_physmap_exact(
-                xch, dom, count, 0, 0, &page_array[cur_pages]);
+                xch, dom, count, 0, pod_mode, &page_array[cur_pages]);
             cur_pages += count;
             stat_normal_pages += count;
         }
     }
 
-    /* Subtract 0x20 from target_pages for the VGA "hole".  Xen will
-     * adjust the PoD cache size so that domain tot_pages will be
-     * target_pages - 0x20 after this call. */
-    if ( pod_mode )
-        rc = xc_domain_set_pod_target(xch, dom, target_pages - 0x20,
-                                      NULL, NULL, NULL);
-
     if ( rc != 0 )
     {
         PERROR("Could not allocate memory for HVM guest.");
diff -r 6d56e31fe1e1 -r be8ae5439a88 xen/arch/x86/mm/p2m-pod.c
--- a/xen/arch/x86/mm/p2m-pod.c	Wed Aug 15 09:41:21 2012 +0100
+++ b/xen/arch/x86/mm/p2m-pod.c	Thu Aug 16 10:14:11 2012 +0200
@@ -344,8 +344,9 @@ p2m_pod_set_mem_target(struct domain *d,
 
     pod_lock(p2m);
 
-    /* P == B: Nothing to do. */
-    if ( p2m->pod.entry_count == 0 )
+    /* P == B: Nothing to do (unless the guest is being created). */
+    populated = d->tot_pages - p2m->pod.count;
+    if ( populated > 0 && p2m->pod.entry_count == 0 )
         goto out;
 
     /* Don't do anything if the domain is being torn down */
@@ -357,13 +358,11 @@ p2m_pod_set_mem_target(struct domain *d,
     if ( target < d->tot_pages )
         goto out;
 
-    populated  = d->tot_pages - p2m->pod.count;
-
     pod_target = target - populated;
 
     /* B < T': Set the cache size equal to # of outstanding entries,
      * let the balloon driver fill in the rest. */
-    if ( pod_target > p2m->pod.entry_count )
+    if ( populated > 0 && pod_target > p2m->pod.entry_count )
         pod_target = p2m->pod.entry_count;
 
     ASSERT( pod_target >= p2m->pod.count );


--===============2557942805203222644==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
--===============2557942805203222644==--

From xen-changelog-bounces@lists.xen.org Thu Aug 16 16:55:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Aug 2012 16:55:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T23Ln-0002L4-8Z; Thu, 16 Aug 2012 16:55:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lm-0002Kz-9n
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:14 +0000
Received: from [85.158.143.99:44620] by server-1.bemta-4.messagelabs.com id
	25/48-07754-1F52D205; Thu, 16 Aug 2012 16:55:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-216.messagelabs.com!1345136110!25132934!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23920 invoked from network); 16 Aug 2012 16:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Aug 2012 16:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lh-00028M-Ho
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lh-0005EG-3q
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:09 +0000
Message-Id: <E1T23Lh-0005EG-3q@xenbits.xen.org>
Date: Thu, 16 Aug 2012 16:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PoD: prevent guest from being
	destroyed upon early access to its memory
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============2557942805203222644=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============2557942805203222644==
Content-Type: text/plain

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345104851 -7200
# Node ID be8ae5439a884a48f1287989232e379c5985cf00
# Parent  6d56e31fe1e1dc793379d662a36ff1731760eb0c
x86/PoD: prevent guest from being destroyed upon early access to its memory

When an external agent (e.g. a monitoring daemon) happens to access the
memory of a PoD guest prior to setting the PoD target, that access must
fail for there not being any page in the PoD cache, and only the space
above the low 2Mb gets scanned for victim pages (while only the low 2Mb
got real pages populated so far).

To accomodate for this
- set the PoD target first
- do all physmap population in PoD mode (i.e. not just large [2Mb or
  1Gb] pages)
- slightly lift the restrictions enforced by p2m_pod_set_mem_target()
  to accomodate for the changed tools behavior

Tested-by: Jürgen Groß <juergen.gross@ts.fujitsu.com>
           (in a 4.0.x based incarnation)
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---


diff -r 6d56e31fe1e1 -r be8ae5439a88 tools/libxc/xc_hvm_build_x86.c
--- a/tools/libxc/xc_hvm_build_x86.c	Wed Aug 15 09:41:21 2012 +0100
+++ b/tools/libxc/xc_hvm_build_x86.c	Thu Aug 16 10:14:11 2012 +0200
@@ -160,7 +160,7 @@ static int setup_guest(xc_interface *xch
     int pod_mode = 0;
 
     if ( nr_pages > target_pages )
-        pod_mode = 1;
+        pod_mode = XENMEMF_populate_on_demand;
 
     memset(&elf, 0, sizeof(elf));
     if ( elf_init(&elf, image, image_size) != 0 )
@@ -197,6 +197,22 @@ static int setup_guest(xc_interface *xch
     for ( i = mmio_start >> PAGE_SHIFT; i < nr_pages; i++ )
         page_array[i] += mmio_size >> PAGE_SHIFT;
 
+    if ( pod_mode )
+    {
+        /*
+         * Subtract 0x20 from target_pages for the VGA "hole".  Xen will
+         * adjust the PoD cache size so that domain tot_pages will be
+         * target_pages - 0x20 after this call.
+         */
+        rc = xc_domain_set_pod_target(xch, dom, target_pages - 0x20,
+                                      NULL, NULL, NULL);
+        if ( rc != 0 )
+        {
+            PERROR("Could not set PoD target for HVM guest.\n");
+            goto error_out;
+        }
+    }
+
     /*
      * Allocate memory for HVM guest, skipping VGA hole 0xA0000-0xC0000.
      *
@@ -208,7 +224,7 @@ static int setup_guest(xc_interface *xch
      * ensure that we can be preempted and hence dom0 remains responsive.
      */
     rc = xc_domain_populate_physmap_exact(
-        xch, dom, 0xa0, 0, 0, &page_array[0x00]);
+        xch, dom, 0xa0, 0, pod_mode, &page_array[0x00]);
     cur_pages = 0xc0;
     stat_normal_pages = 0xc0;
     while ( (rc == 0) && (nr_pages > cur_pages) )
@@ -247,8 +263,7 @@ static int setup_guest(xc_interface *xch
                 sp_extents[i] = page_array[cur_pages+(i<<SUPERPAGE_1GB_SHIFT)];
 
             done = xc_domain_populate_physmap(xch, dom, nr_extents, SUPERPAGE_1GB_SHIFT,
-                                              pod_mode ? XENMEMF_populate_on_demand : 0,
-                                              sp_extents);
+                                              pod_mode, sp_extents);
 
             if ( done > 0 )
             {
@@ -285,8 +300,7 @@ static int setup_guest(xc_interface *xch
                     sp_extents[i] = page_array[cur_pages+(i<<SUPERPAGE_2MB_SHIFT)];
 
                 done = xc_domain_populate_physmap(xch, dom, nr_extents, SUPERPAGE_2MB_SHIFT,
-                                                  pod_mode ? XENMEMF_populate_on_demand : 0,
-                                                  sp_extents);
+                                                  pod_mode, sp_extents);
 
                 if ( done > 0 )
                 {
@@ -302,19 +316,12 @@ static int setup_guest(xc_interface *xch
         if ( count != 0 )
         {
             rc = xc_domain_populate_physmap_exact(
-                xch, dom, count, 0, 0, &page_array[cur_pages]);
+                xch, dom, count, 0, pod_mode, &page_array[cur_pages]);
             cur_pages += count;
             stat_normal_pages += count;
         }
     }
 
-    /* Subtract 0x20 from target_pages for the VGA "hole".  Xen will
-     * adjust the PoD cache size so that domain tot_pages will be
-     * target_pages - 0x20 after this call. */
-    if ( pod_mode )
-        rc = xc_domain_set_pod_target(xch, dom, target_pages - 0x20,
-                                      NULL, NULL, NULL);
-
     if ( rc != 0 )
     {
         PERROR("Could not allocate memory for HVM guest.");
diff -r 6d56e31fe1e1 -r be8ae5439a88 xen/arch/x86/mm/p2m-pod.c
--- a/xen/arch/x86/mm/p2m-pod.c	Wed Aug 15 09:41:21 2012 +0100
+++ b/xen/arch/x86/mm/p2m-pod.c	Thu Aug 16 10:14:11 2012 +0200
@@ -344,8 +344,9 @@ p2m_pod_set_mem_target(struct domain *d,
 
     pod_lock(p2m);
 
-    /* P == B: Nothing to do. */
-    if ( p2m->pod.entry_count == 0 )
+    /* P == B: Nothing to do (unless the guest is being created). */
+    populated = d->tot_pages - p2m->pod.count;
+    if ( populated > 0 && p2m->pod.entry_count == 0 )
         goto out;
 
     /* Don't do anything if the domain is being torn down */
@@ -357,13 +358,11 @@ p2m_pod_set_mem_target(struct domain *d,
     if ( target < d->tot_pages )
         goto out;
 
-    populated  = d->tot_pages - p2m->pod.count;
-
     pod_target = target - populated;
 
     /* B < T': Set the cache size equal to # of outstanding entries,
      * let the balloon driver fill in the rest. */
-    if ( pod_target > p2m->pod.entry_count )
+    if ( populated > 0 && pod_target > p2m->pod.entry_count )
         pod_target = p2m->pod.entry_count;
 
     ASSERT( pod_target >= p2m->pod.count );


--===============2557942805203222644==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
--===============2557942805203222644==--

From xen-changelog-bounces@lists.xen.org Thu Aug 16 16:55:30 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Aug 2012 16:55:30 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T23Lx-0002Ld-Bg; Thu, 16 Aug 2012 16:55:25 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lv-0002LU-MK
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:23 +0000
Received: from [85.158.143.35:23260] by server-1.bemta-4.messagelabs.com id
	5B/78-07754-AF52D205; Thu, 16 Aug 2012 16:55:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-21.messagelabs.com!1345136110!12617734!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24973 invoked from network); 16 Aug 2012 16:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Aug 2012 16:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lh-00028P-Qx
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lh-0005EX-PO
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:09 +0000
Message-Id: <E1T23Lh-0005EX-PO@xenbits.xen.org>
Date: Thu, 16 Aug 2012 16:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PoD: clean up types
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345104979 -7200
# Node ID c887c30a0a35e74de786e0d240bbc51a8065a5fd
# Parent  be8ae5439a884a48f1287989232e379c5985cf00
x86/PoD: clean up types

GMFN values must undoubtedly be "unsigned long". "count" and
"entry_count", since they are signed types, should also be "long" as
otherwise they can't fit all values that can fit into "d->tot_pages"
(which currently is "uint32_t").

Beyond that, the patch doesn't convert everything to "long" as in many
places it is clear that "int" suffices. In places where "long" is being
used partially already, the change is however being done.

Furthermore, page order values have no use of being "long".

Finally, in the course of updating a few printk messages anyway, some
also get slightly shortened (to focus on the relevant information).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---


diff -r be8ae5439a88 -r c887c30a0a35 xen/arch/x86/mm/p2m-pod.c
--- a/xen/arch/x86/mm/p2m-pod.c	Thu Aug 16 10:14:11 2012 +0200
+++ b/xen/arch/x86/mm/p2m-pod.c	Thu Aug 16 10:16:19 2012 +0200
@@ -66,7 +66,7 @@ static inline void unlock_page_alloc(str
 static int
 p2m_pod_cache_add(struct p2m_domain *p2m,
                   struct page_info *page,
-                  unsigned long order)
+                  unsigned int order)
 {
     int i;
     struct page_info *p;
@@ -80,7 +80,7 @@ p2m_pod_cache_add(struct p2m_domain *p2m
     /* Check to make sure this is a contiguous region */
     if( mfn_x(mfn) & ((1 << order) - 1) )
     {
-        printk("%s: mfn %lx not aligned order %lu! (mask %lx)\n",
+        printk("%s: mfn %lx not aligned order %u! (mask %lx)\n",
                __func__, mfn_x(mfn), order, ((1UL << order) - 1));
         return -1;
     }
@@ -146,7 +146,7 @@ p2m_pod_cache_add(struct p2m_domain *p2m
  * down 2-meg pages into singleton pages automatically.  Returns null if
  * a superpage is requested and no superpages are available. */
 static struct page_info * p2m_pod_cache_get(struct p2m_domain *p2m,
-                                            unsigned long order)
+                                            unsigned int order)
 {
     struct page_info *p = NULL;
     int i;
@@ -234,7 +234,7 @@ p2m_pod_set_cache_target(struct p2m_doma
                 goto retry;
             }   
             
-            printk("%s: Unable to allocate domheap page for pod cache.  target %lu cachesize %d\n",
+            printk("%s: Unable to allocate page for PoD cache (target=%lu cache=%ld)\n",
                    __func__, pod_target, p2m->pod.count);
             ret = -ENOMEM;
             goto out;
@@ -337,10 +337,9 @@ out:
 int
 p2m_pod_set_mem_target(struct domain *d, unsigned long target)
 {
-    unsigned pod_target;
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
     int ret = 0;
-    unsigned long populated;
+    unsigned long populated, pod_target;
 
     pod_lock(p2m);
 
@@ -633,7 +632,8 @@ out_unlock:
 void p2m_pod_dump_data(struct domain *d)
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
-    printk("    PoD entries=%d cachesize=%d\n",
+
+    printk("    PoD entries=%ld cachesize=%ld\n",
            p2m->pod.entry_count, p2m->pod.count);
 }
 
@@ -1071,8 +1071,9 @@ p2m_pod_demand_populate(struct p2m_domai
 out_of_memory:
     pod_unlock(p2m);
 
-    printk("%s: Out of populate-on-demand memory! tot_pages %" PRIu32 " pod_entries %" PRIi32 "\n",
-           __func__, d->tot_pages, p2m->pod.entry_count);
+    printk("%s: Dom%d out of PoD memory! (tot=%"PRIu32" ents=%ld dom%d)\n",
+           __func__, d->domain_id, d->tot_pages, p2m->pod.entry_count,
+           current->domain->domain_id);
     domain_crash(d);
     return -1;
 out_fail:
@@ -1111,10 +1112,9 @@ guest_physmap_mark_populate_on_demand(st
                                       unsigned int order)
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
-    unsigned long i;
+    unsigned long i, pod_count = 0;
     p2m_type_t ot;
     mfn_t omfn;
-    int pod_count = 0;
     int rc = 0;
 
     BUG_ON(!paging_mode_translate(d));
diff -r be8ae5439a88 -r c887c30a0a35 xen/arch/x86/mm/p2m-pt.c
--- a/xen/arch/x86/mm/p2m-pt.c	Thu Aug 16 10:14:11 2012 +0200
+++ b/xen/arch/x86/mm/p2m-pt.c	Thu Aug 16 10:16:19 2012 +0200
@@ -965,8 +965,7 @@ static void p2m_change_type_global(struc
 #if P2M_AUDIT
 long p2m_pt_audit_p2m(struct p2m_domain *p2m)
 {
-    int entry_count = 0;
-    unsigned long pmbad = 0;
+    unsigned long entry_count = 0, pmbad = 0;
     unsigned long mfn, gfn, m2pfn;
     int test_linear;
     struct domain *d = p2m->domain;
@@ -1126,7 +1125,7 @@ long p2m_pt_audit_p2m(struct p2m_domain 
 
     if ( entry_count != p2m->pod.entry_count )
     {
-        printk("%s: refcounted entry count %d, audit count %d!\n",
+        printk("%s: refcounted entry count %ld, audit count %lu!\n",
                __func__,
                p2m->pod.entry_count,
                entry_count);
diff -r be8ae5439a88 -r c887c30a0a35 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h	Thu Aug 16 10:14:11 2012 +0200
+++ b/xen/include/asm-x86/p2m.h	Thu Aug 16 10:16:19 2012 +0200
@@ -282,10 +282,10 @@ struct p2m_domain {
     struct {
         struct page_list_head super,   /* List of superpages                */
                          single;       /* Non-super lists                   */
-        int              count,        /* # of pages in cache lists         */
+        long             count,        /* # of pages in cache lists         */
                          entry_count;  /* # of pages in p2m marked pod      */
-        unsigned         reclaim_single; /* Last gpfn of a scan */
-        unsigned         max_guest;    /* gpfn of max guest demand-populate */
+        unsigned long    reclaim_single; /* Last gpfn of a scan */
+        unsigned long    max_guest;    /* gpfn of max guest demand-populate */
 #define POD_HISTORY_MAX 128
         /* gpfn of last guest superpage demand-populated */
         unsigned long    last_populated[POD_HISTORY_MAX]; 

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

From xen-changelog-bounces@lists.xen.org Thu Aug 16 16:55:30 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 16 Aug 2012 16:55:30 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T23Lx-0002Ld-Bg; Thu, 16 Aug 2012 16:55:25 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lv-0002LU-MK
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:23 +0000
Received: from [85.158.143.35:23260] by server-1.bemta-4.messagelabs.com id
	5B/78-07754-AF52D205; Thu, 16 Aug 2012 16:55:22 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-21.messagelabs.com!1345136110!12617734!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24973 invoked from network); 16 Aug 2012 16:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Aug 2012 16:55:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lh-00028P-Qx
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T23Lh-0005EX-PO
	for xen-changelog@lists.xensource.com; Thu, 16 Aug 2012 16:55:09 +0000
Message-Id: <E1T23Lh-0005EX-PO@xenbits.xen.org>
Date: Thu, 16 Aug 2012 16:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/PoD: clean up types
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345104979 -7200
# Node ID c887c30a0a35e74de786e0d240bbc51a8065a5fd
# Parent  be8ae5439a884a48f1287989232e379c5985cf00
x86/PoD: clean up types

GMFN values must undoubtedly be "unsigned long". "count" and
"entry_count", since they are signed types, should also be "long" as
otherwise they can't fit all values that can fit into "d->tot_pages"
(which currently is "uint32_t").

Beyond that, the patch doesn't convert everything to "long" as in many
places it is clear that "int" suffices. In places where "long" is being
used partially already, the change is however being done.

Furthermore, page order values have no use of being "long".

Finally, in the course of updating a few printk messages anyway, some
also get slightly shortened (to focus on the relevant information).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---


diff -r be8ae5439a88 -r c887c30a0a35 xen/arch/x86/mm/p2m-pod.c
--- a/xen/arch/x86/mm/p2m-pod.c	Thu Aug 16 10:14:11 2012 +0200
+++ b/xen/arch/x86/mm/p2m-pod.c	Thu Aug 16 10:16:19 2012 +0200
@@ -66,7 +66,7 @@ static inline void unlock_page_alloc(str
 static int
 p2m_pod_cache_add(struct p2m_domain *p2m,
                   struct page_info *page,
-                  unsigned long order)
+                  unsigned int order)
 {
     int i;
     struct page_info *p;
@@ -80,7 +80,7 @@ p2m_pod_cache_add(struct p2m_domain *p2m
     /* Check to make sure this is a contiguous region */
     if( mfn_x(mfn) & ((1 << order) - 1) )
     {
-        printk("%s: mfn %lx not aligned order %lu! (mask %lx)\n",
+        printk("%s: mfn %lx not aligned order %u! (mask %lx)\n",
                __func__, mfn_x(mfn), order, ((1UL << order) - 1));
         return -1;
     }
@@ -146,7 +146,7 @@ p2m_pod_cache_add(struct p2m_domain *p2m
  * down 2-meg pages into singleton pages automatically.  Returns null if
  * a superpage is requested and no superpages are available. */
 static struct page_info * p2m_pod_cache_get(struct p2m_domain *p2m,
-                                            unsigned long order)
+                                            unsigned int order)
 {
     struct page_info *p = NULL;
     int i;
@@ -234,7 +234,7 @@ p2m_pod_set_cache_target(struct p2m_doma
                 goto retry;
             }   
             
-            printk("%s: Unable to allocate domheap page for pod cache.  target %lu cachesize %d\n",
+            printk("%s: Unable to allocate page for PoD cache (target=%lu cache=%ld)\n",
                    __func__, pod_target, p2m->pod.count);
             ret = -ENOMEM;
             goto out;
@@ -337,10 +337,9 @@ out:
 int
 p2m_pod_set_mem_target(struct domain *d, unsigned long target)
 {
-    unsigned pod_target;
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
     int ret = 0;
-    unsigned long populated;
+    unsigned long populated, pod_target;
 
     pod_lock(p2m);
 
@@ -633,7 +632,8 @@ out_unlock:
 void p2m_pod_dump_data(struct domain *d)
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
-    printk("    PoD entries=%d cachesize=%d\n",
+
+    printk("    PoD entries=%ld cachesize=%ld\n",
            p2m->pod.entry_count, p2m->pod.count);
 }
 
@@ -1071,8 +1071,9 @@ p2m_pod_demand_populate(struct p2m_domai
 out_of_memory:
     pod_unlock(p2m);
 
-    printk("%s: Out of populate-on-demand memory! tot_pages %" PRIu32 " pod_entries %" PRIi32 "\n",
-           __func__, d->tot_pages, p2m->pod.entry_count);
+    printk("%s: Dom%d out of PoD memory! (tot=%"PRIu32" ents=%ld dom%d)\n",
+           __func__, d->domain_id, d->tot_pages, p2m->pod.entry_count,
+           current->domain->domain_id);
     domain_crash(d);
     return -1;
 out_fail:
@@ -1111,10 +1112,9 @@ guest_physmap_mark_populate_on_demand(st
                                       unsigned int order)
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
-    unsigned long i;
+    unsigned long i, pod_count = 0;
     p2m_type_t ot;
     mfn_t omfn;
-    int pod_count = 0;
     int rc = 0;
 
     BUG_ON(!paging_mode_translate(d));
diff -r be8ae5439a88 -r c887c30a0a35 xen/arch/x86/mm/p2m-pt.c
--- a/xen/arch/x86/mm/p2m-pt.c	Thu Aug 16 10:14:11 2012 +0200
+++ b/xen/arch/x86/mm/p2m-pt.c	Thu Aug 16 10:16:19 2012 +0200
@@ -965,8 +965,7 @@ static void p2m_change_type_global(struc
 #if P2M_AUDIT
 long p2m_pt_audit_p2m(struct p2m_domain *p2m)
 {
-    int entry_count = 0;
-    unsigned long pmbad = 0;
+    unsigned long entry_count = 0, pmbad = 0;
     unsigned long mfn, gfn, m2pfn;
     int test_linear;
     struct domain *d = p2m->domain;
@@ -1126,7 +1125,7 @@ long p2m_pt_audit_p2m(struct p2m_domain 
 
     if ( entry_count != p2m->pod.entry_count )
     {
-        printk("%s: refcounted entry count %d, audit count %d!\n",
+        printk("%s: refcounted entry count %ld, audit count %lu!\n",
                __func__,
                p2m->pod.entry_count,
                entry_count);
diff -r be8ae5439a88 -r c887c30a0a35 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h	Thu Aug 16 10:14:11 2012 +0200
+++ b/xen/include/asm-x86/p2m.h	Thu Aug 16 10:16:19 2012 +0200
@@ -282,10 +282,10 @@ struct p2m_domain {
     struct {
         struct page_list_head super,   /* List of superpages                */
                          single;       /* Non-super lists                   */
-        int              count,        /* # of pages in cache lists         */
+        long             count,        /* # of pages in cache lists         */
                          entry_count;  /* # of pages in p2m marked pod      */
-        unsigned         reclaim_single; /* Last gpfn of a scan */
-        unsigned         max_guest;    /* gpfn of max guest demand-populate */
+        unsigned long    reclaim_single; /* Last gpfn of a scan */
+        unsigned long    max_guest;    /* gpfn of max guest demand-populate */
 #define POD_HISTORY_MAX 128
         /* gpfn of last guest superpage demand-populated */
         unsigned long    last_populated[POD_HISTORY_MAX]; 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 08:55:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 08:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2IKt-0001VX-E3; Fri, 17 Aug 2012 08:55:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKr-0001VC-6F
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1345193709!2383039!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26921 invoked from network); 17 Aug 2012 08:55:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 08:55:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKi-0005fv-TZ
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKi-0007Xs-P9
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:08 +0000
Message-Id: <E1T2IKi-0007Xs-P9@xenbits.xen.org>
Date: Fri, 17 Aug 2012 08:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] EPT/PoD: fix interaction with 1Gb
	pages
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345135085 -3600
# Node ID 3468a834be8d7d36e135706639c4c61965ab8116
# Parent  8918737c7e80fb3e5fd410c6f386cd21afa0683a
EPT/PoD: fix interaction with 1Gb pages

When PoD got enabled to support 1Gb pages, ept_get_entry() didn't get
updated to match - the assertion in there triggered, indicating that
the call to p2m_pod_demand_populate() needed adjustment.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r 8918737c7e80 -r 3468a834be8d xen/arch/x86/mm/p2m-ept.c
--- a/xen/arch/x86/mm/p2m-ept.c	Thu Aug 16 14:31:09 2012 +0100
+++ b/xen/arch/x86/mm/p2m-ept.c	Thu Aug 16 17:38:05 2012 +0100
@@ -521,13 +521,12 @@ static mfn_t ept_get_entry(struct p2m_do
             }
 
             /* Populate this superpage */
-            ASSERT(i == 1);
+            ASSERT(i <= 2);
 
             index = gfn_remainder >> ( i * EPT_TABLE_ORDER);
             ept_entry = table + index;
 
-            if ( !p2m_pod_demand_populate(p2m, gfn, 
-                                            PAGE_ORDER_2M, q) )
+            if ( !p2m_pod_demand_populate(p2m, gfn, i * EPT_TABLE_ORDER, q) )
                 goto retry;
             else
                 goto out;

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 08:55:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 08:55:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2IKt-0001VX-E3; Fri, 17 Aug 2012 08:55:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKr-0001VC-6F
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-15.tower-27.messagelabs.com!1345193709!2383039!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26921 invoked from network); 17 Aug 2012 08:55:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 08:55:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKi-0005fv-TZ
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKi-0007Xs-P9
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:08 +0000
Message-Id: <E1T2IKi-0007Xs-P9@xenbits.xen.org>
Date: Fri, 17 Aug 2012 08:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] EPT/PoD: fix interaction with 1Gb
	pages
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345135085 -3600
# Node ID 3468a834be8d7d36e135706639c4c61965ab8116
# Parent  8918737c7e80fb3e5fd410c6f386cd21afa0683a
EPT/PoD: fix interaction with 1Gb pages

When PoD got enabled to support 1Gb pages, ept_get_entry() didn't get
updated to match - the assertion in there triggered, indicating that
the call to p2m_pod_demand_populate() needed adjustment.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r 8918737c7e80 -r 3468a834be8d xen/arch/x86/mm/p2m-ept.c
--- a/xen/arch/x86/mm/p2m-ept.c	Thu Aug 16 14:31:09 2012 +0100
+++ b/xen/arch/x86/mm/p2m-ept.c	Thu Aug 16 17:38:05 2012 +0100
@@ -521,13 +521,12 @@ static mfn_t ept_get_entry(struct p2m_do
             }
 
             /* Populate this superpage */
-            ASSERT(i == 1);
+            ASSERT(i <= 2);
 
             index = gfn_remainder >> ( i * EPT_TABLE_ORDER);
             ept_entry = table + index;
 
-            if ( !p2m_pod_demand_populate(p2m, gfn, 
-                                            PAGE_ORDER_2M, q) )
+            if ( !p2m_pod_demand_populate(p2m, gfn, i * EPT_TABLE_ORDER, q) )
                 goto retry;
             else
                 goto out;

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 08:55:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 08:55:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2IKo-0001VK-BC; Fri, 17 Aug 2012 08:55:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKm-0001VB-3p
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:12 +0000
Received: from [85.158.139.83:31136] by server-3.bemta-5.messagelabs.com id
	FE/51-27237-FE60E205; Fri, 17 Aug 2012 08:55:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-182.messagelabs.com!1345193708!27931907!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30473 invoked from network); 17 Aug 2012 08:55:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 08:55:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKi-0005fs-C0
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKi-0007Xd-2s
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:08 +0000
Message-Id: <E1T2IKi-0007Xd-2s@xenbits.xen.org>
Date: Fri, 17 Aug 2012 08:55:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/mm: update max_mapped_pfn on
	MMIO mappings too.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1345123869 -3600
# Node ID 8918737c7e80fb3e5fd410c6f386cd21afa0683a
# Parent  c887c30a0a35e74de786e0d240bbc51a8065a5fd
x86/mm: update max_mapped_pfn on MMIO mappings too.

max_mapped_pfn should reflect the highest mapping we've ever seen of
any type, or the tests in the lookup functions will be wrong.  As it
happens, the highest mapping has always been a RAM one, but this is no
longer the case when we allow 64-bit BARs.

Reported-by: Xudong Hao <xudong.hao@intel.com>
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r c887c30a0a35 -r 8918737c7e80 xen/arch/x86/mm/p2m-ept.c
--- a/xen/arch/x86/mm/p2m-ept.c	Thu Aug 16 10:16:19 2012 +0200
+++ b/xen/arch/x86/mm/p2m-ept.c	Thu Aug 16 14:31:09 2012 +0100
@@ -428,7 +428,7 @@ ept_set_entry(struct p2m_domain *p2m, un
     }
 
     /* Track the highest gfn for which we have ever had a valid mapping */
-    if ( mfn_valid(mfn_x(mfn)) &&
+    if ( p2mt != p2m_invalid &&
          (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) )
         p2m->max_mapped_pfn = gfn + (1UL << order) - 1;
 
diff -r c887c30a0a35 -r 8918737c7e80 xen/arch/x86/mm/p2m-pt.c
--- a/xen/arch/x86/mm/p2m-pt.c	Thu Aug 16 10:16:19 2012 +0200
+++ b/xen/arch/x86/mm/p2m-pt.c	Thu Aug 16 14:31:09 2012 +0100
@@ -454,7 +454,7 @@ p2m_set_entry(struct p2m_domain *p2m, un
     }
 
     /* Track the highest gfn for which we have ever had a valid mapping */
-    if ( mfn_valid(mfn) 
+    if ( p2mt != p2m_invalid
          && (gfn + (1UL << page_order) - 1 > p2m->max_mapped_pfn) )
         p2m->max_mapped_pfn = gfn + (1UL << page_order) - 1;
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 08:55:25 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 08:55:25 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2IKo-0001VK-BC; Fri, 17 Aug 2012 08:55:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKm-0001VB-3p
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:12 +0000
Received: from [85.158.139.83:31136] by server-3.bemta-5.messagelabs.com id
	FE/51-27237-FE60E205; Fri, 17 Aug 2012 08:55:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-9.tower-182.messagelabs.com!1345193708!27931907!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30473 invoked from network); 17 Aug 2012 08:55:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 08:55:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKi-0005fs-C0
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2IKi-0007Xd-2s
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 08:55:08 +0000
Message-Id: <E1T2IKi-0007Xd-2s@xenbits.xen.org>
Date: Fri, 17 Aug 2012 08:55:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/mm: update max_mapped_pfn on
	MMIO mappings too.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Tim Deegan <tim@xen.org>
# Date 1345123869 -3600
# Node ID 8918737c7e80fb3e5fd410c6f386cd21afa0683a
# Parent  c887c30a0a35e74de786e0d240bbc51a8065a5fd
x86/mm: update max_mapped_pfn on MMIO mappings too.

max_mapped_pfn should reflect the highest mapping we've ever seen of
any type, or the tests in the lookup functions will be wrong.  As it
happens, the highest mapping has always been a RAM one, but this is no
longer the case when we allow 64-bit BARs.

Reported-by: Xudong Hao <xudong.hao@intel.com>
Signed-off-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
---


diff -r c887c30a0a35 -r 8918737c7e80 xen/arch/x86/mm/p2m-ept.c
--- a/xen/arch/x86/mm/p2m-ept.c	Thu Aug 16 10:16:19 2012 +0200
+++ b/xen/arch/x86/mm/p2m-ept.c	Thu Aug 16 14:31:09 2012 +0100
@@ -428,7 +428,7 @@ ept_set_entry(struct p2m_domain *p2m, un
     }
 
     /* Track the highest gfn for which we have ever had a valid mapping */
-    if ( mfn_valid(mfn_x(mfn)) &&
+    if ( p2mt != p2m_invalid &&
          (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) )
         p2m->max_mapped_pfn = gfn + (1UL << order) - 1;
 
diff -r c887c30a0a35 -r 8918737c7e80 xen/arch/x86/mm/p2m-pt.c
--- a/xen/arch/x86/mm/p2m-pt.c	Thu Aug 16 10:16:19 2012 +0200
+++ b/xen/arch/x86/mm/p2m-pt.c	Thu Aug 16 14:31:09 2012 +0100
@@ -454,7 +454,7 @@ p2m_set_entry(struct p2m_domain *p2m, un
     }
 
     /* Track the highest gfn for which we have ever had a valid mapping */
-    if ( mfn_valid(mfn) 
+    if ( p2mt != p2m_invalid
          && (gfn + (1UL << page_order) - 1 > p2m->max_mapped_pfn) )
         p2m->max_mapped_pfn = gfn + (1UL << page_order) - 1;
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 18:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 18:33:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2RMA-0002LT-3G; Fri, 17 Aug 2012 18:33:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM8-0002L2-KX
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:12 +0000
Received: from [85.158.143.35:48772] by server-2.bemta-4.messagelabs.com id
	4A/3A-31966-86E8E205; Fri, 17 Aug 2012 18:33:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-21.messagelabs.com!1345228390!6140102!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11371 invoked from network); 17 Aug 2012 18:33:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 18:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM6-00049A-FD
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM6-0006vL-6K
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:10 +0000
Message-Id: <E1T2RM6-0006vL-6K@xenbits.xen.org>
Date: Fri, 17 Aug 2012 18:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xend: Replace the use of
	XMLPrettyPrint from PyXML with stdlib functionality.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User M A Young <m.a.young@durham.ac.uk>
# Date 1345209026 -3600
# Node ID 71a6727651110ac53b8ffe17a9a799d73a511131
# Parent  c433e7e7d5fe422bd8cb96383a62577c28dc7160
xend: Replace the use of XMLPrettyPrint from PyXML with stdlib functionality.

This appears to have been missed by changeset 22235:b8cc53d22545
"Replace pyxml/xmlproc-based XML validator with lxml based one"

This was reported by Toshio Ernie Kuratomi at
https://bugzilla.redhat.com/show_bug.cgi?id=842843

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r c433e7e7d5fe -r 71a672765111 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py	Fri Aug 17 12:36:38 2012 +0200
+++ b/tools/python/xen/xm/create.py	Fri Aug 17 14:10:26 2012 +0100
@@ -1543,8 +1543,7 @@ def main(argv):
             SXPPrettyPrint.prettyprint(config)
 
         if opts.vals.xmldryrun and serverType == SERVER_XEN_API:
-            from xml.dom.ext import PrettyPrint as XMLPrettyPrint
-            XMLPrettyPrint(doc)
+            print doc.toprettyxml()
 
     if opts.vals.dryrun or opts.vals.xmldryrun:
         return                                               

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 18:33:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 18:33:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2RMA-0002LT-3G; Fri, 17 Aug 2012 18:33:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM8-0002L2-KX
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:12 +0000
Received: from [85.158.143.35:48772] by server-2.bemta-4.messagelabs.com id
	4A/3A-31966-86E8E205; Fri, 17 Aug 2012 18:33:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-21.messagelabs.com!1345228390!6140102!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11371 invoked from network); 17 Aug 2012 18:33:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 18:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM6-00049A-FD
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM6-0006vL-6K
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:10 +0000
Message-Id: <E1T2RM6-0006vL-6K@xenbits.xen.org>
Date: Fri, 17 Aug 2012 18:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xend: Replace the use of
	XMLPrettyPrint from PyXML with stdlib functionality.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User M A Young <m.a.young@durham.ac.uk>
# Date 1345209026 -3600
# Node ID 71a6727651110ac53b8ffe17a9a799d73a511131
# Parent  c433e7e7d5fe422bd8cb96383a62577c28dc7160
xend: Replace the use of XMLPrettyPrint from PyXML with stdlib functionality.

This appears to have been missed by changeset 22235:b8cc53d22545
"Replace pyxml/xmlproc-based XML validator with lxml based one"

This was reported by Toshio Ernie Kuratomi at
https://bugzilla.redhat.com/show_bug.cgi?id=842843

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r c433e7e7d5fe -r 71a672765111 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py	Fri Aug 17 12:36:38 2012 +0200
+++ b/tools/python/xen/xm/create.py	Fri Aug 17 14:10:26 2012 +0100
@@ -1543,8 +1543,7 @@ def main(argv):
             SXPPrettyPrint.prettyprint(config)
 
         if opts.vals.xmldryrun and serverType == SERVER_XEN_API:
-            from xml.dom.ext import PrettyPrint as XMLPrettyPrint
-            XMLPrettyPrint(doc)
+            print doc.toprettyxml()
 
     if opts.vals.dryrun or opts.vals.xmldryrun:
         return                                               

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 18:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 18:33:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2RMA-0002LO-0v; Fri, 17 Aug 2012 18:33:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM8-0002L2-8c
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:12 +0000
Received: from [85.158.143.35:21727] by server-2.bemta-4.messagelabs.com id
	09/3A-31966-76E8E205; Fri, 17 Aug 2012 18:33:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-21.messagelabs.com!1345228390!13910937!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23097 invoked from network); 17 Aug 2012 18:33:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 18:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM5-000497-OT
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM5-0006v4-LL
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:09 +0000
Message-Id: <E1T2RM5-0006v4-LL@xenbits.xen.org>
Date: Fri, 17 Aug 2012 18:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] fix typos in
	xen/arch/x86/hvm/vmx/vmcs.c
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Yongjie Ren <yongjie.ren@intel.com>
# Date 1345199798 -7200
# Node ID c433e7e7d5fe422bd8cb96383a62577c28dc7160
# Parent  64017d4df9daa7a243e4f8a63057cb94efb32626
fix typos in xen/arch/x86/hvm/vmx/vmcs.c

Signed-off-by: Yongjie Ren <yongjie.ren@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 64017d4df9da -r c433e7e7d5fe xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c	Fri Aug 17 11:36:08 2012 +0200
+++ b/xen/arch/x86/hvm/vmx/vmcs.c	Fri Aug 17 12:36:38 2012 +0200
@@ -109,7 +109,7 @@ static u32 adjust_vmx_controls(
     if ( ctl_min & ~ctl )
     {
         *mismatch = 1;
-        printk("VMX: CPU%d has insufficent %s (%08x but requires min %08x)\n",
+        printk("VMX: CPU%d has insufficient %s (%08x; requires %08x)\n",
                smp_processor_id(), name, ctl, ctl_min);
     }
 
@@ -227,7 +227,7 @@ static int vmx_init_vmcs_config(void)
     {
         /*
          * To use EPT we expect to be able to clear certain intercepts.
-         * We check VMX_BASIC_MSR[55] to correctly handle default1 controls.
+         * We check VMX_BASIC_MSR[55] to correctly handle default controls.
          */
         uint32_t must_be_one, must_be_zero, msr = MSR_IA32_VMX_PROCBASED_CTLS;
         if ( vmx_basic_msr_high & (1u << 23) )

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 18:33:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 18:33:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2RMA-0002LO-0v; Fri, 17 Aug 2012 18:33:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM8-0002L2-8c
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:12 +0000
Received: from [85.158.143.35:21727] by server-2.bemta-4.messagelabs.com id
	09/3A-31966-76E8E205; Fri, 17 Aug 2012 18:33:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-21.messagelabs.com!1345228390!13910937!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23097 invoked from network); 17 Aug 2012 18:33:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 18:33:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM5-000497-OT
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM5-0006v4-LL
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:09 +0000
Message-Id: <E1T2RM5-0006v4-LL@xenbits.xen.org>
Date: Fri, 17 Aug 2012 18:33:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] fix typos in
	xen/arch/x86/hvm/vmx/vmcs.c
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Yongjie Ren <yongjie.ren@intel.com>
# Date 1345199798 -7200
# Node ID c433e7e7d5fe422bd8cb96383a62577c28dc7160
# Parent  64017d4df9daa7a243e4f8a63057cb94efb32626
fix typos in xen/arch/x86/hvm/vmx/vmcs.c

Signed-off-by: Yongjie Ren <yongjie.ren@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
---


diff -r 64017d4df9da -r c433e7e7d5fe xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c	Fri Aug 17 11:36:08 2012 +0200
+++ b/xen/arch/x86/hvm/vmx/vmcs.c	Fri Aug 17 12:36:38 2012 +0200
@@ -109,7 +109,7 @@ static u32 adjust_vmx_controls(
     if ( ctl_min & ~ctl )
     {
         *mismatch = 1;
-        printk("VMX: CPU%d has insufficent %s (%08x but requires min %08x)\n",
+        printk("VMX: CPU%d has insufficient %s (%08x; requires %08x)\n",
                smp_processor_id(), name, ctl, ctl_min);
     }
 
@@ -227,7 +227,7 @@ static int vmx_init_vmcs_config(void)
     {
         /*
          * To use EPT we expect to be able to clear certain intercepts.
-         * We check VMX_BASIC_MSR[55] to correctly handle default1 controls.
+         * We check VMX_BASIC_MSR[55] to correctly handle default controls.
          */
         uint32_t must_be_one, must_be_zero, msr = MSR_IA32_VMX_PROCBASED_CTLS;
         if ( vmx_basic_msr_high & (1u << 23) )

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 18:33:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 18:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2RMF-0002MB-5z; Fri, 17 Aug 2012 18:33:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RMD-0002L1-7n
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1345228389!9817465!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29461 invoked from network); 17 Aug 2012 18:33:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 18:33:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM5-000494-Bx
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM5-0006up-20
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:09 +0000
Message-Id: <E1T2RM5-0006up-20@xenbits.xen.org>
Date: Fri, 17 Aug 2012 18:33:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/ucode: don't crash during AP
	bringup on non-Intel, non-AMD CPUs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345196168 -7200
# Node ID 64017d4df9daa7a243e4f8a63057cb94efb32626
# Parent  3468a834be8d7d36e135706639c4c61965ab8116
x86/ucode: don't crash during AP bringup on non-Intel, non-AMD CPUs

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 3468a834be8d -r 64017d4df9da xen/arch/x86/microcode.c
--- a/xen/arch/x86/microcode.c	Thu Aug 16 17:38:05 2012 +0100
+++ b/xen/arch/x86/microcode.c	Fri Aug 17 11:36:08 2012 +0200
@@ -109,6 +109,9 @@ int microcode_resume_cpu(int cpu)
     struct cpu_signature nsig;
     unsigned int cpu2;
 
+    if ( !microcode_ops )
+        return 0;
+
     spin_lock(&microcode_mutex);
 
     err = microcode_ops->collect_cpu_info(cpu, &uci->cpu_sig);

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 18:33:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 18:33:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2RMF-0002MB-5z; Fri, 17 Aug 2012 18:33:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RMD-0002L1-7n
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1345228389!9817465!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29461 invoked from network); 17 Aug 2012 18:33:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 18:33:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM5-000494-Bx
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2RM5-0006up-20
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 18:33:09 +0000
Message-Id: <E1T2RM5-0006up-20@xenbits.xen.org>
Date: Fri, 17 Aug 2012 18:33:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/ucode: don't crash during AP
	bringup on non-Intel, non-AMD CPUs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345196168 -7200
# Node ID 64017d4df9daa7a243e4f8a63057cb94efb32626
# Parent  3468a834be8d7d36e135706639c4c61965ab8116
x86/ucode: don't crash during AP bringup on non-Intel, non-AMD CPUs

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 3468a834be8d -r 64017d4df9da xen/arch/x86/microcode.c
--- a/xen/arch/x86/microcode.c	Thu Aug 16 17:38:05 2012 +0100
+++ b/xen/arch/x86/microcode.c	Fri Aug 17 11:36:08 2012 +0200
@@ -109,6 +109,9 @@ int microcode_resume_cpu(int cpu)
     struct cpu_signature nsig;
     unsigned int cpu2;
 
+    if ( !microcode_ops )
+        return 0;
+
     spin_lock(&microcode_mutex);
 
     err = microcode_ops->collect_cpu_info(cpu, &uci->cpu_sig);

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 22:55:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 22:55:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2VRh-0005h4-4t; Fri, 17 Aug 2012 22:55:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRf-0005gt-OM
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:11 +0000
Received: from [85.158.143.35:50444] by server-2.bemta-4.messagelabs.com id
	A9/45-31966-FCBCE205; Fri, 17 Aug 2012 22:55:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1345244108!14727231!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21631 invoked from network); 17 Aug 2012 22:55:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 22:55:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRc-00078W-J7
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRc-00067g-As
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:08 +0000
Message-Id: <E1T2VRc-00067g-As@xenbits.xen.org>
Date: Fri, 17 Aug 2012 22:55:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxc/Linux: Add VM_DONTCOPY flag of
	the VMA of the hypercall buffer
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Wangzhenguo <wangzhenguo@huawei.com>
# Date 1345211208 -3600
# Node ID b021cca938e55bb1d9fae4f1fd4df1a2d20db215
# Parent  71a6727651110ac53b8ffe17a9a799d73a511131
libxc/Linux: Add VM_DONTCOPY flag of the VMA of the hypercall buffer

This avoids the hypercall buffer becoming CoW on fork.

In multi-threads and multi-processes environment, e.g. the process has two
threads, thread A may call hypercall, thread B may call fork() to create child
process. After forking, all pages of the process including hypercall buffers
are cow. It will cause a write protection and return EFAULT error if hypervisor
calls copy_to_user in hypercall in thread A context,

Fix:
1. Before hypercall: use MADV_DONTFORK of madvise syscall to make the hypercall
   buffer not to be copied to child process after fork.
2. After hypercall: undo the effect of MADV_DONTFORK for the hypercall buffer
   by using MADV_DOFORK of madvise syscall.
3. Use mmap/nunmap for memory alloc/free instead of malloc/free to bypass libc.

Note:
Child processes must not use the opened xc_{interface,evtchn,gnttab,gntshr}
handle that inherits from parents. They should reopen the handle if they want
to interact with xc. Otherwise, it may cause segment fault to access hypercall
buffer caches of the handle.

Signed-off-by: Zhenguo Wang <wangzhenguo@huawei.com>
Signed-off-by: Xiaowei Yang <xiaowei.yang@huawei.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- s/ptr/p/ to fix build & tweaked the wording of the comments
         slightly. ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 71a672765111 -r b021cca938e5 tools/libxc/xc_linux_osdep.c
--- a/tools/libxc/xc_linux_osdep.c	Fri Aug 17 14:10:26 2012 +0100
+++ b/tools/libxc/xc_linux_osdep.c	Fri Aug 17 14:46:48 2012 +0100
@@ -93,22 +93,21 @@ static void *linux_privcmd_alloc_hyperca
     size_t size = npages * XC_PAGE_SIZE;
     void *p;
 
-    p = xc_memalign(xch, XC_PAGE_SIZE, size);
-    if (!p)
-        return NULL;
+    /* Address returned by mmap is page aligned. */
+    p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, -1, 0);
 
-    if ( mlock(p, size) < 0 )
-    {
-        free(p);
-        return NULL;
-    }
+    /* Do not copy the VMA to child process on fork. Avoid the page being COW
+        on hypercall. */
+    madvise(p, npages * XC_PAGE_SIZE, MADV_DONTFORK);
     return p;
 }
 
 static void linux_privcmd_free_hypercall_buffer(xc_interface *xch, xc_osdep_handle h, void *ptr, int npages)
 {
-    munlock(ptr, npages * XC_PAGE_SIZE);
-    free(ptr);
+    /* Recover the VMA flags. Maybe it's not necessary */
+    madvise(ptr, npages * XC_PAGE_SIZE, MADV_DOFORK);
+    
+    munmap(ptr, npages * XC_PAGE_SIZE);
 }
 
 static int linux_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcmd_hypercall_t *hypercall)
diff -r 71a672765111 -r b021cca938e5 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h	Fri Aug 17 14:10:26 2012 +0100
+++ b/tools/libxc/xenctrl.h	Fri Aug 17 14:46:48 2012 +0100
@@ -134,6 +134,12 @@ typedef enum xc_error_code xc_error_code
  * be called multiple times within a single process.  Multiple processes can
  * have an open hypervisor interface at the same time.
  *
+ * Note:
+ * Child processes must not use the opened xc interface handle that inherits
+ * from parents. They should reopen the handle if they want to interact with
+ * xc. Otherwise, it may cause segment fault to access hypercall buffer caches
+ * of the handle.
+ *
  * Each call to this function should have a corresponding call to
  * xc_interface_close().
  *
@@ -908,6 +914,12 @@ int xc_evtchn_status(xc_interface *xch, 
  * Return a handle to the event channel driver, or -1 on failure, in which case
  * errno will be set appropriately.
  *
+ * Note:
+ * Child processes must not use the opened xc evtchn handle that inherits from
+ * parents. They should reopen the handle if they want to interact with xc.
+ * Otherwise, it may cause segment fault to access hypercall buffer caches of
+ * the handle.
+ *
  * Before Xen pre-4.1 this function would sometimes report errors with perror.
  */
 xc_evtchn *xc_evtchn_open(xentoollog_logger *logger,
@@ -1339,9 +1351,13 @@ int xc_domain_subscribe_for_suspend(
 
 /*
  * These functions sometimes log messages as above, but not always.
- */
-
-/*
+ *
+ * Note:
+ * Child processes must not use the opened xc gnttab handle that inherits from
+ * parents. They should reopen the handle if they want to interact with xc.
+ * Otherwise, it may cause segment fault to access hypercall buffer caches of
+ * the handle.
+ *
  * Return an fd onto the grant table driver.  Logs errors.
  */
 xc_gnttab *xc_gnttab_open(xentoollog_logger *logger,
@@ -1458,6 +1474,13 @@ grant_entry_v2_t *xc_gnttab_map_table_v2
 
 /*
  * Return an fd onto the grant sharing driver.  Logs errors.
+ *
+ * Note:
+ * Child processes must not use the opened xc gntshr handle that inherits from
+ * parents. They should reopen the handle if they want to interact with xc.
+ * Otherwise, it may cause segment fault to access hypercall buffer caches of
+ * the handle.
+ *
  */
 xc_gntshr *xc_gntshr_open(xentoollog_logger *logger,
 			  unsigned open_flags);

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 22:55:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 22:55:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2VRh-0005h4-4t; Fri, 17 Aug 2012 22:55:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRf-0005gt-OM
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:11 +0000
Received: from [85.158.143.35:50444] by server-2.bemta-4.messagelabs.com id
	A9/45-31966-FCBCE205; Fri, 17 Aug 2012 22:55:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-21.messagelabs.com!1345244108!14727231!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21631 invoked from network); 17 Aug 2012 22:55:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 22:55:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRc-00078W-J7
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRc-00067g-As
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:08 +0000
Message-Id: <E1T2VRc-00067g-As@xenbits.xen.org>
Date: Fri, 17 Aug 2012 22:55:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxc/Linux: Add VM_DONTCOPY flag of
	the VMA of the hypercall buffer
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Wangzhenguo <wangzhenguo@huawei.com>
# Date 1345211208 -3600
# Node ID b021cca938e55bb1d9fae4f1fd4df1a2d20db215
# Parent  71a6727651110ac53b8ffe17a9a799d73a511131
libxc/Linux: Add VM_DONTCOPY flag of the VMA of the hypercall buffer

This avoids the hypercall buffer becoming CoW on fork.

In multi-threads and multi-processes environment, e.g. the process has two
threads, thread A may call hypercall, thread B may call fork() to create child
process. After forking, all pages of the process including hypercall buffers
are cow. It will cause a write protection and return EFAULT error if hypervisor
calls copy_to_user in hypercall in thread A context,

Fix:
1. Before hypercall: use MADV_DONTFORK of madvise syscall to make the hypercall
   buffer not to be copied to child process after fork.
2. After hypercall: undo the effect of MADV_DONTFORK for the hypercall buffer
   by using MADV_DOFORK of madvise syscall.
3. Use mmap/nunmap for memory alloc/free instead of malloc/free to bypass libc.

Note:
Child processes must not use the opened xc_{interface,evtchn,gnttab,gntshr}
handle that inherits from parents. They should reopen the handle if they want
to interact with xc. Otherwise, it may cause segment fault to access hypercall
buffer caches of the handle.

Signed-off-by: Zhenguo Wang <wangzhenguo@huawei.com>
Signed-off-by: Xiaowei Yang <xiaowei.yang@huawei.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- s/ptr/p/ to fix build & tweaked the wording of the comments
         slightly. ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 71a672765111 -r b021cca938e5 tools/libxc/xc_linux_osdep.c
--- a/tools/libxc/xc_linux_osdep.c	Fri Aug 17 14:10:26 2012 +0100
+++ b/tools/libxc/xc_linux_osdep.c	Fri Aug 17 14:46:48 2012 +0100
@@ -93,22 +93,21 @@ static void *linux_privcmd_alloc_hyperca
     size_t size = npages * XC_PAGE_SIZE;
     void *p;
 
-    p = xc_memalign(xch, XC_PAGE_SIZE, size);
-    if (!p)
-        return NULL;
+    /* Address returned by mmap is page aligned. */
+    p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, -1, 0);
 
-    if ( mlock(p, size) < 0 )
-    {
-        free(p);
-        return NULL;
-    }
+    /* Do not copy the VMA to child process on fork. Avoid the page being COW
+        on hypercall. */
+    madvise(p, npages * XC_PAGE_SIZE, MADV_DONTFORK);
     return p;
 }
 
 static void linux_privcmd_free_hypercall_buffer(xc_interface *xch, xc_osdep_handle h, void *ptr, int npages)
 {
-    munlock(ptr, npages * XC_PAGE_SIZE);
-    free(ptr);
+    /* Recover the VMA flags. Maybe it's not necessary */
+    madvise(ptr, npages * XC_PAGE_SIZE, MADV_DOFORK);
+    
+    munmap(ptr, npages * XC_PAGE_SIZE);
 }
 
 static int linux_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcmd_hypercall_t *hypercall)
diff -r 71a672765111 -r b021cca938e5 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h	Fri Aug 17 14:10:26 2012 +0100
+++ b/tools/libxc/xenctrl.h	Fri Aug 17 14:46:48 2012 +0100
@@ -134,6 +134,12 @@ typedef enum xc_error_code xc_error_code
  * be called multiple times within a single process.  Multiple processes can
  * have an open hypervisor interface at the same time.
  *
+ * Note:
+ * Child processes must not use the opened xc interface handle that inherits
+ * from parents. They should reopen the handle if they want to interact with
+ * xc. Otherwise, it may cause segment fault to access hypercall buffer caches
+ * of the handle.
+ *
  * Each call to this function should have a corresponding call to
  * xc_interface_close().
  *
@@ -908,6 +914,12 @@ int xc_evtchn_status(xc_interface *xch, 
  * Return a handle to the event channel driver, or -1 on failure, in which case
  * errno will be set appropriately.
  *
+ * Note:
+ * Child processes must not use the opened xc evtchn handle that inherits from
+ * parents. They should reopen the handle if they want to interact with xc.
+ * Otherwise, it may cause segment fault to access hypercall buffer caches of
+ * the handle.
+ *
  * Before Xen pre-4.1 this function would sometimes report errors with perror.
  */
 xc_evtchn *xc_evtchn_open(xentoollog_logger *logger,
@@ -1339,9 +1351,13 @@ int xc_domain_subscribe_for_suspend(
 
 /*
  * These functions sometimes log messages as above, but not always.
- */
-
-/*
+ *
+ * Note:
+ * Child processes must not use the opened xc gnttab handle that inherits from
+ * parents. They should reopen the handle if they want to interact with xc.
+ * Otherwise, it may cause segment fault to access hypercall buffer caches of
+ * the handle.
+ *
  * Return an fd onto the grant table driver.  Logs errors.
  */
 xc_gnttab *xc_gnttab_open(xentoollog_logger *logger,
@@ -1458,6 +1474,13 @@ grant_entry_v2_t *xc_gnttab_map_table_v2
 
 /*
  * Return an fd onto the grant sharing driver.  Logs errors.
+ *
+ * Note:
+ * Child processes must not use the opened xc gntshr handle that inherits from
+ * parents. They should reopen the handle if they want to interact with xc.
+ * Otherwise, it may cause segment fault to access hypercall buffer caches of
+ * the handle.
+ *
  */
 xc_gntshr *xc_gntshr_open(xentoollog_logger *logger,
 			  unsigned open_flags);

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 22:55:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 22:55:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2VRh-0005h9-7C; Fri, 17 Aug 2012 22:55:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRg-0005gv-A2
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:12 +0000
Received: from [85.158.143.99:37088] by server-3.bemta-4.messagelabs.com id
	15/C7-09529-FCBCE205; Fri, 17 Aug 2012 22:55:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-216.messagelabs.com!1345244109!18996527!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25365 invoked from network); 17 Aug 2012 22:55:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 22:55:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRd-00078Z-4a
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRc-00067v-U0
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:08 +0000
Message-Id: <E1T2VRc-00067v-U0@xenbits.xen.org>
Date: Fri, 17 Aug 2012 22:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/python: Clean python correctly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1345211209 -3600
# Node ID 2eae0ec993b80cab2c9469db3b9ae9a644a74ac9
# Parent  b021cca938e55bb1d9fae4f1fd4df1a2d20db215
tools/python: Clean python correctly

Cleaning the python directory should completely remove the build/
directory, otherwise subsequent builds may be short-circuited and a
stale build installed.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r b021cca938e5 -r 2eae0ec993b8 tools/libxc/xc_linux_osdep.c
--- a/tools/libxc/xc_linux_osdep.c	Fri Aug 17 14:46:48 2012 +0100
+++ b/tools/libxc/xc_linux_osdep.c	Fri Aug 17 14:46:49 2012 +0100
@@ -1,4 +1,4 @@
-/******************************************************************************
+ /******************************************************************************
  *
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
@@ -106,7 +106,7 @@ static void linux_privcmd_free_hypercall
 {
     /* Recover the VMA flags. Maybe it's not necessary */
     madvise(ptr, npages * XC_PAGE_SIZE, MADV_DOFORK);
-    
+
     munmap(ptr, npages * XC_PAGE_SIZE);
 }
 
diff -r b021cca938e5 -r 2eae0ec993b8 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h	Fri Aug 17 14:46:48 2012 +0100
+++ b/tools/libxc/xenctrl.h	Fri Aug 17 14:46:49 2012 +0100
@@ -135,10 +135,9 @@ typedef enum xc_error_code xc_error_code
  * have an open hypervisor interface at the same time.
  *
  * Note:
- * Child processes must not use the opened xc interface handle that inherits
- * from parents. They should reopen the handle if they want to interact with
- * xc. Otherwise, it may cause segment fault to access hypercall buffer caches
- * of the handle.
+ * After fork a child process must not use any opened xc interface
+ * handle inherited from their parent. They must open a new handle if
+ * they want to interact with xc.
  *
  * Each call to this function should have a corresponding call to
  * xc_interface_close().
@@ -915,10 +914,9 @@ int xc_evtchn_status(xc_interface *xch, 
  * errno will be set appropriately.
  *
  * Note:
- * Child processes must not use the opened xc evtchn handle that inherits from
- * parents. They should reopen the handle if they want to interact with xc.
- * Otherwise, it may cause segment fault to access hypercall buffer caches of
- * the handle.
+ * After fork a child process must not use any opened xc evtchn
+ * handle inherited from their parent. They must open a new handle if
+ * they want to interact with xc.
  *
  * Before Xen pre-4.1 this function would sometimes report errors with perror.
  */
@@ -1351,12 +1349,13 @@ int xc_domain_subscribe_for_suspend(
 
 /*
  * These functions sometimes log messages as above, but not always.
- *
+ */
+
+/*
  * Note:
- * Child processes must not use the opened xc gnttab handle that inherits from
- * parents. They should reopen the handle if they want to interact with xc.
- * Otherwise, it may cause segment fault to access hypercall buffer caches of
- * the handle.
+ * After fork a child process must not use any opened xc gnttab
+ * handle inherited from their parent. They must open a new handle if
+ * they want to interact with xc.
  *
  * Return an fd onto the grant table driver.  Logs errors.
  */
@@ -1476,10 +1475,9 @@ grant_entry_v2_t *xc_gnttab_map_table_v2
  * Return an fd onto the grant sharing driver.  Logs errors.
  *
  * Note:
- * Child processes must not use the opened xc gntshr handle that inherits from
- * parents. They should reopen the handle if they want to interact with xc.
- * Otherwise, it may cause segment fault to access hypercall buffer caches of
- * the handle.
+ * After fork a child process must not use any opened xc gntshr
+ * handle inherited from their parent. They must open a new handle if
+ * they want to interact with xc.
  *
  */
 xc_gntshr *xc_gntshr_open(xentoollog_logger *logger,
diff -r b021cca938e5 -r 2eae0ec993b8 tools/python/Makefile
--- a/tools/python/Makefile	Fri Aug 17 14:46:48 2012 +0100
+++ b/tools/python/Makefile	Fri Aug 17 14:46:49 2012 +0100
@@ -34,7 +34,7 @@ test:
 .PHONY: clean
 clean:
 	rm -f $(XENPATH)
-	rm -rf *.pyc *.pyo *.o *.a *~ xen/util/auxbin.pyc
+	rm -rf build/ *.pyc *.pyo *.o *.a *~ xen/util/auxbin.pyc
 	rm -f xen/lowlevel/xl/_pyxl_types.h
 	rm -f xen/lowlevel/xl/_pyxl_types.c
 	rm -f $(DEPS)

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 22:55:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 22:55:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2VRh-0005h9-7C; Fri, 17 Aug 2012 22:55:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRg-0005gv-A2
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:12 +0000
Received: from [85.158.143.99:37088] by server-3.bemta-4.messagelabs.com id
	15/C7-09529-FCBCE205; Fri, 17 Aug 2012 22:55:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-216.messagelabs.com!1345244109!18996527!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25365 invoked from network); 17 Aug 2012 22:55:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 22:55:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRd-00078Z-4a
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRc-00067v-U0
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:08 +0000
Message-Id: <E1T2VRc-00067v-U0@xenbits.xen.org>
Date: Fri, 17 Aug 2012 22:55:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/python: Clean python correctly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1345211209 -3600
# Node ID 2eae0ec993b80cab2c9469db3b9ae9a644a74ac9
# Parent  b021cca938e55bb1d9fae4f1fd4df1a2d20db215
tools/python: Clean python correctly

Cleaning the python directory should completely remove the build/
directory, otherwise subsequent builds may be short-circuited and a
stale build installed.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r b021cca938e5 -r 2eae0ec993b8 tools/libxc/xc_linux_osdep.c
--- a/tools/libxc/xc_linux_osdep.c	Fri Aug 17 14:46:48 2012 +0100
+++ b/tools/libxc/xc_linux_osdep.c	Fri Aug 17 14:46:49 2012 +0100
@@ -1,4 +1,4 @@
-/******************************************************************************
+ /******************************************************************************
  *
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
@@ -106,7 +106,7 @@ static void linux_privcmd_free_hypercall
 {
     /* Recover the VMA flags. Maybe it's not necessary */
     madvise(ptr, npages * XC_PAGE_SIZE, MADV_DOFORK);
-    
+
     munmap(ptr, npages * XC_PAGE_SIZE);
 }
 
diff -r b021cca938e5 -r 2eae0ec993b8 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h	Fri Aug 17 14:46:48 2012 +0100
+++ b/tools/libxc/xenctrl.h	Fri Aug 17 14:46:49 2012 +0100
@@ -135,10 +135,9 @@ typedef enum xc_error_code xc_error_code
  * have an open hypervisor interface at the same time.
  *
  * Note:
- * Child processes must not use the opened xc interface handle that inherits
- * from parents. They should reopen the handle if they want to interact with
- * xc. Otherwise, it may cause segment fault to access hypercall buffer caches
- * of the handle.
+ * After fork a child process must not use any opened xc interface
+ * handle inherited from their parent. They must open a new handle if
+ * they want to interact with xc.
  *
  * Each call to this function should have a corresponding call to
  * xc_interface_close().
@@ -915,10 +914,9 @@ int xc_evtchn_status(xc_interface *xch, 
  * errno will be set appropriately.
  *
  * Note:
- * Child processes must not use the opened xc evtchn handle that inherits from
- * parents. They should reopen the handle if they want to interact with xc.
- * Otherwise, it may cause segment fault to access hypercall buffer caches of
- * the handle.
+ * After fork a child process must not use any opened xc evtchn
+ * handle inherited from their parent. They must open a new handle if
+ * they want to interact with xc.
  *
  * Before Xen pre-4.1 this function would sometimes report errors with perror.
  */
@@ -1351,12 +1349,13 @@ int xc_domain_subscribe_for_suspend(
 
 /*
  * These functions sometimes log messages as above, but not always.
- *
+ */
+
+/*
  * Note:
- * Child processes must not use the opened xc gnttab handle that inherits from
- * parents. They should reopen the handle if they want to interact with xc.
- * Otherwise, it may cause segment fault to access hypercall buffer caches of
- * the handle.
+ * After fork a child process must not use any opened xc gnttab
+ * handle inherited from their parent. They must open a new handle if
+ * they want to interact with xc.
  *
  * Return an fd onto the grant table driver.  Logs errors.
  */
@@ -1476,10 +1475,9 @@ grant_entry_v2_t *xc_gnttab_map_table_v2
  * Return an fd onto the grant sharing driver.  Logs errors.
  *
  * Note:
- * Child processes must not use the opened xc gntshr handle that inherits from
- * parents. They should reopen the handle if they want to interact with xc.
- * Otherwise, it may cause segment fault to access hypercall buffer caches of
- * the handle.
+ * After fork a child process must not use any opened xc gntshr
+ * handle inherited from their parent. They must open a new handle if
+ * they want to interact with xc.
  *
  */
 xc_gntshr *xc_gntshr_open(xentoollog_logger *logger,
diff -r b021cca938e5 -r 2eae0ec993b8 tools/python/Makefile
--- a/tools/python/Makefile	Fri Aug 17 14:46:48 2012 +0100
+++ b/tools/python/Makefile	Fri Aug 17 14:46:49 2012 +0100
@@ -34,7 +34,7 @@ test:
 .PHONY: clean
 clean:
 	rm -f $(XENPATH)
-	rm -rf *.pyc *.pyo *.o *.a *~ xen/util/auxbin.pyc
+	rm -rf build/ *.pyc *.pyo *.o *.a *~ xen/util/auxbin.pyc
 	rm -f xen/lowlevel/xl/_pyxl_types.h
 	rm -f xen/lowlevel/xl/_pyxl_types.c
 	rm -f $(DEPS)

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 22:55:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 22:55:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2VRm-0005hM-AN; Fri, 17 Aug 2012 22:55:18 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRk-0005gu-W5
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-27.messagelabs.com!1345244109!9005038!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16459 invoked from network); 17 Aug 2012 22:55:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 22:55:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRd-00078c-Mw
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRd-00068A-I9
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:09 +0000
Message-Id: <E1T2VRd-00068A-I9@xenbits.xen.org>
Date: Fri, 17 Aug 2012 22:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] docs: console: correct example
	console type definition
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1345211849 -3600
# Node ID 73ac4b7ad2e14bf468fe7d4d032c80c6bd7350ad
# Parent  2eae0ec993b80cab2c9469db3b9ae9a644a74ac9
docs: console: correct example console type definition

I think this is intended to be under the specific console's directory.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 2eae0ec993b8 -r 73ac4b7ad2e1 docs/misc/console.txt
--- a/docs/misc/console.txt	Fri Aug 17 14:46:49 2012 +0100
+++ b/docs/misc/console.txt	Fri Aug 17 14:57:29 2012 +0100
@@ -36,7 +36,7 @@ toolstack in the "type" node on xenstore
 section.
 For example:
 
-# xenstore-read /local/domain/26/console/type
+# xenstore-read /local/domain/26/console/1/type
 xenconsoled
 
 The supported values are only xenconsoled or ioemu; xenconsoled has

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

From xen-changelog-bounces@lists.xen.org Fri Aug 17 22:55:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 17 Aug 2012 22:55:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T2VRm-0005hM-AN; Fri, 17 Aug 2012 22:55:18 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRk-0005gu-W5
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:17 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-27.messagelabs.com!1345244109!9005038!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16459 invoked from network); 17 Aug 2012 22:55:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	17 Aug 2012 22:55:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRd-00078c-Mw
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T2VRd-00068A-I9
	for xen-changelog@lists.xensource.com; Fri, 17 Aug 2012 22:55:09 +0000
Message-Id: <E1T2VRd-00068A-I9@xenbits.xen.org>
Date: Fri, 17 Aug 2012 22:55:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] docs: console: correct example
	console type definition
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1345211849 -3600
# Node ID 73ac4b7ad2e14bf468fe7d4d032c80c6bd7350ad
# Parent  2eae0ec993b80cab2c9469db3b9ae9a644a74ac9
docs: console: correct example console type definition

I think this is intended to be under the specific console's directory.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 2eae0ec993b8 -r 73ac4b7ad2e1 docs/misc/console.txt
--- a/docs/misc/console.txt	Fri Aug 17 14:46:49 2012 +0100
+++ b/docs/misc/console.txt	Fri Aug 17 14:57:29 2012 +0100
@@ -36,7 +36,7 @@ toolstack in the "type" node on xenstore
 section.
 For example:
 
-# xenstore-read /local/domain/26/console/type
+# xenstore-read /local/domain/26/console/1/type
 xenconsoled
 
 The supported values are only xenconsoled or ioemu; xenconsoled has

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

From xen-changelog-bounces@lists.xen.org Mon Aug 20 21:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Aug 2012 21:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T3ZQK-0007ek-UW; Mon, 20 Aug 2012 21:22:12 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQJ-0007eT-O2
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:11 +0000
Received: from [85.158.138.51:30502] by server-6.bemta-3.messagelabs.com id
	BF/DA-32013-28AA2305; Mon, 20 Aug 2012 21:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-174.messagelabs.com!1345497729!21266332!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26216 invoked from network); 20 Aug 2012 21:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	20 Aug 2012 21:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQG-00086K-Tl
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQG-00054h-EQ
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:08 +0000
Message-Id: <E1T3ZQG-00054h-EQ@xenbits.xen.org>
Date: Mon, 20 Aug 2012 21:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: don't expose SYSENTER on
	unknown CPUs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345444801 -7200
# Node ID 4b0d263008cdf4585fe30ec2847b0a810db12354
# Parent  73ac4b7ad2e14bf468fe7d4d032c80c6bd7350ad
x86: don't expose SYSENTER on unknown CPUs

So far we only ever set up the respective MSRs on Intel CPUs, yet we
hide the feature only on a 32-bit hypervisor. That prevents booting of
PV guests on top of a 64-bit hypervisor making use of the instruction
on unknown CPUs (VIA in this case).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 73ac4b7ad2e1 -r 4b0d263008cd xen/arch/x86/cpu/common.c
--- a/xen/arch/x86/cpu/common.c	Fri Aug 17 14:57:29 2012 +0100
+++ b/xen/arch/x86/cpu/common.c	Mon Aug 20 08:40:01 2012 +0200
@@ -55,6 +55,7 @@ static void default_init(struct cpuinfo_
 	/* Not much we can do here... */
 	/* Check if at least it has cpuid */
 	BUG_ON(c->cpuid_level == -1);
+	__clear_bit(X86_FEATURE_SEP, c->x86_capability);
 }
 
 static struct cpu_dev default_cpu = {

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

From xen-changelog-bounces@lists.xen.org Mon Aug 20 21:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Aug 2012 21:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T3ZQK-0007ek-UW; Mon, 20 Aug 2012 21:22:12 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQJ-0007eT-O2
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:11 +0000
Received: from [85.158.138.51:30502] by server-6.bemta-3.messagelabs.com id
	BF/DA-32013-28AA2305; Mon, 20 Aug 2012 21:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-174.messagelabs.com!1345497729!21266332!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26216 invoked from network); 20 Aug 2012 21:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	20 Aug 2012 21:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQG-00086K-Tl
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQG-00054h-EQ
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:08 +0000
Message-Id: <E1T3ZQG-00054h-EQ@xenbits.xen.org>
Date: Mon, 20 Aug 2012 21:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: don't expose SYSENTER on
	unknown CPUs
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345444801 -7200
# Node ID 4b0d263008cdf4585fe30ec2847b0a810db12354
# Parent  73ac4b7ad2e14bf468fe7d4d032c80c6bd7350ad
x86: don't expose SYSENTER on unknown CPUs

So far we only ever set up the respective MSRs on Intel CPUs, yet we
hide the feature only on a 32-bit hypervisor. That prevents booting of
PV guests on top of a 64-bit hypervisor making use of the instruction
on unknown CPUs (VIA in this case).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 73ac4b7ad2e1 -r 4b0d263008cd xen/arch/x86/cpu/common.c
--- a/xen/arch/x86/cpu/common.c	Fri Aug 17 14:57:29 2012 +0100
+++ b/xen/arch/x86/cpu/common.c	Mon Aug 20 08:40:01 2012 +0200
@@ -55,6 +55,7 @@ static void default_init(struct cpuinfo_
 	/* Not much we can do here... */
 	/* Check if at least it has cpuid */
 	BUG_ON(c->cpuid_level == -1);
+	__clear_bit(X86_FEATURE_SEP, c->x86_capability);
 }
 
 static struct cpu_dev default_cpu = {

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

From xen-changelog-bounces@lists.xen.org Mon Aug 20 21:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Aug 2012 21:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T3ZQR-0007fN-0m; Mon, 20 Aug 2012 21:22:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQP-0007ei-Tp
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1345497729!10200460!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14777 invoked from network); 20 Aug 2012 21:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	20 Aug 2012 21:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQH-00086N-D3
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQH-00054w-45
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:09 +0000
Message-Id: <E1T3ZQH-00054w-45@xenbits.xen.org>
Date: Mon, 20 Aug 2012 21:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64: refine the XSA-9 fix
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345445207 -7200
# Node ID e6ca45ca03c2e08af3a74b404166527b68fd1218
# Parent  4b0d263008cdf4585fe30ec2847b0a810db12354
x86-64: refine the XSA-9 fix

Our product management wasn't happy with the "solution" for XSA-9, and
demanded that customer systems must continue to boot. Rather than
having our and perhaps other distros carry non-trivial patches, allow
for more fine grained control (panic on boot, deny guest creation, or
merely warn) by means of a single line change.

Also, as this was found to be a problem with remotely managed systems,
don't default to boot denial (just deny guest creation).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 4b0d263008cd -r e6ca45ca03c2 xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c	Mon Aug 20 08:40:01 2012 +0200
+++ b/xen/arch/x86/cpu/amd.c	Mon Aug 20 08:46:47 2012 +0200
@@ -32,8 +32,11 @@
 static char opt_famrev[14];
 string_param("cpuid_mask_cpu", opt_famrev);
 
-static bool_t opt_allow_unsafe;
+#ifdef __x86_64__
+/* 1 = allow, 0 = don't allow guest creation, -1 = don't allow boot */
+s8 __read_mostly opt_allow_unsafe;
 boolean_param("allow_unsafe", opt_allow_unsafe);
+#endif
 
 static inline void wrmsr_amd(unsigned int index, unsigned int lo, 
 		unsigned int hi)
@@ -496,10 +499,19 @@ static void __devinit init_amd(struct cp
 		clear_bit(X86_FEATURE_MWAIT, c->x86_capability);
 
 #ifdef __x86_64__
-	if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
+	if (!cpu_has_amd_erratum(c, AMD_ERRATUM_121))
+		opt_allow_unsafe = 1;
+	else if (opt_allow_unsafe < 0)
 		panic("Xen will not boot on this CPU for security reasons.\n"
 		      "Pass \"allow_unsafe\" if you're trusting all your"
 		      " (PV) guest kernels.\n");
+	else if (!opt_allow_unsafe && c == &boot_cpu_data)
+		printk(KERN_WARNING
+		       "*** Xen will not allow creation of DomU-s on"
+		       " this CPU for security reasons. ***\n"
+		       KERN_WARNING
+		       "*** Pass \"allow_unsafe\" if you're trusting"
+		       " all your (PV) guest kernels. ***\n");
 
 	/* AMD CPUs do not support SYSENTER outside of legacy mode. */
 	clear_bit(X86_FEATURE_SEP, c->x86_capability);
diff -r 4b0d263008cd -r e6ca45ca03c2 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c	Mon Aug 20 08:40:01 2012 +0200
+++ b/xen/arch/x86/domain.c	Mon Aug 20 08:46:47 2012 +0200
@@ -55,6 +55,7 @@
 #include <asm/traps.h>
 #include <asm/nmi.h>
 #include <asm/mce.h>
+#include <asm/amd.h>
 #include <xen/numa.h>
 #include <xen/iommu.h>
 #ifdef CONFIG_COMPAT
@@ -531,6 +532,20 @@ int arch_domain_create(struct domain *d,
 
 #else /* __x86_64__ */
 
+    if ( d->domain_id && !is_idle_domain(d) &&
+         cpu_has_amd_erratum(&boot_cpu_data, AMD_ERRATUM_121) )
+    {
+        if ( !opt_allow_unsafe )
+        {
+            printk(XENLOG_G_ERR "Xen does not allow DomU creation on this CPU"
+                   " for security reasons.\n");
+            return -EPERM;
+        }
+        printk(XENLOG_G_WARNING
+               "Dom%d may compromise security on this CPU.\n",
+               d->domain_id);
+    }
+
     BUILD_BUG_ON(PDPT_L2_ENTRIES * sizeof(*d->arch.mm_perdomain_pt_pages)
                  != PAGE_SIZE);
     pg = alloc_domheap_page(NULL, MEMF_node(domain_to_node(d)));
diff -r 4b0d263008cd -r e6ca45ca03c2 xen/include/asm-x86/amd.h
--- a/xen/include/asm-x86/amd.h	Mon Aug 20 08:40:01 2012 +0200
+++ b/xen/include/asm-x86/amd.h	Mon Aug 20 08:46:47 2012 +0200
@@ -147,6 +147,8 @@ struct cpuinfo_x86;
 int cpu_has_amd_erratum(const struct cpuinfo_x86 *, int, ...);
 
 #ifdef __x86_64__
+extern s8 opt_allow_unsafe;
+
 void fam10h_check_enable_mmcfg(void);
 void check_enable_amd_mmconf_dmi(void);
 #endif

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

From xen-changelog-bounces@lists.xen.org Mon Aug 20 21:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 20 Aug 2012 21:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T3ZQR-0007fN-0m; Mon, 20 Aug 2012 21:22:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQP-0007ei-Tp
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-27.messagelabs.com!1345497729!10200460!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14777 invoked from network); 20 Aug 2012 21:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	20 Aug 2012 21:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQH-00086N-D3
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T3ZQH-00054w-45
	for xen-changelog@lists.xensource.com; Mon, 20 Aug 2012 21:22:09 +0000
Message-Id: <E1T3ZQH-00054w-45@xenbits.xen.org>
Date: Mon, 20 Aug 2012 21:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86-64: refine the XSA-9 fix
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Jan Beulich <jbeulich@suse.com>
# Date 1345445207 -7200
# Node ID e6ca45ca03c2e08af3a74b404166527b68fd1218
# Parent  4b0d263008cdf4585fe30ec2847b0a810db12354
x86-64: refine the XSA-9 fix

Our product management wasn't happy with the "solution" for XSA-9, and
demanded that customer systems must continue to boot. Rather than
having our and perhaps other distros carry non-trivial patches, allow
for more fine grained control (panic on boot, deny guest creation, or
merely warn) by means of a single line change.

Also, as this was found to be a problem with remotely managed systems,
don't default to boot denial (just deny guest creation).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
---


diff -r 4b0d263008cd -r e6ca45ca03c2 xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c	Mon Aug 20 08:40:01 2012 +0200
+++ b/xen/arch/x86/cpu/amd.c	Mon Aug 20 08:46:47 2012 +0200
@@ -32,8 +32,11 @@
 static char opt_famrev[14];
 string_param("cpuid_mask_cpu", opt_famrev);
 
-static bool_t opt_allow_unsafe;
+#ifdef __x86_64__
+/* 1 = allow, 0 = don't allow guest creation, -1 = don't allow boot */
+s8 __read_mostly opt_allow_unsafe;
 boolean_param("allow_unsafe", opt_allow_unsafe);
+#endif
 
 static inline void wrmsr_amd(unsigned int index, unsigned int lo, 
 		unsigned int hi)
@@ -496,10 +499,19 @@ static void __devinit init_amd(struct cp
 		clear_bit(X86_FEATURE_MWAIT, c->x86_capability);
 
 #ifdef __x86_64__
-	if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
+	if (!cpu_has_amd_erratum(c, AMD_ERRATUM_121))
+		opt_allow_unsafe = 1;
+	else if (opt_allow_unsafe < 0)
 		panic("Xen will not boot on this CPU for security reasons.\n"
 		      "Pass \"allow_unsafe\" if you're trusting all your"
 		      " (PV) guest kernels.\n");
+	else if (!opt_allow_unsafe && c == &boot_cpu_data)
+		printk(KERN_WARNING
+		       "*** Xen will not allow creation of DomU-s on"
+		       " this CPU for security reasons. ***\n"
+		       KERN_WARNING
+		       "*** Pass \"allow_unsafe\" if you're trusting"
+		       " all your (PV) guest kernels. ***\n");
 
 	/* AMD CPUs do not support SYSENTER outside of legacy mode. */
 	clear_bit(X86_FEATURE_SEP, c->x86_capability);
diff -r 4b0d263008cd -r e6ca45ca03c2 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c	Mon Aug 20 08:40:01 2012 +0200
+++ b/xen/arch/x86/domain.c	Mon Aug 20 08:46:47 2012 +0200
@@ -55,6 +55,7 @@
 #include <asm/traps.h>
 #include <asm/nmi.h>
 #include <asm/mce.h>
+#include <asm/amd.h>
 #include <xen/numa.h>
 #include <xen/iommu.h>
 #ifdef CONFIG_COMPAT
@@ -531,6 +532,20 @@ int arch_domain_create(struct domain *d,
 
 #else /* __x86_64__ */
 
+    if ( d->domain_id && !is_idle_domain(d) &&
+         cpu_has_amd_erratum(&boot_cpu_data, AMD_ERRATUM_121) )
+    {
+        if ( !opt_allow_unsafe )
+        {
+            printk(XENLOG_G_ERR "Xen does not allow DomU creation on this CPU"
+                   " for security reasons.\n");
+            return -EPERM;
+        }
+        printk(XENLOG_G_WARNING
+               "Dom%d may compromise security on this CPU.\n",
+               d->domain_id);
+    }
+
     BUILD_BUG_ON(PDPT_L2_ENTRIES * sizeof(*d->arch.mm_perdomain_pt_pages)
                  != PAGE_SIZE);
     pg = alloc_domheap_page(NULL, MEMF_node(domain_to_node(d)));
diff -r 4b0d263008cd -r e6ca45ca03c2 xen/include/asm-x86/amd.h
--- a/xen/include/asm-x86/amd.h	Mon Aug 20 08:40:01 2012 +0200
+++ b/xen/include/asm-x86/amd.h	Mon Aug 20 08:46:47 2012 +0200
@@ -147,6 +147,8 @@ struct cpuinfo_x86;
 int cpu_has_amd_erratum(const struct cpuinfo_x86 *, int, ...);
 
 #ifdef __x86_64__
+extern s8 opt_allow_unsafe;
+
 void fam10h_check_enable_mmcfg(void);
 void check_enable_amd_mmconf_dmi(void);
 #endif

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Prw-0005Ha-CN; Thu, 23 Aug 2012 05:22:12 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prv-0005HQ-9W
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:11 +0000
Received: from [85.158.143.99:44501] by server-2.bemta-4.messagelabs.com id
	63/F4-21239-20EB5305; Thu, 23 Aug 2012 05:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-216.messagelabs.com!1345699328!26492897!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3835 invoked from network); 23 Aug 2012 05:22:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prs-0007oY-Gv
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prs-0004gA-0n
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:08 +0000
Message-Id: <E1T4Prs-0004gA-0n@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xsm: Add missing dummy hooks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1345670012 -3600
# Node ID c961e012e00bd2c185275a931dab1a8f90d50667
# Parent  e6ca45ca03c2e08af3a74b404166527b68fd1218
xsm: Add missing dummy hooks

A few XSM hooks have been defined without implementation in dummy.c;
these will cause a null function pointer deference if called. Also
implement the efi_call hook, which was incorrectly added without any
implementations.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r e6ca45ca03c2 -r c961e012e00b xen/xsm/dummy.c
--- a/xen/xsm/dummy.c	Mon Aug 20 08:46:47 2012 +0200
+++ b/xen/xsm/dummy.c	Wed Aug 22 22:13:32 2012 +0100
@@ -295,6 +295,21 @@ static char *dummy_show_security_evtchn 
     return NULL;
 }
 
+static int dummy_get_pod_target(struct domain *d)
+{
+    return 0;
+}
+
+static int dummy_set_pod_target(struct domain *d)
+{
+    return 0;
+}
+
+static int dummy_get_device_group (uint32_t machine_bdf)
+{
+    return 0;
+}
+
 static int dummy_test_assign_device (uint32_t machine_bdf)
 {
     return 0;
@@ -503,6 +518,11 @@ static int dummy_firmware_info (void)
     return 0;
 }
 
+static int dummy_efi_call(void)
+{
+    return 0;
+}
+
 static int dummy_acpi_sleep (void)
 {
     return 0;
@@ -565,6 +585,11 @@ static int dummy_bind_pt_irq (struct dom
     return 0;
 }
 
+static int dummy_unbind_pt_irq (struct domain *d)
+{
+    return 0;
+}
+
 static int dummy_pin_mem_cacheattr (struct domain *d)
 {
     return 0;
@@ -652,6 +677,8 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, alloc_security_evtchn);
     set_to_dummy_if_null(ops, free_security_evtchn);
     set_to_dummy_if_null(ops, show_security_evtchn);
+    set_to_dummy_if_null(ops, get_pod_target);
+    set_to_dummy_if_null(ops, set_pod_target);
 
     set_to_dummy_if_null(ops, memory_adjust_reservation);
     set_to_dummy_if_null(ops, memory_stat_reservation);
@@ -670,6 +697,7 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, iomem_permission);
     set_to_dummy_if_null(ops, pci_config_permission);
 
+    set_to_dummy_if_null(ops, get_device_group);
     set_to_dummy_if_null(ops, test_assign_device);
     set_to_dummy_if_null(ops, assign_device);
     set_to_dummy_if_null(ops, deassign_device);
@@ -711,6 +739,7 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, physinfo);
     set_to_dummy_if_null(ops, platform_quirk);
     set_to_dummy_if_null(ops, firmware_info);
+    set_to_dummy_if_null(ops, efi_call);
     set_to_dummy_if_null(ops, acpi_sleep);
     set_to_dummy_if_null(ops, change_freq);
     set_to_dummy_if_null(ops, getidletime);
@@ -723,6 +752,7 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, remove_from_physmap);
     set_to_dummy_if_null(ops, sendtrigger);
     set_to_dummy_if_null(ops, bind_pt_irq);
+    set_to_dummy_if_null(ops, unbind_pt_irq);
     set_to_dummy_if_null(ops, pin_mem_cacheattr);
     set_to_dummy_if_null(ops, ext_vcpucontext);
     set_to_dummy_if_null(ops, vcpuextstate);
diff -r e6ca45ca03c2 -r c961e012e00b xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c	Mon Aug 20 08:46:47 2012 +0200
+++ b/xen/xsm/flask/hooks.c	Wed Aug 22 22:13:32 2012 +0100
@@ -1280,6 +1280,11 @@ static int flask_firmware_info(void)
     return domain_has_xen(current->domain, XEN__FIRMWARE);
 }
 
+static int flask_efi_call(void)
+{
+    return domain_has_xen(current->domain, XEN__FIRMWARE);
+}
+
 static int flask_acpi_sleep(void)
 {
     return domain_has_xen(current->domain, XEN__SLEEP);
@@ -1663,6 +1668,7 @@ static struct xsm_operations flask_ops =
     .physinfo = flask_physinfo,
     .platform_quirk = flask_platform_quirk,
     .firmware_info = flask_firmware_info,
+    .efi_call = flask_efi_call,
     .acpi_sleep = flask_acpi_sleep,
     .change_freq = flask_change_freq,
     .getidletime = flask_getidletime,

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Prw-0005Ha-CN; Thu, 23 Aug 2012 05:22:12 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prv-0005HQ-9W
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:11 +0000
Received: from [85.158.143.99:44501] by server-2.bemta-4.messagelabs.com id
	63/F4-21239-20EB5305; Thu, 23 Aug 2012 05:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-216.messagelabs.com!1345699328!26492897!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3835 invoked from network); 23 Aug 2012 05:22:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prs-0007oY-Gv
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prs-0004gA-0n
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:08 +0000
Message-Id: <E1T4Prs-0004gA-0n@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xsm: Add missing dummy hooks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1345670012 -3600
# Node ID c961e012e00bd2c185275a931dab1a8f90d50667
# Parent  e6ca45ca03c2e08af3a74b404166527b68fd1218
xsm: Add missing dummy hooks

A few XSM hooks have been defined without implementation in dummy.c;
these will cause a null function pointer deference if called. Also
implement the efi_call hook, which was incorrectly added without any
implementations.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r e6ca45ca03c2 -r c961e012e00b xen/xsm/dummy.c
--- a/xen/xsm/dummy.c	Mon Aug 20 08:46:47 2012 +0200
+++ b/xen/xsm/dummy.c	Wed Aug 22 22:13:32 2012 +0100
@@ -295,6 +295,21 @@ static char *dummy_show_security_evtchn 
     return NULL;
 }
 
+static int dummy_get_pod_target(struct domain *d)
+{
+    return 0;
+}
+
+static int dummy_set_pod_target(struct domain *d)
+{
+    return 0;
+}
+
+static int dummy_get_device_group (uint32_t machine_bdf)
+{
+    return 0;
+}
+
 static int dummy_test_assign_device (uint32_t machine_bdf)
 {
     return 0;
@@ -503,6 +518,11 @@ static int dummy_firmware_info (void)
     return 0;
 }
 
+static int dummy_efi_call(void)
+{
+    return 0;
+}
+
 static int dummy_acpi_sleep (void)
 {
     return 0;
@@ -565,6 +585,11 @@ static int dummy_bind_pt_irq (struct dom
     return 0;
 }
 
+static int dummy_unbind_pt_irq (struct domain *d)
+{
+    return 0;
+}
+
 static int dummy_pin_mem_cacheattr (struct domain *d)
 {
     return 0;
@@ -652,6 +677,8 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, alloc_security_evtchn);
     set_to_dummy_if_null(ops, free_security_evtchn);
     set_to_dummy_if_null(ops, show_security_evtchn);
+    set_to_dummy_if_null(ops, get_pod_target);
+    set_to_dummy_if_null(ops, set_pod_target);
 
     set_to_dummy_if_null(ops, memory_adjust_reservation);
     set_to_dummy_if_null(ops, memory_stat_reservation);
@@ -670,6 +697,7 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, iomem_permission);
     set_to_dummy_if_null(ops, pci_config_permission);
 
+    set_to_dummy_if_null(ops, get_device_group);
     set_to_dummy_if_null(ops, test_assign_device);
     set_to_dummy_if_null(ops, assign_device);
     set_to_dummy_if_null(ops, deassign_device);
@@ -711,6 +739,7 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, physinfo);
     set_to_dummy_if_null(ops, platform_quirk);
     set_to_dummy_if_null(ops, firmware_info);
+    set_to_dummy_if_null(ops, efi_call);
     set_to_dummy_if_null(ops, acpi_sleep);
     set_to_dummy_if_null(ops, change_freq);
     set_to_dummy_if_null(ops, getidletime);
@@ -723,6 +752,7 @@ void xsm_fixup_ops (struct xsm_operation
     set_to_dummy_if_null(ops, remove_from_physmap);
     set_to_dummy_if_null(ops, sendtrigger);
     set_to_dummy_if_null(ops, bind_pt_irq);
+    set_to_dummy_if_null(ops, unbind_pt_irq);
     set_to_dummy_if_null(ops, pin_mem_cacheattr);
     set_to_dummy_if_null(ops, ext_vcpucontext);
     set_to_dummy_if_null(ops, vcpuextstate);
diff -r e6ca45ca03c2 -r c961e012e00b xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c	Mon Aug 20 08:46:47 2012 +0200
+++ b/xen/xsm/flask/hooks.c	Wed Aug 22 22:13:32 2012 +0100
@@ -1280,6 +1280,11 @@ static int flask_firmware_info(void)
     return domain_has_xen(current->domain, XEN__FIRMWARE);
 }
 
+static int flask_efi_call(void)
+{
+    return domain_has_xen(current->domain, XEN__FIRMWARE);
+}
+
 static int flask_acpi_sleep(void)
 {
     return domain_has_xen(current->domain, XEN__SLEEP);
@@ -1663,6 +1668,7 @@ static struct xsm_operations flask_ops =
     .physinfo = flask_physinfo,
     .platform_quirk = flask_platform_quirk,
     .firmware_info = flask_firmware_info,
+    .efi_call = flask_efi_call,
     .acpi_sleep = flask_acpi_sleep,
     .change_freq = flask_change_freq,
     .getidletime = flask_getidletime,

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Pry-0005I8-Ho; Thu, 23 Aug 2012 05:22:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prw-0005HQ-MH
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:12 +0000
Received: from [85.158.143.35:40155] by server-2.bemta-4.messagelabs.com id
	3A/F4-21239-40EB5305; Thu, 23 Aug 2012 05:22:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-21.messagelabs.com!1345699329!10190562!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29722 invoked from network); 23 Aug 2012 05:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prs-0007ob-Tz
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prs-0004gP-Lg
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:08 +0000
Message-Id: <E1T4Prs-0004gP-Lg@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xsm/flask: remove page-to-domain
	lookups from XSM hooks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1345670092 -3600
# Node ID c24eb37fcbbf5a8e4d508059f732b775adada80e
# Parent  c961e012e00bd2c185275a931dab1a8f90d50667
xsm/flask: remove page-to-domain lookups from XSM hooks

Doing a reverse lookup from MFN to its owning domain is redundant with
the internal checks Xen does on pages. Change the checks to operate
directly on the domain owning the pages for normal memory; MMIO areas
are still checked with security_iomem_sid.

This fixes a hypervisor crash when a domU attempts to map an MFN that
is free in Xen's heap: the XSM hook is called before the validity
check, and page_get_owner returns garbage when called on these
pages. While explicitly checking for such pages using
page_get_owner_and_reference is a possible solution, this ends up
duplicating parts of get_page_from_l1e.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r c961e012e00b -r c24eb37fcbbf xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/arch/x86/domctl.c	Wed Aug 22 22:14:52 2012 +0100
@@ -114,7 +114,7 @@ long arch_do_domctl(
 
         page = mfn_to_page(mfn);
 
-        ret = xsm_getpageframeinfo(page);
+        ret = xsm_getpageframeinfo(d);
         if ( ret )
         {
             rcu_unlock_domain(d);
@@ -170,6 +170,13 @@ long arch_do_domctl(
             if ( unlikely((d = rcu_lock_domain_by_id(dom)) == NULL) )
                 break;
 
+            ret = xsm_getpageframeinfo(d);
+            if ( ret )
+            {
+                rcu_unlock_domain(d);
+                break;
+            }
+
             if ( unlikely(num > 1024) ||
                  unlikely(num != domctl->u.getpageframeinfo3.num) )
             {
@@ -209,8 +216,6 @@ long arch_do_domctl(
                     if ( unlikely(!page) ||
                          unlikely(is_xen_heap_page(page)) )
                         type = XEN_DOMCTL_PFINFO_XTAB;
-                    else if ( xsm_getpageframeinfo(page) != 0 )
-                        ;
                     else
                     {
                         switch( page->u.inuse.type_info & PGT_type_mask )
@@ -267,6 +272,13 @@ long arch_do_domctl(
         if ( unlikely((d = rcu_lock_domain_by_id(dom)) == NULL) )
             break;
 
+        ret = xsm_getpageframeinfo(d);
+        if ( ret )
+        {
+            rcu_unlock_domain(d);
+            break;
+        }
+
         if ( unlikely(num > 1024) )
         {
             ret = -E2BIG;
@@ -310,11 +322,6 @@ long arch_do_domctl(
                 if ( unlikely(!page) ||
                      unlikely(is_xen_heap_page(page)) )
                     arr32[j] |= XEN_DOMCTL_PFINFO_XTAB;
-                else if ( xsm_getpageframeinfo(page) != 0 )
-                {
-                    put_page(page);
-                    continue;
-                }
                 else
                 {
                     unsigned long type = 0;
diff -r c961e012e00b -r c24eb37fcbbf xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/arch/x86/mm.c	Wed Aug 22 22:14:52 2012 +0100
@@ -3073,7 +3073,7 @@ long do_mmuext_op(
                 break;
             }
 
-            if ( (rc = xsm_memory_pin_page(d, page)) != 0 )
+            if ( (rc = xsm_memory_pin_page(d, pg_owner, page)) != 0 )
             {
                 put_page_and_type(page);
                 okay = 0;
@@ -3643,7 +3643,7 @@ long do_mmu_update(
             mfn = req.ptr >> PAGE_SHIFT;
             gpfn = req.val;
 
-            rc = xsm_mmu_machphys_update(d, mfn);
+            rc = xsm_mmu_machphys_update(d, pg_owner, mfn);
             if ( rc )
                 break;
 
diff -r c961e012e00b -r c24eb37fcbbf xen/include/xsm/xsm.h
--- a/xen/include/xsm/xsm.h	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/include/xsm/xsm.h	Wed Aug 22 22:14:52 2012 +0100
@@ -105,7 +105,7 @@ struct xsm_operations {
     int (*set_pod_target) (struct domain *d);
     int (*memory_adjust_reservation) (struct domain *d1, struct domain *d2);
     int (*memory_stat_reservation) (struct domain *d1, struct domain *d2);
-    int (*memory_pin_page) (struct domain *d, struct page_info *page);
+    int (*memory_pin_page) (struct domain *d1, struct domain *d2, struct page_info *page);
     int (*remove_from_physmap) (struct domain *d1, struct domain *d2);
 
     int (*console_io) (struct domain *d, int cmd);
@@ -143,7 +143,7 @@ struct xsm_operations {
 
 #ifdef CONFIG_X86
     int (*shadow_control) (struct domain *d, uint32_t op);
-    int (*getpageframeinfo) (struct page_info *page);
+    int (*getpageframeinfo) (struct domain *d);
     int (*getmemlist) (struct domain *d);
     int (*hypercall_init) (struct domain *d);
     int (*hvmcontext) (struct domain *d, uint32_t op);
@@ -171,9 +171,8 @@ struct xsm_operations {
     int (*domain_memory_map) (struct domain *d);
     int (*mmu_normal_update) (struct domain *d, struct domain *t,
                               struct domain *f, intpte_t fpte);
-    int (*mmu_machphys_update) (struct domain *d, unsigned long mfn);
-    int (*update_va_mapping) (struct domain *d, struct domain *f, 
-                                                            l1_pgentry_t pte);
+    int (*mmu_machphys_update) (struct domain *d1, struct domain *d2, unsigned long mfn);
+    int (*update_va_mapping) (struct domain *d, struct domain *f, l1_pgentry_t pte);
     int (*add_to_physmap) (struct domain *d1, struct domain *d2);
     int (*sendtrigger) (struct domain *d);
     int (*bind_pt_irq) (struct domain *d, struct xen_domctl_bind_pt_irq *bind);
@@ -455,9 +454,10 @@ static inline int xsm_memory_stat_reserv
     return xsm_call(memory_stat_reservation(d1, d2));
 }
 
-static inline int xsm_memory_pin_page(struct domain *d, struct page_info *page)
+static inline int xsm_memory_pin_page(struct domain *d1, struct domain *d2,
+                                      struct page_info *page)
 {
-    return xsm_call(memory_pin_page(d, page));
+    return xsm_call(memory_pin_page(d1, d2, page));
 }
 
 static inline int xsm_remove_from_physmap(struct domain *d1, struct domain *d2)
@@ -617,9 +617,9 @@ static inline int xsm_shadow_control (st
     return xsm_call(shadow_control(d, op));
 }
 
-static inline int xsm_getpageframeinfo (struct page_info *page)
+static inline int xsm_getpageframeinfo (struct domain *d)
 {
-    return xsm_call(getpageframeinfo(page));
+    return xsm_call(getpageframeinfo(d));
 }
 
 static inline int xsm_getmemlist (struct domain *d)
@@ -753,9 +753,10 @@ static inline int xsm_mmu_normal_update 
     return xsm_call(mmu_normal_update(d, t, f, fpte));
 }
 
-static inline int xsm_mmu_machphys_update (struct domain *d, unsigned long mfn)
+static inline int xsm_mmu_machphys_update (struct domain *d1, struct domain *d2,
+                                           unsigned long mfn)
 {
-    return xsm_call(mmu_machphys_update(d, mfn));
+    return xsm_call(mmu_machphys_update(d1, d2, mfn));
 }
 
 static inline int xsm_update_va_mapping(struct domain *d, struct domain *f, 
diff -r c961e012e00b -r c24eb37fcbbf xen/xsm/dummy.c
--- a/xen/xsm/dummy.c	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/xsm/dummy.c	Wed Aug 22 22:14:52 2012 +0100
@@ -243,7 +243,7 @@ static int dummy_schedop_shutdown (struc
     return 0;
 }
 
-static int dummy_memory_pin_page(struct domain *d, struct page_info *page)
+static int dummy_memory_pin_page(struct domain *d1, struct domain *d2, struct page_info *page)
 {
     return 0;
 }
@@ -418,7 +418,7 @@ static int dummy_shadow_control (struct 
     return 0;
 }
 
-static int dummy_getpageframeinfo (struct page_info *page)
+static int dummy_getpageframeinfo (struct domain *d)
 {
     return 0;
 }
@@ -554,7 +554,7 @@ static int dummy_mmu_normal_update (stru
     return 0;
 }
 
-static int dummy_mmu_machphys_update (struct domain *d, unsigned long mfn)
+static int dummy_mmu_machphys_update (struct domain *d, struct domain *f, unsigned long mfn)
 {
     return 0;
 }
diff -r c961e012e00b -r c24eb37fcbbf xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/xsm/flask/hooks.c	Wed Aug 22 22:14:52 2012 +0100
@@ -108,15 +108,21 @@ static int flask_domain_alloc_security(s
 
     memset(dsec, 0, sizeof(struct domain_security_struct));
 
-    if ( is_idle_domain(d) )
+    dsec->create_sid = SECSID_NULL;
+    switch ( d->domain_id )
     {
+    case DOMID_IDLE:
         dsec->sid = SECINITSID_XEN;
         dsec->create_sid = SECINITSID_DOM0;
-    }
-    else
-    {
+        break;
+    case DOMID_XEN:
+        dsec->sid = SECINITSID_DOMXEN;
+        break;
+    case DOMID_IO:
+        dsec->sid = SECINITSID_DOMIO;
+        break;
+    default:
         dsec->sid = SECINITSID_UNLABELED;
-        dsec->create_sid = SECSID_NULL;
     }
 
     d->ssid = dsec;
@@ -361,64 +367,6 @@ static int flask_grant_query_size(struct
     return domain_has_perm(d1, d2, SECCLASS_GRANT, GRANT__QUERY);
 }
 
-static int get_page_sid(struct page_info *page, u32 *sid)
-{
-    int rc = 0;
-    struct domain *d;
-    struct domain_security_struct *dsec;
-    unsigned long mfn;
-
-    d = page_get_owner(page);
-
-    if ( d == NULL )
-    {
-        mfn = page_to_mfn(page);
-        rc = security_iomem_sid(mfn, sid);
-        return rc;
-    }
-
-    switch ( d->domain_id )
-    {
-    case DOMID_IO:
-        /*A tracked IO page?*/
-        *sid = SECINITSID_DOMIO;
-        break;
-
-    case DOMID_XEN:
-        /*A page from Xen's private heap?*/
-        *sid = SECINITSID_DOMXEN;
-        break;
-
-    default:
-        /*Pages are implicitly labeled by domain ownership!*/
-        dsec = d->ssid;
-        *sid = dsec ? dsec->sid : SECINITSID_UNLABELED;
-        break;
-    }
-
-    return rc;
-}
-
-static int get_mfn_sid(unsigned long mfn, u32 *sid)
-{
-    int rc = 0;
-    struct page_info *page;
-
-    if ( mfn_valid(mfn) )
-    {
-        /*mfn is valid if this is a page that Xen is tracking!*/
-        page = mfn_to_page(mfn);
-        rc = get_page_sid(page, sid);
-    }
-    else
-    {
-        /*Possibly an untracked IO page?*/
-        rc = security_iomem_sid(mfn, sid);
-    }
-
-    return rc;    
-}
-
 static int flask_get_pod_target(struct domain *d)
 {
     return domain_has_perm(current->domain, d, SECCLASS_DOMAIN, DOMAIN__GETPODTARGET);
@@ -439,18 +387,10 @@ static int flask_memory_stat_reservation
     return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__STAT);
 }
 
-static int flask_memory_pin_page(struct domain *d, struct page_info *page)
+static int flask_memory_pin_page(struct domain *d1, struct domain *d2,
+                                 struct page_info *page)
 {
-    int rc = 0;
-    u32 sid;
-    struct domain_security_struct *dsec;
-    dsec = d->ssid;
-
-    rc = get_page_sid(page, &sid);
-    if ( rc )
-        return rc;
-
-    return avc_has_perm(dsec->sid, sid, SECCLASS_MMU, MMU__PINPAGE, NULL);
+    return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__PINPAGE);
 }
 
 static int flask_console_io(struct domain *d, int cmd)
@@ -1095,19 +1035,9 @@ static int flask_ioport_permission(struc
     return security_iterate_ioport_sids(start, end, _ioport_has_perm, &data);
 }
 
-static int flask_getpageframeinfo(struct page_info *page)
+static int flask_getpageframeinfo(struct domain *d)
 {
-    int rc = 0;
-    u32 tsid;
-    struct domain_security_struct *dsec;
-
-    dsec = current->domain->ssid;
-
-    rc = get_page_sid(page, &tsid);
-    if ( rc )
-        return rc;
-
-    return avc_has_perm(dsec->sid, tsid, SECCLASS_MMU, MMU__PAGEINFO, NULL);    
+    return domain_has_perm(current->domain, d, SECCLASS_MMU, MMU__PAGEINFO);
 }
 
 static int flask_getmemlist(struct domain *d)
@@ -1314,88 +1244,65 @@ static int flask_domain_memory_map(struc
     return domain_has_perm(current->domain, d, SECCLASS_MMU, MMU__MEMORYMAP);
 }
 
-static int flask_mmu_normal_update(struct domain *d, struct domain *t,
-                                   struct domain *f, intpte_t fpte)
+static int domain_memory_perm(struct domain *d, struct domain *f, l1_pgentry_t pte)
 {
     int rc = 0;
     u32 map_perms = MMU__MAP_READ;
     unsigned long fgfn, fmfn;
-    struct domain_security_struct *dsec;
-    u32 fsid;
-    struct avc_audit_data ad;
     p2m_type_t p2mt;
 
-    if (d != t)
-        rc = domain_has_perm(d, t, SECCLASS_MMU, MMU__REMOTE_REMAP);
-    if ( rc )
-        return rc;
-
-    if ( !(l1e_get_flags(l1e_from_intpte(fpte)) & _PAGE_PRESENT) )
-        return 0;
-
-    dsec = d->ssid;
-
-    if ( l1e_get_flags(l1e_from_intpte(fpte)) & _PAGE_RW )
-        map_perms |= MMU__MAP_WRITE;
-
-    AVC_AUDIT_DATA_INIT(&ad, MEMORY);
-    fgfn = l1e_get_pfn(l1e_from_intpte(fpte));
-    fmfn = mfn_x(get_gfn_query(f, fgfn, &p2mt));
-
-    ad.sdom = d;
-    ad.tdom = f;
-    ad.memory.pte = fpte;
-    ad.memory.mfn = fmfn;
-
-    rc = get_mfn_sid(fmfn, &fsid);
-
-    put_gfn(f, fgfn);
-
-    if ( rc )
-        return rc;
-
-    return avc_has_perm(dsec->sid, fsid, SECCLASS_MMU, map_perms, &ad);
-}
-
-static int flask_mmu_machphys_update(struct domain *d, unsigned long mfn)
-{
-    int rc = 0;
-    u32 psid;
-    struct domain_security_struct *dsec;
-    dsec = d->ssid;
-
-    rc = get_mfn_sid(mfn, &psid);
-    if ( rc )
-        return rc;
-
-    return avc_has_perm(dsec->sid, psid, SECCLASS_MMU, MMU__UPDATEMP, NULL);
-}
-
-static int flask_update_va_mapping(struct domain *d, struct domain *f,
-                                   l1_pgentry_t pte)
-{
-    int rc = 0;
-    u32 psid;
-    u32 map_perms = MMU__MAP_READ;
-    struct page_info *page = NULL;
-    struct domain_security_struct *dsec;
-
     if ( !(l1e_get_flags(pte) & _PAGE_PRESENT) )
         return 0;
 
     if ( l1e_get_flags(pte) & _PAGE_RW )
         map_perms |= MMU__MAP_WRITE;
 
-    dsec = d->ssid;
+    fgfn = l1e_get_pfn(pte);
+    fmfn = mfn_x(get_gfn_query(f, fgfn, &p2mt));
+    put_gfn(f, fgfn);
 
-    page = get_page_from_gfn(f, l1e_get_pfn(pte), NULL, P2M_ALLOC);
-    rc = get_mfn_sid(page ? page_to_mfn(page) : INVALID_MFN, &psid);
-    if ( page )
-        put_page(page);
+    if ( f->domain_id == DOMID_IO || !mfn_valid(fmfn) )
+    {
+        struct avc_audit_data ad;
+        struct domain_security_struct *dsec = d->ssid;
+        u32 fsid;
+        AVC_AUDIT_DATA_INIT(&ad, MEMORY);
+        ad.sdom = d;
+        ad.tdom = f;
+        ad.memory.pte = pte.l1;
+        ad.memory.mfn = fmfn;
+        rc = security_iomem_sid(fmfn, &fsid);
+        if ( rc )
+            return rc;
+        return avc_has_perm(dsec->sid, fsid, SECCLASS_MMU, map_perms, &ad);
+    }
+
+    return domain_has_perm(d, f, SECCLASS_MMU, map_perms);
+}
+
+static int flask_mmu_normal_update(struct domain *d, struct domain *t,
+                                   struct domain *f, intpte_t fpte)
+{
+    int rc = 0;
+
+    if (d != t)
+        rc = domain_has_perm(d, t, SECCLASS_MMU, MMU__REMOTE_REMAP);
     if ( rc )
         return rc;
 
-    return avc_has_perm(dsec->sid, psid, SECCLASS_MMU, map_perms, NULL);
+    return domain_memory_perm(d, f, l1e_from_intpte(fpte));
+}
+
+static int flask_mmu_machphys_update(struct domain *d1, struct domain *d2,
+                                     unsigned long mfn)
+{
+    return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__UPDATEMP);
+}
+
+static int flask_update_va_mapping(struct domain *d, struct domain *f,
+                                   l1_pgentry_t pte)
+{
+    return domain_memory_perm(d, f, pte);
 }
 
 static int flask_add_to_physmap(struct domain *d1, struct domain *d2)

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Pry-0005I8-Ho; Thu, 23 Aug 2012 05:22:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prw-0005HQ-MH
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:12 +0000
Received: from [85.158.143.35:40155] by server-2.bemta-4.messagelabs.com id
	3A/F4-21239-40EB5305; Thu, 23 Aug 2012 05:22:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-21.messagelabs.com!1345699329!10190562!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29722 invoked from network); 23 Aug 2012 05:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prs-0007ob-Tz
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prs-0004gP-Lg
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:08 +0000
Message-Id: <E1T4Prs-0004gP-Lg@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xsm/flask: remove page-to-domain
	lookups from XSM hooks
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1345670092 -3600
# Node ID c24eb37fcbbf5a8e4d508059f732b775adada80e
# Parent  c961e012e00bd2c185275a931dab1a8f90d50667
xsm/flask: remove page-to-domain lookups from XSM hooks

Doing a reverse lookup from MFN to its owning domain is redundant with
the internal checks Xen does on pages. Change the checks to operate
directly on the domain owning the pages for normal memory; MMIO areas
are still checked with security_iomem_sid.

This fixes a hypervisor crash when a domU attempts to map an MFN that
is free in Xen's heap: the XSM hook is called before the validity
check, and page_get_owner returns garbage when called on these
pages. While explicitly checking for such pages using
page_get_owner_and_reference is a possible solution, this ends up
duplicating parts of get_page_from_l1e.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r c961e012e00b -r c24eb37fcbbf xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/arch/x86/domctl.c	Wed Aug 22 22:14:52 2012 +0100
@@ -114,7 +114,7 @@ long arch_do_domctl(
 
         page = mfn_to_page(mfn);
 
-        ret = xsm_getpageframeinfo(page);
+        ret = xsm_getpageframeinfo(d);
         if ( ret )
         {
             rcu_unlock_domain(d);
@@ -170,6 +170,13 @@ long arch_do_domctl(
             if ( unlikely((d = rcu_lock_domain_by_id(dom)) == NULL) )
                 break;
 
+            ret = xsm_getpageframeinfo(d);
+            if ( ret )
+            {
+                rcu_unlock_domain(d);
+                break;
+            }
+
             if ( unlikely(num > 1024) ||
                  unlikely(num != domctl->u.getpageframeinfo3.num) )
             {
@@ -209,8 +216,6 @@ long arch_do_domctl(
                     if ( unlikely(!page) ||
                          unlikely(is_xen_heap_page(page)) )
                         type = XEN_DOMCTL_PFINFO_XTAB;
-                    else if ( xsm_getpageframeinfo(page) != 0 )
-                        ;
                     else
                     {
                         switch( page->u.inuse.type_info & PGT_type_mask )
@@ -267,6 +272,13 @@ long arch_do_domctl(
         if ( unlikely((d = rcu_lock_domain_by_id(dom)) == NULL) )
             break;
 
+        ret = xsm_getpageframeinfo(d);
+        if ( ret )
+        {
+            rcu_unlock_domain(d);
+            break;
+        }
+
         if ( unlikely(num > 1024) )
         {
             ret = -E2BIG;
@@ -310,11 +322,6 @@ long arch_do_domctl(
                 if ( unlikely(!page) ||
                      unlikely(is_xen_heap_page(page)) )
                     arr32[j] |= XEN_DOMCTL_PFINFO_XTAB;
-                else if ( xsm_getpageframeinfo(page) != 0 )
-                {
-                    put_page(page);
-                    continue;
-                }
                 else
                 {
                     unsigned long type = 0;
diff -r c961e012e00b -r c24eb37fcbbf xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/arch/x86/mm.c	Wed Aug 22 22:14:52 2012 +0100
@@ -3073,7 +3073,7 @@ long do_mmuext_op(
                 break;
             }
 
-            if ( (rc = xsm_memory_pin_page(d, page)) != 0 )
+            if ( (rc = xsm_memory_pin_page(d, pg_owner, page)) != 0 )
             {
                 put_page_and_type(page);
                 okay = 0;
@@ -3643,7 +3643,7 @@ long do_mmu_update(
             mfn = req.ptr >> PAGE_SHIFT;
             gpfn = req.val;
 
-            rc = xsm_mmu_machphys_update(d, mfn);
+            rc = xsm_mmu_machphys_update(d, pg_owner, mfn);
             if ( rc )
                 break;
 
diff -r c961e012e00b -r c24eb37fcbbf xen/include/xsm/xsm.h
--- a/xen/include/xsm/xsm.h	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/include/xsm/xsm.h	Wed Aug 22 22:14:52 2012 +0100
@@ -105,7 +105,7 @@ struct xsm_operations {
     int (*set_pod_target) (struct domain *d);
     int (*memory_adjust_reservation) (struct domain *d1, struct domain *d2);
     int (*memory_stat_reservation) (struct domain *d1, struct domain *d2);
-    int (*memory_pin_page) (struct domain *d, struct page_info *page);
+    int (*memory_pin_page) (struct domain *d1, struct domain *d2, struct page_info *page);
     int (*remove_from_physmap) (struct domain *d1, struct domain *d2);
 
     int (*console_io) (struct domain *d, int cmd);
@@ -143,7 +143,7 @@ struct xsm_operations {
 
 #ifdef CONFIG_X86
     int (*shadow_control) (struct domain *d, uint32_t op);
-    int (*getpageframeinfo) (struct page_info *page);
+    int (*getpageframeinfo) (struct domain *d);
     int (*getmemlist) (struct domain *d);
     int (*hypercall_init) (struct domain *d);
     int (*hvmcontext) (struct domain *d, uint32_t op);
@@ -171,9 +171,8 @@ struct xsm_operations {
     int (*domain_memory_map) (struct domain *d);
     int (*mmu_normal_update) (struct domain *d, struct domain *t,
                               struct domain *f, intpte_t fpte);
-    int (*mmu_machphys_update) (struct domain *d, unsigned long mfn);
-    int (*update_va_mapping) (struct domain *d, struct domain *f, 
-                                                            l1_pgentry_t pte);
+    int (*mmu_machphys_update) (struct domain *d1, struct domain *d2, unsigned long mfn);
+    int (*update_va_mapping) (struct domain *d, struct domain *f, l1_pgentry_t pte);
     int (*add_to_physmap) (struct domain *d1, struct domain *d2);
     int (*sendtrigger) (struct domain *d);
     int (*bind_pt_irq) (struct domain *d, struct xen_domctl_bind_pt_irq *bind);
@@ -455,9 +454,10 @@ static inline int xsm_memory_stat_reserv
     return xsm_call(memory_stat_reservation(d1, d2));
 }
 
-static inline int xsm_memory_pin_page(struct domain *d, struct page_info *page)
+static inline int xsm_memory_pin_page(struct domain *d1, struct domain *d2,
+                                      struct page_info *page)
 {
-    return xsm_call(memory_pin_page(d, page));
+    return xsm_call(memory_pin_page(d1, d2, page));
 }
 
 static inline int xsm_remove_from_physmap(struct domain *d1, struct domain *d2)
@@ -617,9 +617,9 @@ static inline int xsm_shadow_control (st
     return xsm_call(shadow_control(d, op));
 }
 
-static inline int xsm_getpageframeinfo (struct page_info *page)
+static inline int xsm_getpageframeinfo (struct domain *d)
 {
-    return xsm_call(getpageframeinfo(page));
+    return xsm_call(getpageframeinfo(d));
 }
 
 static inline int xsm_getmemlist (struct domain *d)
@@ -753,9 +753,10 @@ static inline int xsm_mmu_normal_update 
     return xsm_call(mmu_normal_update(d, t, f, fpte));
 }
 
-static inline int xsm_mmu_machphys_update (struct domain *d, unsigned long mfn)
+static inline int xsm_mmu_machphys_update (struct domain *d1, struct domain *d2,
+                                           unsigned long mfn)
 {
-    return xsm_call(mmu_machphys_update(d, mfn));
+    return xsm_call(mmu_machphys_update(d1, d2, mfn));
 }
 
 static inline int xsm_update_va_mapping(struct domain *d, struct domain *f, 
diff -r c961e012e00b -r c24eb37fcbbf xen/xsm/dummy.c
--- a/xen/xsm/dummy.c	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/xsm/dummy.c	Wed Aug 22 22:14:52 2012 +0100
@@ -243,7 +243,7 @@ static int dummy_schedop_shutdown (struc
     return 0;
 }
 
-static int dummy_memory_pin_page(struct domain *d, struct page_info *page)
+static int dummy_memory_pin_page(struct domain *d1, struct domain *d2, struct page_info *page)
 {
     return 0;
 }
@@ -418,7 +418,7 @@ static int dummy_shadow_control (struct 
     return 0;
 }
 
-static int dummy_getpageframeinfo (struct page_info *page)
+static int dummy_getpageframeinfo (struct domain *d)
 {
     return 0;
 }
@@ -554,7 +554,7 @@ static int dummy_mmu_normal_update (stru
     return 0;
 }
 
-static int dummy_mmu_machphys_update (struct domain *d, unsigned long mfn)
+static int dummy_mmu_machphys_update (struct domain *d, struct domain *f, unsigned long mfn)
 {
     return 0;
 }
diff -r c961e012e00b -r c24eb37fcbbf xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c	Wed Aug 22 22:13:32 2012 +0100
+++ b/xen/xsm/flask/hooks.c	Wed Aug 22 22:14:52 2012 +0100
@@ -108,15 +108,21 @@ static int flask_domain_alloc_security(s
 
     memset(dsec, 0, sizeof(struct domain_security_struct));
 
-    if ( is_idle_domain(d) )
+    dsec->create_sid = SECSID_NULL;
+    switch ( d->domain_id )
     {
+    case DOMID_IDLE:
         dsec->sid = SECINITSID_XEN;
         dsec->create_sid = SECINITSID_DOM0;
-    }
-    else
-    {
+        break;
+    case DOMID_XEN:
+        dsec->sid = SECINITSID_DOMXEN;
+        break;
+    case DOMID_IO:
+        dsec->sid = SECINITSID_DOMIO;
+        break;
+    default:
         dsec->sid = SECINITSID_UNLABELED;
-        dsec->create_sid = SECSID_NULL;
     }
 
     d->ssid = dsec;
@@ -361,64 +367,6 @@ static int flask_grant_query_size(struct
     return domain_has_perm(d1, d2, SECCLASS_GRANT, GRANT__QUERY);
 }
 
-static int get_page_sid(struct page_info *page, u32 *sid)
-{
-    int rc = 0;
-    struct domain *d;
-    struct domain_security_struct *dsec;
-    unsigned long mfn;
-
-    d = page_get_owner(page);
-
-    if ( d == NULL )
-    {
-        mfn = page_to_mfn(page);
-        rc = security_iomem_sid(mfn, sid);
-        return rc;
-    }
-
-    switch ( d->domain_id )
-    {
-    case DOMID_IO:
-        /*A tracked IO page?*/
-        *sid = SECINITSID_DOMIO;
-        break;
-
-    case DOMID_XEN:
-        /*A page from Xen's private heap?*/
-        *sid = SECINITSID_DOMXEN;
-        break;
-
-    default:
-        /*Pages are implicitly labeled by domain ownership!*/
-        dsec = d->ssid;
-        *sid = dsec ? dsec->sid : SECINITSID_UNLABELED;
-        break;
-    }
-
-    return rc;
-}
-
-static int get_mfn_sid(unsigned long mfn, u32 *sid)
-{
-    int rc = 0;
-    struct page_info *page;
-
-    if ( mfn_valid(mfn) )
-    {
-        /*mfn is valid if this is a page that Xen is tracking!*/
-        page = mfn_to_page(mfn);
-        rc = get_page_sid(page, sid);
-    }
-    else
-    {
-        /*Possibly an untracked IO page?*/
-        rc = security_iomem_sid(mfn, sid);
-    }
-
-    return rc;    
-}
-
 static int flask_get_pod_target(struct domain *d)
 {
     return domain_has_perm(current->domain, d, SECCLASS_DOMAIN, DOMAIN__GETPODTARGET);
@@ -439,18 +387,10 @@ static int flask_memory_stat_reservation
     return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__STAT);
 }
 
-static int flask_memory_pin_page(struct domain *d, struct page_info *page)
+static int flask_memory_pin_page(struct domain *d1, struct domain *d2,
+                                 struct page_info *page)
 {
-    int rc = 0;
-    u32 sid;
-    struct domain_security_struct *dsec;
-    dsec = d->ssid;
-
-    rc = get_page_sid(page, &sid);
-    if ( rc )
-        return rc;
-
-    return avc_has_perm(dsec->sid, sid, SECCLASS_MMU, MMU__PINPAGE, NULL);
+    return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__PINPAGE);
 }
 
 static int flask_console_io(struct domain *d, int cmd)
@@ -1095,19 +1035,9 @@ static int flask_ioport_permission(struc
     return security_iterate_ioport_sids(start, end, _ioport_has_perm, &data);
 }
 
-static int flask_getpageframeinfo(struct page_info *page)
+static int flask_getpageframeinfo(struct domain *d)
 {
-    int rc = 0;
-    u32 tsid;
-    struct domain_security_struct *dsec;
-
-    dsec = current->domain->ssid;
-
-    rc = get_page_sid(page, &tsid);
-    if ( rc )
-        return rc;
-
-    return avc_has_perm(dsec->sid, tsid, SECCLASS_MMU, MMU__PAGEINFO, NULL);    
+    return domain_has_perm(current->domain, d, SECCLASS_MMU, MMU__PAGEINFO);
 }
 
 static int flask_getmemlist(struct domain *d)
@@ -1314,88 +1244,65 @@ static int flask_domain_memory_map(struc
     return domain_has_perm(current->domain, d, SECCLASS_MMU, MMU__MEMORYMAP);
 }
 
-static int flask_mmu_normal_update(struct domain *d, struct domain *t,
-                                   struct domain *f, intpte_t fpte)
+static int domain_memory_perm(struct domain *d, struct domain *f, l1_pgentry_t pte)
 {
     int rc = 0;
     u32 map_perms = MMU__MAP_READ;
     unsigned long fgfn, fmfn;
-    struct domain_security_struct *dsec;
-    u32 fsid;
-    struct avc_audit_data ad;
     p2m_type_t p2mt;
 
-    if (d != t)
-        rc = domain_has_perm(d, t, SECCLASS_MMU, MMU__REMOTE_REMAP);
-    if ( rc )
-        return rc;
-
-    if ( !(l1e_get_flags(l1e_from_intpte(fpte)) & _PAGE_PRESENT) )
-        return 0;
-
-    dsec = d->ssid;
-
-    if ( l1e_get_flags(l1e_from_intpte(fpte)) & _PAGE_RW )
-        map_perms |= MMU__MAP_WRITE;
-
-    AVC_AUDIT_DATA_INIT(&ad, MEMORY);
-    fgfn = l1e_get_pfn(l1e_from_intpte(fpte));
-    fmfn = mfn_x(get_gfn_query(f, fgfn, &p2mt));
-
-    ad.sdom = d;
-    ad.tdom = f;
-    ad.memory.pte = fpte;
-    ad.memory.mfn = fmfn;
-
-    rc = get_mfn_sid(fmfn, &fsid);
-
-    put_gfn(f, fgfn);
-
-    if ( rc )
-        return rc;
-
-    return avc_has_perm(dsec->sid, fsid, SECCLASS_MMU, map_perms, &ad);
-}
-
-static int flask_mmu_machphys_update(struct domain *d, unsigned long mfn)
-{
-    int rc = 0;
-    u32 psid;
-    struct domain_security_struct *dsec;
-    dsec = d->ssid;
-
-    rc = get_mfn_sid(mfn, &psid);
-    if ( rc )
-        return rc;
-
-    return avc_has_perm(dsec->sid, psid, SECCLASS_MMU, MMU__UPDATEMP, NULL);
-}
-
-static int flask_update_va_mapping(struct domain *d, struct domain *f,
-                                   l1_pgentry_t pte)
-{
-    int rc = 0;
-    u32 psid;
-    u32 map_perms = MMU__MAP_READ;
-    struct page_info *page = NULL;
-    struct domain_security_struct *dsec;
-
     if ( !(l1e_get_flags(pte) & _PAGE_PRESENT) )
         return 0;
 
     if ( l1e_get_flags(pte) & _PAGE_RW )
         map_perms |= MMU__MAP_WRITE;
 
-    dsec = d->ssid;
+    fgfn = l1e_get_pfn(pte);
+    fmfn = mfn_x(get_gfn_query(f, fgfn, &p2mt));
+    put_gfn(f, fgfn);
 
-    page = get_page_from_gfn(f, l1e_get_pfn(pte), NULL, P2M_ALLOC);
-    rc = get_mfn_sid(page ? page_to_mfn(page) : INVALID_MFN, &psid);
-    if ( page )
-        put_page(page);
+    if ( f->domain_id == DOMID_IO || !mfn_valid(fmfn) )
+    {
+        struct avc_audit_data ad;
+        struct domain_security_struct *dsec = d->ssid;
+        u32 fsid;
+        AVC_AUDIT_DATA_INIT(&ad, MEMORY);
+        ad.sdom = d;
+        ad.tdom = f;
+        ad.memory.pte = pte.l1;
+        ad.memory.mfn = fmfn;
+        rc = security_iomem_sid(fmfn, &fsid);
+        if ( rc )
+            return rc;
+        return avc_has_perm(dsec->sid, fsid, SECCLASS_MMU, map_perms, &ad);
+    }
+
+    return domain_has_perm(d, f, SECCLASS_MMU, map_perms);
+}
+
+static int flask_mmu_normal_update(struct domain *d, struct domain *t,
+                                   struct domain *f, intpte_t fpte)
+{
+    int rc = 0;
+
+    if (d != t)
+        rc = domain_has_perm(d, t, SECCLASS_MMU, MMU__REMOTE_REMAP);
     if ( rc )
         return rc;
 
-    return avc_has_perm(dsec->sid, psid, SECCLASS_MMU, map_perms, NULL);
+    return domain_memory_perm(d, f, l1e_from_intpte(fpte));
+}
+
+static int flask_mmu_machphys_update(struct domain *d1, struct domain *d2,
+                                     unsigned long mfn)
+{
+    return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__UPDATEMP);
+}
+
+static int flask_update_va_mapping(struct domain *d, struct domain *f,
+                                   l1_pgentry_t pte)
+{
+    return domain_memory_perm(d, f, pte);
 }
 
 static int flask_add_to_physmap(struct domain *d1, struct domain *d2)

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Prz-0005IP-OG; Thu, 23 Aug 2012 05:22:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pry-0005Hr-3t
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:14 +0000
Received: from [85.158.143.35:56953] by server-3.bemta-4.messagelabs.com id
	C1/D3-09529-50EB5305; Thu, 23 Aug 2012 05:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-21.messagelabs.com!1345699330!12436797!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10761 invoked from network); 23 Aug 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pru-0007ok-F8
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pru-0004hr-AW
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:10 +0000
Message-Id: <E1T4Pru-0004hr-AW@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] hvm: Remove VM genearation ID device
	and incr_generationid from build_info.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Paul Durrant <paul.durrant@citrix.com>
# Date 1345670787 -3600
# Node ID e1edef2013b86bc01cd8ed9abd0f335e08b5d1b6
# Parent  03507cc3a1ee28c6f88e5a01a03077082bd99b58
hvm: Remove VM genearation ID device and incr_generationid from build_info.

Microsoft have now published their VM generation ID specification at
https://www.microsoft.com/en-us/download/details.aspx?id=30707.
It differs from the original specification upon which I based my
implementation in several key areas. Particularly, it is no longer
an incrementing 64-bit counter and so this patch is to remove
the incr_generationid field from the build_info and also disable the
ACPI device before 4.2 is released.

I will follow up with further patches to implement the VM generation
ID to the new specification.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 03507cc3a1ee -r e1edef2013b8 tools/firmware/hvmloader/acpi/dsdt.asl
--- a/tools/firmware/hvmloader/acpi/dsdt.asl	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/firmware/hvmloader/acpi/dsdt.asl	Wed Aug 22 22:26:27 2012 +0100
@@ -396,31 +396,6 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                         IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
                         IRQNoFlags () {7}
                     })
-                } 
-
-                Device(VGID) {
-                    Name(_HID, EisaID ("XEN0000"))
-                    Name(_UID, 0x00)
-                    Name(_CID, "VM_Gen_Counter")
-                    Name(_DDN, "VM_Gen_Counter")
-                    Method(_STA, 0, NotSerialized)
-                    {
-                        If(LEqual(\_SB.VGIA, 0x00000000)) {
-                            Return(0x00)
-                        } Else {
-                            Return(0x0F)
-                        }
-                    }
-                    Name(PKG, Package ()
-                    {
-                        0x00000000,
-                        0x00000000
-                    })
-                    Method(ADDR, 0, NotSerialized)
-                    {
-                        Store(\_SB.VGIA, Index(PKG, 0))
-                        Return(PKG)
-                    }
                 }
             }
         }
diff -r 03507cc3a1ee -r e1edef2013b8 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/libxl/libxl_create.c	Wed Aug 22 22:26:27 2012 +0100
@@ -248,7 +248,6 @@ int libxl__domain_build_info_setdefault(
         libxl_defbool_setdefault(&b_info->u.hvm.hpet,               true);
         libxl_defbool_setdefault(&b_info->u.hvm.vpt_align,          true);
         libxl_defbool_setdefault(&b_info->u.hvm.nested_hvm,         false);
-        libxl_defbool_setdefault(&b_info->u.hvm.incr_generationid,  false);
         libxl_defbool_setdefault(&b_info->u.hvm.usb,                false);
         libxl_defbool_setdefault(&b_info->u.hvm.xen_platform_pci,   true);
 
@@ -758,27 +757,24 @@ static void domcreate_bootloader_done(li
 
     /* read signature */
     int hvm, pae, superpages;
-    int no_incr_generationid;
     switch (info->type) {
     case LIBXL_DOMAIN_TYPE_HVM:
         hvm = 1;
         superpages = 1;
         pae = libxl_defbool_val(info->u.hvm.pae);
-        no_incr_generationid = !libxl_defbool_val(info->u.hvm.incr_generationid);
         callbacks->toolstack_restore = libxl__toolstack_restore;
         break;
     case LIBXL_DOMAIN_TYPE_PV:
         hvm = 0;
         superpages = 0;
         pae = 1;
-        no_incr_generationid = 0;
         break;
     default:
         rc = ERROR_INVAL;
         goto out;
     }
     libxl__xc_domain_restore(egc, dcs,
-                             hvm, pae, superpages, no_incr_generationid);
+                             hvm, pae, superpages, 1);
     return;
 
  out:
diff -r 03507cc3a1ee -r e1edef2013b8 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Wed Aug 22 22:26:27 2012 +0100
@@ -292,7 +292,6 @@ libxl_domain_build_info = Struct("domain
                                        ("vpt_align",        libxl_defbool),
                                        ("timer_mode",       libxl_timer_mode),
                                        ("nested_hvm",       libxl_defbool),
-                                       ("incr_generationid",libxl_defbool),
                                        ("nographic",        libxl_defbool),
                                        ("vga",              libxl_vga_interface_info),
                                        ("vnc",              libxl_vnc_info),
diff -r 03507cc3a1ee -r e1edef2013b8 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Wed Aug 22 22:26:27 2012 +0100
@@ -139,7 +139,6 @@ struct domain_create {
     const char *restore_file;
     int migrate_fd; /* -1 means none */
     char **migration_domname_r; /* from malloc */
-    int incr_generationid;
 };
 
 
@@ -1759,10 +1758,6 @@ static int create_domain(struct domain_c
         }
     }
 
-    if (d_config.c_info.type == LIBXL_DOMAIN_TYPE_HVM)
-        libxl_defbool_set(&d_config.b_info.u.hvm.incr_generationid,
-                          dom_info->incr_generationid);
-
     if (debug || dom_info->dryrun)
         printf_info(default_output_format, -1, &d_config);
 
@@ -3183,7 +3178,6 @@ static void migrate_receive(int debug, i
     dom_info.paused = 1;
     dom_info.migrate_fd = recv_fd;
     dom_info.migration_domname_r = &migration_domname;
-    dom_info.incr_generationid = 0;
 
     rc = create_domain(&dom_info);
     if (rc < 0) {
@@ -3364,7 +3358,6 @@ int main_restore(int argc, char **argv)
     dom_info.vnc = vnc;
     dom_info.vncautopass = vncautopass;
     dom_info.console_autoconnect = console_autoconnect;
-    dom_info.incr_generationid = 1;
 
     rc = create_domain(&dom_info);
     if (rc < 0)
@@ -3766,7 +3759,6 @@ int main_create(int argc, char **argv)
     dom_info.vnc = vnc;
     dom_info.vncautopass = vncautopass;
     dom_info.console_autoconnect = console_autoconnect;
-    dom_info.incr_generationid = 0;
 
     rc = create_domain(&dom_info);
     if (rc < 0)
diff -r 03507cc3a1ee -r e1edef2013b8 tools/libxl/xl_sxp.c
--- a/tools/libxl/xl_sxp.c	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/libxl/xl_sxp.c	Wed Aug 22 22:26:27 2012 +0100
@@ -108,8 +108,6 @@ void printf_info_sexp(int domid, libxl_d
                libxl_timer_mode_to_string(b_info->u.hvm.timer_mode));
         printf("\t\t\t(nestedhvm %s)\n",
                libxl_defbool_to_string(b_info->u.hvm.nested_hvm));
-        printf("\t\t\t(no_incr_generationid %s)\n",
-               libxl_defbool_to_string(b_info->u.hvm.incr_generationid));
         printf("\t\t\t(stdvga %s)\n", b_info->u.hvm.vga.kind ==
                                       LIBXL_VGA_INTERFACE_TYPE_STD ?
                                       "True" : "False");

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Prz-0005IP-OG; Thu, 23 Aug 2012 05:22:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pry-0005Hr-3t
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:14 +0000
Received: from [85.158.143.35:56953] by server-3.bemta-4.messagelabs.com id
	C1/D3-09529-50EB5305; Thu, 23 Aug 2012 05:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-12.tower-21.messagelabs.com!1345699330!12436797!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10761 invoked from network); 23 Aug 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pru-0007ok-F8
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pru-0004hr-AW
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:10 +0000
Message-Id: <E1T4Pru-0004hr-AW@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] hvm: Remove VM genearation ID device
	and incr_generationid from build_info.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Paul Durrant <paul.durrant@citrix.com>
# Date 1345670787 -3600
# Node ID e1edef2013b86bc01cd8ed9abd0f335e08b5d1b6
# Parent  03507cc3a1ee28c6f88e5a01a03077082bd99b58
hvm: Remove VM genearation ID device and incr_generationid from build_info.

Microsoft have now published their VM generation ID specification at
https://www.microsoft.com/en-us/download/details.aspx?id=30707.
It differs from the original specification upon which I based my
implementation in several key areas. Particularly, it is no longer
an incrementing 64-bit counter and so this patch is to remove
the incr_generationid field from the build_info and also disable the
ACPI device before 4.2 is released.

I will follow up with further patches to implement the VM generation
ID to the new specification.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 03507cc3a1ee -r e1edef2013b8 tools/firmware/hvmloader/acpi/dsdt.asl
--- a/tools/firmware/hvmloader/acpi/dsdt.asl	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/firmware/hvmloader/acpi/dsdt.asl	Wed Aug 22 22:26:27 2012 +0100
@@ -396,31 +396,6 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                         IO (Decode16, 0x0378, 0x0378, 0x08, 0x08)
                         IRQNoFlags () {7}
                     })
-                } 
-
-                Device(VGID) {
-                    Name(_HID, EisaID ("XEN0000"))
-                    Name(_UID, 0x00)
-                    Name(_CID, "VM_Gen_Counter")
-                    Name(_DDN, "VM_Gen_Counter")
-                    Method(_STA, 0, NotSerialized)
-                    {
-                        If(LEqual(\_SB.VGIA, 0x00000000)) {
-                            Return(0x00)
-                        } Else {
-                            Return(0x0F)
-                        }
-                    }
-                    Name(PKG, Package ()
-                    {
-                        0x00000000,
-                        0x00000000
-                    })
-                    Method(ADDR, 0, NotSerialized)
-                    {
-                        Store(\_SB.VGIA, Index(PKG, 0))
-                        Return(PKG)
-                    }
                 }
             }
         }
diff -r 03507cc3a1ee -r e1edef2013b8 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/libxl/libxl_create.c	Wed Aug 22 22:26:27 2012 +0100
@@ -248,7 +248,6 @@ int libxl__domain_build_info_setdefault(
         libxl_defbool_setdefault(&b_info->u.hvm.hpet,               true);
         libxl_defbool_setdefault(&b_info->u.hvm.vpt_align,          true);
         libxl_defbool_setdefault(&b_info->u.hvm.nested_hvm,         false);
-        libxl_defbool_setdefault(&b_info->u.hvm.incr_generationid,  false);
         libxl_defbool_setdefault(&b_info->u.hvm.usb,                false);
         libxl_defbool_setdefault(&b_info->u.hvm.xen_platform_pci,   true);
 
@@ -758,27 +757,24 @@ static void domcreate_bootloader_done(li
 
     /* read signature */
     int hvm, pae, superpages;
-    int no_incr_generationid;
     switch (info->type) {
     case LIBXL_DOMAIN_TYPE_HVM:
         hvm = 1;
         superpages = 1;
         pae = libxl_defbool_val(info->u.hvm.pae);
-        no_incr_generationid = !libxl_defbool_val(info->u.hvm.incr_generationid);
         callbacks->toolstack_restore = libxl__toolstack_restore;
         break;
     case LIBXL_DOMAIN_TYPE_PV:
         hvm = 0;
         superpages = 0;
         pae = 1;
-        no_incr_generationid = 0;
         break;
     default:
         rc = ERROR_INVAL;
         goto out;
     }
     libxl__xc_domain_restore(egc, dcs,
-                             hvm, pae, superpages, no_incr_generationid);
+                             hvm, pae, superpages, 1);
     return;
 
  out:
diff -r 03507cc3a1ee -r e1edef2013b8 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/libxl/libxl_types.idl	Wed Aug 22 22:26:27 2012 +0100
@@ -292,7 +292,6 @@ libxl_domain_build_info = Struct("domain
                                        ("vpt_align",        libxl_defbool),
                                        ("timer_mode",       libxl_timer_mode),
                                        ("nested_hvm",       libxl_defbool),
-                                       ("incr_generationid",libxl_defbool),
                                        ("nographic",        libxl_defbool),
                                        ("vga",              libxl_vga_interface_info),
                                        ("vnc",              libxl_vnc_info),
diff -r 03507cc3a1ee -r e1edef2013b8 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Wed Aug 22 22:26:27 2012 +0100
@@ -139,7 +139,6 @@ struct domain_create {
     const char *restore_file;
     int migrate_fd; /* -1 means none */
     char **migration_domname_r; /* from malloc */
-    int incr_generationid;
 };
 
 
@@ -1759,10 +1758,6 @@ static int create_domain(struct domain_c
         }
     }
 
-    if (d_config.c_info.type == LIBXL_DOMAIN_TYPE_HVM)
-        libxl_defbool_set(&d_config.b_info.u.hvm.incr_generationid,
-                          dom_info->incr_generationid);
-
     if (debug || dom_info->dryrun)
         printf_info(default_output_format, -1, &d_config);
 
@@ -3183,7 +3178,6 @@ static void migrate_receive(int debug, i
     dom_info.paused = 1;
     dom_info.migrate_fd = recv_fd;
     dom_info.migration_domname_r = &migration_domname;
-    dom_info.incr_generationid = 0;
 
     rc = create_domain(&dom_info);
     if (rc < 0) {
@@ -3364,7 +3358,6 @@ int main_restore(int argc, char **argv)
     dom_info.vnc = vnc;
     dom_info.vncautopass = vncautopass;
     dom_info.console_autoconnect = console_autoconnect;
-    dom_info.incr_generationid = 1;
 
     rc = create_domain(&dom_info);
     if (rc < 0)
@@ -3766,7 +3759,6 @@ int main_create(int argc, char **argv)
     dom_info.vnc = vnc;
     dom_info.vncautopass = vncautopass;
     dom_info.console_autoconnect = console_autoconnect;
-    dom_info.incr_generationid = 0;
 
     rc = create_domain(&dom_info);
     if (rc < 0)
diff -r 03507cc3a1ee -r e1edef2013b8 tools/libxl/xl_sxp.c
--- a/tools/libxl/xl_sxp.c	Wed Aug 22 22:20:42 2012 +0100
+++ b/tools/libxl/xl_sxp.c	Wed Aug 22 22:26:27 2012 +0100
@@ -108,8 +108,6 @@ void printf_info_sexp(int domid, libxl_d
                libxl_timer_mode_to_string(b_info->u.hvm.timer_mode));
         printf("\t\t\t(nestedhvm %s)\n",
                libxl_defbool_to_string(b_info->u.hvm.nested_hvm));
-        printf("\t\t\t(no_incr_generationid %s)\n",
-               libxl_defbool_to_string(b_info->u.hvm.incr_generationid));
         printf("\t\t\t(stdvga %s)\n", b_info->u.hvm.vga.kind ==
                                       LIBXL_VGA_INTERFACE_TYPE_STD ?
                                       "True" : "False");

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Prz-0005IZ-TI; Thu, 23 Aug 2012 05:22:15 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pry-0005Hy-UQ
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:15 +0000
Received: from [85.158.139.83:15344] by server-2.bemta-5.messagelabs.com id
	58/7C-10142-60EB5305; Thu, 23 Aug 2012 05:22:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-182.messagelabs.com!1345699331!27872018!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6176 invoked from network); 23 Aug 2012 05:22:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prv-0007oq-NJ
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prv-0004iO-Cg
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:11 +0000
Message-Id: <E1T4Prv-0004iO-Cg@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Dump IOMMU p2m table
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Santosh Jodh <santosh.jodh@citrix.com>
# Date 1345670946 -3600
# Node ID b02ac80ff6899e98b4089842843104fd8572a7cd
# Parent  1636cc4886f60f864c5cb7d851fa8b27521ee357
Dump IOMMU p2m table

New key handler 'o' to dump the IOMMU p2m table for each domain.
Skips dumping table for domain 0.
Intel and AMD specific iommu_ops handler for dumping p2m table.

Incorporated feedback from Jan Beulich and Wei Wang.
Fixed indent printing with %*s.
Removed superflous superpage and other attribute prints.
Make next_level use consistent for AMD IOMMU dumps. Warn if found
inconsistent.
AMD IOMMU does not skip levels. Handle 2mb and 1gb IOMMU page size for
AMD.

Signed-off-by: Santosh Jodh <santosh.jodh@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 1636cc4886f6 -r b02ac80ff689 xen/drivers/passthrough/amd/pci_amd_iommu.c
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c	Wed Aug 22 22:29:06 2012 +0100
@@ -22,6 +22,7 @@
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
 #include <xen/paging.h>
+#include <xen/softirq.h>
 #include <asm/hvm/iommu.h>
 #include <asm/amd-iommu.h>
 #include <asm/hvm/svm/amd-iommu-proto.h>
@@ -512,6 +513,80 @@ static int amd_iommu_group_id(u16 seg, u
 
 #include <asm/io_apic.h>
 
+static void amd_dump_p2m_table_level(struct page_info* pg, int level, 
+                                     paddr_t gpa, int indent)
+{
+    paddr_t address;
+    void *table_vaddr, *pde;
+    paddr_t next_table_maddr;
+    int index, next_level, present;
+    u32 *entry;
+
+    if ( level < 1 )
+        return;
+
+    table_vaddr = __map_domain_page(pg);
+    if ( table_vaddr == NULL )
+    {
+        printk("Failed to map IOMMU domain page %"PRIpaddr"\n", 
+                page_to_maddr(pg));
+        return;
+    }
+
+    for ( index = 0; index < PTE_PER_TABLE_SIZE; index++ )
+    {
+        if ( !(index % 2) )
+            process_pending_softirqs();
+
+        pde = table_vaddr + (index * IOMMU_PAGE_TABLE_ENTRY_SIZE);
+        next_table_maddr = amd_iommu_get_next_table_from_pte(pde);
+        entry = (u32*)pde;
+
+        present = get_field_from_reg_u32(entry[0],
+                                         IOMMU_PDE_PRESENT_MASK,
+                                         IOMMU_PDE_PRESENT_SHIFT);
+
+        if ( !present )
+            continue;
+
+        next_level = get_field_from_reg_u32(entry[0],
+                                            IOMMU_PDE_NEXT_LEVEL_MASK,
+                                            IOMMU_PDE_NEXT_LEVEL_SHIFT);
+
+        if ( next_level && (next_level != (level - 1)) )
+        {
+            printk("IOMMU p2m table error. next_level = %d, expected %d\n",
+                   next_level, level - 1);
+
+            continue;
+        }
+
+        address = gpa + amd_offset_level_address(index, level);
+        if ( next_level >= 1 )
+            amd_dump_p2m_table_level(
+                maddr_to_page(next_table_maddr), next_level,
+                address, indent + 1);
+        else
+            printk("%*sgfn: %08lx  mfn: %08lx\n",
+                   indent, "",
+                   (unsigned long)PFN_DOWN(address),
+                   (unsigned long)PFN_DOWN(next_table_maddr));
+    }
+
+    unmap_domain_page(table_vaddr);
+}
+
+static void amd_dump_p2m_table(struct domain *d)
+{
+    struct hvm_iommu *hd  = domain_hvm_iommu(d);
+
+    if ( !hd->root_table ) 
+        return;
+
+    printk("p2m table has %d levels\n", hd->paging_mode);
+    amd_dump_p2m_table_level(hd->root_table, hd->paging_mode, 0, 0);
+}
+
 const struct iommu_ops amd_iommu_ops = {
     .init = amd_iommu_domain_init,
     .dom0_init = amd_iommu_dom0_init,
@@ -531,4 +606,5 @@ const struct iommu_ops amd_iommu_ops = {
     .resume = amd_iommu_resume,
     .share_p2m = amd_iommu_share_p2m,
     .crash_shutdown = amd_iommu_suspend,
+    .dump_p2m_table = amd_dump_p2m_table,
 };
diff -r 1636cc4886f6 -r b02ac80ff689 xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/drivers/passthrough/iommu.c	Wed Aug 22 22:29:06 2012 +0100
@@ -19,10 +19,12 @@
 #include <xen/paging.h>
 #include <xen/guest_access.h>
 #include <xen/softirq.h>
+#include <xen/keyhandler.h>
 #include <xsm/xsm.h>
 
 static void parse_iommu_param(char *s);
 static int iommu_populate_page_table(struct domain *d);
+static void iommu_dump_p2m_table(unsigned char key);
 
 /*
  * The 'iommu' parameter enables the IOMMU.  Optional comma separated
@@ -54,6 +56,12 @@ bool_t __read_mostly amd_iommu_perdev_in
 
 DEFINE_PER_CPU(bool_t, iommu_dont_flush_iotlb);
 
+static struct keyhandler iommu_p2m_table = {
+    .diagnostic = 0,
+    .u.fn = iommu_dump_p2m_table,
+    .desc = "dump iommu p2m table"
+};
+
 static void __init parse_iommu_param(char *s)
 {
     char *ss;
@@ -119,6 +127,7 @@ void __init iommu_dom0_init(struct domai
     if ( !iommu_enabled )
         return;
 
+    register_keyhandler('o', &iommu_p2m_table);
     d->need_iommu = !!iommu_dom0_strict;
     if ( need_iommu(d) )
     {
@@ -654,6 +663,34 @@ int iommu_do_domctl(
     return ret;
 }
 
+static void iommu_dump_p2m_table(unsigned char key)
+{
+    struct domain *d;
+    const struct iommu_ops *ops;
+
+    if ( !iommu_enabled )
+    {
+        printk("IOMMU not enabled!\n");
+        return;
+    }
+
+    ops = iommu_get_ops();
+    for_each_domain(d)
+    {
+        if ( !d->domain_id )
+            continue;
+
+        if ( iommu_use_hap_pt(d) )
+        {
+            printk("\ndomain%d IOMMU p2m table shared with MMU: \n", d->domain_id);
+            continue;
+        }
+
+        printk("\ndomain%d IOMMU p2m table: \n", d->domain_id);
+        ops->dump_p2m_table(d);
+    }
+}
+
 /*
  * Local variables:
  * mode: C
diff -r 1636cc4886f6 -r b02ac80ff689 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c	Wed Aug 22 22:29:06 2012 +0100
@@ -31,6 +31,7 @@
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
 #include <xen/keyhandler.h>
+#include <xen/softirq.h>
 #include <asm/msi.h>
 #include <asm/irq.h>
 #if defined(__i386__) || defined(__x86_64__)
@@ -2365,6 +2366,60 @@ static void vtd_resume(void)
     }
 }
 
+static void vtd_dump_p2m_table_level(paddr_t pt_maddr, int level, paddr_t gpa, 
+                                     int indent)
+{
+    paddr_t address;
+    int i;
+    struct dma_pte *pt_vaddr, *pte;
+    int next_level;
+
+    if ( level < 1 )
+        return;
+
+    pt_vaddr = map_vtd_domain_page(pt_maddr);
+    if ( pt_vaddr == NULL )
+    {
+        printk("Failed to map VT-D domain page %"PRIpaddr"\n", pt_maddr);
+        return;
+    }
+
+    next_level = level - 1;
+    for ( i = 0; i < PTE_NUM; i++ )
+    {
+        if ( !(i % 2) )
+            process_pending_softirqs();
+
+        pte = &pt_vaddr[i];
+        if ( !dma_pte_present(*pte) )
+            continue;
+
+        address = gpa + offset_level_address(i, level);
+        if ( next_level >= 1 ) 
+            vtd_dump_p2m_table_level(dma_pte_addr(*pte), next_level, 
+                                     address, indent + 1);
+        else
+            printk("%*sgfn: %08lx mfn: %08lx\n",
+                   indent, "",
+                   (unsigned long)(address >> PAGE_SHIFT_4K),
+                   (unsigned long)(pte->val >> PAGE_SHIFT_4K));
+    }
+
+    unmap_vtd_domain_page(pt_vaddr);
+}
+
+static void vtd_dump_p2m_table(struct domain *d)
+{
+    struct hvm_iommu *hd;
+
+    if ( list_empty(&acpi_drhd_units) )
+        return;
+
+    hd = domain_hvm_iommu(d);
+    printk("p2m table has %d levels\n", agaw_to_level(hd->agaw));
+    vtd_dump_p2m_table_level(hd->pgd_maddr, agaw_to_level(hd->agaw), 0, 0);
+}
+
 const struct iommu_ops intel_iommu_ops = {
     .init = intel_iommu_domain_init,
     .dom0_init = intel_iommu_dom0_init,
@@ -2387,6 +2442,7 @@ const struct iommu_ops intel_iommu_ops =
     .crash_shutdown = vtd_crash_shutdown,
     .iotlb_flush = intel_iommu_iotlb_flush,
     .iotlb_flush_all = intel_iommu_iotlb_flush_all,
+    .dump_p2m_table = vtd_dump_p2m_table,
 };
 
 /*
diff -r 1636cc4886f6 -r b02ac80ff689 xen/drivers/passthrough/vtd/iommu.h
--- a/xen/drivers/passthrough/vtd/iommu.h	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.h	Wed Aug 22 22:29:06 2012 +0100
@@ -248,6 +248,8 @@ struct context_entry {
 #define level_to_offset_bits(l) (12 + (l - 1) * LEVEL_STRIDE)
 #define address_level_offset(addr, level) \
             ((addr >> level_to_offset_bits(level)) & LEVEL_MASK)
+#define offset_level_address(offset, level) \
+            ((u64)(offset) << level_to_offset_bits(level))
 #define level_mask(l) (((u64)(-1)) << level_to_offset_bits(l))
 #define level_size(l) (1 << level_to_offset_bits(l))
 #define align_to_level(addr, l) ((addr + level_size(l) - 1) & level_mask(l))
diff -r 1636cc4886f6 -r b02ac80ff689 xen/include/asm-x86/hvm/svm/amd-iommu-defs.h
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h	Wed Aug 22 22:29:06 2012 +0100
@@ -38,6 +38,10 @@
 #define PTE_PER_TABLE_ALLOC(entries)	\
 	PAGE_SIZE * (PTE_PER_TABLE_ALIGN(entries) >> PTE_PER_TABLE_SHIFT)
 
+#define amd_offset_level_address(offset, level) \
+      	((u64)(offset) << (12 + (PTE_PER_TABLE_SHIFT * \
+                                (level - IOMMU_PAGING_MODE_LEVEL_1))))
+
 #define PCI_MIN_CAP_OFFSET	0x40
 #define PCI_MAX_CAP_BLOCKS	48
 #define PCI_CAP_PTR_MASK	0xFC
diff -r 1636cc4886f6 -r b02ac80ff689 xen/include/xen/iommu.h
--- a/xen/include/xen/iommu.h	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/include/xen/iommu.h	Wed Aug 22 22:29:06 2012 +0100
@@ -141,6 +141,7 @@ struct iommu_ops {
     void (*crash_shutdown)(void);
     void (*iotlb_flush)(struct domain *d, unsigned long gfn, unsigned int page_count);
     void (*iotlb_flush_all)(struct domain *d);
+    void (*dump_p2m_table)(struct domain *d);
 };
 
 void iommu_update_ire_from_apic(unsigned int apic, unsigned int reg, unsigned int value);

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Prz-0005IK-Ks; Thu, 23 Aug 2012 05:22:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prx-0005Ho-Nq
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:13 +0000
Received: from [85.158.138.51:55114] by server-9.bemta-3.messagelabs.com id
	00/D9-23952-50EB5305; Thu, 23 Aug 2012 05:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-174.messagelabs.com!1345699331!27310617!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13367 invoked from network); 23 Aug 2012 05:22:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prv-0007on-04
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pru-0004i7-Rx
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:10 +0000
Message-Id: <E1T4Pru-0004i7-Rx@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Fix shared entry status for grant
	copy operation on paged-out gfn
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andres Lagar-Cavilla <andres@lagarcavilla.org>
# Date 1345670870 -3600
# Node ID 1636cc4886f60f864c5cb7d851fa8b27521ee357
# Parent  e1edef2013b86bc01cd8ed9abd0f335e08b5d1b6
Fix shared entry status for grant copy operation on paged-out gfn

The unwind path was not clearing the shared entry status bits. This
was BSOD-ing guests on network activity under certain configurations.

Also:
 * sed the fixup method name to signal it's related to grant copy.
 * use atomic clear flag ops during fixup.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r e1edef2013b8 -r 1636cc4886f6 xen/common/grant_table.c
--- a/xen/common/grant_table.c	Wed Aug 22 22:26:27 2012 +0100
+++ b/xen/common/grant_table.c	Wed Aug 22 22:27:50 2012 +0100
@@ -1751,14 +1751,14 @@ __release_grant_for_copy(
    under the domain's grant table lock. */
 /* Only safe on transitive grants.  Even then, note that we don't
    attempt to drop any pin on the referent grant. */
-static void __fixup_status_for_pin(const struct active_grant_entry *act,
+static void __fixup_status_for_copy_pin(const struct active_grant_entry *act,
                                    uint16_t *status)
 {
     if ( !(act->pin & GNTPIN_hstw_mask) )
-        *status &= ~GTF_writing;
+        gnttab_clear_flag(_GTF_writing, status);
 
     if ( !(act->pin & GNTPIN_hstr_mask) )
-        *status &= ~GTF_reading;
+        gnttab_clear_flag(_GTF_reading, status);
 }
 
 /* Grab a frame number from a grant entry and update the flags and pin
@@ -1834,7 +1834,7 @@ __acquire_grant_for_copy(
         if ( sha2 && (shah->flags & GTF_type_mask) == GTF_transitive )
         {
             if ( !allow_transitive )
-                PIN_FAIL(unlock_out, GNTST_general_error,
+                PIN_FAIL(unlock_out_clear, GNTST_general_error,
                          "transitive grant when transitivity not allowed\n");
 
             trans_domid = sha2->transitive.trans_domid;
@@ -1842,7 +1842,7 @@ __acquire_grant_for_copy(
             barrier(); /* Stop the compiler from re-loading
                           trans_domid from shared memory */
             if ( trans_domid == rd->domain_id )
-                PIN_FAIL(unlock_out, GNTST_general_error,
+                PIN_FAIL(unlock_out_clear, GNTST_general_error,
                          "transitive grants cannot be self-referential\n");
 
             /* We allow the trans_domid == ldom case, which
@@ -1855,7 +1855,7 @@ __acquire_grant_for_copy(
             /* We need to leave the rrd locked during the grant copy */
             td = rcu_lock_domain_by_id(trans_domid);
             if ( td == NULL )
-                PIN_FAIL(unlock_out, GNTST_general_error,
+                PIN_FAIL(unlock_out_clear, GNTST_general_error,
                          "transitive grant referenced bad domain %d\n",
                          trans_domid);
             spin_unlock(&rgt->lock);
@@ -1866,7 +1866,7 @@ __acquire_grant_for_copy(
 
             spin_lock(&rgt->lock);
             if ( rc != GNTST_okay ) {
-                __fixup_status_for_pin(act, status);
+                __fixup_status_for_copy_pin(act, status);
                 rcu_unlock_domain(td);
                 spin_unlock(&rgt->lock);
                 return rc;
@@ -1878,7 +1878,7 @@ __acquire_grant_for_copy(
                and try again. */
             if ( act->pin != old_pin )
             {
-                __fixup_status_for_pin(act, status);
+                __fixup_status_for_copy_pin(act, status);
                 rcu_unlock_domain(td);
                 spin_unlock(&rgt->lock);
                 put_page(*page);
@@ -1897,7 +1897,7 @@ __acquire_grant_for_copy(
         {
             rc = __get_paged_frame(sha1->frame, &grant_frame, page, readonly, rd);
             if ( rc != GNTST_okay )
-                goto unlock_out;
+                goto unlock_out_clear;
             act->gfn = sha1->frame;
             is_sub_page = 0;
             trans_page_off = 0;
@@ -1907,7 +1907,7 @@ __acquire_grant_for_copy(
         {
             rc = __get_paged_frame(sha2->full_page.frame, &grant_frame, page, readonly, rd);
             if ( rc != GNTST_okay )
-                goto unlock_out;
+                goto unlock_out_clear;
             act->gfn = sha2->full_page.frame;
             is_sub_page = 0;
             trans_page_off = 0;
@@ -1917,7 +1917,7 @@ __acquire_grant_for_copy(
         {
             rc = __get_paged_frame(sha2->sub_page.frame, &grant_frame, page, readonly, rd);
             if ( rc != GNTST_okay )
-                goto unlock_out;
+                goto unlock_out_clear;
             act->gfn = sha2->sub_page.frame;
             is_sub_page = 1;
             trans_page_off = sha2->sub_page.page_off;
@@ -1948,6 +1948,17 @@ __acquire_grant_for_copy(
     *length = act->length;
     *frame = act->frame;
 
+    spin_unlock(&rgt->lock);
+    return rc;
+ 
+ unlock_out_clear:
+    if ( !(readonly) &&
+         !(act->pin & GNTPIN_hstw_mask) )
+        gnttab_clear_flag(_GTF_writing, status);
+
+    if ( !act->pin )
+        gnttab_clear_flag(_GTF_reading, status);
+
  unlock_out:
     spin_unlock(&rgt->lock);
     return rc;

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Prz-0005IZ-TI; Thu, 23 Aug 2012 05:22:15 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pry-0005Hy-UQ
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:15 +0000
Received: from [85.158.139.83:15344] by server-2.bemta-5.messagelabs.com id
	58/7C-10142-60EB5305; Thu, 23 Aug 2012 05:22:14 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-182.messagelabs.com!1345699331!27872018!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6176 invoked from network); 23 Aug 2012 05:22:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prv-0007oq-NJ
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prv-0004iO-Cg
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:11 +0000
Message-Id: <E1T4Prv-0004iO-Cg@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Dump IOMMU p2m table
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Santosh Jodh <santosh.jodh@citrix.com>
# Date 1345670946 -3600
# Node ID b02ac80ff6899e98b4089842843104fd8572a7cd
# Parent  1636cc4886f60f864c5cb7d851fa8b27521ee357
Dump IOMMU p2m table

New key handler 'o' to dump the IOMMU p2m table for each domain.
Skips dumping table for domain 0.
Intel and AMD specific iommu_ops handler for dumping p2m table.

Incorporated feedback from Jan Beulich and Wei Wang.
Fixed indent printing with %*s.
Removed superflous superpage and other attribute prints.
Make next_level use consistent for AMD IOMMU dumps. Warn if found
inconsistent.
AMD IOMMU does not skip levels. Handle 2mb and 1gb IOMMU page size for
AMD.

Signed-off-by: Santosh Jodh <santosh.jodh@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 1636cc4886f6 -r b02ac80ff689 xen/drivers/passthrough/amd/pci_amd_iommu.c
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c	Wed Aug 22 22:29:06 2012 +0100
@@ -22,6 +22,7 @@
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
 #include <xen/paging.h>
+#include <xen/softirq.h>
 #include <asm/hvm/iommu.h>
 #include <asm/amd-iommu.h>
 #include <asm/hvm/svm/amd-iommu-proto.h>
@@ -512,6 +513,80 @@ static int amd_iommu_group_id(u16 seg, u
 
 #include <asm/io_apic.h>
 
+static void amd_dump_p2m_table_level(struct page_info* pg, int level, 
+                                     paddr_t gpa, int indent)
+{
+    paddr_t address;
+    void *table_vaddr, *pde;
+    paddr_t next_table_maddr;
+    int index, next_level, present;
+    u32 *entry;
+
+    if ( level < 1 )
+        return;
+
+    table_vaddr = __map_domain_page(pg);
+    if ( table_vaddr == NULL )
+    {
+        printk("Failed to map IOMMU domain page %"PRIpaddr"\n", 
+                page_to_maddr(pg));
+        return;
+    }
+
+    for ( index = 0; index < PTE_PER_TABLE_SIZE; index++ )
+    {
+        if ( !(index % 2) )
+            process_pending_softirqs();
+
+        pde = table_vaddr + (index * IOMMU_PAGE_TABLE_ENTRY_SIZE);
+        next_table_maddr = amd_iommu_get_next_table_from_pte(pde);
+        entry = (u32*)pde;
+
+        present = get_field_from_reg_u32(entry[0],
+                                         IOMMU_PDE_PRESENT_MASK,
+                                         IOMMU_PDE_PRESENT_SHIFT);
+
+        if ( !present )
+            continue;
+
+        next_level = get_field_from_reg_u32(entry[0],
+                                            IOMMU_PDE_NEXT_LEVEL_MASK,
+                                            IOMMU_PDE_NEXT_LEVEL_SHIFT);
+
+        if ( next_level && (next_level != (level - 1)) )
+        {
+            printk("IOMMU p2m table error. next_level = %d, expected %d\n",
+                   next_level, level - 1);
+
+            continue;
+        }
+
+        address = gpa + amd_offset_level_address(index, level);
+        if ( next_level >= 1 )
+            amd_dump_p2m_table_level(
+                maddr_to_page(next_table_maddr), next_level,
+                address, indent + 1);
+        else
+            printk("%*sgfn: %08lx  mfn: %08lx\n",
+                   indent, "",
+                   (unsigned long)PFN_DOWN(address),
+                   (unsigned long)PFN_DOWN(next_table_maddr));
+    }
+
+    unmap_domain_page(table_vaddr);
+}
+
+static void amd_dump_p2m_table(struct domain *d)
+{
+    struct hvm_iommu *hd  = domain_hvm_iommu(d);
+
+    if ( !hd->root_table ) 
+        return;
+
+    printk("p2m table has %d levels\n", hd->paging_mode);
+    amd_dump_p2m_table_level(hd->root_table, hd->paging_mode, 0, 0);
+}
+
 const struct iommu_ops amd_iommu_ops = {
     .init = amd_iommu_domain_init,
     .dom0_init = amd_iommu_dom0_init,
@@ -531,4 +606,5 @@ const struct iommu_ops amd_iommu_ops = {
     .resume = amd_iommu_resume,
     .share_p2m = amd_iommu_share_p2m,
     .crash_shutdown = amd_iommu_suspend,
+    .dump_p2m_table = amd_dump_p2m_table,
 };
diff -r 1636cc4886f6 -r b02ac80ff689 xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/drivers/passthrough/iommu.c	Wed Aug 22 22:29:06 2012 +0100
@@ -19,10 +19,12 @@
 #include <xen/paging.h>
 #include <xen/guest_access.h>
 #include <xen/softirq.h>
+#include <xen/keyhandler.h>
 #include <xsm/xsm.h>
 
 static void parse_iommu_param(char *s);
 static int iommu_populate_page_table(struct domain *d);
+static void iommu_dump_p2m_table(unsigned char key);
 
 /*
  * The 'iommu' parameter enables the IOMMU.  Optional comma separated
@@ -54,6 +56,12 @@ bool_t __read_mostly amd_iommu_perdev_in
 
 DEFINE_PER_CPU(bool_t, iommu_dont_flush_iotlb);
 
+static struct keyhandler iommu_p2m_table = {
+    .diagnostic = 0,
+    .u.fn = iommu_dump_p2m_table,
+    .desc = "dump iommu p2m table"
+};
+
 static void __init parse_iommu_param(char *s)
 {
     char *ss;
@@ -119,6 +127,7 @@ void __init iommu_dom0_init(struct domai
     if ( !iommu_enabled )
         return;
 
+    register_keyhandler('o', &iommu_p2m_table);
     d->need_iommu = !!iommu_dom0_strict;
     if ( need_iommu(d) )
     {
@@ -654,6 +663,34 @@ int iommu_do_domctl(
     return ret;
 }
 
+static void iommu_dump_p2m_table(unsigned char key)
+{
+    struct domain *d;
+    const struct iommu_ops *ops;
+
+    if ( !iommu_enabled )
+    {
+        printk("IOMMU not enabled!\n");
+        return;
+    }
+
+    ops = iommu_get_ops();
+    for_each_domain(d)
+    {
+        if ( !d->domain_id )
+            continue;
+
+        if ( iommu_use_hap_pt(d) )
+        {
+            printk("\ndomain%d IOMMU p2m table shared with MMU: \n", d->domain_id);
+            continue;
+        }
+
+        printk("\ndomain%d IOMMU p2m table: \n", d->domain_id);
+        ops->dump_p2m_table(d);
+    }
+}
+
 /*
  * Local variables:
  * mode: C
diff -r 1636cc4886f6 -r b02ac80ff689 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c	Wed Aug 22 22:29:06 2012 +0100
@@ -31,6 +31,7 @@
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
 #include <xen/keyhandler.h>
+#include <xen/softirq.h>
 #include <asm/msi.h>
 #include <asm/irq.h>
 #if defined(__i386__) || defined(__x86_64__)
@@ -2365,6 +2366,60 @@ static void vtd_resume(void)
     }
 }
 
+static void vtd_dump_p2m_table_level(paddr_t pt_maddr, int level, paddr_t gpa, 
+                                     int indent)
+{
+    paddr_t address;
+    int i;
+    struct dma_pte *pt_vaddr, *pte;
+    int next_level;
+
+    if ( level < 1 )
+        return;
+
+    pt_vaddr = map_vtd_domain_page(pt_maddr);
+    if ( pt_vaddr == NULL )
+    {
+        printk("Failed to map VT-D domain page %"PRIpaddr"\n", pt_maddr);
+        return;
+    }
+
+    next_level = level - 1;
+    for ( i = 0; i < PTE_NUM; i++ )
+    {
+        if ( !(i % 2) )
+            process_pending_softirqs();
+
+        pte = &pt_vaddr[i];
+        if ( !dma_pte_present(*pte) )
+            continue;
+
+        address = gpa + offset_level_address(i, level);
+        if ( next_level >= 1 ) 
+            vtd_dump_p2m_table_level(dma_pte_addr(*pte), next_level, 
+                                     address, indent + 1);
+        else
+            printk("%*sgfn: %08lx mfn: %08lx\n",
+                   indent, "",
+                   (unsigned long)(address >> PAGE_SHIFT_4K),
+                   (unsigned long)(pte->val >> PAGE_SHIFT_4K));
+    }
+
+    unmap_vtd_domain_page(pt_vaddr);
+}
+
+static void vtd_dump_p2m_table(struct domain *d)
+{
+    struct hvm_iommu *hd;
+
+    if ( list_empty(&acpi_drhd_units) )
+        return;
+
+    hd = domain_hvm_iommu(d);
+    printk("p2m table has %d levels\n", agaw_to_level(hd->agaw));
+    vtd_dump_p2m_table_level(hd->pgd_maddr, agaw_to_level(hd->agaw), 0, 0);
+}
+
 const struct iommu_ops intel_iommu_ops = {
     .init = intel_iommu_domain_init,
     .dom0_init = intel_iommu_dom0_init,
@@ -2387,6 +2442,7 @@ const struct iommu_ops intel_iommu_ops =
     .crash_shutdown = vtd_crash_shutdown,
     .iotlb_flush = intel_iommu_iotlb_flush,
     .iotlb_flush_all = intel_iommu_iotlb_flush_all,
+    .dump_p2m_table = vtd_dump_p2m_table,
 };
 
 /*
diff -r 1636cc4886f6 -r b02ac80ff689 xen/drivers/passthrough/vtd/iommu.h
--- a/xen/drivers/passthrough/vtd/iommu.h	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.h	Wed Aug 22 22:29:06 2012 +0100
@@ -248,6 +248,8 @@ struct context_entry {
 #define level_to_offset_bits(l) (12 + (l - 1) * LEVEL_STRIDE)
 #define address_level_offset(addr, level) \
             ((addr >> level_to_offset_bits(level)) & LEVEL_MASK)
+#define offset_level_address(offset, level) \
+            ((u64)(offset) << level_to_offset_bits(level))
 #define level_mask(l) (((u64)(-1)) << level_to_offset_bits(l))
 #define level_size(l) (1 << level_to_offset_bits(l))
 #define align_to_level(addr, l) ((addr + level_size(l) - 1) & level_mask(l))
diff -r 1636cc4886f6 -r b02ac80ff689 xen/include/asm-x86/hvm/svm/amd-iommu-defs.h
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-defs.h	Wed Aug 22 22:29:06 2012 +0100
@@ -38,6 +38,10 @@
 #define PTE_PER_TABLE_ALLOC(entries)	\
 	PAGE_SIZE * (PTE_PER_TABLE_ALIGN(entries) >> PTE_PER_TABLE_SHIFT)
 
+#define amd_offset_level_address(offset, level) \
+      	((u64)(offset) << (12 + (PTE_PER_TABLE_SHIFT * \
+                                (level - IOMMU_PAGING_MODE_LEVEL_1))))
+
 #define PCI_MIN_CAP_OFFSET	0x40
 #define PCI_MAX_CAP_BLOCKS	48
 #define PCI_CAP_PTR_MASK	0xFC
diff -r 1636cc4886f6 -r b02ac80ff689 xen/include/xen/iommu.h
--- a/xen/include/xen/iommu.h	Wed Aug 22 22:27:50 2012 +0100
+++ b/xen/include/xen/iommu.h	Wed Aug 22 22:29:06 2012 +0100
@@ -141,6 +141,7 @@ struct iommu_ops {
     void (*crash_shutdown)(void);
     void (*iotlb_flush)(struct domain *d, unsigned long gfn, unsigned int page_count);
     void (*iotlb_flush_all)(struct domain *d);
+    void (*dump_p2m_table)(struct domain *d);
 };
 
 void iommu_update_ire_from_apic(unsigned int apic, unsigned int reg, unsigned int value);

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Prz-0005IK-Ks; Thu, 23 Aug 2012 05:22:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prx-0005Ho-Nq
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:13 +0000
Received: from [85.158.138.51:55114] by server-9.bemta-3.messagelabs.com id
	00/D9-23952-50EB5305; Thu, 23 Aug 2012 05:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-8.tower-174.messagelabs.com!1345699331!27310617!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13367 invoked from network); 23 Aug 2012 05:22:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prv-0007on-04
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Pru-0004i7-Rx
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:10 +0000
Message-Id: <E1T4Pru-0004i7-Rx@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Fix shared entry status for grant
	copy operation on paged-out gfn
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andres Lagar-Cavilla <andres@lagarcavilla.org>
# Date 1345670870 -3600
# Node ID 1636cc4886f60f864c5cb7d851fa8b27521ee357
# Parent  e1edef2013b86bc01cd8ed9abd0f335e08b5d1b6
Fix shared entry status for grant copy operation on paged-out gfn

The unwind path was not clearing the shared entry status bits. This
was BSOD-ing guests on network activity under certain configurations.

Also:
 * sed the fixup method name to signal it's related to grant copy.
 * use atomic clear flag ops during fixup.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r e1edef2013b8 -r 1636cc4886f6 xen/common/grant_table.c
--- a/xen/common/grant_table.c	Wed Aug 22 22:26:27 2012 +0100
+++ b/xen/common/grant_table.c	Wed Aug 22 22:27:50 2012 +0100
@@ -1751,14 +1751,14 @@ __release_grant_for_copy(
    under the domain's grant table lock. */
 /* Only safe on transitive grants.  Even then, note that we don't
    attempt to drop any pin on the referent grant. */
-static void __fixup_status_for_pin(const struct active_grant_entry *act,
+static void __fixup_status_for_copy_pin(const struct active_grant_entry *act,
                                    uint16_t *status)
 {
     if ( !(act->pin & GNTPIN_hstw_mask) )
-        *status &= ~GTF_writing;
+        gnttab_clear_flag(_GTF_writing, status);
 
     if ( !(act->pin & GNTPIN_hstr_mask) )
-        *status &= ~GTF_reading;
+        gnttab_clear_flag(_GTF_reading, status);
 }
 
 /* Grab a frame number from a grant entry and update the flags and pin
@@ -1834,7 +1834,7 @@ __acquire_grant_for_copy(
         if ( sha2 && (shah->flags & GTF_type_mask) == GTF_transitive )
         {
             if ( !allow_transitive )
-                PIN_FAIL(unlock_out, GNTST_general_error,
+                PIN_FAIL(unlock_out_clear, GNTST_general_error,
                          "transitive grant when transitivity not allowed\n");
 
             trans_domid = sha2->transitive.trans_domid;
@@ -1842,7 +1842,7 @@ __acquire_grant_for_copy(
             barrier(); /* Stop the compiler from re-loading
                           trans_domid from shared memory */
             if ( trans_domid == rd->domain_id )
-                PIN_FAIL(unlock_out, GNTST_general_error,
+                PIN_FAIL(unlock_out_clear, GNTST_general_error,
                          "transitive grants cannot be self-referential\n");
 
             /* We allow the trans_domid == ldom case, which
@@ -1855,7 +1855,7 @@ __acquire_grant_for_copy(
             /* We need to leave the rrd locked during the grant copy */
             td = rcu_lock_domain_by_id(trans_domid);
             if ( td == NULL )
-                PIN_FAIL(unlock_out, GNTST_general_error,
+                PIN_FAIL(unlock_out_clear, GNTST_general_error,
                          "transitive grant referenced bad domain %d\n",
                          trans_domid);
             spin_unlock(&rgt->lock);
@@ -1866,7 +1866,7 @@ __acquire_grant_for_copy(
 
             spin_lock(&rgt->lock);
             if ( rc != GNTST_okay ) {
-                __fixup_status_for_pin(act, status);
+                __fixup_status_for_copy_pin(act, status);
                 rcu_unlock_domain(td);
                 spin_unlock(&rgt->lock);
                 return rc;
@@ -1878,7 +1878,7 @@ __acquire_grant_for_copy(
                and try again. */
             if ( act->pin != old_pin )
             {
-                __fixup_status_for_pin(act, status);
+                __fixup_status_for_copy_pin(act, status);
                 rcu_unlock_domain(td);
                 spin_unlock(&rgt->lock);
                 put_page(*page);
@@ -1897,7 +1897,7 @@ __acquire_grant_for_copy(
         {
             rc = __get_paged_frame(sha1->frame, &grant_frame, page, readonly, rd);
             if ( rc != GNTST_okay )
-                goto unlock_out;
+                goto unlock_out_clear;
             act->gfn = sha1->frame;
             is_sub_page = 0;
             trans_page_off = 0;
@@ -1907,7 +1907,7 @@ __acquire_grant_for_copy(
         {
             rc = __get_paged_frame(sha2->full_page.frame, &grant_frame, page, readonly, rd);
             if ( rc != GNTST_okay )
-                goto unlock_out;
+                goto unlock_out_clear;
             act->gfn = sha2->full_page.frame;
             is_sub_page = 0;
             trans_page_off = 0;
@@ -1917,7 +1917,7 @@ __acquire_grant_for_copy(
         {
             rc = __get_paged_frame(sha2->sub_page.frame, &grant_frame, page, readonly, rd);
             if ( rc != GNTST_okay )
-                goto unlock_out;
+                goto unlock_out_clear;
             act->gfn = sha2->sub_page.frame;
             is_sub_page = 1;
             trans_page_off = sha2->sub_page.page_off;
@@ -1948,6 +1948,17 @@ __acquire_grant_for_copy(
     *length = act->length;
     *frame = act->frame;
 
+    spin_unlock(&rgt->lock);
+    return rc;
+ 
+ unlock_out_clear:
+    if ( !(readonly) &&
+         !(act->pin & GNTPIN_hstw_mask) )
+        gnttab_clear_flag(_GTF_writing, status);
+
+    if ( !act->pin )
+        gnttab_clear_flag(_GTF_reading, status);
+
  unlock_out:
     spin_unlock(&rgt->lock);
     return rc;

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Pry-0005I3-Ey; Thu, 23 Aug 2012 05:22:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prw-0005HY-Az
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:12 +0000
Received: from [85.158.138.51:55060] by server-11.bemta-3.messagelabs.com id
	13/C5-23152-30EB5305; Thu, 23 Aug 2012 05:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1345699329!27443931!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24227 invoked from network); 23 Aug 2012 05:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prt-0007oe-K0
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prt-0004hN-65
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:09 +0000
Message-Id: <E1T4Prt-0004hN-65@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] flask/policy: add accesses used by
	newer dom0s
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1345670136 -3600
# Node ID a325ee7a463903ac13a6bf38a3452271631b0043
# Parent  c24eb37fcbbf5a8e4d508059f732b775adada80e
flask/policy: add accesses used by newer dom0s

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r c24eb37fcbbf -r a325ee7a4639 tools/flask/policy/policy/modules/xen/xen.if
--- a/tools/flask/policy/policy/modules/xen/xen.if	Wed Aug 22 22:14:52 2012 +0100
+++ b/tools/flask/policy/policy/modules/xen/xen.if	Wed Aug 22 22:15:36 2012 +0100
@@ -100,7 +100,7 @@ define(`use_device', `
 # admin_device(domain, device)
 #   Allow a device to be used and delegated by a domain
 define(`admin_device', `
-    allow $1 $2:resource { setup stat_device add_device add_irq add_iomem add_ioport remove_device remove_irq remove_iomem remove_ioport };
+    allow $1 $2:resource { setup stat_device add_device add_irq add_iomem add_ioport remove_device remove_irq remove_iomem remove_ioport plug unplug };
     allow $1 $2:hvm bind_irq;
     use_device($1, $2)
 ')
diff -r c24eb37fcbbf -r a325ee7a4639 tools/flask/policy/policy/modules/xen/xen.te
--- a/tools/flask/policy/policy/modules/xen/xen.te	Wed Aug 22 22:14:52 2012 +0100
+++ b/tools/flask/policy/policy/modules/xen/xen.te	Wed Aug 22 22:15:36 2012 +0100
@@ -55,8 +55,8 @@ type device_t, resource_type;
 allow xen_t dom0_t:domain { create };
 
 allow dom0_t xen_t:xen { kexec readapic writeapic mtrr_read mtrr_add mtrr_del
-	scheduler physinfo heap quirk readconsole writeconsole settime
-	microcode cpupool_op sched_op };
+	scheduler physinfo heap quirk readconsole writeconsole settime getcpuinfo
+	microcode cpupool_op sched_op pm_op };
 allow dom0_t xen_t:mmu { memorymap };
 allow dom0_t security_t:security { check_context compute_av compute_create
 	compute_member load_policy compute_relabel compute_user setenforce

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Pry-0005I3-Ey; Thu, 23 Aug 2012 05:22:14 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prw-0005HY-Az
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:12 +0000
Received: from [85.158.138.51:55060] by server-11.bemta-3.messagelabs.com id
	13/C5-23152-30EB5305; Thu, 23 Aug 2012 05:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1345699329!27443931!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24227 invoked from network); 23 Aug 2012 05:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prt-0007oe-K0
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prt-0004hN-65
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:09 +0000
Message-Id: <E1T4Prt-0004hN-65@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] flask/policy: add accesses used by
	newer dom0s
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Daniel De Graaf <dgdegra@tycho.nsa.gov>
# Date 1345670136 -3600
# Node ID a325ee7a463903ac13a6bf38a3452271631b0043
# Parent  c24eb37fcbbf5a8e4d508059f732b775adada80e
flask/policy: add accesses used by newer dom0s

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r c24eb37fcbbf -r a325ee7a4639 tools/flask/policy/policy/modules/xen/xen.if
--- a/tools/flask/policy/policy/modules/xen/xen.if	Wed Aug 22 22:14:52 2012 +0100
+++ b/tools/flask/policy/policy/modules/xen/xen.if	Wed Aug 22 22:15:36 2012 +0100
@@ -100,7 +100,7 @@ define(`use_device', `
 # admin_device(domain, device)
 #   Allow a device to be used and delegated by a domain
 define(`admin_device', `
-    allow $1 $2:resource { setup stat_device add_device add_irq add_iomem add_ioport remove_device remove_irq remove_iomem remove_ioport };
+    allow $1 $2:resource { setup stat_device add_device add_irq add_iomem add_ioport remove_device remove_irq remove_iomem remove_ioport plug unplug };
     allow $1 $2:hvm bind_irq;
     use_device($1, $2)
 ')
diff -r c24eb37fcbbf -r a325ee7a4639 tools/flask/policy/policy/modules/xen/xen.te
--- a/tools/flask/policy/policy/modules/xen/xen.te	Wed Aug 22 22:14:52 2012 +0100
+++ b/tools/flask/policy/policy/modules/xen/xen.te	Wed Aug 22 22:15:36 2012 +0100
@@ -55,8 +55,8 @@ type device_t, resource_type;
 allow xen_t dom0_t:domain { create };
 
 allow dom0_t xen_t:xen { kexec readapic writeapic mtrr_read mtrr_add mtrr_del
-	scheduler physinfo heap quirk readconsole writeconsole settime
-	microcode cpupool_op sched_op };
+	scheduler physinfo heap quirk readconsole writeconsole settime getcpuinfo
+	microcode cpupool_op sched_op pm_op };
 allow dom0_t xen_t:mmu { memorymap };
 allow dom0_t security_t:security { check_context compute_av compute_create
 	compute_member load_policy compute_relabel compute_user setenforce

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Ps3-0005Je-WC; Thu, 23 Aug 2012 05:22:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Ps2-0005Hn-IX
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1345699330!10655206!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29821 invoked from network); 23 Aug 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prt-0007oh-Vq
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prt-0004hc-OZ
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:09 +0000
Message-Id: <E1T4Prt-0004hc-OZ@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxc: Support save/restore of up to
	4096 VCPUs (increase from 64 VCPUs).
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345670442 -3600
# Node ID 03507cc3a1ee28c6f88e5a01a03077082bd99b58
# Parent  a325ee7a463903ac13a6bf38a3452271631b0043
libxc: Support save/restore of up to 4096 VCPUs (increase from 64 VCPUs).

Signed-off-by: Keir Fraser <keir@xen.org>
---


diff -r a325ee7a4639 -r 03507cc3a1ee tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c	Wed Aug 22 22:15:36 2012 +0100
+++ b/tools/libxc/xc_domain_restore.c	Wed Aug 22 22:20:42 2012 +0100
@@ -462,7 +462,7 @@ static int dump_qemu(xc_interface *xch, 
 
 static int buffer_tail_hvm(xc_interface *xch, struct restore_ctx *ctx,
                            struct tailbuf_hvm *buf, int fd,
-                           unsigned int max_vcpu_id, uint64_t vcpumap,
+                           unsigned int max_vcpu_id, uint64_t *vcpumap,
                            int ext_vcpucontext,
                            int vcpuextstate, uint32_t vcpuextstate_size)
 {
@@ -530,7 +530,7 @@ static int buffer_tail_hvm(xc_interface 
 
 static int buffer_tail_pv(xc_interface *xch, struct restore_ctx *ctx,
                           struct tailbuf_pv *buf, int fd,
-                          unsigned int max_vcpu_id, uint64_t vcpumap,
+                          unsigned int max_vcpu_id, uint64_t *vcpumap,
                           int ext_vcpucontext,
                           int vcpuextstate,
                           uint32_t vcpuextstate_size)
@@ -563,8 +563,8 @@ static int buffer_tail_pv(xc_interface *
     /* VCPU contexts */
     buf->vcpucount = 0;
     for (i = 0; i <= max_vcpu_id; i++) {
-        // DPRINTF("vcpumap: %llx, cpu: %d, bit: %llu\n", vcpumap, i, (vcpumap % (1ULL << i)));
-        if ( (!(vcpumap & (1ULL << i))) )
+        // DPRINTF("vcpumap: %llx, cpu: %d, bit: %llu\n", vcpumap[i/64], i, (vcpumap[i/64] & (1ULL << (i%64))));
+        if ( (!(vcpumap[i/64] & (1ULL << (i%64)))) )
             continue;
         buf->vcpucount++;
     }
@@ -614,7 +614,7 @@ static int buffer_tail_pv(xc_interface *
 
 static int buffer_tail(xc_interface *xch, struct restore_ctx *ctx,
                        tailbuf_t *buf, int fd, unsigned int max_vcpu_id,
-                       uint64_t vcpumap, int ext_vcpucontext,
+                       uint64_t *vcpumap, int ext_vcpucontext,
                        int vcpuextstate, uint32_t vcpuextstate_size)
 {
     if ( buf->ishvm )
@@ -680,7 +680,7 @@ typedef struct {
 
     int new_ctxt_format;
     int max_vcpu_id;
-    uint64_t vcpumap;
+    uint64_t vcpumap[XC_SR_MAX_VCPUS/64];
     uint64_t identpt;
     uint64_t paging_ring_pfn;
     uint64_t access_ring_pfn;
@@ -745,12 +745,12 @@ static int pagebuf_get_one(xc_interface 
     case XC_SAVE_ID_VCPU_INFO:
         buf->new_ctxt_format = 1;
         if ( RDEXACT(fd, &buf->max_vcpu_id, sizeof(buf->max_vcpu_id)) ||
-             buf->max_vcpu_id >= 64 || RDEXACT(fd, &buf->vcpumap,
-                                               sizeof(uint64_t)) ) {
+             buf->max_vcpu_id >= XC_SR_MAX_VCPUS ||
+             RDEXACT(fd, buf->vcpumap, vcpumap_sz(buf->max_vcpu_id)) ) {
             PERROR("Error when reading max_vcpu_id");
             return -1;
         }
-        // DPRINTF("Max VCPU ID: %d, vcpumap: %llx\n", buf->max_vcpu_id, buf->vcpumap);
+        // DPRINTF("Max VCPU ID: %d, vcpumap: %llx\n", buf->max_vcpu_id, buf->vcpumap[0]);
         return pagebuf_get_one(xch, ctx, buf, fd, dom);
 
     case XC_SAVE_ID_HVM_IDENT_PT:
@@ -1366,7 +1366,7 @@ int xc_domain_restore(xc_interface *xch,
     struct mmuext_op pin[MAX_PIN_BATCH];
     unsigned int nr_pins;
 
-    uint64_t vcpumap = 1ULL;
+    uint64_t vcpumap[XC_SR_MAX_VCPUS/64] = { 1ULL };
     unsigned int max_vcpu_id = 0;
     int new_ctxt_format = 0;
 
@@ -1517,8 +1517,8 @@ int xc_domain_restore(xc_interface *xch,
         if ( j == 0 ) {
             /* catch vcpu updates */
             if (pagebuf.new_ctxt_format) {
-                vcpumap = pagebuf.vcpumap;
                 max_vcpu_id = pagebuf.max_vcpu_id;
+                memcpy(vcpumap, pagebuf.vcpumap, vcpumap_sz(max_vcpu_id));
             }
             /* should this be deferred? does it change? */
             if ( pagebuf.identpt )
@@ -1880,7 +1880,7 @@ int xc_domain_restore(xc_interface *xch,
     vcpup = tailbuf.u.pv.vcpubuf;
     for ( i = 0; i <= max_vcpu_id; i++ )
     {
-        if ( !(vcpumap & (1ULL << i)) )
+        if ( !(vcpumap[i/64] & (1ULL << (i%64))) )
             continue;
 
         memcpy(ctxt, vcpup, ((dinfo->guest_width == 8) ? sizeof(ctxt->x64)
diff -r a325ee7a4639 -r 03507cc3a1ee tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c	Wed Aug 22 22:15:36 2012 +0100
+++ b/tools/libxc/xc_domain_save.c	Wed Aug 22 22:20:42 2012 +0100
@@ -855,7 +855,7 @@ int xc_domain_save(xc_interface *xch, in
     unsigned long needed_to_fix = 0;
     unsigned long total_sent    = 0;
 
-    uint64_t vcpumap = 1ULL;
+    uint64_t vcpumap[XC_SR_MAX_VCPUS/64] = { 1ULL };
 
     /* HVM: a buffer for holding HVM context */
     uint32_t hvm_buf_size = 0;
@@ -1581,13 +1581,13 @@ int xc_domain_save(xc_interface *xch, in
     }
 
     {
-        struct {
+        struct chunk {
             int id;
             int max_vcpu_id;
-            uint64_t vcpumap;
+            uint64_t vcpumap[XC_SR_MAX_VCPUS/64];
         } chunk = { XC_SAVE_ID_VCPU_INFO, info.max_vcpu_id };
 
-        if ( info.max_vcpu_id >= 64 )
+        if ( info.max_vcpu_id >= XC_SR_MAX_VCPUS )
         {
             ERROR("Too many VCPUS in guest!");
             goto out;
@@ -1598,11 +1598,12 @@ int xc_domain_save(xc_interface *xch, in
             xc_vcpuinfo_t vinfo;
             if ( (xc_vcpu_getinfo(xch, dom, i, &vinfo) == 0) &&
                  vinfo.online )
-                vcpumap |= 1ULL << i;
+                vcpumap[i/64] |= 1ULL << (i%64);
         }
 
-        chunk.vcpumap = vcpumap;
-        if ( wrexact(io_fd, &chunk, sizeof(chunk)) )
+        memcpy(chunk.vcpumap, vcpumap, vcpumap_sz(info.max_vcpu_id));
+        if ( wrexact(io_fd, &chunk, offsetof(struct chunk, vcpumap)
+                     + vcpumap_sz(info.max_vcpu_id)) )
         {
             PERROR("Error when writing to state file");
             goto out;
@@ -1878,7 +1879,7 @@ int xc_domain_save(xc_interface *xch, in
 
     for ( i = 0; i <= info.max_vcpu_id; i++ )
     {
-        if ( !(vcpumap & (1ULL << i)) )
+        if ( !(vcpumap[i/64] & (1ULL << (i%64))) )
             continue;
 
         if ( (i != 0) && xc_vcpu_getcontext(xch, dom, i, &ctxt) )
diff -r a325ee7a4639 -r 03507cc3a1ee tools/libxc/xg_save_restore.h
--- a/tools/libxc/xg_save_restore.h	Wed Aug 22 22:15:36 2012 +0100
+++ b/tools/libxc/xg_save_restore.h	Wed Aug 22 22:20:42 2012 +0100
@@ -269,6 +269,9 @@
 /* When pinning page tables at the end of restore, we also use batching. */
 #define MAX_PIN_BATCH  1024
 
+/* Maximum #VCPUs currently supported for save/restore. */
+#define XC_SR_MAX_VCPUS 4096
+#define vcpumap_sz(max_id) (((max_id)/64+1)*sizeof(uint64_t))
 
 
 /*

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

From xen-changelog-bounces@lists.xen.org Thu Aug 23 05:22:23 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 23 Aug 2012 05:22:23 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4Ps3-0005Je-WC; Thu, 23 Aug 2012 05:22:19 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Ps2-0005Hn-IX
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:18 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-27.messagelabs.com!1345699330!10655206!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29821 invoked from network); 23 Aug 2012 05:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Aug 2012 05:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prt-0007oh-Vq
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4Prt-0004hc-OZ
	for xen-changelog@lists.xensource.com; Thu, 23 Aug 2012 05:22:09 +0000
Message-Id: <E1T4Prt-0004hc-OZ@xenbits.xen.org>
Date: Thu, 23 Aug 2012 05:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxc: Support save/restore of up to
	4096 VCPUs (increase from 64 VCPUs).
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345670442 -3600
# Node ID 03507cc3a1ee28c6f88e5a01a03077082bd99b58
# Parent  a325ee7a463903ac13a6bf38a3452271631b0043
libxc: Support save/restore of up to 4096 VCPUs (increase from 64 VCPUs).

Signed-off-by: Keir Fraser <keir@xen.org>
---


diff -r a325ee7a4639 -r 03507cc3a1ee tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c	Wed Aug 22 22:15:36 2012 +0100
+++ b/tools/libxc/xc_domain_restore.c	Wed Aug 22 22:20:42 2012 +0100
@@ -462,7 +462,7 @@ static int dump_qemu(xc_interface *xch, 
 
 static int buffer_tail_hvm(xc_interface *xch, struct restore_ctx *ctx,
                            struct tailbuf_hvm *buf, int fd,
-                           unsigned int max_vcpu_id, uint64_t vcpumap,
+                           unsigned int max_vcpu_id, uint64_t *vcpumap,
                            int ext_vcpucontext,
                            int vcpuextstate, uint32_t vcpuextstate_size)
 {
@@ -530,7 +530,7 @@ static int buffer_tail_hvm(xc_interface 
 
 static int buffer_tail_pv(xc_interface *xch, struct restore_ctx *ctx,
                           struct tailbuf_pv *buf, int fd,
-                          unsigned int max_vcpu_id, uint64_t vcpumap,
+                          unsigned int max_vcpu_id, uint64_t *vcpumap,
                           int ext_vcpucontext,
                           int vcpuextstate,
                           uint32_t vcpuextstate_size)
@@ -563,8 +563,8 @@ static int buffer_tail_pv(xc_interface *
     /* VCPU contexts */
     buf->vcpucount = 0;
     for (i = 0; i <= max_vcpu_id; i++) {
-        // DPRINTF("vcpumap: %llx, cpu: %d, bit: %llu\n", vcpumap, i, (vcpumap % (1ULL << i)));
-        if ( (!(vcpumap & (1ULL << i))) )
+        // DPRINTF("vcpumap: %llx, cpu: %d, bit: %llu\n", vcpumap[i/64], i, (vcpumap[i/64] & (1ULL << (i%64))));
+        if ( (!(vcpumap[i/64] & (1ULL << (i%64)))) )
             continue;
         buf->vcpucount++;
     }
@@ -614,7 +614,7 @@ static int buffer_tail_pv(xc_interface *
 
 static int buffer_tail(xc_interface *xch, struct restore_ctx *ctx,
                        tailbuf_t *buf, int fd, unsigned int max_vcpu_id,
-                       uint64_t vcpumap, int ext_vcpucontext,
+                       uint64_t *vcpumap, int ext_vcpucontext,
                        int vcpuextstate, uint32_t vcpuextstate_size)
 {
     if ( buf->ishvm )
@@ -680,7 +680,7 @@ typedef struct {
 
     int new_ctxt_format;
     int max_vcpu_id;
-    uint64_t vcpumap;
+    uint64_t vcpumap[XC_SR_MAX_VCPUS/64];
     uint64_t identpt;
     uint64_t paging_ring_pfn;
     uint64_t access_ring_pfn;
@@ -745,12 +745,12 @@ static int pagebuf_get_one(xc_interface 
     case XC_SAVE_ID_VCPU_INFO:
         buf->new_ctxt_format = 1;
         if ( RDEXACT(fd, &buf->max_vcpu_id, sizeof(buf->max_vcpu_id)) ||
-             buf->max_vcpu_id >= 64 || RDEXACT(fd, &buf->vcpumap,
-                                               sizeof(uint64_t)) ) {
+             buf->max_vcpu_id >= XC_SR_MAX_VCPUS ||
+             RDEXACT(fd, buf->vcpumap, vcpumap_sz(buf->max_vcpu_id)) ) {
             PERROR("Error when reading max_vcpu_id");
             return -1;
         }
-        // DPRINTF("Max VCPU ID: %d, vcpumap: %llx\n", buf->max_vcpu_id, buf->vcpumap);
+        // DPRINTF("Max VCPU ID: %d, vcpumap: %llx\n", buf->max_vcpu_id, buf->vcpumap[0]);
         return pagebuf_get_one(xch, ctx, buf, fd, dom);
 
     case XC_SAVE_ID_HVM_IDENT_PT:
@@ -1366,7 +1366,7 @@ int xc_domain_restore(xc_interface *xch,
     struct mmuext_op pin[MAX_PIN_BATCH];
     unsigned int nr_pins;
 
-    uint64_t vcpumap = 1ULL;
+    uint64_t vcpumap[XC_SR_MAX_VCPUS/64] = { 1ULL };
     unsigned int max_vcpu_id = 0;
     int new_ctxt_format = 0;
 
@@ -1517,8 +1517,8 @@ int xc_domain_restore(xc_interface *xch,
         if ( j == 0 ) {
             /* catch vcpu updates */
             if (pagebuf.new_ctxt_format) {
-                vcpumap = pagebuf.vcpumap;
                 max_vcpu_id = pagebuf.max_vcpu_id;
+                memcpy(vcpumap, pagebuf.vcpumap, vcpumap_sz(max_vcpu_id));
             }
             /* should this be deferred? does it change? */
             if ( pagebuf.identpt )
@@ -1880,7 +1880,7 @@ int xc_domain_restore(xc_interface *xch,
     vcpup = tailbuf.u.pv.vcpubuf;
     for ( i = 0; i <= max_vcpu_id; i++ )
     {
-        if ( !(vcpumap & (1ULL << i)) )
+        if ( !(vcpumap[i/64] & (1ULL << (i%64))) )
             continue;
 
         memcpy(ctxt, vcpup, ((dinfo->guest_width == 8) ? sizeof(ctxt->x64)
diff -r a325ee7a4639 -r 03507cc3a1ee tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c	Wed Aug 22 22:15:36 2012 +0100
+++ b/tools/libxc/xc_domain_save.c	Wed Aug 22 22:20:42 2012 +0100
@@ -855,7 +855,7 @@ int xc_domain_save(xc_interface *xch, in
     unsigned long needed_to_fix = 0;
     unsigned long total_sent    = 0;
 
-    uint64_t vcpumap = 1ULL;
+    uint64_t vcpumap[XC_SR_MAX_VCPUS/64] = { 1ULL };
 
     /* HVM: a buffer for holding HVM context */
     uint32_t hvm_buf_size = 0;
@@ -1581,13 +1581,13 @@ int xc_domain_save(xc_interface *xch, in
     }
 
     {
-        struct {
+        struct chunk {
             int id;
             int max_vcpu_id;
-            uint64_t vcpumap;
+            uint64_t vcpumap[XC_SR_MAX_VCPUS/64];
         } chunk = { XC_SAVE_ID_VCPU_INFO, info.max_vcpu_id };
 
-        if ( info.max_vcpu_id >= 64 )
+        if ( info.max_vcpu_id >= XC_SR_MAX_VCPUS )
         {
             ERROR("Too many VCPUS in guest!");
             goto out;
@@ -1598,11 +1598,12 @@ int xc_domain_save(xc_interface *xch, in
             xc_vcpuinfo_t vinfo;
             if ( (xc_vcpu_getinfo(xch, dom, i, &vinfo) == 0) &&
                  vinfo.online )
-                vcpumap |= 1ULL << i;
+                vcpumap[i/64] |= 1ULL << (i%64);
         }
 
-        chunk.vcpumap = vcpumap;
-        if ( wrexact(io_fd, &chunk, sizeof(chunk)) )
+        memcpy(chunk.vcpumap, vcpumap, vcpumap_sz(info.max_vcpu_id));
+        if ( wrexact(io_fd, &chunk, offsetof(struct chunk, vcpumap)
+                     + vcpumap_sz(info.max_vcpu_id)) )
         {
             PERROR("Error when writing to state file");
             goto out;
@@ -1878,7 +1879,7 @@ int xc_domain_save(xc_interface *xch, in
 
     for ( i = 0; i <= info.max_vcpu_id; i++ )
     {
-        if ( !(vcpumap & (1ULL << i)) )
+        if ( !(vcpumap[i/64] & (1ULL << (i%64))) )
             continue;
 
         if ( (i != 0) && xc_vcpu_getcontext(xch, dom, i, &ctxt) )
diff -r a325ee7a4639 -r 03507cc3a1ee tools/libxc/xg_save_restore.h
--- a/tools/libxc/xg_save_restore.h	Wed Aug 22 22:15:36 2012 +0100
+++ b/tools/libxc/xg_save_restore.h	Wed Aug 22 22:20:42 2012 +0100
@@ -269,6 +269,9 @@
 /* When pinning page tables at the end of restore, we also use batching. */
 #define MAX_PIN_BATCH  1024
 
+/* Maximum #VCPUs currently supported for save/restore. */
+#define XC_SR_MAX_VCPUS 4096
+#define vcpumap_sz(max_id) (((max_id)/64+1)*sizeof(uint64_t))
 
 
 /*

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIi-0005ZL-K8; Fri, 24 Aug 2012 03:11:12 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0005Z9-M8
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Received: from [85.158.138.51:27585] by server-5.bemta-3.messagelabs.com id
	96/37-08865-EC0F6305; Fri, 24 Aug 2012 03:11:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-174.messagelabs.com!1345777869!19726328!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2573 invoked from network); 24 Aug 2012 03:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIe-0007Bd-Vd
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIe-0002fh-Lc
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:08 +0000
Message-Id: <E1T4kIe-0002fh-Lc@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86,
	cmdline: Fix setting skip_realmode boolean on no-real-mode and
	tboot options
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730524 -3600
# Node ID b7e66cabb70f9d9d94dba6a82ae3419d7b292f9e
# Parent  b02ac80ff6899e98b4089842843104fd8572a7cd
x86,cmdline: Fix setting skip_realmode boolean on no-real-mode and tboot options
...effect should be cumulative.

Signed-off-by: Keir Fraser <keir@xen.org>
---


diff -r b02ac80ff689 -r b7e66cabb70f xen/arch/x86/boot/cmdline.S
--- a/xen/arch/x86/boot/cmdline.S	Wed Aug 22 22:29:06 2012 +0100
+++ b/xen/arch/x86/boot/cmdline.S	Thu Aug 23 15:02:04 2012 +0100
@@ -164,13 +164,15 @@ cmdline_parse_early:
         pushl   MB_cmdline(%ebx)
         call    .Lfind_option
         test    %eax,%eax
-        setnz   sym_phys(skip_realmode)
+        setnz   %al
+        or      %al,sym_phys(skip_realmode)
 
         /* Check for 'tboot=' command-line option. */
         movl    $sym_phys(.Ltboot_opt),4(%esp)
         call    .Lfind_option
         test    %eax,%eax
-        setnz   sym_phys(skip_realmode) /* tboot= implies no-real-mode */
+        setnz   %al
+        or      %al,sym_phys(skip_realmode) /* tboot= implies no-real-mode */
 
 .Lparse_edd:
         /* Check for 'edd=' command-line option. */

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIi-0005ZL-K8; Fri, 24 Aug 2012 03:11:12 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0005Z9-M8
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Received: from [85.158.138.51:27585] by server-5.bemta-3.messagelabs.com id
	96/37-08865-EC0F6305; Fri, 24 Aug 2012 03:11:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-174.messagelabs.com!1345777869!19726328!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2573 invoked from network); 24 Aug 2012 03:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIe-0007Bd-Vd
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIe-0002fh-Lc
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:08 +0000
Message-Id: <E1T4kIe-0002fh-Lc@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86,
	cmdline: Fix setting skip_realmode boolean on no-real-mode and
	tboot options
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730524 -3600
# Node ID b7e66cabb70f9d9d94dba6a82ae3419d7b292f9e
# Parent  b02ac80ff6899e98b4089842843104fd8572a7cd
x86,cmdline: Fix setting skip_realmode boolean on no-real-mode and tboot options
...effect should be cumulative.

Signed-off-by: Keir Fraser <keir@xen.org>
---


diff -r b02ac80ff689 -r b7e66cabb70f xen/arch/x86/boot/cmdline.S
--- a/xen/arch/x86/boot/cmdline.S	Wed Aug 22 22:29:06 2012 +0100
+++ b/xen/arch/x86/boot/cmdline.S	Thu Aug 23 15:02:04 2012 +0100
@@ -164,13 +164,15 @@ cmdline_parse_early:
         pushl   MB_cmdline(%ebx)
         call    .Lfind_option
         test    %eax,%eax
-        setnz   sym_phys(skip_realmode)
+        setnz   %al
+        or      %al,sym_phys(skip_realmode)
 
         /* Check for 'tboot=' command-line option. */
         movl    $sym_phys(.Ltboot_opt),4(%esp)
         call    .Lfind_option
         test    %eax,%eax
-        setnz   sym_phys(skip_realmode) /* tboot= implies no-real-mode */
+        setnz   %al
+        or      %al,sym_phys(skip_realmode) /* tboot= implies no-real-mode */
 
 .Lparse_edd:
         /* Check for 'edd=' command-line option. */

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIj-0005Zc-Mg; Fri, 24 Aug 2012 03:11:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIi-0005ZK-Pr
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:12 +0000
Received: from [85.158.143.99:28852] by server-1.bemta-4.messagelabs.com id
	79/BA-12504-0D0F6305; Fri, 24 Aug 2012 03:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-216.messagelabs.com!1345777870!26684525!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26416 invoked from network); 24 Aug 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIg-0007Bj-3f
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIf-0002gB-Oq
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:09 +0000
Message-Id: <E1T4kIf-0002gB-Oq@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Added tag 4.2.0-rc3 for changeset
	d44f290e81df
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730736 -3600
# Node ID d33db851e697321775290399ba7a9cf9ebab58f4
# Parent  d44f290e81df5f78f0e3545742e3c4ff5415b0a7
Added tag 4.2.0-rc3 for changeset d44f290e81df
---


diff -r d44f290e81df -r d33db851e697 .hgtags
--- a/.hgtags	Thu Aug 23 15:05:30 2012 +0100
+++ b/.hgtags	Thu Aug 23 15:05:36 2012 +0100
@@ -54,3 +54,4 @@ 7b6791dbfecdb2eba6acd2c8bf0ced17d06746b2
 6241fa0ad1a939d2eba11bdec929564276f56a9e 4.1.0-branched
 8e620dc570ce42564c1630de5798e23909ee809c 4.2.0-rc1
 f4c47bcc01e13cb2e3b4b71fd588d86278875442 4.2.0-rc2
+d44f290e81df5f78f0e3545742e3c4ff5415b0a7 4.2.0-rc3

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIj-0005Zc-Mg; Fri, 24 Aug 2012 03:11:13 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIi-0005ZK-Pr
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:12 +0000
Received: from [85.158.143.99:28852] by server-1.bemta-4.messagelabs.com id
	79/BA-12504-0D0F6305; Fri, 24 Aug 2012 03:11:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-216.messagelabs.com!1345777870!26684525!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26416 invoked from network); 24 Aug 2012 03:11:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIg-0007Bj-3f
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIf-0002gB-Oq
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:09 +0000
Message-Id: <E1T4kIf-0002gB-Oq@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Added tag 4.2.0-rc3 for changeset
	d44f290e81df
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730736 -3600
# Node ID d33db851e697321775290399ba7a9cf9ebab58f4
# Parent  d44f290e81df5f78f0e3545742e3c4ff5415b0a7
Added tag 4.2.0-rc3 for changeset d44f290e81df
---


diff -r d44f290e81df -r d33db851e697 .hgtags
--- a/.hgtags	Thu Aug 23 15:05:30 2012 +0100
+++ b/.hgtags	Thu Aug 23 15:05:36 2012 +0100
@@ -54,3 +54,4 @@ 7b6791dbfecdb2eba6acd2c8bf0ced17d06746b2
 6241fa0ad1a939d2eba11bdec929564276f56a9e 4.1.0-branched
 8e620dc570ce42564c1630de5798e23909ee809c 4.2.0-rc1
 f4c47bcc01e13cb2e3b4b71fd588d86278875442 4.2.0-rc2
+d44f290e81df5f78f0e3545742e3c4ff5415b0a7 4.2.0-rc3

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIk-0005Zx-PT; Fri, 24 Aug 2012 03:11:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIk-0005Zh-BY
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:14 +0000
Received: from [85.158.143.99:28870] by server-3.bemta-4.messagelabs.com id
	43/49-08232-1D0F6305; Fri, 24 Aug 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1345777871!22349958!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20452 invoked from network); 24 Aug 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0007Bn-1j
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIg-0002gf-QX
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:10 +0000
Message-Id: <E1T4kIg-0002gf-QX@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Update Xen version to 4.2.0-rc4-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730771 -3600
# Node ID c29ffdfae39b9e19ee8cd1e7b4ee22f1409ded28
# Parent  5c1f69f28a34f3ce9c198295dbefb0fa579ca57a
Update Xen version to 4.2.0-rc4-pre
---


diff -r 5c1f69f28a34 -r c29ffdfae39b xen/Makefile
--- a/xen/Makefile	Thu Aug 23 15:05:48 2012 +0100
+++ b/xen/Makefile	Thu Aug 23 15:06:11 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .0-rc3$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .0-rc4-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIk-0005Zx-PT; Fri, 24 Aug 2012 03:11:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIk-0005Zh-BY
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:14 +0000
Received: from [85.158.143.99:28870] by server-3.bemta-4.messagelabs.com id
	43/49-08232-1D0F6305; Fri, 24 Aug 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1345777871!22349958!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20452 invoked from network); 24 Aug 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0007Bn-1j
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIg-0002gf-QX
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:10 +0000
Message-Id: <E1T4kIg-0002gf-QX@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Update Xen version to 4.2.0-rc4-pre
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730771 -3600
# Node ID c29ffdfae39b9e19ee8cd1e7b4ee22f1409ded28
# Parent  5c1f69f28a34f3ce9c198295dbefb0fa579ca57a
Update Xen version to 4.2.0-rc4-pre
---


diff -r 5c1f69f28a34 -r c29ffdfae39b xen/Makefile
--- a/xen/Makefile	Thu Aug 23 15:05:48 2012 +0100
+++ b/xen/Makefile	Thu Aug 23 15:06:11 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .0-rc3$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .0-rc4-pre$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIl-0005aG-Sb; Fri, 24 Aug 2012 03:11:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIk-0005Zi-Fd
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:14 +0000
Received: from [85.158.143.35:20331] by server-2.bemta-4.messagelabs.com id
	D4/22-21239-1D0F6305; Fri, 24 Aug 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-21.messagelabs.com!1345777870!10373347!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27074 invoked from network); 24 Aug 2012 03:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIf-0007Bg-JY
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIf-0002fw-8R
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:09 +0000
Message-Id: <E1T4kIf-0002fw-8R@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Update Xen version to 4.2.0-rc3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730730 -3600
# Node ID d44f290e81df5f78f0e3545742e3c4ff5415b0a7
# Parent  b7e66cabb70f9d9d94dba6a82ae3419d7b292f9e
Update Xen version to 4.2.0-rc3
---


diff -r b7e66cabb70f -r d44f290e81df Config.mk
--- a/Config.mk	Thu Aug 23 15:02:04 2012 +0100
+++ b/Config.mk	Thu Aug 23 15:05:30 2012 +0100
@@ -214,7 +214,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= effd5676225761abdab90becac519716515c3be4
+QEMU_TAG ?= xen-4.2.0-rc3
 # Tue Aug 14 15:57:49 2012 +0100
 # Revert "qemu-xen-traditional: use O_DIRECT to open disk images for IDE"
 
diff -r b7e66cabb70f -r d44f290e81df xen/Makefile
--- a/xen/Makefile	Thu Aug 23 15:02:04 2012 +0100
+++ b/xen/Makefile	Thu Aug 23 15:05:30 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .0-rc3-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .0-rc3$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIl-0005aG-Sb; Fri, 24 Aug 2012 03:11:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIk-0005Zi-Fd
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:14 +0000
Received: from [85.158.143.35:20331] by server-2.bemta-4.messagelabs.com id
	D4/22-21239-1D0F6305; Fri, 24 Aug 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-21.messagelabs.com!1345777870!10373347!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27074 invoked from network); 24 Aug 2012 03:11:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIf-0007Bg-JY
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIf-0002fw-8R
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:09 +0000
Message-Id: <E1T4kIf-0002fw-8R@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Update Xen version to 4.2.0-rc3
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730730 -3600
# Node ID d44f290e81df5f78f0e3545742e3c4ff5415b0a7
# Parent  b7e66cabb70f9d9d94dba6a82ae3419d7b292f9e
Update Xen version to 4.2.0-rc3
---


diff -r b7e66cabb70f -r d44f290e81df Config.mk
--- a/Config.mk	Thu Aug 23 15:02:04 2012 +0100
+++ b/Config.mk	Thu Aug 23 15:05:30 2012 +0100
@@ -214,7 +214,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e
 # CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG ?= effd5676225761abdab90becac519716515c3be4
+QEMU_TAG ?= xen-4.2.0-rc3
 # Tue Aug 14 15:57:49 2012 +0100
 # Revert "qemu-xen-traditional: use O_DIRECT to open disk images for IDE"
 
diff -r b7e66cabb70f -r d44f290e81df xen/Makefile
--- a/xen/Makefile	Thu Aug 23 15:02:04 2012 +0100
+++ b/xen/Makefile	Thu Aug 23 15:05:30 2012 +0100
@@ -2,7 +2,7 @@
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 4
 export XEN_SUBVERSION    = 2
-export XEN_EXTRAVERSION ?= .0-rc3-pre$(XEN_VENDORVERSION)
+export XEN_EXTRAVERSION ?= .0-rc3$(XEN_VENDORVERSION)
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
 -include xen-version
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIn-0005ah-1h; Fri, 24 Aug 2012 03:11:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIm-0005aD-6B
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:16 +0000
Received: from [85.158.139.83:24067] by server-4.bemta-5.messagelabs.com id
	75/B7-12386-3D0F6305; Fri, 24 Aug 2012 03:11:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-182.messagelabs.com!1345777871!20372273!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.3 required=7.0 tests=ML_MARKETING,
  UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8962 invoked from network); 24 Aug 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIg-0007Bm-Vw
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIg-0002gQ-9o
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:10 +0000
Message-Id: <E1T4kIg-0002gQ-9o@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Added signature for changeset
	d44f290e81df
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730748 -3600
# Node ID 5c1f69f28a34f3ce9c198295dbefb0fa579ca57a
# Parent  d33db851e697321775290399ba7a9cf9ebab58f4
Added signature for changeset d44f290e81df
---


diff -r d33db851e697 -r 5c1f69f28a34 .hgsigs
--- a/.hgsigs	Thu Aug 23 15:05:36 2012 +0100
+++ b/.hgsigs	Thu Aug 23 15:05:48 2012 +0100
@@ -7,3 +7,4 @@ 7b6791dbfecdb2eba6acd2c8bf0ced17d06746b2
 6241fa0ad1a939d2eba11bdec929564276f56a9e 0 iQEcBAABAgAGBQJNcSJqAAoJEIP+FMlX6CvZbxEH/206722t0t46MfPq0/buPpQDNiB0HtFZY79u1Yc8xGTo23rQ2NTG10JdCurN2pyxwFesiSIZ4Ua3zqpZ0EA2EN6xAFY9Vua4WEPNJwK8pxxWABcHI017QTidQs41bEaUn92yyfmixq6iYCGvR+b46KWbip/i9Z6vZpw0g3JyOaxgAhkA+p4w90yUIKUkjTrtiuqnI31MUQE0urwWAXQUj78knrqEu3wb91+me1KLH9WzReBB7tt3/GmaK4qSdnHNpIkulVK0XJYzFkJzFr5eHVeYTGFb25Sgir2sIN2gxaCPI3/p90akFMJKmeNV5XCmOQ5g2GWUZTff8LGF6Fk0Me8=
 8e620dc570ce42564c1630de5798e23909ee809c 0 iQEcBAABAgAGBQJQFqUYAAoJEIP+FMlX6CvZDGEH/jxUFG29okRASHY6XwFrJ4AU7tLyC8Bt2vAH3ZaA/h1Tn2GWkQXf4tzBAvvwWNBrm1hdj73OaB7dD2l2kvL551AhoSd4/5z+pPtpC72ItwFFTr3Ep9GRZEvEHculuei5IUzw1lxZuNCPCScBxQl+KI+dZHIeP0YO46VZTtG+EeBlj0SJ7JojKN4REd382eIgSLvpEFHCM6vqeCWM9FtDyomiMXdSosDLcWdFauFmV7cdWybA5WPj6bkJenABwX0A1V9uf225S0DTdO0t/7ncZ8h+wXTzqiixywA+lqza+u+HzNyopWmwiFcseFZjuHbKx6M2v0EvKPBcyTgdRZF/+Kg=
 f4c47bcc01e13cb2e3b4b71fd588d86278875442 0 iQEcBAABAgAGBQJQIpupAAoJEIP+FMlX6CvZnBwH/3qlibrquTmD2p3rcdVi/JkWixaKK3KH4Ows/76sAJYCdx9YkmtkgC4zyz5aph4Rfy7dYnQIUhbwNNdZNBDd0XOVkjQm0ZX1wQjv3yA3Eq9NOUDmfFWldF+oosOG3h/+MLm/36CkB7gFku1ENQ8kagytXe4rN3QdOiJ9Rz84BAv6nJoT/1OX+m+MlBs948orC23aNEfWxrsrv2s92v5fJcAfSLW/AtER2JnASIxWECJ/TOkuHtrO2QPoBymSnifM2R624L+ySwRxSxo+Owfpooje5eekk0ekifvdYtaJ3pOfoOCv8yGEtb7mXv62WowVkasUZa/q+rGdVpHuK0UlBjI=
+d44f290e81df5f78f0e3545742e3c4ff5415b0a7 0 iQEcBAABAgAGBQJQNji7AAoJEIP+FMlX6CvZvBcIAJPiA6ydvolYCvZsfGgafqCpcpG3f+PbUOwQRWfUcaKHPWFKnwRkmx9MAP9tEjXFNZcbimktDrofmee6XfLb8NLnCcHWZT8trRXYTNw2lM6DpK+AROUpAcShF3gCHQEtCJC6+NArD75aUkUji3awbGlhplHbyWvgvSSULhga+2xfYszRC7eI/g+7/f4JNkvqeWllAtd9fwftXaGhQi2V4LT5IimpJI7PivlDi0wi+BtqXHcmZhlnw3zpR51NRujsMVTNZMqe733kGdt8Y8j3vvsfXBye4+YAkEKFrzW3jTYlA9ws71oNVvWmwmOjOHpx6ASfquP3hhAoiHvb2c6Wims=

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:19 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIn-0005ah-1h; Fri, 24 Aug 2012 03:11:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIm-0005aD-6B
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:16 +0000
Received: from [85.158.139.83:24067] by server-4.bemta-5.messagelabs.com id
	75/B7-12386-3D0F6305; Fri, 24 Aug 2012 03:11:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-182.messagelabs.com!1345777871!20372273!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.3 required=7.0 tests=ML_MARKETING,
  UPPERCASE_25_50
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8962 invoked from network); 24 Aug 2012 03:11:12 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:12 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIg-0007Bm-Vw
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIg-0002gQ-9o
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:10 +0000
Message-Id: <E1T4kIg-0002gQ-9o@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] Added signature for changeset
	d44f290e81df
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1345730748 -3600
# Node ID 5c1f69f28a34f3ce9c198295dbefb0fa579ca57a
# Parent  d33db851e697321775290399ba7a9cf9ebab58f4
Added signature for changeset d44f290e81df
---


diff -r d33db851e697 -r 5c1f69f28a34 .hgsigs
--- a/.hgsigs	Thu Aug 23 15:05:36 2012 +0100
+++ b/.hgsigs	Thu Aug 23 15:05:48 2012 +0100
@@ -7,3 +7,4 @@ 7b6791dbfecdb2eba6acd2c8bf0ced17d06746b2
 6241fa0ad1a939d2eba11bdec929564276f56a9e 0 iQEcBAABAgAGBQJNcSJqAAoJEIP+FMlX6CvZbxEH/206722t0t46MfPq0/buPpQDNiB0HtFZY79u1Yc8xGTo23rQ2NTG10JdCurN2pyxwFesiSIZ4Ua3zqpZ0EA2EN6xAFY9Vua4WEPNJwK8pxxWABcHI017QTidQs41bEaUn92yyfmixq6iYCGvR+b46KWbip/i9Z6vZpw0g3JyOaxgAhkA+p4w90yUIKUkjTrtiuqnI31MUQE0urwWAXQUj78knrqEu3wb91+me1KLH9WzReBB7tt3/GmaK4qSdnHNpIkulVK0XJYzFkJzFr5eHVeYTGFb25Sgir2sIN2gxaCPI3/p90akFMJKmeNV5XCmOQ5g2GWUZTff8LGF6Fk0Me8=
 8e620dc570ce42564c1630de5798e23909ee809c 0 iQEcBAABAgAGBQJQFqUYAAoJEIP+FMlX6CvZDGEH/jxUFG29okRASHY6XwFrJ4AU7tLyC8Bt2vAH3ZaA/h1Tn2GWkQXf4tzBAvvwWNBrm1hdj73OaB7dD2l2kvL551AhoSd4/5z+pPtpC72ItwFFTr3Ep9GRZEvEHculuei5IUzw1lxZuNCPCScBxQl+KI+dZHIeP0YO46VZTtG+EeBlj0SJ7JojKN4REd382eIgSLvpEFHCM6vqeCWM9FtDyomiMXdSosDLcWdFauFmV7cdWybA5WPj6bkJenABwX0A1V9uf225S0DTdO0t/7ncZ8h+wXTzqiixywA+lqza+u+HzNyopWmwiFcseFZjuHbKx6M2v0EvKPBcyTgdRZF/+Kg=
 f4c47bcc01e13cb2e3b4b71fd588d86278875442 0 iQEcBAABAgAGBQJQIpupAAoJEIP+FMlX6CvZnBwH/3qlibrquTmD2p3rcdVi/JkWixaKK3KH4Ows/76sAJYCdx9YkmtkgC4zyz5aph4Rfy7dYnQIUhbwNNdZNBDd0XOVkjQm0ZX1wQjv3yA3Eq9NOUDmfFWldF+oosOG3h/+MLm/36CkB7gFku1ENQ8kagytXe4rN3QdOiJ9Rz84BAv6nJoT/1OX+m+MlBs948orC23aNEfWxrsrv2s92v5fJcAfSLW/AtER2JnASIxWECJ/TOkuHtrO2QPoBymSnifM2R624L+ySwRxSxo+Owfpooje5eekk0ekifvdYtaJ3pOfoOCv8yGEtb7mXv62WowVkasUZa/q+rGdVpHuK0UlBjI=
+d44f290e81df5f78f0e3545742e3c4ff5415b0a7 0 iQEcBAABAgAGBQJQNji7AAoJEIP+FMlX6CvZvBcIAJPiA6ydvolYCvZsfGgafqCpcpG3f+PbUOwQRWfUcaKHPWFKnwRkmx9MAP9tEjXFNZcbimktDrofmee6XfLb8NLnCcHWZT8trRXYTNw2lM6DpK+AROUpAcShF3gCHQEtCJC6+NArD75aUkUji3awbGlhplHbyWvgvSSULhga+2xfYszRC7eI/g+7/f4JNkvqeWllAtd9fwftXaGhQi2V4LT5IimpJI7PivlDi0wi+BtqXHcmZhlnw3zpR51NRujsMVTNZMqe733kGdt8Y8j3vvsfXBye4+YAkEKFrzW3jTYlA9ws71oNVvWmwmOjOHpx6ASfquP3hhAoiHvb2c6Wims=

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIl-0005aL-Uo; Fri, 24 Aug 2012 03:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIk-0005Zl-Qa
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:15 +0000
Received: from [85.158.138.51:27701] by server-1.bemta-3.messagelabs.com id
	94/85-09327-1D0F6305; Fri, 24 Aug 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-174.messagelabs.com!1345777872!8845191!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25460 invoked from network); 24 Aug 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0007Bv-W8
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0002hC-Uz
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Message-Id: <E1T4kIh-0002hC-Uz@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl: make "xl list -l" proper JSON
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1345745548 -3600
# Node ID 4ca40e0559c33205fb5163b10249a0fd5fda39b9
# Parent  53e35329b07f90d07eb3e96d3ed24db46ece2d28
xl: make "xl list -l" proper JSON

Bastian Blank reports that the output of this command is just multiple
JSON objects concatenated and is not a single properly formed JSON
object.

Fix this by wrapping in an array. This turned out to be a bit more
intrusive than I was expecting due to the requirement to keep
supporting the SXP output mode.

Python's json module is happy to parse the result...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 53e35329b07f -r 4ca40e0559c3 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Thu Aug 23 19:00:09 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Thu Aug 23 19:12:28 2012 +0100
@@ -319,23 +319,10 @@ static void dolog(const char *file, int 
     free(s);
 }
 
-static void printf_info(enum output_format output_format,
-                        int domid,
-                        libxl_domain_config *d_config)
-{
-    if (output_format == OUTPUT_FORMAT_SXP)
-        return printf_info_sexp(domid, d_config);
-
-    const char *buf;
-    libxl_yajl_length len = 0;
+static yajl_gen_status printf_info_one_json(yajl_gen hand, int domid,
+                                            libxl_domain_config *d_config)
+{
     yajl_gen_status s;
-    yajl_gen hand;
-
-    hand = libxl_yajl_gen_alloc(NULL);
-    if (!hand) {
-        fprintf(stderr, "unable to allocate JSON generator\n");
-        return;
-    }
 
     s = yajl_gen_map_open(hand);
     if (s != yajl_gen_status_ok)
@@ -364,6 +351,31 @@ static void printf_info(enum output_form
     if (s != yajl_gen_status_ok)
         goto out;
 
+out:
+    return s;
+}
+static void printf_info(enum output_format output_format,
+                        int domid,
+                        libxl_domain_config *d_config)
+{
+    if (output_format == OUTPUT_FORMAT_SXP)
+        return printf_info_sexp(domid, d_config);
+
+    const char *buf;
+    libxl_yajl_length len = 0;
+    yajl_gen_status s;
+    yajl_gen hand;
+
+    hand = libxl_yajl_gen_alloc(NULL);
+    if (!hand) {
+        fprintf(stderr, "unable to allocate JSON generator\n");
+        return;
+    }
+
+    s = printf_info_one_json(hand, domid, d_config);
+    if (s != yajl_gen_status_ok)
+        goto out;
+
     s = yajl_gen_get_buf(hand, (const unsigned char **)&buf, &len);
     if (s != yajl_gen_status_ok)
         goto out;
@@ -2674,6 +2686,24 @@ static void list_domains_details(const l
     uint8_t *data;
     int i, len, rc;
 
+    yajl_gen hand;
+    yajl_gen_status s;
+    const char *buf;
+    libxl_yajl_length yajl_len = 0;
+
+    if (default_output_format == OUTPUT_FORMAT_JSON) {
+        hand = libxl_yajl_gen_alloc(NULL);
+        if (!hand) {
+            fprintf(stderr, "unable to allocate JSON generator\n");
+            return;
+        }
+
+        s = yajl_gen_array_open(hand);
+        if (s != yajl_gen_status_ok)
+            goto out;
+    } else
+        s = yajl_gen_status_ok;
+
     for (i = 0; i < nb_domain; i++) {
         /* no detailed info available on dom0 */
         if (info[i].domid == 0)
@@ -2684,10 +2714,35 @@ static void list_domains_details(const l
         CHK_ERRNO(asprintf(&config_source, "<domid %d data>", info[i].domid));
         libxl_domain_config_init(&d_config);
         parse_config_data(config_source, (char *)data, len, &d_config, NULL);
-        printf_info(default_output_format, info[i].domid, &d_config);
+        if (default_output_format == OUTPUT_FORMAT_SXP)
+            printf_info_sexp(domid, &d_config);
+        else
+            s = printf_info_one_json(hand, info[i].domid, &d_config);
         libxl_domain_config_dispose(&d_config);
         free(data);
         free(config_source);
+        if (s != yajl_gen_status_ok)
+            goto out;
+    }
+
+    if (default_output_format == OUTPUT_FORMAT_JSON) {
+        s = yajl_gen_array_close(hand);
+        if (s != yajl_gen_status_ok)
+            goto out;
+
+        s = yajl_gen_get_buf(hand, (const unsigned char **)&buf, &yajl_len);
+        if (s != yajl_gen_status_ok)
+            goto out;
+
+        puts(buf);
+    }
+
+out:
+    if (default_output_format == OUTPUT_FORMAT_JSON) {
+        yajl_gen_free(hand);
+        if (s != yajl_gen_status_ok)
+            fprintf(stderr,
+                    "unable to format domain config as JSON (YAJL:%d)\n", s);
     }
 }
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIl-0005aL-Uo; Fri, 24 Aug 2012 03:11:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIk-0005Zl-Qa
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:15 +0000
Received: from [85.158.138.51:27701] by server-1.bemta-3.messagelabs.com id
	94/85-09327-1D0F6305; Fri, 24 Aug 2012 03:11:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-174.messagelabs.com!1345777872!8845191!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25460 invoked from network); 24 Aug 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0007Bv-W8
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0002hC-Uz
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Message-Id: <E1T4kIh-0002hC-Uz@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:11 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] xl: make "xl list -l" proper JSON
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1345745548 -3600
# Node ID 4ca40e0559c33205fb5163b10249a0fd5fda39b9
# Parent  53e35329b07f90d07eb3e96d3ed24db46ece2d28
xl: make "xl list -l" proper JSON

Bastian Blank reports that the output of this command is just multiple
JSON objects concatenated and is not a single properly formed JSON
object.

Fix this by wrapping in an array. This turned out to be a bit more
intrusive than I was expecting due to the requirement to keep
supporting the SXP output mode.

Python's json module is happy to parse the result...

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 53e35329b07f -r 4ca40e0559c3 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Thu Aug 23 19:00:09 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Thu Aug 23 19:12:28 2012 +0100
@@ -319,23 +319,10 @@ static void dolog(const char *file, int 
     free(s);
 }
 
-static void printf_info(enum output_format output_format,
-                        int domid,
-                        libxl_domain_config *d_config)
-{
-    if (output_format == OUTPUT_FORMAT_SXP)
-        return printf_info_sexp(domid, d_config);
-
-    const char *buf;
-    libxl_yajl_length len = 0;
+static yajl_gen_status printf_info_one_json(yajl_gen hand, int domid,
+                                            libxl_domain_config *d_config)
+{
     yajl_gen_status s;
-    yajl_gen hand;
-
-    hand = libxl_yajl_gen_alloc(NULL);
-    if (!hand) {
-        fprintf(stderr, "unable to allocate JSON generator\n");
-        return;
-    }
 
     s = yajl_gen_map_open(hand);
     if (s != yajl_gen_status_ok)
@@ -364,6 +351,31 @@ static void printf_info(enum output_form
     if (s != yajl_gen_status_ok)
         goto out;
 
+out:
+    return s;
+}
+static void printf_info(enum output_format output_format,
+                        int domid,
+                        libxl_domain_config *d_config)
+{
+    if (output_format == OUTPUT_FORMAT_SXP)
+        return printf_info_sexp(domid, d_config);
+
+    const char *buf;
+    libxl_yajl_length len = 0;
+    yajl_gen_status s;
+    yajl_gen hand;
+
+    hand = libxl_yajl_gen_alloc(NULL);
+    if (!hand) {
+        fprintf(stderr, "unable to allocate JSON generator\n");
+        return;
+    }
+
+    s = printf_info_one_json(hand, domid, d_config);
+    if (s != yajl_gen_status_ok)
+        goto out;
+
     s = yajl_gen_get_buf(hand, (const unsigned char **)&buf, &len);
     if (s != yajl_gen_status_ok)
         goto out;
@@ -2674,6 +2686,24 @@ static void list_domains_details(const l
     uint8_t *data;
     int i, len, rc;
 
+    yajl_gen hand;
+    yajl_gen_status s;
+    const char *buf;
+    libxl_yajl_length yajl_len = 0;
+
+    if (default_output_format == OUTPUT_FORMAT_JSON) {
+        hand = libxl_yajl_gen_alloc(NULL);
+        if (!hand) {
+            fprintf(stderr, "unable to allocate JSON generator\n");
+            return;
+        }
+
+        s = yajl_gen_array_open(hand);
+        if (s != yajl_gen_status_ok)
+            goto out;
+    } else
+        s = yajl_gen_status_ok;
+
     for (i = 0; i < nb_domain; i++) {
         /* no detailed info available on dom0 */
         if (info[i].domid == 0)
@@ -2684,10 +2714,35 @@ static void list_domains_details(const l
         CHK_ERRNO(asprintf(&config_source, "<domid %d data>", info[i].domid));
         libxl_domain_config_init(&d_config);
         parse_config_data(config_source, (char *)data, len, &d_config, NULL);
-        printf_info(default_output_format, info[i].domid, &d_config);
+        if (default_output_format == OUTPUT_FORMAT_SXP)
+            printf_info_sexp(domid, &d_config);
+        else
+            s = printf_info_one_json(hand, info[i].domid, &d_config);
         libxl_domain_config_dispose(&d_config);
         free(data);
         free(config_source);
+        if (s != yajl_gen_status_ok)
+            goto out;
+    }
+
+    if (default_output_format == OUTPUT_FORMAT_JSON) {
+        s = yajl_gen_array_close(hand);
+        if (s != yajl_gen_status_ok)
+            goto out;
+
+        s = yajl_gen_get_buf(hand, (const unsigned char **)&buf, &yajl_len);
+        if (s != yajl_gen_status_ok)
+            goto out;
+
+        puts(buf);
+    }
+
+out:
+    if (default_output_format == OUTPUT_FORMAT_JSON) {
+        yajl_gen_free(hand);
+        if (s != yajl_gen_status_ok)
+            fprintf(stderr,
+                    "unable to format domain config as JSON (YAJL:%d)\n", s);
     }
 }
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:28 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIw-0005dz-4d; Fri, 24 Aug 2012 03:11:26 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIu-0005c7-U3
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:25 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-27.messagelabs.com!1345777872!3510641!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2597 invoked from network); 24 Aug 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0007Bs-OF
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0002gx-Dg
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Message-Id: <E1T4kIh-0002gx-Dg@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: make domain resume API
	asynchronous
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1345744809 -3600
# Node ID 53e35329b07f90d07eb3e96d3ed24db46ece2d28
# Parent  c29ffdfae39b9e19ee8cd1e7b4ee22f1409ded28
libxl: make domain resume API asynchronous

Although the current implementation has no asynchromous parts I can
envisage it needing to do bits of create/destroy like functionality
which may need async support in the future.

To do this make the meat into an internal libxl__domain_resume
function in order to satisfy the no-internal-callers rule for the
async function.

Since I needed to touch the logging to s/ctx/CTX/ anyway switch to the
LOG* helper macros.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/libxl.c	Thu Aug 23 19:00:09 2012 +0100
@@ -396,15 +396,12 @@ int libxl_domain_rename(libxl_ctx *ctx, 
     return rc;
 }
 
-int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel)
+int libxl__domain_resume(libxl__gc *gc, uint32_t domid, int suspend_cancel)
 {
-    GC_INIT(ctx);
     int rc = 0;
 
-    if (xc_domain_resume(ctx->xch, domid, suspend_cancel)) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                        "xc_domain_resume failed for domain %u",
-                        domid);
+    if (xc_domain_resume(CTX->xch, domid, suspend_cancel)) {
+        LOGE(ERROR, "xc_domain_resume failed for domain %u", domid);
         rc = ERROR_FAIL;
         goto out;
     }
@@ -418,24 +415,29 @@ int libxl_domain_resume(libxl_ctx *ctx, 
     if (type == LIBXL_DOMAIN_TYPE_HVM) {
         rc = libxl__domain_resume_device_model(gc, domid);
         if (rc) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-                       "failed to resume device model for domain %u:%d",
-                       domid, rc);
+            LOG(ERROR, "failed to resume device model for domain %u:%d",
+                domid, rc);
             goto out;
         }
     }
 
-    if (!xs_resume_domain(ctx->xsh, domid)) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                        "xs_resume_domain failed for domain %u",
-                        domid);
+    if (!xs_resume_domain(CTX->xsh, domid)) {
+        LOGE(ERROR, "xs_resume_domain failed for domain %u", domid);
         rc = ERROR_FAIL;
     }
 out:
-    GC_FREE;
     return rc;
 }
 
+int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel,
+                        const libxl_asyncop_how *ao_how)
+{
+    AO_CREATE(ctx, domid, ao_how);
+    int rc = libxl__domain_resume(gc, domid, suspend_cancel);
+    libxl__ao_complete(egc, ao, rc);
+    return AO_INPROGRESS;
+}
+
 /*
  * Preserves a domain but rewrites xenstore etc to make it unique so
  * that the domain can be restarted.
diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/libxl.h	Thu Aug 23 19:00:09 2012 +0100
@@ -529,7 +529,9 @@ int libxl_domain_suspend(libxl_ctx *ctx,
  *   If this parameter is true, use co-operative resume. The guest
  *   must support this.
  */
-int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel);
+int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel,
+                        const libxl_asyncop_how *ao_how)
+                        LIBXL_EXTERNAL_CALLERS_ONLY;
 
 int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info,
                              uint32_t domid, int send_fd, int recv_fd,
diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Thu Aug 23 19:00:09 2012 +0100
@@ -1121,7 +1121,7 @@ static int libxl__remus_domain_resume_ca
     STATE_AO_GC(dss->ao);
 
     /* Resumes the domain and the device model */
-    if (libxl_domain_resume(CTX, dss->domid, /* Fast Suspend */1))
+    if (libxl__domain_resume(gc, dss->domid, /* Fast Suspend */1))
         return 0;
 
     /* REMUS TODO: Deal with disk. Start a new network output buffer */
diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Thu Aug 23 19:00:09 2012 +0100
@@ -899,6 +899,9 @@ _hidden int libxl__domain_resume_device_
 
 _hidden void libxl__userdata_destroyall(libxl__gc *gc, uint32_t domid);
 
+_hidden int libxl__domain_resume(libxl__gc *gc, uint32_t domid,
+                                 int suspend_cancel);
+
 /* returns 0 or 1, or a libxl error code */
 _hidden int libxl__domain_pvcontrol_available(libxl__gc *gc, uint32_t domid);
 
diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Thu Aug 23 19:00:09 2012 +0100
@@ -2854,7 +2854,7 @@ static int save_domain(const char *p, co
     close(fd);
 
     if (checkpoint)
-        libxl_domain_resume(ctx, domid, 1);
+        libxl_domain_resume(ctx, domid, 1, 0);
     else
         libxl_domain_destroy(ctx, domid, 0);
 
@@ -3105,7 +3105,7 @@ static void migrate_domain(const char *d
         if (common_domname) {
             libxl_domain_rename(ctx, domid, away_domname, common_domname);
         }
-        rc = libxl_domain_resume(ctx, domid, 0);
+        rc = libxl_domain_resume(ctx, domid, 0, 0);
         if (!rc) fprintf(stderr, "migration sender: Resumed OK.\n");
 
         fprintf(stderr, "Migration failed due to problems at target.\n");
@@ -3127,7 +3127,7 @@ static void migrate_domain(const char *d
     close(send_fd);
     migration_child_report(recv_fd);
     fprintf(stderr, "Migration failed, resuming at sender.\n");
-    libxl_domain_resume(ctx, domid, 0);
+    libxl_domain_resume(ctx, domid, 0, 0);
     exit(-ERROR_FAIL);
 
  failed_badly:
@@ -6646,7 +6646,7 @@ int main_remus(int argc, char **argv)
         fprintf(stderr, "Failed to suspend domain at primary.\n");
     else {
         fprintf(stderr, "Remus: Backup failed? resuming domain at primary.\n");
-        libxl_domain_resume(ctx, domid, 1);
+        libxl_domain_resume(ctx, domid, 1, 0);
     }
 
     close(send_fd);

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

From xen-changelog-bounces@lists.xen.org Fri Aug 24 03:11:28 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 24 Aug 2012 03:11:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T4kIw-0005dz-4d; Fri, 24 Aug 2012 03:11:26 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIu-0005c7-U3
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:25 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-27.messagelabs.com!1345777872!3510641!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2597 invoked from network); 24 Aug 2012 03:11:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	24 Aug 2012 03:11:13 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0007Bs-OF
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T4kIh-0002gx-Dg
	for xen-changelog@lists.xensource.com; Fri, 24 Aug 2012 03:11:11 +0000
Message-Id: <E1T4kIh-0002gx-Dg@xenbits.xen.org>
Date: Fri, 24 Aug 2012 03:11:10 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: make domain resume API
	asynchronous
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1345744809 -3600
# Node ID 53e35329b07f90d07eb3e96d3ed24db46ece2d28
# Parent  c29ffdfae39b9e19ee8cd1e7b4ee22f1409ded28
libxl: make domain resume API asynchronous

Although the current implementation has no asynchromous parts I can
envisage it needing to do bits of create/destroy like functionality
which may need async support in the future.

To do this make the meat into an internal libxl__domain_resume
function in order to satisfy the no-internal-callers rule for the
async function.

Since I needed to touch the logging to s/ctx/CTX/ anyway switch to the
LOG* helper macros.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/libxl.c	Thu Aug 23 19:00:09 2012 +0100
@@ -396,15 +396,12 @@ int libxl_domain_rename(libxl_ctx *ctx, 
     return rc;
 }
 
-int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel)
+int libxl__domain_resume(libxl__gc *gc, uint32_t domid, int suspend_cancel)
 {
-    GC_INIT(ctx);
     int rc = 0;
 
-    if (xc_domain_resume(ctx->xch, domid, suspend_cancel)) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                        "xc_domain_resume failed for domain %u",
-                        domid);
+    if (xc_domain_resume(CTX->xch, domid, suspend_cancel)) {
+        LOGE(ERROR, "xc_domain_resume failed for domain %u", domid);
         rc = ERROR_FAIL;
         goto out;
     }
@@ -418,24 +415,29 @@ int libxl_domain_resume(libxl_ctx *ctx, 
     if (type == LIBXL_DOMAIN_TYPE_HVM) {
         rc = libxl__domain_resume_device_model(gc, domid);
         if (rc) {
-            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
-                       "failed to resume device model for domain %u:%d",
-                       domid, rc);
+            LOG(ERROR, "failed to resume device model for domain %u:%d",
+                domid, rc);
             goto out;
         }
     }
 
-    if (!xs_resume_domain(ctx->xsh, domid)) {
-        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
-                        "xs_resume_domain failed for domain %u",
-                        domid);
+    if (!xs_resume_domain(CTX->xsh, domid)) {
+        LOGE(ERROR, "xs_resume_domain failed for domain %u", domid);
         rc = ERROR_FAIL;
     }
 out:
-    GC_FREE;
     return rc;
 }
 
+int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel,
+                        const libxl_asyncop_how *ao_how)
+{
+    AO_CREATE(ctx, domid, ao_how);
+    int rc = libxl__domain_resume(gc, domid, suspend_cancel);
+    libxl__ao_complete(egc, ao, rc);
+    return AO_INPROGRESS;
+}
+
 /*
  * Preserves a domain but rewrites xenstore etc to make it unique so
  * that the domain can be restarted.
diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/libxl.h
--- a/tools/libxl/libxl.h	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/libxl.h	Thu Aug 23 19:00:09 2012 +0100
@@ -529,7 +529,9 @@ int libxl_domain_suspend(libxl_ctx *ctx,
  *   If this parameter is true, use co-operative resume. The guest
  *   must support this.
  */
-int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel);
+int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid, int suspend_cancel,
+                        const libxl_asyncop_how *ao_how)
+                        LIBXL_EXTERNAL_CALLERS_ONLY;
 
 int libxl_domain_remus_start(libxl_ctx *ctx, libxl_domain_remus_info *info,
                              uint32_t domid, int send_fd, int recv_fd,
diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/libxl_dom.c	Thu Aug 23 19:00:09 2012 +0100
@@ -1121,7 +1121,7 @@ static int libxl__remus_domain_resume_ca
     STATE_AO_GC(dss->ao);
 
     /* Resumes the domain and the device model */
-    if (libxl_domain_resume(CTX, dss->domid, /* Fast Suspend */1))
+    if (libxl__domain_resume(gc, dss->domid, /* Fast Suspend */1))
         return 0;
 
     /* REMUS TODO: Deal with disk. Start a new network output buffer */
diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/libxl_internal.h	Thu Aug 23 19:00:09 2012 +0100
@@ -899,6 +899,9 @@ _hidden int libxl__domain_resume_device_
 
 _hidden void libxl__userdata_destroyall(libxl__gc *gc, uint32_t domid);
 
+_hidden int libxl__domain_resume(libxl__gc *gc, uint32_t domid,
+                                 int suspend_cancel);
+
 /* returns 0 or 1, or a libxl error code */
 _hidden int libxl__domain_pvcontrol_available(libxl__gc *gc, uint32_t domid);
 
diff -r c29ffdfae39b -r 53e35329b07f tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Thu Aug 23 15:06:11 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Thu Aug 23 19:00:09 2012 +0100
@@ -2854,7 +2854,7 @@ static int save_domain(const char *p, co
     close(fd);
 
     if (checkpoint)
-        libxl_domain_resume(ctx, domid, 1);
+        libxl_domain_resume(ctx, domid, 1, 0);
     else
         libxl_domain_destroy(ctx, domid, 0);
 
@@ -3105,7 +3105,7 @@ static void migrate_domain(const char *d
         if (common_domname) {
             libxl_domain_rename(ctx, domid, away_domname, common_domname);
         }
-        rc = libxl_domain_resume(ctx, domid, 0);
+        rc = libxl_domain_resume(ctx, domid, 0, 0);
         if (!rc) fprintf(stderr, "migration sender: Resumed OK.\n");
 
         fprintf(stderr, "Migration failed due to problems at target.\n");
@@ -3127,7 +3127,7 @@ static void migrate_domain(const char *d
     close(send_fd);
     migration_child_report(recv_fd);
     fprintf(stderr, "Migration failed, resuming at sender.\n");
-    libxl_domain_resume(ctx, domid, 0);
+    libxl_domain_resume(ctx, domid, 0, 0);
     exit(-ERROR_FAIL);
 
  failed_badly:
@@ -6646,7 +6646,7 @@ int main_remus(int argc, char **argv)
         fprintf(stderr, "Failed to suspend domain at primary.\n");
     else {
         fprintf(stderr, "Remus: Backup failed? resuming domain at primary.\n");
-        libxl_domain_resume(ctx, domid, 1);
+        libxl_domain_resume(ctx, domid, 1, 0);
     }
 
     close(send_fd);

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56MA-0005jq-3O; Sat, 25 Aug 2012 02:44:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M8-0005jH-Je
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:12 +0000
Received: from [85.158.143.99:34095] by server-2.bemta-4.messagelabs.com id
	72/0A-21239-BFB38305; Sat, 25 Aug 2012 02:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-216.messagelabs.com!1345862649!27521022!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11058 invoked from network); 25 Aug 2012 02:44:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M4-0007hC-RK
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M4-0002uq-K0
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:08 +0000
Message-Id: <E1T56M4-0002uq-K0@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nested vmx: Don't set bit 55 in
	IA32_VMX_BASIC_MSR
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Zhang Xiantao <xiantao.zhang@intel.com>
# Date 1345798187 -3600
# Node ID 985e836dff8b7081b63cf89329e17a3418c04e81
# Parent  42f959fec02d56bbff6a7fb95484ed8baabfa64f
nested vmx: Don't set bit 55 in IA32_VMX_BASIC_MSR

All related IA32_VMX_TRUE_*_MSR are not implemented,
so set this bit to 0, otherwise system L1VMM may
get incorrect default1 class settings.

Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 42f959fec02d -r 985e836dff8b xen/arch/x86/hvm/vmx/vvmx.c
--- a/xen/arch/x86/hvm/vmx/vvmx.c	Fri Aug 24 09:49:14 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vvmx.c	Fri Aug 24 09:49:47 2012 +0100
@@ -1290,7 +1290,7 @@ int nvmx_msr_read_intercept(unsigned int
     switch (msr) {
     case MSR_IA32_VMX_BASIC:
         data = VVMCS_REVISION | ((u64)PAGE_SIZE) << 32 | 
-               ((u64)MTRR_TYPE_WRBACK) << 50 | (1ULL << 55);
+               ((u64)MTRR_TYPE_WRBACK) << 50;
         break;
     case MSR_IA32_VMX_PINBASED_CTLS:
         /* 1-seetings */

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56MA-0005jq-3O; Sat, 25 Aug 2012 02:44:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M8-0005jH-Je
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:12 +0000
Received: from [85.158.143.99:34095] by server-2.bemta-4.messagelabs.com id
	72/0A-21239-BFB38305; Sat, 25 Aug 2012 02:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-5.tower-216.messagelabs.com!1345862649!27521022!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11058 invoked from network); 25 Aug 2012 02:44:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M4-0007hC-RK
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M4-0002uq-K0
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:08 +0000
Message-Id: <E1T56M4-0002uq-K0@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nested vmx: Don't set bit 55 in
	IA32_VMX_BASIC_MSR
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Zhang Xiantao <xiantao.zhang@intel.com>
# Date 1345798187 -3600
# Node ID 985e836dff8b7081b63cf89329e17a3418c04e81
# Parent  42f959fec02d56bbff6a7fb95484ed8baabfa64f
nested vmx: Don't set bit 55 in IA32_VMX_BASIC_MSR

All related IA32_VMX_TRUE_*_MSR are not implemented,
so set this bit to 0, otherwise system L1VMM may
get incorrect default1 class settings.

Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 42f959fec02d -r 985e836dff8b xen/arch/x86/hvm/vmx/vvmx.c
--- a/xen/arch/x86/hvm/vmx/vvmx.c	Fri Aug 24 09:49:14 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vvmx.c	Fri Aug 24 09:49:47 2012 +0100
@@ -1290,7 +1290,7 @@ int nvmx_msr_read_intercept(unsigned int
     switch (msr) {
     case MSR_IA32_VMX_BASIC:
         data = VVMCS_REVISION | ((u64)PAGE_SIZE) << 32 | 
-               ((u64)MTRR_TYPE_WRBACK) << 50 | (1ULL << 55);
+               ((u64)MTRR_TYPE_WRBACK) << 50;
         break;
     case MSR_IA32_VMX_PINBASED_CTLS:
         /* 1-seetings */

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56M8-0005jZ-U8; Sat, 25 Aug 2012 02:44:12 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M8-0005jF-3a
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:12 +0000
Received: from [85.158.138.51:33057] by server-2.bemta-3.messagelabs.com id
	86/EF-09157-BFB38305; Sat, 25 Aug 2012 02:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1345862649!27855016!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19266 invoked from network); 25 Aug 2012 02:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M5-0007hF-A1
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M5-0002v5-4W
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:09 +0000
Message-Id: <E1T56M5-0002v5-4W@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: provide "make realclean"
	target
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1345808294 -3600
# Node ID 24dbd9d4f340c941cd13273024c562e8921fe961
# Parent  985e836dff8b7081b63cf89329e17a3418c04e81
libxl: provide "make realclean" target

This removes all the autogenerated files.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 985e836dff8b -r 24dbd9d4f340 tools/libxl/Makefile
--- a/tools/libxl/Makefile	Fri Aug 24 09:49:47 2012 +0100
+++ b/tools/libxl/Makefile	Fri Aug 24 12:38:14 2012 +0100
@@ -212,8 +212,10 @@ clean:
 	$(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS)
 	$(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
 	$(RM) -f testidl.c.new testidl.c
-#	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
 
 distclean: clean
 
+realclean: distclean
+	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
+
 -include $(DEPS)

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56M8-0005jZ-U8; Sat, 25 Aug 2012 02:44:12 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M8-0005jF-3a
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:12 +0000
Received: from [85.158.138.51:33057] by server-2.bemta-3.messagelabs.com id
	86/EF-09157-BFB38305; Sat, 25 Aug 2012 02:44:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-174.messagelabs.com!1345862649!27855016!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19266 invoked from network); 25 Aug 2012 02:44:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M5-0007hF-A1
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M5-0002v5-4W
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:09 +0000
Message-Id: <E1T56M5-0002v5-4W@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: provide "make realclean"
	target
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1345808294 -3600
# Node ID 24dbd9d4f340c941cd13273024c562e8921fe961
# Parent  985e836dff8b7081b63cf89329e17a3418c04e81
libxl: provide "make realclean" target

This removes all the autogenerated files.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 985e836dff8b -r 24dbd9d4f340 tools/libxl/Makefile
--- a/tools/libxl/Makefile	Fri Aug 24 09:49:47 2012 +0100
+++ b/tools/libxl/Makefile	Fri Aug 24 12:38:14 2012 +0100
@@ -212,8 +212,10 @@ clean:
 	$(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS)
 	$(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
 	$(RM) -f testidl.c.new testidl.c
-#	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
 
 distclean: clean
 
+realclean: distclean
+	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
+
 -include $(DEPS)

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56M9-0005je-0Y; Sat, 25 Aug 2012 02:44:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M8-0005jE-7x
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:12 +0000
Received: from [85.158.139.83:48828] by server-7.bemta-5.messagelabs.com id
	A7/91-32634-AFB38305; Sat, 25 Aug 2012 02:44:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-182.messagelabs.com!1345862648!23797074!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26139 invoked from network); 25 Aug 2012 02:44:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M4-0007h9-5M
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M3-0002ub-Vm
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:08 +0000
Message-Id: <E1T56M3-0002ub-Vm@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nested vmx: VM_ENTRY_IA32E_MODE
	shouldn't be in default1 class
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Zhang Xiantao <xiantao.zhang@intel.com>
# Date 1345798154 -3600
# Node ID 42f959fec02d56bbff6a7fb95484ed8baabfa64f
# Parent  4ca40e0559c33205fb5163b10249a0fd5fda39b9
nested vmx: VM_ENTRY_IA32E_MODE shouldn't be in default1 class
for IA32_VM_ENTRY_CTLS_MSR.

If set to 1, L2 guest's paging mode maybe mis-judged
and mis-set.

Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 4ca40e0559c3 -r 42f959fec02d xen/arch/x86/hvm/vmx/vvmx.c
--- a/xen/arch/x86/hvm/vmx/vvmx.c	Thu Aug 23 19:12:28 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vvmx.c	Fri Aug 24 09:49:14 2012 +0100
@@ -1334,7 +1334,6 @@ int nvmx_msr_read_intercept(unsigned int
     case MSR_IA32_VMX_ENTRY_CTLS:
         /* bit 0-8, and 12 must be 1 (refer G5 of SDM) */
         data = 0x11ff;
-        data |= VM_ENTRY_IA32E_MODE;
         data = (data << 32) | data;
         break;
 

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56MB-0005k1-6E; Sat, 25 Aug 2012 02:44:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M9-0005jU-73
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:13 +0000
Received: from [85.158.138.51:28068] by server-9.bemta-3.messagelabs.com id
	E3/69-23952-CFB38305; Sat, 25 Aug 2012 02:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1345862650!21338436!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30052 invoked from network); 25 Aug 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M6-0007hI-1L
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M5-0002vK-MO
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:09 +0000
Message-Id: <E1T56M5-0002vK-MO@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: Rerun flex
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1345808296 -3600
# Node ID d4f854c3e7321121ed9a39a6ca6f70b420736091
# Parent  24dbd9d4f340c941cd13273024c562e8921fe961
libxl: Rerun flex

This undoes some systematic changes which were made to
libxlu_cfg_l.[ch] along with manually-edited files (eg, whitespace
changes, emacs local variables) and returns these two files to exactly
the output of flex (Debian squeeze 2.5.35-10 i386).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 24dbd9d4f340 -r d4f854c3e732 tools/libxl/libxlu_cfg_l.c
--- a/tools/libxl/libxlu_cfg_l.c	Fri Aug 24 12:38:14 2012 +0100
+++ b/tools/libxl/libxlu_cfg_l.c	Fri Aug 24 12:38:16 2012 +0100
@@ -34,7 +34,7 @@
 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types. 
  */
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS 1
@@ -51,7 +51,7 @@ typedef uint32_t flex_uint32_t;
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 
@@ -185,7 +185,7 @@ typedef struct yy_buffer_state *YY_BUFFE
 
     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
      *       access to the local variable yy_act. Since yyless() is a macro, it would break
-     *       existing scanners that call yyless() from OUTSIDE xlu__cfg_yylex.
+     *       existing scanners that call yyless() from OUTSIDE xlu__cfg_yylex. 
      *       One obvious solution it to make yy_act a global. I tried that, and saw
      *       a 5% performance hit in a non-yylineno scanner, because yy_act is
      *       normally declared as a register variable-- so it is not worth it.
@@ -197,7 +197,7 @@ typedef struct yy_buffer_state *YY_BUFFE
                     if ( yytext[yyl] == '\n' )\
                         --yylineno;\
             }while(0)
-
+    
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
 	do \
@@ -259,7 +259,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-
+    
 	/* Whether to try to fill the input buffer when we reach the
 	 * end of it.
 	 */
@@ -574,9 +574,9 @@ static int yy_init_globals (yyscan_t yys
     /* This must go here because YYSTYPE and YYLTYPE are included
      * from bison output in section 1.*/
     #    define yylval yyg->yylval_r
-
+    
     #    define yylloc yyg->yylloc_r
-
+    
 int xlu__cfg_yylex_init (yyscan_t* scanner);
 
 int xlu__cfg_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -615,9 +615,9 @@ YYSTYPE * xlu__cfg_yyget_lval (yyscan_t 
 void xlu__cfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
 
        YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner );
-
+    
         void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+    
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
  */
@@ -845,7 +845,7 @@ yy_find_action:
 			int yyl;
 			for ( yyl = yyg->yy_more_len; yyl < yyleng; ++yyl )
 				if ( yytext[yyl] == '\n' )
-
+					   
     do{ yylineno++;
         yycolumn=0;
     }while(0)
@@ -1377,7 +1377,7 @@ static int yy_get_next_buffer (yyscan_t 
 	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
 
 	if ( c == '\n' )
-
+		   
     do{ yylineno++;
         yycolumn=0;
     }while(0)
@@ -1460,7 +1460,7 @@ static void xlu__cfg_yy_load_buffer_stat
     YY_BUFFER_STATE xlu__cfg_yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
 {
 	YY_BUFFER_STATE b;
-
+    
 	b = (YY_BUFFER_STATE) xlu__cfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
 	if ( ! b )
 		YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_create_buffer()" );
@@ -1504,7 +1504,7 @@ static void xlu__cfg_yy_load_buffer_stat
 #ifndef __cplusplus
 extern int isatty (int );
 #endif /* __cplusplus */
-
+    
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
  * such as during a xlu__cfg_yyrestart() or at EOF.
@@ -1530,7 +1530,7 @@ extern int isatty (int );
     }
 
         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
+    
 	errno = oerrno;
 }
 
@@ -1636,9 +1636,9 @@ static void xlu__cfg_yyensure_buffer_sta
 								, yyscanner);
 		if ( ! yyg->yy_buffer_stack )
 			YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yyensure_buffer_stack()" );
-
+								  
 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+				
 		yyg->yy_buffer_stack_max = num_to_alloc;
 		yyg->yy_buffer_stack_top = 0;
 		return;
@@ -1667,12 +1667,12 @@ static void xlu__cfg_yyensure_buffer_sta
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
  * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object. 
  */
 YY_BUFFER_STATE xlu__cfg_yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
 {
 	YY_BUFFER_STATE b;
-
+    
 	if ( size < 2 ||
 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -1708,7 +1708,7 @@ YY_BUFFER_STATE xlu__cfg_yy_scan_buffer 
  */
 YY_BUFFER_STATE xlu__cfg_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
 {
-
+    
 	return xlu__cfg_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
 }
 
@@ -1725,7 +1725,7 @@ YY_BUFFER_STATE xlu__cfg_yy_scan_bytes  
 	char *buf;
 	yy_size_t n;
 	int i;
-
+    
 	/* Get memory for full buffer, including space for trailing EOB's. */
 	n = _yybytes_len + 2;
 	buf = (char *) xlu__cfg_yyalloc(n ,yyscanner );
@@ -1793,10 +1793,10 @@ YY_EXTRA_TYPE xlu__cfg_yyget_extra  (yys
 int xlu__cfg_yyget_lineno  (yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+    
         if (! YY_CURRENT_BUFFER)
             return 0;
-
+    
     return yylineno;
 }
 
@@ -1806,10 +1806,10 @@ int xlu__cfg_yyget_lineno  (yyscan_t yys
 int xlu__cfg_yyget_column  (yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+    
         if (! YY_CURRENT_BUFFER)
             return 0;
-
+    
     return yycolumn;
 }
 
@@ -1870,8 +1870,8 @@ void xlu__cfg_yyset_lineno (int  line_nu
 
         /* lineno is only valid if an input buffer exists. */
         if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "xlu__cfg_yyset_lineno called with no buffer" , yyscanner);
-
+           yy_fatal_error( "xlu__cfg_yyset_lineno called with no buffer" , yyscanner); 
+    
     yylineno = line_number;
 }
 
@@ -1885,8 +1885,8 @@ void xlu__cfg_yyset_column (int  column_
 
         /* column is only valid if an input buffer exists. */
         if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "xlu__cfg_yyset_column called with no buffer" , yyscanner);
-
+           yy_fatal_error( "xlu__cfg_yyset_column called with no buffer" , yyscanner); 
+    
     yycolumn = column_no;
 }
 
@@ -1939,13 +1939,13 @@ YYLTYPE *xlu__cfg_yyget_lloc  (yyscan_t 
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
     return yylloc;
 }
-
+    
 void xlu__cfg_yyset_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
     yylloc = yylloc_param;
 }
-
+    
 /* User-visible API */
 
 /* xlu__cfg_yylex_init is special because it creates the scanner itself, so it is
@@ -1993,20 +1993,20 @@ int xlu__cfg_yylex_init_extra(YY_EXTRA_T
         errno = EINVAL;
         return 1;
     }
-
+	
     *ptr_yy_globals = (yyscan_t) xlu__cfg_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-
+	
     if (*ptr_yy_globals == NULL){
         errno = ENOMEM;
         return 1;
     }
-
+    
     /* By setting to 0xAA, we expose bugs in
     yy_init_globals. Leave at 0x00 for releases. */
     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
+    
     xlu__cfg_yyset_extra (yy_user_defined, *ptr_yy_globals);
-
+    
     return yy_init_globals ( *ptr_yy_globals );
 }
 
@@ -2122,11 +2122,3 @@ void xlu__cfg_yyfree (void * ptr , yysca
 #define YYTABLES_NAME "yytables"
 
 #line 104 "libxlu_cfg_l.l"
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff -r 24dbd9d4f340 -r d4f854c3e732 tools/libxl/libxlu_cfg_l.h
--- a/tools/libxl/libxlu_cfg_l.h	Fri Aug 24 12:38:14 2012 +0100
+++ b/tools/libxl/libxlu_cfg_l.h	Fri Aug 24 12:38:16 2012 +0100
@@ -38,7 +38,7 @@
 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types. 
  */
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS 1
@@ -55,7 +55,7 @@ typedef uint32_t flex_uint32_t;
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 
@@ -193,7 +193,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-
+    
 	/* Whether to try to fill the input buffer when we reach the
 	 * end of it.
 	 */
@@ -281,9 +281,9 @@ YYSTYPE * xlu__cfg_yyget_lval (yyscan_t 
 void xlu__cfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
 
        YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner );
-
+    
         void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+    
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
  */
@@ -355,11 +355,3 @@ extern int xlu__cfg_yylex \
 #line 356 "libxlu_cfg_l.h"
 #undef xlu__cfg_yyIN_HEADER
 #endif /* xlu__cfg_yyHEADER_H */
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56MB-0005k1-6E; Sat, 25 Aug 2012 02:44:15 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M9-0005jU-73
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:13 +0000
Received: from [85.158.138.51:28068] by server-9.bemta-3.messagelabs.com id
	E3/69-23952-CFB38305; Sat, 25 Aug 2012 02:44:12 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-14.tower-174.messagelabs.com!1345862650!21338436!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30052 invoked from network); 25 Aug 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M6-0007hI-1L
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M5-0002vK-MO
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:09 +0000
Message-Id: <E1T56M5-0002vK-MO@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: Rerun flex
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1345808296 -3600
# Node ID d4f854c3e7321121ed9a39a6ca6f70b420736091
# Parent  24dbd9d4f340c941cd13273024c562e8921fe961
libxl: Rerun flex

This undoes some systematic changes which were made to
libxlu_cfg_l.[ch] along with manually-edited files (eg, whitespace
changes, emacs local variables) and returns these two files to exactly
the output of flex (Debian squeeze 2.5.35-10 i386).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r 24dbd9d4f340 -r d4f854c3e732 tools/libxl/libxlu_cfg_l.c
--- a/tools/libxl/libxlu_cfg_l.c	Fri Aug 24 12:38:14 2012 +0100
+++ b/tools/libxl/libxlu_cfg_l.c	Fri Aug 24 12:38:16 2012 +0100
@@ -34,7 +34,7 @@
 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types. 
  */
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS 1
@@ -51,7 +51,7 @@ typedef uint32_t flex_uint32_t;
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 
@@ -185,7 +185,7 @@ typedef struct yy_buffer_state *YY_BUFFE
 
     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
      *       access to the local variable yy_act. Since yyless() is a macro, it would break
-     *       existing scanners that call yyless() from OUTSIDE xlu__cfg_yylex.
+     *       existing scanners that call yyless() from OUTSIDE xlu__cfg_yylex. 
      *       One obvious solution it to make yy_act a global. I tried that, and saw
      *       a 5% performance hit in a non-yylineno scanner, because yy_act is
      *       normally declared as a register variable-- so it is not worth it.
@@ -197,7 +197,7 @@ typedef struct yy_buffer_state *YY_BUFFE
                     if ( yytext[yyl] == '\n' )\
                         --yylineno;\
             }while(0)
-
+    
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
 	do \
@@ -259,7 +259,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-
+    
 	/* Whether to try to fill the input buffer when we reach the
 	 * end of it.
 	 */
@@ -574,9 +574,9 @@ static int yy_init_globals (yyscan_t yys
     /* This must go here because YYSTYPE and YYLTYPE are included
      * from bison output in section 1.*/
     #    define yylval yyg->yylval_r
-
+    
     #    define yylloc yyg->yylloc_r
-
+    
 int xlu__cfg_yylex_init (yyscan_t* scanner);
 
 int xlu__cfg_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -615,9 +615,9 @@ YYSTYPE * xlu__cfg_yyget_lval (yyscan_t 
 void xlu__cfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
 
        YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner );
-
+    
         void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+    
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
  */
@@ -845,7 +845,7 @@ yy_find_action:
 			int yyl;
 			for ( yyl = yyg->yy_more_len; yyl < yyleng; ++yyl )
 				if ( yytext[yyl] == '\n' )
-
+					   
     do{ yylineno++;
         yycolumn=0;
     }while(0)
@@ -1377,7 +1377,7 @@ static int yy_get_next_buffer (yyscan_t 
 	yyg->yy_hold_char = *++yyg->yy_c_buf_p;
 
 	if ( c == '\n' )
-
+		   
     do{ yylineno++;
         yycolumn=0;
     }while(0)
@@ -1460,7 +1460,7 @@ static void xlu__cfg_yy_load_buffer_stat
     YY_BUFFER_STATE xlu__cfg_yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
 {
 	YY_BUFFER_STATE b;
-
+    
 	b = (YY_BUFFER_STATE) xlu__cfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
 	if ( ! b )
 		YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_create_buffer()" );
@@ -1504,7 +1504,7 @@ static void xlu__cfg_yy_load_buffer_stat
 #ifndef __cplusplus
 extern int isatty (int );
 #endif /* __cplusplus */
-
+    
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
  * such as during a xlu__cfg_yyrestart() or at EOF.
@@ -1530,7 +1530,7 @@ extern int isatty (int );
     }
 
         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
+    
 	errno = oerrno;
 }
 
@@ -1636,9 +1636,9 @@ static void xlu__cfg_yyensure_buffer_sta
 								, yyscanner);
 		if ( ! yyg->yy_buffer_stack )
 			YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yyensure_buffer_stack()" );
-
+								  
 		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+				
 		yyg->yy_buffer_stack_max = num_to_alloc;
 		yyg->yy_buffer_stack_top = 0;
 		return;
@@ -1667,12 +1667,12 @@ static void xlu__cfg_yyensure_buffer_sta
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
  * @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object. 
  */
 YY_BUFFER_STATE xlu__cfg_yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
 {
 	YY_BUFFER_STATE b;
-
+    
 	if ( size < 2 ||
 	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
 	     base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -1708,7 +1708,7 @@ YY_BUFFER_STATE xlu__cfg_yy_scan_buffer 
  */
 YY_BUFFER_STATE xlu__cfg_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
 {
-
+    
 	return xlu__cfg_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
 }
 
@@ -1725,7 +1725,7 @@ YY_BUFFER_STATE xlu__cfg_yy_scan_bytes  
 	char *buf;
 	yy_size_t n;
 	int i;
-
+    
 	/* Get memory for full buffer, including space for trailing EOB's. */
 	n = _yybytes_len + 2;
 	buf = (char *) xlu__cfg_yyalloc(n ,yyscanner );
@@ -1793,10 +1793,10 @@ YY_EXTRA_TYPE xlu__cfg_yyget_extra  (yys
 int xlu__cfg_yyget_lineno  (yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+    
         if (! YY_CURRENT_BUFFER)
             return 0;
-
+    
     return yylineno;
 }
 
@@ -1806,10 +1806,10 @@ int xlu__cfg_yyget_lineno  (yyscan_t yys
 int xlu__cfg_yyget_column  (yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+    
         if (! YY_CURRENT_BUFFER)
             return 0;
-
+    
     return yycolumn;
 }
 
@@ -1870,8 +1870,8 @@ void xlu__cfg_yyset_lineno (int  line_nu
 
         /* lineno is only valid if an input buffer exists. */
         if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "xlu__cfg_yyset_lineno called with no buffer" , yyscanner);
-
+           yy_fatal_error( "xlu__cfg_yyset_lineno called with no buffer" , yyscanner); 
+    
     yylineno = line_number;
 }
 
@@ -1885,8 +1885,8 @@ void xlu__cfg_yyset_column (int  column_
 
         /* column is only valid if an input buffer exists. */
         if (! YY_CURRENT_BUFFER )
-           yy_fatal_error( "xlu__cfg_yyset_column called with no buffer" , yyscanner);
-
+           yy_fatal_error( "xlu__cfg_yyset_column called with no buffer" , yyscanner); 
+    
     yycolumn = column_no;
 }
 
@@ -1939,13 +1939,13 @@ YYLTYPE *xlu__cfg_yyget_lloc  (yyscan_t 
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
     return yylloc;
 }
-
+    
 void xlu__cfg_yyset_lloc (YYLTYPE *  yylloc_param , yyscan_t yyscanner)
 {
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
     yylloc = yylloc_param;
 }
-
+    
 /* User-visible API */
 
 /* xlu__cfg_yylex_init is special because it creates the scanner itself, so it is
@@ -1993,20 +1993,20 @@ int xlu__cfg_yylex_init_extra(YY_EXTRA_T
         errno = EINVAL;
         return 1;
     }
-
+	
     *ptr_yy_globals = (yyscan_t) xlu__cfg_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-
+	
     if (*ptr_yy_globals == NULL){
         errno = ENOMEM;
         return 1;
     }
-
+    
     /* By setting to 0xAA, we expose bugs in
     yy_init_globals. Leave at 0x00 for releases. */
     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
+    
     xlu__cfg_yyset_extra (yy_user_defined, *ptr_yy_globals);
-
+    
     return yy_init_globals ( *ptr_yy_globals );
 }
 
@@ -2122,11 +2122,3 @@ void xlu__cfg_yyfree (void * ptr , yysca
 #define YYTABLES_NAME "yytables"
 
 #line 104 "libxlu_cfg_l.l"
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff -r 24dbd9d4f340 -r d4f854c3e732 tools/libxl/libxlu_cfg_l.h
--- a/tools/libxl/libxlu_cfg_l.h	Fri Aug 24 12:38:14 2012 +0100
+++ b/tools/libxl/libxlu_cfg_l.h	Fri Aug 24 12:38:16 2012 +0100
@@ -38,7 +38,7 @@
 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types. 
  */
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS 1
@@ -55,7 +55,7 @@ typedef uint32_t flex_uint32_t;
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 
@@ -193,7 +193,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-
+    
 	/* Whether to try to fill the input buffer when we reach the
 	 * end of it.
 	 */
@@ -281,9 +281,9 @@ YYSTYPE * xlu__cfg_yyget_lval (yyscan_t 
 void xlu__cfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
 
        YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner );
-
+    
         void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+    
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
  */
@@ -355,11 +355,3 @@ extern int xlu__cfg_yylex \
 #line 356 "libxlu_cfg_l.h"
 #undef xlu__cfg_yyIN_HEADER
 #endif /* xlu__cfg_yyHEADER_H */
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:22 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:22 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56M9-0005je-0Y; Sat, 25 Aug 2012 02:44:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M8-0005jE-7x
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:12 +0000
Received: from [85.158.139.83:48828] by server-7.bemta-5.messagelabs.com id
	A7/91-32634-AFB38305; Sat, 25 Aug 2012 02:44:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-7.tower-182.messagelabs.com!1345862648!23797074!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26139 invoked from network); 25 Aug 2012 02:44:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M4-0007h9-5M
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M3-0002ub-Vm
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:08 +0000
Message-Id: <E1T56M3-0002ub-Vm@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nested vmx: VM_ENTRY_IA32E_MODE
	shouldn't be in default1 class
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Zhang Xiantao <xiantao.zhang@intel.com>
# Date 1345798154 -3600
# Node ID 42f959fec02d56bbff6a7fb95484ed8baabfa64f
# Parent  4ca40e0559c33205fb5163b10249a0fd5fda39b9
nested vmx: VM_ENTRY_IA32E_MODE shouldn't be in default1 class
for IA32_VM_ENTRY_CTLS_MSR.

If set to 1, L2 guest's paging mode maybe mis-judged
and mis-set.

Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 4ca40e0559c3 -r 42f959fec02d xen/arch/x86/hvm/vmx/vvmx.c
--- a/xen/arch/x86/hvm/vmx/vvmx.c	Thu Aug 23 19:12:28 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vvmx.c	Fri Aug 24 09:49:14 2012 +0100
@@ -1334,7 +1334,6 @@ int nvmx_msr_read_intercept(unsigned int
     case MSR_IA32_VMX_ENTRY_CTLS:
         /* bit 0-8, and 12 must be 1 (refer G5 of SDM) */
         data = 0x11ff;
-        data |= VM_ENTRY_IA32E_MODE;
         data = (data << 32) | data;
         break;
 

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56MH-0005ky-97; Sat, 25 Aug 2012 02:44:21 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56MF-0005jp-5U
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1345862650!1979396!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8705 invoked from network); 25 Aug 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M6-0007hL-Hu
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M6-0002vZ-74
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:10 +0000
Message-Id: <E1T56M6-0002vZ-74@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: Rerun bison
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1345808298 -3600
# Node ID 1126b3079bef37e1bb5a97b90c14a51d4e1c91c3
# Parent  d4f854c3e7321121ed9a39a6ca6f70b420736091
libxl: Rerun bison

This updates libxlu_cfg_y.[ch] to code generated by bison from
Debian squeeze (1:2.4.1.dfsg-3 i386).

There should be no functional change since there is no change to the
source file, but we will inherit bugfixes and behavioural changes from
the new version of bison.  So this is more a matter of hope than
knowledge.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r d4f854c3e732 -r 1126b3079bef tools/libxl/libxlu_cfg_y.c
--- a/tools/libxl/libxlu_cfg_y.c	Fri Aug 24 12:38:16 2012 +0100
+++ b/tools/libxl/libxlu_cfg_y.c	Fri Aug 24 12:38:18 2012 +0100
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-
+   
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +28,7 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
@@ -47,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -55,41 +54,28 @@
 /* Pure parsers.  */
 #define YYPURE 1
 
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
 /* Using locations.  */
 #define YYLSP_NEEDED 1
 
 /* Substitute the variable and function names.  */
-#define yyparse xlu__cfg_yyparse
-#define yylex   xlu__cfg_yylex
-#define yyerror xlu__cfg_yyerror
-#define yylval  xlu__cfg_yylval
-#define yychar  xlu__cfg_yychar
-#define yydebug xlu__cfg_yydebug
-#define yynerrs xlu__cfg_yynerrs
-#define yylloc xlu__cfg_yylloc
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     IDENT = 258,
-     STRING = 259,
-     NUMBER = 260,
-     NEWLINE = 261
-   };
-#endif
-/* Tokens.  */
-#define IDENT 258
-#define STRING 259
-#define NUMBER 260
-#define NEWLINE 261
-
-
-
+#define yyparse         xlu__cfg_yyparse
+#define yylex           xlu__cfg_yylex
+#define yyerror         xlu__cfg_yyerror
+#define yylval          xlu__cfg_yylval
+#define yychar          xlu__cfg_yychar
+#define yydebug         xlu__cfg_yydebug
+#define yynerrs         xlu__cfg_yynerrs
+#define yylloc          xlu__cfg_yylloc
 
 /* Copy the first part of user declarations.  */
+
+/* Line 189 of yacc.c  */
 #line 19 "libxlu_cfg_y.y"
 
 #define YYLEX_PARAM ctx->scanner
@@ -97,6 +83,9 @@
 #include "libxlu_cfg_l.h"
 
 
+/* Line 189 of yacc.c  */
+#line 88 "libxlu_cfg_y.c"
+
 /* Enabling traces.  */
 #ifndef YYDEBUG
 # define YYDEBUG 0
@@ -115,19 +104,40 @@
 # define YYTOKEN_TABLE 0
 #endif
 
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     IDENT = 258,
+     STRING = 259,
+     NUMBER = 260,
+     NEWLINE = 261
+   };
+#endif
+
+
+
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c  */
 #line 25 "libxlu_cfg_y.y"
-{
+
   char *string;
   XLU_ConfigSetting *setting;
-}
-/* Line 187 of yacc.c.  */
-#line 127 "libxlu_cfg_y.c"
-	YYSTYPE;
+
+
+
+/* Line 214 of yacc.c  */
+#line 137 "libxlu_cfg_y.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -147,8 +157,8 @@ typedef struct YYLTYPE
 /* Copy the second part of user declarations.  */
 
 
-/* Line 216 of yacc.c.  */
-#line 152 "libxlu_cfg_y.c"
+/* Line 264 of yacc.c  */
+#line 162 "libxlu_cfg_y.c"
 
 #ifdef short
 # undef short
@@ -223,14 +233,14 @@ typedef short int yytype_int16;
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int i)
+YYID (int yyi)
 #else
 static int
-YYID (i)
-    int i;
+YYID (yyi)
+    int yyi;
 #endif
 {
-  return i;
+  return yyi;
 }
 #endif
 
@@ -312,9 +322,9 @@ void free (void *); /* INFRINGES ON USER
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-    YYLTYPE yyls;
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+  YYLTYPE yyls_alloc;
 };
 
 /* The size of the maximum gap between one aligned stack and the next.  */
@@ -349,12 +359,12 @@ union yyalloc
    elements in the stack, and YYPTR gives the new location of the
    stack.  Advance YYPTR to a properly aligned location for the next
    stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
@@ -451,7 +461,7 @@ static const yytype_uint8 yyrline[] =
 static const char *const yytname[] =
 {
   "$end", "error", "$undefined", "IDENT", "STRING", "NUMBER", "NEWLINE",
-  "'='", "';'", "'['", "']'", "','", "$accept", "file", "setting", "@1",
+  "'='", "';'", "'['", "']'", "','", "$accept", "file", "setting", "$@1",
   "endstmt", "value", "atom", "valuelist", "values", "nlok", 0
 };
 #endif
@@ -732,17 +742,20 @@ yy_symbol_print (yyoutput, yytype, yyval
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 #else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
@@ -778,11 +791,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, c
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
 		       , &(yylsp[(yyi + 1) - (yynrhs)])		       , ctx);
-      fprintf (stderr, "\n");
+      YYFPRINTF (stderr, "\n");
     }
 }
 
@@ -819,7 +832,7 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-
+
 
 #if YYERROR_VERBOSE
 
@@ -1030,7 +1043,7 @@ yysyntax_error (char *yyresult, int yyst
     }
 }
 #endif /* YYERROR_VERBOSE */
-
+
 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -1062,39 +1075,67 @@ yydestruct (yymsg, yytype, yyvaluep, yyl
   switch (yytype)
     {
       case 3: /* "IDENT" */
+
+/* Line 1000 of yacc.c  */
 #line 40 "libxlu_cfg_y.y"
 	{ free((yyvaluep->string)); };
-#line 1068 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1085 "libxlu_cfg_y.c"
 	break;
       case 4: /* "STRING" */
+
+/* Line 1000 of yacc.c  */
 #line 40 "libxlu_cfg_y.y"
 	{ free((yyvaluep->string)); };
-#line 1073 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1094 "libxlu_cfg_y.c"
 	break;
       case 5: /* "NUMBER" */
+
+/* Line 1000 of yacc.c  */
 #line 40 "libxlu_cfg_y.y"
 	{ free((yyvaluep->string)); };
-#line 1078 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1103 "libxlu_cfg_y.c"
 	break;
       case 17: /* "value" */
+
+/* Line 1000 of yacc.c  */
 #line 43 "libxlu_cfg_y.y"
 	{ xlu__cfg_set_free((yyvaluep->setting)); };
-#line 1083 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1112 "libxlu_cfg_y.c"
 	break;
       case 18: /* "atom" */
+
+/* Line 1000 of yacc.c  */
 #line 40 "libxlu_cfg_y.y"
 	{ free((yyvaluep->string)); };
-#line 1088 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1121 "libxlu_cfg_y.c"
 	break;
       case 19: /* "valuelist" */
+
+/* Line 1000 of yacc.c  */
 #line 43 "libxlu_cfg_y.y"
 	{ xlu__cfg_set_free((yyvaluep->setting)); };
-#line 1093 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1130 "libxlu_cfg_y.c"
 	break;
       case 20: /* "values" */
+
+/* Line 1000 of yacc.c  */
 #line 43 "libxlu_cfg_y.y"
 	{ xlu__cfg_set_free((yyvaluep->setting)); };
-#line 1098 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1139 "libxlu_cfg_y.c"
 	break;
 
       default:
@@ -1102,9 +1143,7 @@ yydestruct (yymsg, yytype, yyvaluep, yyl
     }
 }
 
-
 /* Prevent warnings from -Wmissing-prototypes.  */
-
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
 int yyparse (void *YYPARSE_PARAM);
@@ -1123,10 +1162,9 @@ int yyparse ();
 
 
 
-
-/*----------.
-| yyparse.  |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1150,24 +1188,59 @@ yyparse (ctx)
 #endif
 #endif
 {
-  /* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
+/* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
 
-/* Number of syntax errors so far.  */
-int yynerrs;
-/* Location data for the look-ahead symbol.  */
+/* Location data for the lookahead symbol.  */
 YYLTYPE yylloc;
 
-  int yystate;
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+       `yyls': related to locations.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    /* The location stack.  */
+    YYLTYPE yylsa[YYINITDEPTH];
+    YYLTYPE *yyls;
+    YYLTYPE *yylsp;
+
+    /* The locations where the error started and ended.  */
+    YYLTYPE yyerror_range[2];
+
+    YYSIZE_T yystacksize;
+
   int yyn;
   int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+  YYLTYPE yyloc;
+
 #if YYERROR_VERBOSE
   /* Buffer for error messages, and its allocated size.  */
   char yymsgbuf[128];
@@ -1175,63 +1248,37 @@ YYLTYPE yylloc;
   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 #endif
 
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
-
-  /* The location stack.  */
-  YYLTYPE yylsa[YYINITDEPTH];
-  YYLTYPE *yyls = yylsa;
-  YYLTYPE *yylsp;
-  /* The locations where the error started and ended.  */
-  YYLTYPE yyerror_range[2];
-
 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
 
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-  YYLTYPE yyloc;
-
   /* The number of symbols on the RHS of the reduced rule.
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yyls = yylsa;
+  yystacksize = YYINITDEPTH;
+
   YYDPRINTF ((stderr, "Starting parse\n"));
 
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
+  yychar = YYEMPTY; /* Cause a token to be read.  */
 
   /* Initialize stack pointers.
      Waste one element of value and location stack
      so that they stay on the same level as the state stack.
      The wasted elements are never initialized.  */
-
   yyssp = yyss;
   yyvsp = yyvs;
   yylsp = yyls;
+
 #if YYLTYPE_IS_TRIVIAL
   /* Initialize the default location before parsing starts.  */
   yylloc.first_line   = yylloc.last_line   = 1;
-  yylloc.first_column = yylloc.last_column = 0;
+  yylloc.first_column = yylloc.last_column = 1;
 #endif
 
   goto yysetstate;
@@ -1270,6 +1317,7 @@ YYLTYPE yylloc;
 		    &yyvs1, yysize * sizeof (*yyvsp),
 		    &yyls1, yysize * sizeof (*yylsp),
 		    &yystacksize);
+
 	yyls = yyls1;
 	yyss = yyss1;
 	yyvs = yyvs1;
@@ -1291,9 +1339,9 @@ YYLTYPE yylloc;
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-	YYSTACK_RELOCATE (yyls);
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+	YYSTACK_RELOCATE (yyls_alloc, yyls);
 #  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
@@ -1314,6 +1362,9 @@ YYLTYPE yylloc;
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
@@ -1322,16 +1373,16 @@ YYLTYPE yylloc;
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
+     lookahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to look-ahead token.  */
+  /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
   if (yyn == YYPACT_NINF)
     goto yydefault;
 
-  /* Not known => get a look-ahead token if don't already have one.  */
+  /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -1363,20 +1414,16 @@ yybackup:
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
   *++yyvsp = yylval;
@@ -1417,58 +1464,79 @@ yyreduce:
   switch (yyn)
     {
         case 4:
+
+/* Line 1455 of yacc.c  */
 #line 50 "libxlu_cfg_y.y"
     { xlu__cfg_set_store(ctx,(yyvsp[(1) - (3)].string),(yyvsp[(3) - (3)].setting),(yylsp[(3) - (3)]).first_line); ;}
     break;
 
   case 10:
+
+/* Line 1455 of yacc.c  */
 #line 58 "libxlu_cfg_y.y"
     { (yyval.setting)= xlu__cfg_set_mk(ctx,1,(yyvsp[(1) - (1)].string)); ;}
     break;
 
   case 11:
+
+/* Line 1455 of yacc.c  */
 #line 59 "libxlu_cfg_y.y"
     { (yyval.setting)= (yyvsp[(3) - (4)].setting); ;}
     break;
 
   case 12:
+
+/* Line 1455 of yacc.c  */
 #line 61 "libxlu_cfg_y.y"
     { (yyval.string)= (yyvsp[(1) - (1)].string); ;}
     break;
 
   case 13:
+
+/* Line 1455 of yacc.c  */
 #line 62 "libxlu_cfg_y.y"
     { (yyval.string)= (yyvsp[(1) - (1)].string); ;}
     break;
 
   case 14:
+
+/* Line 1455 of yacc.c  */
 #line 64 "libxlu_cfg_y.y"
     { (yyval.setting)= xlu__cfg_set_mk(ctx,0,0); ;}
     break;
 
   case 15:
+
+/* Line 1455 of yacc.c  */
 #line 65 "libxlu_cfg_y.y"
     { (yyval.setting)= (yyvsp[(1) - (1)].setting); ;}
     break;
 
   case 16:
+
+/* Line 1455 of yacc.c  */
 #line 66 "libxlu_cfg_y.y"
     { (yyval.setting)= (yyvsp[(1) - (3)].setting); ;}
     break;
 
   case 17:
+
+/* Line 1455 of yacc.c  */
 #line 68 "libxlu_cfg_y.y"
     { (yyval.setting)= xlu__cfg_set_mk(ctx,2,(yyvsp[(1) - (2)].string)); ;}
     break;
 
   case 18:
+
+/* Line 1455 of yacc.c  */
 #line 69 "libxlu_cfg_y.y"
     { xlu__cfg_set_add(ctx,(yyvsp[(1) - (5)].setting),(yyvsp[(4) - (5)].string)); (yyval.setting)= (yyvsp[(1) - (5)].setting); ;}
     break;
 
 
-/* Line 1267 of yacc.c.  */
-#line 1472 "libxlu_cfg_y.c"
+
+/* Line 1455 of yacc.c  */
+#line 1540 "libxlu_cfg_y.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1544,7 +1612,7 @@ yyerrlab:
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
+      /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
@@ -1561,7 +1629,7 @@ yyerrlab:
 	}
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -1619,14 +1687,11 @@ yyerrlab1:
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   *++yyvsp = yylval;
 
   yyerror_range[1] = yylloc;
   /* Using YYLLOC is tempting, but would change the location of
-     the look-ahead.  YYLOC is available though.  */
+     the lookahead.  YYLOC is available though.  */
   YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
   *++yylsp = yyloc;
 
@@ -1651,7 +1716,7 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -1662,7 +1727,7 @@ yyexhaustedlab:
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
+  if (yychar != YYEMPTY)
      yydestruct ("Cleanup: discarding lookahead",
 		 yytoken, &yylval, &yylloc, ctx);
   /* Do not reclaim the symbols of the rule which action triggered
@@ -1689,11 +1754,3 @@ yyreturn:
 
 
 
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff -r d4f854c3e732 -r 1126b3079bef tools/libxl/libxlu_cfg_y.h
--- a/tools/libxl/libxlu_cfg_y.h	Fri Aug 24 12:38:16 2012 +0100
+++ b/tools/libxl/libxlu_cfg_y.h	Fri Aug 24 12:38:18 2012 +0100
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-
+   
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +28,11 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -45,28 +45,27 @@
      NEWLINE = 261
    };
 #endif
-/* Tokens.  */
-#define IDENT 258
-#define STRING 259
-#define NUMBER 260
-#define NEWLINE 261
-
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
+{
+
+/* Line 1676 of yacc.c  */
 #line 25 "libxlu_cfg_y.y"
-{
+
   char *string;
   XLU_ConfigSetting *setting;
-}
-/* Line 1489 of yacc.c.  */
-#line 66 "libxlu_cfg_y.h"
-	YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c  */
+#line 65 "libxlu_cfg_y.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 
@@ -86,10 +85,3 @@ typedef struct YYLTYPE
 
 
 
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */

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

From xen-changelog-bounces@lists.xen.org Sat Aug 25 02:44:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 25 Aug 2012 02:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T56MH-0005ky-97; Sat, 25 Aug 2012 02:44:21 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56MF-0005jp-5U
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:19 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-11.tower-27.messagelabs.com!1345862650!1979396!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8705 invoked from network); 25 Aug 2012 02:44:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	25 Aug 2012 02:44:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M6-0007hL-Hu
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T56M6-0002vZ-74
	for xen-changelog@lists.xensource.com; Sat, 25 Aug 2012 02:44:10 +0000
Message-Id: <E1T56M6-0002vZ-74@xenbits.xen.org>
Date: Sat, 25 Aug 2012 02:44:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] libxl: Rerun bison
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Ian Jackson <Ian.Jackson@eu.citrix.com>
# Date 1345808298 -3600
# Node ID 1126b3079bef37e1bb5a97b90c14a51d4e1c91c3
# Parent  d4f854c3e7321121ed9a39a6ca6f70b420736091
libxl: Rerun bison

This updates libxlu_cfg_y.[ch] to code generated by bison from
Debian squeeze (1:2.4.1.dfsg-3 i386).

There should be no functional change since there is no change to the
source file, but we will inherit bugfixes and behavioural changes from
the new version of bison.  So this is more a matter of hope than
knowledge.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---


diff -r d4f854c3e732 -r 1126b3079bef tools/libxl/libxlu_cfg_y.c
--- a/tools/libxl/libxlu_cfg_y.c	Fri Aug 24 12:38:16 2012 +0100
+++ b/tools/libxl/libxlu_cfg_y.c	Fri Aug 24 12:38:18 2012 +0100
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-
+   
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +28,7 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
@@ -47,7 +46,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -55,41 +54,28 @@
 /* Pure parsers.  */
 #define YYPURE 1
 
+/* Push parsers.  */
+#define YYPUSH 0
+
+/* Pull parsers.  */
+#define YYPULL 1
+
 /* Using locations.  */
 #define YYLSP_NEEDED 1
 
 /* Substitute the variable and function names.  */
-#define yyparse xlu__cfg_yyparse
-#define yylex   xlu__cfg_yylex
-#define yyerror xlu__cfg_yyerror
-#define yylval  xlu__cfg_yylval
-#define yychar  xlu__cfg_yychar
-#define yydebug xlu__cfg_yydebug
-#define yynerrs xlu__cfg_yynerrs
-#define yylloc xlu__cfg_yylloc
-
-/* Tokens.  */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     IDENT = 258,
-     STRING = 259,
-     NUMBER = 260,
-     NEWLINE = 261
-   };
-#endif
-/* Tokens.  */
-#define IDENT 258
-#define STRING 259
-#define NUMBER 260
-#define NEWLINE 261
-
-
-
+#define yyparse         xlu__cfg_yyparse
+#define yylex           xlu__cfg_yylex
+#define yyerror         xlu__cfg_yyerror
+#define yylval          xlu__cfg_yylval
+#define yychar          xlu__cfg_yychar
+#define yydebug         xlu__cfg_yydebug
+#define yynerrs         xlu__cfg_yynerrs
+#define yylloc          xlu__cfg_yylloc
 
 /* Copy the first part of user declarations.  */
+
+/* Line 189 of yacc.c  */
 #line 19 "libxlu_cfg_y.y"
 
 #define YYLEX_PARAM ctx->scanner
@@ -97,6 +83,9 @@
 #include "libxlu_cfg_l.h"
 
 
+/* Line 189 of yacc.c  */
+#line 88 "libxlu_cfg_y.c"
+
 /* Enabling traces.  */
 #ifndef YYDEBUG
 # define YYDEBUG 0
@@ -115,19 +104,40 @@
 # define YYTOKEN_TABLE 0
 #endif
 
+
+/* Tokens.  */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+   /* Put the tokens into the symbol table, so that GDB and other debuggers
+      know about them.  */
+   enum yytokentype {
+     IDENT = 258,
+     STRING = 259,
+     NUMBER = 260,
+     NEWLINE = 261
+   };
+#endif
+
+
+
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c  */
 #line 25 "libxlu_cfg_y.y"
-{
+
   char *string;
   XLU_ConfigSetting *setting;
-}
-/* Line 187 of yacc.c.  */
-#line 127 "libxlu_cfg_y.c"
-	YYSTYPE;
+
+
+
+/* Line 214 of yacc.c  */
+#line 137 "libxlu_cfg_y.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -147,8 +157,8 @@ typedef struct YYLTYPE
 /* Copy the second part of user declarations.  */
 
 
-/* Line 216 of yacc.c.  */
-#line 152 "libxlu_cfg_y.c"
+/* Line 264 of yacc.c  */
+#line 162 "libxlu_cfg_y.c"
 
 #ifdef short
 # undef short
@@ -223,14 +233,14 @@ typedef short int yytype_int16;
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int i)
+YYID (int yyi)
 #else
 static int
-YYID (i)
-    int i;
+YYID (yyi)
+    int yyi;
 #endif
 {
-  return i;
+  return yyi;
 }
 #endif
 
@@ -312,9 +322,9 @@ void free (void *); /* INFRINGES ON USER
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  yytype_int16 yyss;
-  YYSTYPE yyvs;
-    YYLTYPE yyls;
+  yytype_int16 yyss_alloc;
+  YYSTYPE yyvs_alloc;
+  YYLTYPE yyls_alloc;
 };
 
 /* The size of the maximum gap between one aligned stack and the next.  */
@@ -349,12 +359,12 @@ union yyalloc
    elements in the stack, and YYPTR gives the new location of the
    stack.  Advance YYPTR to a properly aligned location for the next
    stack.  */
-# define YYSTACK_RELOCATE(Stack)					\
+# define YYSTACK_RELOCATE(Stack_alloc, Stack)				\
     do									\
       {									\
 	YYSIZE_T yynewbytes;						\
-	YYCOPY (&yyptr->Stack, Stack, yysize);				\
-	Stack = &yyptr->Stack;						\
+	YYCOPY (&yyptr->Stack_alloc, Stack, yysize);			\
+	Stack = &yyptr->Stack_alloc;					\
 	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
 	yyptr += yynewbytes / sizeof (*yyptr);				\
       }									\
@@ -451,7 +461,7 @@ static const yytype_uint8 yyrline[] =
 static const char *const yytname[] =
 {
   "$end", "error", "$undefined", "IDENT", "STRING", "NUMBER", "NEWLINE",
-  "'='", "';'", "'['", "']'", "','", "$accept", "file", "setting", "@1",
+  "'='", "';'", "'['", "']'", "','", "$accept", "file", "setting", "$@1",
   "endstmt", "value", "atom", "valuelist", "values", "nlok", 0
 };
 #endif
@@ -732,17 +742,20 @@ yy_symbol_print (yyoutput, yytype, yyval
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 #else
 static void
-yy_stack_print (bottom, top)
-    yytype_int16 *bottom;
-    yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+    yytype_int16 *yybottom;
+    yytype_int16 *yytop;
 #endif
 {
   YYFPRINTF (stderr, "Stack now");
-  for (; bottom <= top; ++bottom)
-    YYFPRINTF (stderr, " %d", *bottom);
+  for (; yybottom <= yytop; yybottom++)
+    {
+      int yybot = *yybottom;
+      YYFPRINTF (stderr, " %d", yybot);
+    }
   YYFPRINTF (stderr, "\n");
 }
 
@@ -778,11 +791,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, c
   /* The symbols being reduced.  */
   for (yyi = 0; yyi < yynrhs; yyi++)
     {
-      fprintf (stderr, "   $%d = ", yyi + 1);
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 		       &(yyvsp[(yyi + 1) - (yynrhs)])
 		       , &(yylsp[(yyi + 1) - (yynrhs)])		       , ctx);
-      fprintf (stderr, "\n");
+      YYFPRINTF (stderr, "\n");
     }
 }
 
@@ -819,7 +832,7 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-
+
 
 #if YYERROR_VERBOSE
 
@@ -1030,7 +1043,7 @@ yysyntax_error (char *yyresult, int yyst
     }
 }
 #endif /* YYERROR_VERBOSE */
-
+
 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -1062,39 +1075,67 @@ yydestruct (yymsg, yytype, yyvaluep, yyl
   switch (yytype)
     {
       case 3: /* "IDENT" */
+
+/* Line 1000 of yacc.c  */
 #line 40 "libxlu_cfg_y.y"
 	{ free((yyvaluep->string)); };
-#line 1068 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1085 "libxlu_cfg_y.c"
 	break;
       case 4: /* "STRING" */
+
+/* Line 1000 of yacc.c  */
 #line 40 "libxlu_cfg_y.y"
 	{ free((yyvaluep->string)); };
-#line 1073 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1094 "libxlu_cfg_y.c"
 	break;
       case 5: /* "NUMBER" */
+
+/* Line 1000 of yacc.c  */
 #line 40 "libxlu_cfg_y.y"
 	{ free((yyvaluep->string)); };
-#line 1078 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1103 "libxlu_cfg_y.c"
 	break;
       case 17: /* "value" */
+
+/* Line 1000 of yacc.c  */
 #line 43 "libxlu_cfg_y.y"
 	{ xlu__cfg_set_free((yyvaluep->setting)); };
-#line 1083 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1112 "libxlu_cfg_y.c"
 	break;
       case 18: /* "atom" */
+
+/* Line 1000 of yacc.c  */
 #line 40 "libxlu_cfg_y.y"
 	{ free((yyvaluep->string)); };
-#line 1088 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1121 "libxlu_cfg_y.c"
 	break;
       case 19: /* "valuelist" */
+
+/* Line 1000 of yacc.c  */
 #line 43 "libxlu_cfg_y.y"
 	{ xlu__cfg_set_free((yyvaluep->setting)); };
-#line 1093 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1130 "libxlu_cfg_y.c"
 	break;
       case 20: /* "values" */
+
+/* Line 1000 of yacc.c  */
 #line 43 "libxlu_cfg_y.y"
 	{ xlu__cfg_set_free((yyvaluep->setting)); };
-#line 1098 "libxlu_cfg_y.c"
+
+/* Line 1000 of yacc.c  */
+#line 1139 "libxlu_cfg_y.c"
 	break;
 
       default:
@@ -1102,9 +1143,7 @@ yydestruct (yymsg, yytype, yyvaluep, yyl
     }
 }
 
-
 /* Prevent warnings from -Wmissing-prototypes.  */
-
 #ifdef YYPARSE_PARAM
 #if defined __STDC__ || defined __cplusplus
 int yyparse (void *YYPARSE_PARAM);
@@ -1123,10 +1162,9 @@ int yyparse ();
 
 
 
-
-/*----------.
-| yyparse.  |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse.  |
+`-------------------------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1150,24 +1188,59 @@ yyparse (ctx)
 #endif
 #endif
 {
-  /* The look-ahead symbol.  */
+/* The lookahead symbol.  */
 int yychar;
 
-/* The semantic value of the look-ahead symbol.  */
+/* The semantic value of the lookahead symbol.  */
 YYSTYPE yylval;
 
-/* Number of syntax errors so far.  */
-int yynerrs;
-/* Location data for the look-ahead symbol.  */
+/* Location data for the lookahead symbol.  */
 YYLTYPE yylloc;
 
-  int yystate;
+    /* Number of syntax errors so far.  */
+    int yynerrs;
+
+    int yystate;
+    /* Number of tokens to shift before error messages enabled.  */
+    int yyerrstatus;
+
+    /* The stacks and their tools:
+       `yyss': related to states.
+       `yyvs': related to semantic values.
+       `yyls': related to locations.
+
+       Refer to the stacks thru separate pointers, to allow yyoverflow
+       to reallocate them elsewhere.  */
+
+    /* The state stack.  */
+    yytype_int16 yyssa[YYINITDEPTH];
+    yytype_int16 *yyss;
+    yytype_int16 *yyssp;
+
+    /* The semantic value stack.  */
+    YYSTYPE yyvsa[YYINITDEPTH];
+    YYSTYPE *yyvs;
+    YYSTYPE *yyvsp;
+
+    /* The location stack.  */
+    YYLTYPE yylsa[YYINITDEPTH];
+    YYLTYPE *yyls;
+    YYLTYPE *yylsp;
+
+    /* The locations where the error started and ended.  */
+    YYLTYPE yyerror_range[2];
+
+    YYSIZE_T yystacksize;
+
   int yyn;
   int yyresult;
-  /* Number of tokens to shift before error messages enabled.  */
-  int yyerrstatus;
-  /* Look-ahead token as an internal (translated) token number.  */
-  int yytoken = 0;
+  /* Lookahead token as an internal (translated) token number.  */
+  int yytoken;
+  /* The variables used to return semantic value and location from the
+     action routines.  */
+  YYSTYPE yyval;
+  YYLTYPE yyloc;
+
 #if YYERROR_VERBOSE
   /* Buffer for error messages, and its allocated size.  */
   char yymsgbuf[128];
@@ -1175,63 +1248,37 @@ YYLTYPE yylloc;
   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
 #endif
 
-  /* Three stacks and their tools:
-     `yyss': related to states,
-     `yyvs': related to semantic values,
-     `yyls': related to locations.
-
-     Refer to the stacks thru separate pointers, to allow yyoverflow
-     to reallocate them elsewhere.  */
-
-  /* The state stack.  */
-  yytype_int16 yyssa[YYINITDEPTH];
-  yytype_int16 *yyss = yyssa;
-  yytype_int16 *yyssp;
-
-  /* The semantic value stack.  */
-  YYSTYPE yyvsa[YYINITDEPTH];
-  YYSTYPE *yyvs = yyvsa;
-  YYSTYPE *yyvsp;
-
-  /* The location stack.  */
-  YYLTYPE yylsa[YYINITDEPTH];
-  YYLTYPE *yyls = yylsa;
-  YYLTYPE *yylsp;
-  /* The locations where the error started and ended.  */
-  YYLTYPE yyerror_range[2];
-
 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
 
-  YYSIZE_T yystacksize = YYINITDEPTH;
-
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
-  YYLTYPE yyloc;
-
   /* The number of symbols on the RHS of the reduced rule.
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
+  yytoken = 0;
+  yyss = yyssa;
+  yyvs = yyvsa;
+  yyls = yylsa;
+  yystacksize = YYINITDEPTH;
+
   YYDPRINTF ((stderr, "Starting parse\n"));
 
   yystate = 0;
   yyerrstatus = 0;
   yynerrs = 0;
-  yychar = YYEMPTY;		/* Cause a token to be read.  */
+  yychar = YYEMPTY; /* Cause a token to be read.  */
 
   /* Initialize stack pointers.
      Waste one element of value and location stack
      so that they stay on the same level as the state stack.
      The wasted elements are never initialized.  */
-
   yyssp = yyss;
   yyvsp = yyvs;
   yylsp = yyls;
+
 #if YYLTYPE_IS_TRIVIAL
   /* Initialize the default location before parsing starts.  */
   yylloc.first_line   = yylloc.last_line   = 1;
-  yylloc.first_column = yylloc.last_column = 0;
+  yylloc.first_column = yylloc.last_column = 1;
 #endif
 
   goto yysetstate;
@@ -1270,6 +1317,7 @@ YYLTYPE yylloc;
 		    &yyvs1, yysize * sizeof (*yyvsp),
 		    &yyls1, yysize * sizeof (*yylsp),
 		    &yystacksize);
+
 	yyls = yyls1;
 	yyss = yyss1;
 	yyvs = yyvs1;
@@ -1291,9 +1339,9 @@ YYLTYPE yylloc;
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
 	  goto yyexhaustedlab;
-	YYSTACK_RELOCATE (yyss);
-	YYSTACK_RELOCATE (yyvs);
-	YYSTACK_RELOCATE (yyls);
+	YYSTACK_RELOCATE (yyss_alloc, yyss);
+	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+	YYSTACK_RELOCATE (yyls_alloc, yyls);
 #  undef YYSTACK_RELOCATE
 	if (yyss1 != yyssa)
 	  YYSTACK_FREE (yyss1);
@@ -1314,6 +1362,9 @@ YYLTYPE yylloc;
 
   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
+  if (yystate == YYFINAL)
+    YYACCEPT;
+
   goto yybackup;
 
 /*-----------.
@@ -1322,16 +1373,16 @@ YYLTYPE yylloc;
 yybackup:
 
   /* Do appropriate processing given the current state.  Read a
-     look-ahead token if we need one and don't already have one.  */
+     lookahead token if we need one and don't already have one.  */
 
-  /* First try to decide what to do without reference to look-ahead token.  */
+  /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
   if (yyn == YYPACT_NINF)
     goto yydefault;
 
-  /* Not known => get a look-ahead token if don't already have one.  */
+  /* Not known => get a lookahead token if don't already have one.  */
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -1363,20 +1414,16 @@ yybackup:
       goto yyreduce;
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   /* Count tokens shifted since error; after three, turn off error
      status.  */
   if (yyerrstatus)
     yyerrstatus--;
 
-  /* Shift the look-ahead token.  */
+  /* Shift the lookahead token.  */
   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
-  /* Discard the shifted token unless it is eof.  */
-  if (yychar != YYEOF)
-    yychar = YYEMPTY;
+  /* Discard the shifted token.  */
+  yychar = YYEMPTY;
 
   yystate = yyn;
   *++yyvsp = yylval;
@@ -1417,58 +1464,79 @@ yyreduce:
   switch (yyn)
     {
         case 4:
+
+/* Line 1455 of yacc.c  */
 #line 50 "libxlu_cfg_y.y"
     { xlu__cfg_set_store(ctx,(yyvsp[(1) - (3)].string),(yyvsp[(3) - (3)].setting),(yylsp[(3) - (3)]).first_line); ;}
     break;
 
   case 10:
+
+/* Line 1455 of yacc.c  */
 #line 58 "libxlu_cfg_y.y"
     { (yyval.setting)= xlu__cfg_set_mk(ctx,1,(yyvsp[(1) - (1)].string)); ;}
     break;
 
   case 11:
+
+/* Line 1455 of yacc.c  */
 #line 59 "libxlu_cfg_y.y"
     { (yyval.setting)= (yyvsp[(3) - (4)].setting); ;}
     break;
 
   case 12:
+
+/* Line 1455 of yacc.c  */
 #line 61 "libxlu_cfg_y.y"
     { (yyval.string)= (yyvsp[(1) - (1)].string); ;}
     break;
 
   case 13:
+
+/* Line 1455 of yacc.c  */
 #line 62 "libxlu_cfg_y.y"
     { (yyval.string)= (yyvsp[(1) - (1)].string); ;}
     break;
 
   case 14:
+
+/* Line 1455 of yacc.c  */
 #line 64 "libxlu_cfg_y.y"
     { (yyval.setting)= xlu__cfg_set_mk(ctx,0,0); ;}
     break;
 
   case 15:
+
+/* Line 1455 of yacc.c  */
 #line 65 "libxlu_cfg_y.y"
     { (yyval.setting)= (yyvsp[(1) - (1)].setting); ;}
     break;
 
   case 16:
+
+/* Line 1455 of yacc.c  */
 #line 66 "libxlu_cfg_y.y"
     { (yyval.setting)= (yyvsp[(1) - (3)].setting); ;}
     break;
 
   case 17:
+
+/* Line 1455 of yacc.c  */
 #line 68 "libxlu_cfg_y.y"
     { (yyval.setting)= xlu__cfg_set_mk(ctx,2,(yyvsp[(1) - (2)].string)); ;}
     break;
 
   case 18:
+
+/* Line 1455 of yacc.c  */
 #line 69 "libxlu_cfg_y.y"
     { xlu__cfg_set_add(ctx,(yyvsp[(1) - (5)].setting),(yyvsp[(4) - (5)].string)); (yyval.setting)= (yyvsp[(1) - (5)].setting); ;}
     break;
 
 
-/* Line 1267 of yacc.c.  */
-#line 1472 "libxlu_cfg_y.c"
+
+/* Line 1455 of yacc.c  */
+#line 1540 "libxlu_cfg_y.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1544,7 +1612,7 @@ yyerrlab:
 
   if (yyerrstatus == 3)
     {
-      /* If just tried and failed to reuse look-ahead token after an
+      /* If just tried and failed to reuse lookahead token after an
 	 error, discard it.  */
 
       if (yychar <= YYEOF)
@@ -1561,7 +1629,7 @@ yyerrlab:
 	}
     }
 
-  /* Else will try to reuse look-ahead token after shifting the error
+  /* Else will try to reuse lookahead token after shifting the error
      token.  */
   goto yyerrlab1;
 
@@ -1619,14 +1687,11 @@ yyerrlab1:
       YY_STACK_PRINT (yyss, yyssp);
     }
 
-  if (yyn == YYFINAL)
-    YYACCEPT;
-
   *++yyvsp = yylval;
 
   yyerror_range[1] = yylloc;
   /* Using YYLLOC is tempting, but would change the location of
-     the look-ahead.  YYLOC is available though.  */
+     the lookahead.  YYLOC is available though.  */
   YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
   *++yylsp = yyloc;
 
@@ -1651,7 +1716,7 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -1662,7 +1727,7 @@ yyexhaustedlab:
 #endif
 
 yyreturn:
-  if (yychar != YYEOF && yychar != YYEMPTY)
+  if (yychar != YYEMPTY)
      yydestruct ("Cleanup: discarding lookahead",
 		 yytoken, &yylval, &yylloc, ctx);
   /* Do not reclaim the symbols of the rule which action triggered
@@ -1689,11 +1754,3 @@ yyreturn:
 
 
 
-
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff -r d4f854c3e732 -r 1126b3079bef tools/libxl/libxlu_cfg_y.h
--- a/tools/libxl/libxlu_cfg_y.h	Fri Aug 24 12:38:16 2012 +0100
+++ b/tools/libxl/libxlu_cfg_y.h	Fri Aug 24 12:38:18 2012 +0100
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3.  */
+
+/* A Bison parser, made by GNU Bison 2.4.1.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
-
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   
+      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
+   
+   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+   
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-
+   
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* As a special exception, you may create a larger work that contains
    part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +28,11 @@
    special exception, which will cause the skeleton and the resulting
    Bison output files to be licensed under the GNU General Public
    License without this special exception.
-
+   
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
+
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
@@ -45,28 +45,27 @@
      NEWLINE = 261
    };
 #endif
-/* Tokens.  */
-#define IDENT 258
-#define STRING 259
-#define NUMBER 260
-#define NEWLINE 261
-
 
 
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
+{
+
+/* Line 1676 of yacc.c  */
 #line 25 "libxlu_cfg_y.y"
-{
+
   char *string;
   XLU_ConfigSetting *setting;
-}
-/* Line 1489 of yacc.c.  */
-#line 66 "libxlu_cfg_y.h"
-	YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c  */
+#line 65 "libxlu_cfg_y.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
 #endif
 
 
@@ -86,10 +85,3 @@ typedef struct YYLTYPE
 
 
 
-/*
- * Local variables:
- * mode: C
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */

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

From xen-changelog-bounces@lists.xen.org Tue Aug 28 19:44:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Aug 2012 19:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T6Rhv-0005P7-5I; Tue, 28 Aug 2012 19:44:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6Rht-0005P0-O9
	for xen-changelog@lists.xensource.com; Tue, 28 Aug 2012 19:44:13 +0000
Received: from [85.158.143.99:10395] by server-1.bemta-4.messagelabs.com id
	99/66-12504-D8F1D305; Tue, 28 Aug 2012 19:44:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1346183048!23112783!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29838 invoked from network); 28 Aug 2012 19:44:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	28 Aug 2012 19:44:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6Rho-00056g-2L
	for xen-changelog@lists.xensource.com; Tue, 28 Aug 2012 19:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6Rhn-0004EB-O3
	for xen-changelog@lists.xensource.com; Tue, 28 Aug 2012 19:44:07 +0000
Message-Id: <E1T6Rhn-0004EB-O3@xenbits.xen.org>
Date: Tue, 28 Aug 2012 19:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/xl: Fix uninitialized variable
	error.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1346161590 -3600
# Node ID 3908b256ff345539ae63851b8d3f810d9af19890
# Parent  1126b3079bef37e1bb5a97b90c14a51d4e1c91c3
tools/xl: Fix uninitialized variable error.

c/s 25779:4ca40e0559c3 introduced a compilation error for any build
system using -Werror=uninitialized, such as the default CentOS 5.7
version of gcc.

And with good reason, because if the global libxl
default_output_format is neither OUTPUT_FORMAT_SXP nor
OUTPUT_FORMAT_JSON, the variable hand will be used before being
initialised.

The attached patch fixes the warning, and futher fixes the logic to
work correctly when a new OUTPUT_FORMAT is added to xl.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 1126b3079bef -r 3908b256ff34 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Aug 24 12:38:18 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Tue Aug 28 14:46:30 2012 +0100
@@ -2686,7 +2686,7 @@ static void list_domains_details(const l
     uint8_t *data;
     int i, len, rc;
 
-    yajl_gen hand;
+    yajl_gen hand = NULL;
     yajl_gen_status s;
     const char *buf;
     libxl_yajl_length yajl_len = 0;
@@ -2714,10 +2714,10 @@ static void list_domains_details(const l
         CHK_ERRNO(asprintf(&config_source, "<domid %d data>", info[i].domid));
         libxl_domain_config_init(&d_config);
         parse_config_data(config_source, (char *)data, len, &d_config, NULL);
-        if (default_output_format == OUTPUT_FORMAT_SXP)
+        if (default_output_format == OUTPUT_FORMAT_JSON)
+            s = printf_info_one_json(hand, info[i].domid, &d_config);
+        else
             printf_info_sexp(domid, &d_config);
-        else
-            s = printf_info_one_json(hand, info[i].domid, &d_config);
         libxl_domain_config_dispose(&d_config);
         free(data);
         free(config_source);

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

From xen-changelog-bounces@lists.xen.org Tue Aug 28 19:44:24 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 28 Aug 2012 19:44:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T6Rhv-0005P7-5I; Tue, 28 Aug 2012 19:44:15 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6Rht-0005P0-O9
	for xen-changelog@lists.xensource.com; Tue, 28 Aug 2012 19:44:13 +0000
Received: from [85.158.143.99:10395] by server-1.bemta-4.messagelabs.com id
	99/66-12504-D8F1D305; Tue, 28 Aug 2012 19:44:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1346183048!23112783!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29838 invoked from network); 28 Aug 2012 19:44:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	28 Aug 2012 19:44:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6Rho-00056g-2L
	for xen-changelog@lists.xensource.com; Tue, 28 Aug 2012 19:44:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6Rhn-0004EB-O3
	for xen-changelog@lists.xensource.com; Tue, 28 Aug 2012 19:44:07 +0000
Message-Id: <E1T6Rhn-0004EB-O3@xenbits.xen.org>
Date: Tue, 28 Aug 2012 19:44:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] tools/xl: Fix uninitialized variable
	error.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1346161590 -3600
# Node ID 3908b256ff345539ae63851b8d3f810d9af19890
# Parent  1126b3079bef37e1bb5a97b90c14a51d4e1c91c3
tools/xl: Fix uninitialized variable error.

c/s 25779:4ca40e0559c3 introduced a compilation error for any build
system using -Werror=uninitialized, such as the default CentOS 5.7
version of gcc.

And with good reason, because if the global libxl
default_output_format is neither OUTPUT_FORMAT_SXP nor
OUTPUT_FORMAT_JSON, the variable hand will be used before being
initialised.

The attached patch fixes the warning, and futher fixes the logic to
work correctly when a new OUTPUT_FORMAT is added to xl.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 1126b3079bef -r 3908b256ff34 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Fri Aug 24 12:38:18 2012 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Tue Aug 28 14:46:30 2012 +0100
@@ -2686,7 +2686,7 @@ static void list_domains_details(const l
     uint8_t *data;
     int i, len, rc;
 
-    yajl_gen hand;
+    yajl_gen hand = NULL;
     yajl_gen_status s;
     const char *buf;
     libxl_yajl_length yajl_len = 0;
@@ -2714,10 +2714,10 @@ static void list_domains_details(const l
         CHK_ERRNO(asprintf(&config_source, "<domid %d data>", info[i].domid));
         libxl_domain_config_init(&d_config);
         parse_config_data(config_source, (char *)data, len, &d_config, NULL);
-        if (default_output_format == OUTPUT_FORMAT_SXP)
+        if (default_output_format == OUTPUT_FORMAT_JSON)
+            s = printf_info_one_json(hand, info[i].domid, &d_config);
+        else
             printf_info_sexp(domid, &d_config);
-        else
-            s = printf_info_one_json(hand, info[i].domid, &d_config);
         libxl_domain_config_dispose(&d_config);
         free(data);
         free(config_source);

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

From xen-changelog-bounces@lists.xen.org Wed Aug 29 06:00:27 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 29 Aug 2012 06:00:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T6bK6-0007mu-JF; Wed, 29 Aug 2012 06:00:18 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6bK5-0007mj-Rw
	for xen-changelog@lists.xensource.com; Wed, 29 Aug 2012 06:00:18 +0000
Received: from [85.158.138.51:9989] by server-9.bemta-3.messagelabs.com id
	8F/88-23952-FEFAD305; Wed, 29 Aug 2012 06:00:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-174.messagelabs.com!1346220014!8668558!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7897 invoked from network); 29 Aug 2012 06:00:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Aug 2012 06:00:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6bK1-0004am-J0
	for xen-changelog@lists.xensource.com; Wed, 29 Aug 2012 06:00:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6bJx-000289-Ka
	for xen-changelog@lists.xensource.com; Wed, 29 Aug 2012 06:00:10 +0000
Message-Id: <E1T6bJx-000289-Ka@xenbits.xen.org>
Date: Wed, 29 Aug 2012 06:00:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: Prefer multiboot-provided e820
	over bios-provided e801 memory info.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1346190045 -3600
# Node ID a0b5f8102a0013c112d8e2f7c476040e882838ae
# Parent  3908b256ff345539ae63851b8d3f810d9af19890
x86: Prefer multiboot-provided e820 over bios-provided e801 memory info.

Some UEFI systems do not provide e820 information. In this case we
should take the detailed memory map provided by a multiboot-capable
loader, rather than rely on very conservative values from the e801
bios call. Using the latter on any modern system really hardly makes
good sense.

[Excellent candidate for 4.1 backport]

Signed-off-by: Keir Fraser <keir@xen.org>
Tested-by: Jonathan Tripathy <jonnyt@abpni.co.uk>
---


diff -r 3908b256ff34 -r a0b5f8102a00 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c	Tue Aug 28 14:46:30 2012 +0100
+++ b/xen/arch/x86/setup.c	Tue Aug 28 22:40:45 2012 +0100
@@ -690,17 +690,6 @@ void __init __start_xen(unsigned long mb
     {
         memmap_type = "Xen-e820";
     }
-    else if ( bootsym(lowmem_kb) )
-    {
-        memmap_type = "Xen-e801";
-        e820_raw[0].addr = 0;
-        e820_raw[0].size = bootsym(lowmem_kb) << 10;
-        e820_raw[0].type = E820_RAM;
-        e820_raw[1].addr = 0x100000;
-        e820_raw[1].size = bootsym(highmem_kb) << 10;
-        e820_raw[1].type = E820_RAM;
-        e820_raw_nr = 2;
-    }
     else if ( mbi->flags & MBI_MEMMAP )
     {
         memmap_type = "Multiboot-e820";
@@ -738,6 +727,17 @@ void __init __start_xen(unsigned long mb
             bytes += map->size + 4;
         }
     }
+    else if ( bootsym(lowmem_kb) )
+    {
+        memmap_type = "Xen-e801";
+        e820_raw[0].addr = 0;
+        e820_raw[0].size = bootsym(lowmem_kb) << 10;
+        e820_raw[0].type = E820_RAM;
+        e820_raw[1].addr = 0x100000;
+        e820_raw[1].size = bootsym(highmem_kb) << 10;
+        e820_raw[1].type = E820_RAM;
+        e820_raw_nr = 2;
+    }
     else if ( mbi->flags & MBI_MEMLIMITS )
     {
         memmap_type = "Multiboot-e801";

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

From xen-changelog-bounces@lists.xen.org Wed Aug 29 06:00:27 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 29 Aug 2012 06:00:27 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T6bK6-0007mu-JF; Wed, 29 Aug 2012 06:00:18 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6bK5-0007mj-Rw
	for xen-changelog@lists.xensource.com; Wed, 29 Aug 2012 06:00:18 +0000
Received: from [85.158.138.51:9989] by server-9.bemta-3.messagelabs.com id
	8F/88-23952-FEFAD305; Wed, 29 Aug 2012 06:00:15 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-174.messagelabs.com!1346220014!8668558!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7897 invoked from network); 29 Aug 2012 06:00:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	29 Aug 2012 06:00:15 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6bK1-0004am-J0
	for xen-changelog@lists.xensource.com; Wed, 29 Aug 2012 06:00:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T6bJx-000289-Ka
	for xen-changelog@lists.xensource.com; Wed, 29 Aug 2012 06:00:10 +0000
Message-Id: <E1T6bJx-000289-Ka@xenbits.xen.org>
Date: Wed, 29 Aug 2012 06:00:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86: Prefer multiboot-provided e820
	over bios-provided e801 memory info.
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1346190045 -3600
# Node ID a0b5f8102a0013c112d8e2f7c476040e882838ae
# Parent  3908b256ff345539ae63851b8d3f810d9af19890
x86: Prefer multiboot-provided e820 over bios-provided e801 memory info.

Some UEFI systems do not provide e820 information. In this case we
should take the detailed memory map provided by a multiboot-capable
loader, rather than rely on very conservative values from the e801
bios call. Using the latter on any modern system really hardly makes
good sense.

[Excellent candidate for 4.1 backport]

Signed-off-by: Keir Fraser <keir@xen.org>
Tested-by: Jonathan Tripathy <jonnyt@abpni.co.uk>
---


diff -r 3908b256ff34 -r a0b5f8102a00 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c	Tue Aug 28 14:46:30 2012 +0100
+++ b/xen/arch/x86/setup.c	Tue Aug 28 22:40:45 2012 +0100
@@ -690,17 +690,6 @@ void __init __start_xen(unsigned long mb
     {
         memmap_type = "Xen-e820";
     }
-    else if ( bootsym(lowmem_kb) )
-    {
-        memmap_type = "Xen-e801";
-        e820_raw[0].addr = 0;
-        e820_raw[0].size = bootsym(lowmem_kb) << 10;
-        e820_raw[0].type = E820_RAM;
-        e820_raw[1].addr = 0x100000;
-        e820_raw[1].size = bootsym(highmem_kb) << 10;
-        e820_raw[1].type = E820_RAM;
-        e820_raw_nr = 2;
-    }
     else if ( mbi->flags & MBI_MEMMAP )
     {
         memmap_type = "Multiboot-e820";
@@ -738,6 +727,17 @@ void __init __start_xen(unsigned long mb
             bytes += map->size + 4;
         }
     }
+    else if ( bootsym(lowmem_kb) )
+    {
+        memmap_type = "Xen-e801";
+        e820_raw[0].addr = 0;
+        e820_raw[0].size = bootsym(lowmem_kb) << 10;
+        e820_raw[0].type = E820_RAM;
+        e820_raw[1].addr = 0x100000;
+        e820_raw[1].size = bootsym(highmem_kb) << 10;
+        e820_raw[1].type = E820_RAM;
+        e820_raw_nr = 2;
+    }
     else if ( mbi->flags & MBI_MEMLIMITS )
     {
         memmap_type = "Multiboot-e801";

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

From xen-changelog-bounces@lists.xen.org Thu Aug 30 15:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 30 Aug 2012 15:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T76ZU-0002tX-Eu; Thu, 30 Aug 2012 15:22:16 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T76ZT-0002tJ-M4
	for xen-changelog@lists.xensource.com; Thu, 30 Aug 2012 15:22:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1346340125!3182357!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7460 invoked from network); 30 Aug 2012 15:22:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	30 Aug 2012 15:22:06 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T76ZJ-0003XX-5M
	for xen-changelog@lists.xensource.com; Thu, 30 Aug 2012 15:22:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T76ZI-00084Q-Rm
	for xen-changelog@lists.xensource.com; Thu, 30 Aug 2012 15:22:04 +0000
Date: Thu, 30 Aug 2012 15:22:04 +0000
Message-Id: <E1T76ZI-00084Q-Rm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen-trad: fix
	msi_translate with PV event delivery
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 3e66da7266c84638c0e22a09c9d2b07529802576
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Thu Aug 30 16:11:32 2012 +0100

    qemu-xen-trad: fix msi_translate with PV event delivery
    
    When switching from msitranslate to straight msi we need to make sure
    that we respect PV event delivery for the msi if the guest asked for it:
    
    - completely disable MSI on the device in pt_disable_msi_translate;
    - then enable MSI again (pt_msi_setup), mapping the correct pirq to it.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Tested-by: Rolu <rolu@roce.org>
---
 hw/pass-through.c |   25 +++++++++++--------------
 hw/pt-msi.c       |   14 ++------------
 2 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/hw/pass-through.c b/hw/pass-through.c
index 6e396e3..304c438 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -3841,21 +3841,18 @@ static int pt_msgctrl_reg_write(struct pt_dev *ptdev,
                 PT_LOG("guest enabling MSI, disable MSI-INTx translation\n");
                 pt_disable_msi_translate(ptdev);
             }
-            else
+            /* Init physical one */
+            PT_LOG("setup msi for dev %x\n", pd->devfn);
+            if (pt_msi_setup(ptdev))
             {
-                /* Init physical one */
-                PT_LOG("setup msi for dev %x\n", pd->devfn);
-                if (pt_msi_setup(ptdev))
-                {
-		    /* We do not broadcast the error to the framework code, so
-		     * that MSI errors are contained in MSI emulation code and
-		     * QEMU can go on running.
-		     * Guest MSI would be actually not working.
-		     */
-		    *value &= ~PCI_MSI_FLAGS_ENABLE;
-		    PT_LOG("Warning: Can not map MSI for dev %x\n", pd->devfn);
-		    return 0;
-                }
+                /* We do not broadcast the error to the framework code, so
+                 * that MSI errors are contained in MSI emulation code and
+                 * QEMU can go on running.
+                 * Guest MSI would be actually not working.
+                 */
+                *value &= ~PCI_MSI_FLAGS_ENABLE;
+                PT_LOG("Warning: Can not map MSI for dev %x\n", pd->devfn);
+                return 0;
             }
             if (pt_msi_update(ptdev))
             {
diff --git a/hw/pt-msi.c b/hw/pt-msi.c
index 70c4023..73f737d 100644
--- a/hw/pt-msi.c
+++ b/hw/pt-msi.c
@@ -263,16 +263,8 @@ void pt_disable_msi_translate(struct pt_dev *dev)
     uint8_t e_device = 0;
     uint8_t e_intx = 0;
 
-    /* MSI_ENABLE bit should be disabed until the new handler is set */
-    msi_set_enable(dev, 0);
-
-    e_device = PCI_SLOT(dev->dev.devfn);
-    e_intx = pci_intx(dev);
-
-    if (xc_domain_unbind_pt_irq(xc_handle, domid, dev->msi->pirq,
-                                 PT_IRQ_TYPE_MSI_TRANSLATE, 0,
-                                 e_device, e_intx, 0))
-        PT_LOG("Error: Unbinding pt irq for MSI-INTx failed!\n");
+    pt_msi_disable(dev);
+    dev->msi->flags |= MSI_FLAG_UNINIT;
 
     if (dev->machine_irq)
     {
@@ -280,8 +272,6 @@ void pt_disable_msi_translate(struct pt_dev *dev)
                                        0, e_device, e_intx))
             PT_LOG("Error: Rebinding of interrupt failed!\n");
     }
-
-    dev->msi_trans_en = 0;
 }
 
 static int pt_msix_update_one(struct pt_dev *dev, int entry_nr)
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Thu Aug 30 15:22:21 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 30 Aug 2012 15:22:21 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T76ZU-0002tX-Eu; Thu, 30 Aug 2012 15:22:16 +0000
Received: from mail27.messagelabs.com ([193.109.254.147])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T76ZT-0002tJ-M4
	for xen-changelog@lists.xensource.com; Thu, 30 Aug 2012 15:22:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1346340125!3182357!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7460 invoked from network); 30 Aug 2012 15:22:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	30 Aug 2012 15:22:06 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T76ZJ-0003XX-5M
	for xen-changelog@lists.xensource.com; Thu, 30 Aug 2012 15:22:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1T76ZI-00084Q-Rm
	for xen-changelog@lists.xensource.com; Thu, 30 Aug 2012 15:22:04 +0000
Date: Thu, 30 Aug 2012 15:22:04 +0000
Message-Id: <E1T76ZI-00084Q-Rm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen-trad: fix
	msi_translate with PV event delivery
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

commit 3e66da7266c84638c0e22a09c9d2b07529802576
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Thu Aug 30 16:11:32 2012 +0100

    qemu-xen-trad: fix msi_translate with PV event delivery
    
    When switching from msitranslate to straight msi we need to make sure
    that we respect PV event delivery for the msi if the guest asked for it:
    
    - completely disable MSI on the device in pt_disable_msi_translate;
    - then enable MSI again (pt_msi_setup), mapping the correct pirq to it.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Tested-by: Rolu <rolu@roce.org>
---
 hw/pass-through.c |   25 +++++++++++--------------
 hw/pt-msi.c       |   14 ++------------
 2 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/hw/pass-through.c b/hw/pass-through.c
index 6e396e3..304c438 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -3841,21 +3841,18 @@ static int pt_msgctrl_reg_write(struct pt_dev *ptdev,
                 PT_LOG("guest enabling MSI, disable MSI-INTx translation\n");
                 pt_disable_msi_translate(ptdev);
             }
-            else
+            /* Init physical one */
+            PT_LOG("setup msi for dev %x\n", pd->devfn);
+            if (pt_msi_setup(ptdev))
             {
-                /* Init physical one */
-                PT_LOG("setup msi for dev %x\n", pd->devfn);
-                if (pt_msi_setup(ptdev))
-                {
-		    /* We do not broadcast the error to the framework code, so
-		     * that MSI errors are contained in MSI emulation code and
-		     * QEMU can go on running.
-		     * Guest MSI would be actually not working.
-		     */
-		    *value &= ~PCI_MSI_FLAGS_ENABLE;
-		    PT_LOG("Warning: Can not map MSI for dev %x\n", pd->devfn);
-		    return 0;
-                }
+                /* We do not broadcast the error to the framework code, so
+                 * that MSI errors are contained in MSI emulation code and
+                 * QEMU can go on running.
+                 * Guest MSI would be actually not working.
+                 */
+                *value &= ~PCI_MSI_FLAGS_ENABLE;
+                PT_LOG("Warning: Can not map MSI for dev %x\n", pd->devfn);
+                return 0;
             }
             if (pt_msi_update(ptdev))
             {
diff --git a/hw/pt-msi.c b/hw/pt-msi.c
index 70c4023..73f737d 100644
--- a/hw/pt-msi.c
+++ b/hw/pt-msi.c
@@ -263,16 +263,8 @@ void pt_disable_msi_translate(struct pt_dev *dev)
     uint8_t e_device = 0;
     uint8_t e_intx = 0;
 
-    /* MSI_ENABLE bit should be disabed until the new handler is set */
-    msi_set_enable(dev, 0);
-
-    e_device = PCI_SLOT(dev->dev.devfn);
-    e_intx = pci_intx(dev);
-
-    if (xc_domain_unbind_pt_irq(xc_handle, domid, dev->msi->pirq,
-                                 PT_IRQ_TYPE_MSI_TRANSLATE, 0,
-                                 e_device, e_intx, 0))
-        PT_LOG("Error: Unbinding pt irq for MSI-INTx failed!\n");
+    pt_msi_disable(dev);
+    dev->msi->flags |= MSI_FLAG_UNINIT;
 
     if (dev->machine_irq)
     {
@@ -280,8 +272,6 @@ void pt_disable_msi_translate(struct pt_dev *dev)
                                        0, e_device, e_intx))
             PT_LOG("Error: Rebinding of interrupt failed!\n");
     }
-
-    dev->msi_trans_en = 0;
 }
 
 static int pt_msix_update_one(struct pt_dev *dev, int entry_nr)
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:16 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw4-0000lL-4H; Fri, 31 Aug 2012 01:22:12 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw3-0000kz-0U
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:11 +0000
Received: from [85.158.143.99:42053] by server-2.bemta-4.messagelabs.com id
	C2/DC-21239-2C110405; Fri, 31 Aug 2012 01:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1346376128!22410634!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17140 invoked from network); 31 Aug 2012 01:22:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0002ec-HX
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0005hI-BD
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Message-Id: <E1T7Fw0-0005hI-BD@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] docs: update xenpaging.txt
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1346345851 -3600
# Node ID 4e6bb38c3a40bb43d8b31374ec14a2b279b0fc24
# Parent  1e5fc9f79c0ecfd8c6a00640691717e40c58b87f
docs: update xenpaging.txt

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 1e5fc9f79c0e -r 4e6bb38c3a40 docs/misc/xenpaging.txt
--- a/docs/misc/xenpaging.txt	Thu Aug 30 17:55:31 2012 +0100
+++ b/docs/misc/xenpaging.txt	Thu Aug 30 17:57:31 2012 +0100
@@ -12,37 +12,34 @@ access the paged-out memory, the page is
 memory.  This allows the sum of all running guests to use more memory
 than physically available on the host.
 
+Requirements:
+
+xenpaging relies on Intel EPT or AMD RVI, other hardware is not
+supported. Only HVM guests are supported.  The dom0 kernel needs
+paging-aware backend drivers to handle paged granttable entries.
+Currently only dom0 kernels based on classic Xen Linux support this
+functionality.
+
 Usage:
 
-Once the guest is running, run xenpaging with the guest_id and the
-number of pages to page-out:
+Up to now xenpaging is not integrated into libxl/xend, so it has to be
+started manually for each guest.
 
-  chdir /var/lib/xen/xenpaging
-  xenpaging <guest_id>  <number_of_pages>
+Once the guest is running, run xenpaging with the guest_id and the path
+to the pagefile:
+ 
+ /usr/lib/xen/bin/xenpaging -f /path/to/page_file -d dom_id &
 
-To obtain the guest_id, run 'xm list'.
-xenpaging will write the pagefile to the current directory.
-Example with 128MB pagefile on guest 1:
+Once xenpaging runs it needs a memory target, which is the memory
+footprint of the guest. This value (in KiB) must be written manually to
+xenstore. The following example sets the target to 512MB:
 
-  xenpaging 1 32768
+ xenstore-write /local/domain/<dom_id>/memory/target-tot_pages $((1024*512))
 
-Caution: stopping xenpaging manually will cause the guest to stall or
-crash because the paged-out memory is not written back into the guest!
-
-After a reboot of a guest, its guest_id changes, the current xenpaging
-binary has no target anymore. To automate restarting of xenpaging after
-guest reboot, specify the number if pages in the guest configuration
-file /etc/xen/vm/<guest_name>:
-
-xenpaging=32768
-
-Redo the guest with 'xm create /etc/xen/vm/<guest_name>' to activate the
-changes.
-
+Now xenpaging tries to page-out as many pages to keep the overall memory
+footprint of the guest at 512MB.
 
 Todo:
-- implement stopping of xenpaging
-- implement/test live migration
-
+- integrate xenpaging into libxl
 
 # vim: tw=72

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:16 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw4-0000lL-4H; Fri, 31 Aug 2012 01:22:12 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw3-0000kz-0U
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:11 +0000
Received: from [85.158.143.99:42053] by server-2.bemta-4.messagelabs.com id
	C2/DC-21239-2C110405; Fri, 31 Aug 2012 01:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-2.tower-216.messagelabs.com!1346376128!22410634!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17140 invoked from network); 31 Aug 2012 01:22:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0002ec-HX
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0005hI-BD
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Message-Id: <E1T7Fw0-0005hI-BD@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] docs: update xenpaging.txt
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1346345851 -3600
# Node ID 4e6bb38c3a40bb43d8b31374ec14a2b279b0fc24
# Parent  1e5fc9f79c0ecfd8c6a00640691717e40c58b87f
docs: update xenpaging.txt

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 1e5fc9f79c0e -r 4e6bb38c3a40 docs/misc/xenpaging.txt
--- a/docs/misc/xenpaging.txt	Thu Aug 30 17:55:31 2012 +0100
+++ b/docs/misc/xenpaging.txt	Thu Aug 30 17:57:31 2012 +0100
@@ -12,37 +12,34 @@ access the paged-out memory, the page is
 memory.  This allows the sum of all running guests to use more memory
 than physically available on the host.
 
+Requirements:
+
+xenpaging relies on Intel EPT or AMD RVI, other hardware is not
+supported. Only HVM guests are supported.  The dom0 kernel needs
+paging-aware backend drivers to handle paged granttable entries.
+Currently only dom0 kernels based on classic Xen Linux support this
+functionality.
+
 Usage:
 
-Once the guest is running, run xenpaging with the guest_id and the
-number of pages to page-out:
+Up to now xenpaging is not integrated into libxl/xend, so it has to be
+started manually for each guest.
 
-  chdir /var/lib/xen/xenpaging
-  xenpaging <guest_id>  <number_of_pages>
+Once the guest is running, run xenpaging with the guest_id and the path
+to the pagefile:
+ 
+ /usr/lib/xen/bin/xenpaging -f /path/to/page_file -d dom_id &
 
-To obtain the guest_id, run 'xm list'.
-xenpaging will write the pagefile to the current directory.
-Example with 128MB pagefile on guest 1:
+Once xenpaging runs it needs a memory target, which is the memory
+footprint of the guest. This value (in KiB) must be written manually to
+xenstore. The following example sets the target to 512MB:
 
-  xenpaging 1 32768
+ xenstore-write /local/domain/<dom_id>/memory/target-tot_pages $((1024*512))
 
-Caution: stopping xenpaging manually will cause the guest to stall or
-crash because the paged-out memory is not written back into the guest!
-
-After a reboot of a guest, its guest_id changes, the current xenpaging
-binary has no target anymore. To automate restarting of xenpaging after
-guest reboot, specify the number if pages in the guest configuration
-file /etc/xen/vm/<guest_name>:
-
-xenpaging=32768
-
-Redo the guest with 'xm create /etc/xen/vm/<guest_name>' to activate the
-changes.
-
+Now xenpaging tries to page-out as many pages to keep the overall memory
+footprint of the guest at 512MB.
 
 Todo:
-- implement stopping of xenpaging
-- implement/test live migration
-
+- integrate xenpaging into libxl
 
 # vim: tw=72

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw4-0000lQ-6i; Fri, 31 Aug 2012 01:22:12 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw3-0000l2-Et
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:11 +0000
Received: from [85.158.143.35:4203] by server-3.bemta-4.messagelabs.com id
	6B/1A-08232-2C110405; Fri, 31 Aug 2012 01:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-21.messagelabs.com!1346376129!5565805!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15868 invoked from network); 31 Aug 2012 01:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0002eg-Ts
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0005hX-SL
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Message-Id: <E1T7Fw0-0005hX-SL@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nvmx: fix unhandled nested XSETBV
	VMExit
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dongxiao Xu <dongxiao.xu@intel.com>
# Date 1346345903 -3600
# Node ID 825f784616220fb05fd929b9f9ae3313ce6cde75
# Parent  4e6bb38c3a40bb43d8b31374ec14a2b279b0fc24
nvmx: fix unhandled nested XSETBV VMExit

If the L2 guest issue a XSETBV instruction, we need to deliver to
L1 guest.

This could fix the Fedora 17 booting hang issue as a L2 guest.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 4e6bb38c3a40 -r 825f78461622 xen/arch/x86/hvm/vmx/vvmx.c
--- a/xen/arch/x86/hvm/vmx/vvmx.c	Thu Aug 30 17:57:31 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vvmx.c	Thu Aug 30 17:58:23 2012 +0100
@@ -1506,6 +1506,7 @@ int nvmx_n2_vmexit_handler(struct cpu_us
     case EXIT_REASON_VMXOFF:
     case EXIT_REASON_VMXON:
     case EXIT_REASON_INVEPT:
+    case EXIT_REASON_XSETBV:
         /* inject to L1 */
         nvcpu->nv_vmexit_pending = 1;
         break;

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw4-0000lQ-6i; Fri, 31 Aug 2012 01:22:12 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw3-0000l2-Et
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:11 +0000
Received: from [85.158.143.35:4203] by server-3.bemta-4.messagelabs.com id
	6B/1A-08232-2C110405; Fri, 31 Aug 2012 01:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-4.tower-21.messagelabs.com!1346376129!5565805!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15868 invoked from network); 31 Aug 2012 01:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0002eg-Ts
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0005hX-SL
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Message-Id: <E1T7Fw0-0005hX-SL@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nvmx: fix unhandled nested XSETBV
	VMExit
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dongxiao Xu <dongxiao.xu@intel.com>
# Date 1346345903 -3600
# Node ID 825f784616220fb05fd929b9f9ae3313ce6cde75
# Parent  4e6bb38c3a40bb43d8b31374ec14a2b279b0fc24
nvmx: fix unhandled nested XSETBV VMExit

If the L2 guest issue a XSETBV instruction, we need to deliver to
L1 guest.

This could fix the Fedora 17 booting hang issue as a L2 guest.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 4e6bb38c3a40 -r 825f78461622 xen/arch/x86/hvm/vmx/vvmx.c
--- a/xen/arch/x86/hvm/vmx/vvmx.c	Thu Aug 30 17:57:31 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vvmx.c	Thu Aug 30 17:58:23 2012 +0100
@@ -1506,6 +1506,7 @@ int nvmx_n2_vmexit_handler(struct cpu_us
     case EXIT_REASON_VMXOFF:
     case EXIT_REASON_VMXON:
     case EXIT_REASON_INVEPT:
+    case EXIT_REASON_XSETBV:
         /* inject to L1 */
         nvcpu->nv_vmexit_pending = 1;
         break;

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw4-0000lV-8u; Fri, 31 Aug 2012 01:22:12 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw3-0000l1-F4
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:11 +0000
Received: from [85.158.138.51:51152] by server-4.bemta-3.messagelabs.com id
	75/6A-24831-2C110405; Fri, 31 Aug 2012 01:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1346376128!23757590!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2311 invoked from network); 31 Aug 2012 01:22:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0002ea-Cj
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fvz-0005h3-OJ
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:07 +0000
Message-Id: <E1T7Fvz-0005h3-OJ@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nvmx: fix resource relinquish for
	nested VMX
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dongxiao Xu <dongxiao.xu@intel.com>
# Date 1346345731 -3600
# Node ID 1e5fc9f79c0ecfd8c6a00640691717e40c58b87f
# Parent  a0b5f8102a0013c112d8e2f7c476040e882838ae
nvmx: fix resource relinquish for nested VMX

The previous order of relinquish resource is:
relinquish_domain_resources() -> vcpu_destroy() ->
nvmx_vcpu_destroy().  However some L1 resources like nv_vvmcx and
io_bitmaps are free in nvmx_vcpu_destroy(), therefore the
relinquish_domain_resources() will not reduce the refcnt of the domain
to 0, therefore the latter vcpu release functions will not be called.

To fix this issue, we need to release the nv_vvmcx and io_bitmaps in
relinquish_domain_resources().

Besides, after destroy the nested vcpu, we need to switch the
vmx->vmcs back to the L1 and let the vcpu_destroy() logic to free the
L1 VMCS page.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Thu Aug 30 17:55:31 2012 +0100
@@ -561,6 +561,9 @@ int hvm_domain_initialise(struct domain 
 
 void hvm_domain_relinquish_resources(struct domain *d)
 {
+    if ( hvm_funcs.nhvm_domain_relinquish_resources )
+        hvm_funcs.nhvm_domain_relinquish_resources(d);
+
     hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.ioreq);
     hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.buf_ioreq);
 
diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c	Thu Aug 30 17:55:31 2012 +0100
@@ -1547,7 +1547,8 @@ static struct hvm_function_table __read_
     .nhvm_vcpu_asid       = nvmx_vcpu_asid,
     .nhvm_vmcx_guest_intercepts_trap = nvmx_intercepts_exception,
     .nhvm_vcpu_vmexit_trap = nvmx_vmexit_trap,
-    .nhvm_intr_blocked    = nvmx_intr_blocked
+    .nhvm_intr_blocked    = nvmx_intr_blocked,
+    .nhvm_domain_relinquish_resources = nvmx_domain_relinquish_resources
 };
 
 struct hvm_function_table * __init start_vmx(void)
diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/arch/x86/hvm/vmx/vvmx.c
--- a/xen/arch/x86/hvm/vmx/vvmx.c	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vvmx.c	Thu Aug 30 17:55:31 2012 +0100
@@ -57,7 +57,15 @@ void nvmx_vcpu_destroy(struct vcpu *v)
 {
     struct nestedvcpu *nvcpu = &vcpu_nestedhvm(v);
 
-    nvmx_purge_vvmcs(v);
+    /* 
+     * When destroying the vcpu, it may be running on behalf of L2 guest.
+     * Therefore we need to switch the VMCS pointer back to the L1 VMCS,
+     * in order to avoid double free of L2 VMCS and the possible memory
+     * leak of L1 VMCS page.
+     */
+    if ( nvcpu->nv_n1vmcx )
+        v->arch.hvm_vmx.vmcs = nvcpu->nv_n1vmcx;
+
     if ( nvcpu->nv_n2vmcx ) {
         __vmpclear(virt_to_maddr(nvcpu->nv_n2vmcx));
         free_xenheap_page(nvcpu->nv_n2vmcx);
@@ -65,6 +73,14 @@ void nvmx_vcpu_destroy(struct vcpu *v)
     }
 }
  
+void nvmx_domain_relinquish_resources(struct domain *d)
+{
+    struct vcpu *v;
+
+    for_each_vcpu ( d, v )
+        nvmx_purge_vvmcs(v);
+}
+
 int nvmx_vcpu_reset(struct vcpu *v)
 {
     return 0;
diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h	Thu Aug 30 17:55:31 2012 +0100
@@ -179,6 +179,7 @@ struct hvm_function_table {
     bool_t (*nhvm_vmcx_hap_enabled)(struct vcpu *v);
 
     enum hvm_intblk (*nhvm_intr_blocked)(struct vcpu *v);
+    void (*nhvm_domain_relinquish_resources)(struct domain *d);
 };
 
 extern struct hvm_function_table hvm_funcs;
diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/include/asm-x86/hvm/vmx/vvmx.h
--- a/xen/include/asm-x86/hvm/vmx/vvmx.h	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/include/asm-x86/hvm/vmx/vvmx.h	Thu Aug 30 17:55:31 2012 +0100
@@ -96,6 +96,7 @@ uint32_t nvmx_vcpu_asid(struct vcpu *v);
 enum hvm_intblk nvmx_intr_blocked(struct vcpu *v);
 int nvmx_intercepts_exception(struct vcpu *v, 
                               unsigned int trap, int error_code);
+void nvmx_domain_relinquish_resources(struct domain *d);
 
 int nvmx_handle_vmxon(struct cpu_user_regs *regs);
 int nvmx_handle_vmxoff(struct cpu_user_regs *regs);

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:17 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:17 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw4-0000lV-8u; Fri, 31 Aug 2012 01:22:12 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw3-0000l1-F4
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:11 +0000
Received: from [85.158.138.51:51152] by server-4.bemta-3.messagelabs.com id
	75/6A-24831-2C110405; Fri, 31 Aug 2012 01:22:10 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-10.tower-174.messagelabs.com!1346376128!23757590!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2311 invoked from network); 31 Aug 2012 01:22:09 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-174.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:09 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw0-0002ea-Cj
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fvz-0005h3-OJ
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:07 +0000
Message-Id: <E1T7Fvz-0005h3-OJ@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:07 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] nvmx: fix resource relinquish for
	nested VMX
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Dongxiao Xu <dongxiao.xu@intel.com>
# Date 1346345731 -3600
# Node ID 1e5fc9f79c0ecfd8c6a00640691717e40c58b87f
# Parent  a0b5f8102a0013c112d8e2f7c476040e882838ae
nvmx: fix resource relinquish for nested VMX

The previous order of relinquish resource is:
relinquish_domain_resources() -> vcpu_destroy() ->
nvmx_vcpu_destroy().  However some L1 resources like nv_vvmcx and
io_bitmaps are free in nvmx_vcpu_destroy(), therefore the
relinquish_domain_resources() will not reduce the refcnt of the domain
to 0, therefore the latter vcpu release functions will not be called.

To fix this issue, we need to release the nv_vvmcx and io_bitmaps in
relinquish_domain_resources().

Besides, after destroy the nested vcpu, we need to switch the
vmx->vmcs back to the L1 and let the vcpu_destroy() logic to free the
L1 VMCS page.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c	Thu Aug 30 17:55:31 2012 +0100
@@ -561,6 +561,9 @@ int hvm_domain_initialise(struct domain 
 
 void hvm_domain_relinquish_resources(struct domain *d)
 {
+    if ( hvm_funcs.nhvm_domain_relinquish_resources )
+        hvm_funcs.nhvm_domain_relinquish_resources(d);
+
     hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.ioreq);
     hvm_destroy_ioreq_page(d, &d->arch.hvm_domain.buf_ioreq);
 
diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c	Thu Aug 30 17:55:31 2012 +0100
@@ -1547,7 +1547,8 @@ static struct hvm_function_table __read_
     .nhvm_vcpu_asid       = nvmx_vcpu_asid,
     .nhvm_vmcx_guest_intercepts_trap = nvmx_intercepts_exception,
     .nhvm_vcpu_vmexit_trap = nvmx_vmexit_trap,
-    .nhvm_intr_blocked    = nvmx_intr_blocked
+    .nhvm_intr_blocked    = nvmx_intr_blocked,
+    .nhvm_domain_relinquish_resources = nvmx_domain_relinquish_resources
 };
 
 struct hvm_function_table * __init start_vmx(void)
diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/arch/x86/hvm/vmx/vvmx.c
--- a/xen/arch/x86/hvm/vmx/vvmx.c	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/arch/x86/hvm/vmx/vvmx.c	Thu Aug 30 17:55:31 2012 +0100
@@ -57,7 +57,15 @@ void nvmx_vcpu_destroy(struct vcpu *v)
 {
     struct nestedvcpu *nvcpu = &vcpu_nestedhvm(v);
 
-    nvmx_purge_vvmcs(v);
+    /* 
+     * When destroying the vcpu, it may be running on behalf of L2 guest.
+     * Therefore we need to switch the VMCS pointer back to the L1 VMCS,
+     * in order to avoid double free of L2 VMCS and the possible memory
+     * leak of L1 VMCS page.
+     */
+    if ( nvcpu->nv_n1vmcx )
+        v->arch.hvm_vmx.vmcs = nvcpu->nv_n1vmcx;
+
     if ( nvcpu->nv_n2vmcx ) {
         __vmpclear(virt_to_maddr(nvcpu->nv_n2vmcx));
         free_xenheap_page(nvcpu->nv_n2vmcx);
@@ -65,6 +73,14 @@ void nvmx_vcpu_destroy(struct vcpu *v)
     }
 }
  
+void nvmx_domain_relinquish_resources(struct domain *d)
+{
+    struct vcpu *v;
+
+    for_each_vcpu ( d, v )
+        nvmx_purge_vvmcs(v);
+}
+
 int nvmx_vcpu_reset(struct vcpu *v)
 {
     return 0;
diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/include/asm-x86/hvm/hvm.h
--- a/xen/include/asm-x86/hvm/hvm.h	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/include/asm-x86/hvm/hvm.h	Thu Aug 30 17:55:31 2012 +0100
@@ -179,6 +179,7 @@ struct hvm_function_table {
     bool_t (*nhvm_vmcx_hap_enabled)(struct vcpu *v);
 
     enum hvm_intblk (*nhvm_intr_blocked)(struct vcpu *v);
+    void (*nhvm_domain_relinquish_resources)(struct domain *d);
 };
 
 extern struct hvm_function_table hvm_funcs;
diff -r a0b5f8102a00 -r 1e5fc9f79c0e xen/include/asm-x86/hvm/vmx/vvmx.h
--- a/xen/include/asm-x86/hvm/vmx/vvmx.h	Tue Aug 28 22:40:45 2012 +0100
+++ b/xen/include/asm-x86/hvm/vmx/vvmx.h	Thu Aug 30 17:55:31 2012 +0100
@@ -96,6 +96,7 @@ uint32_t nvmx_vcpu_asid(struct vcpu *v);
 enum hvm_intblk nvmx_intr_blocked(struct vcpu *v);
 int nvmx_intercepts_exception(struct vcpu *v, 
                               unsigned int trap, int error_code);
+void nvmx_domain_relinquish_resources(struct domain *d);
 
 int nvmx_handle_vmxon(struct cpu_user_regs *regs);
 int nvmx_handle_vmxoff(struct cpu_user_regs *regs);

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw6-0000lv-EP; Fri, 31 Aug 2012 01:22:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw5-0000kz-Jk
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:13 +0000
Received: from [85.158.143.99:44949] by server-2.bemta-4.messagelabs.com id
	F7/DC-21239-5C110405; Fri, 31 Aug 2012 01:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-216.messagelabs.com!1346376130!20699762!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17870 invoked from network); 31 Aug 2012 01:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw2-0002em-5p
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw1-0005i1-U3
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:09 +0000
Message-Id: <E1T7Fw1-0005i1-U3@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/i8259: Clean up
	_mask_and_ack_8259A_irq().
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1346347040 -3600
# Node ID 9e5665f9f430a25e3447431047f1cea59320667f
# Parent  4f3fc4aadcc1efc544b850a98141dc0d0dcc73e2
x86/i8259: Clean up _mask_and_ack_8259A_irq().

Signed-off-by: Keir Fraser <keir@xen.org>
---


diff -r 4f3fc4aadcc1 -r 9e5665f9f430 xen/arch/x86/i8259.c
--- a/xen/arch/x86/i8259.c	Thu Aug 30 18:06:39 2012 +0100
+++ b/xen/arch/x86/i8259.c	Thu Aug 30 18:17:20 2012 +0100
@@ -123,6 +123,8 @@ static struct hw_interrupt_type __read_m
  * 8259A PIC functions to handle ISA devices:
  */
 
+#define aeoi_mode (i8259A_irq_type.ack == disable_8259A_irq)
+
 /*
  * This contains the irq mask for both 8259A irq controllers,
  */
@@ -248,10 +250,10 @@ static bool_t _mask_and_ack_8259A_irq(un
 {
     unsigned int irqmask = 1 << irq;
     unsigned long flags;
-    bool_t real_irq = 1; /* Assume real unless spurious */
-    bool_t need_eoi = i8259A_irq_type.ack != disable_8259A_irq;
+    bool_t is_real_irq = 1; /* Assume real unless spurious */
 
     spin_lock_irqsave(&i8259A_lock, flags);
+
     /*
      * Lightweight spurious IRQ detection. We do not want
      * to overdo spurious IRQ handling - it's usually a sign
@@ -267,46 +269,10 @@ static bool_t _mask_and_ack_8259A_irq(un
      * but should be enough to warn the user that there
      * is something bad going on ...
      */
-    if (cached_irq_mask & irqmask)
-        goto spurious_8259A_irq;
-    cached_irq_mask |= irqmask;
-
- handle_real_irq:
-    if (irq & 8) {
-        inb(0xA1);              /* DUMMY - (do we need this?) */
-        outb(cached_A1,0xA1);
-        if ( need_eoi )
-        {
-            outb(0x60 + (irq & 7), 0xA0);/* 'Specific EOI' to slave */
-            outb(0x62,0x20);        /* 'Specific EOI' to master-IRQ2 */
-        }
-    } else {
-        inb(0x21);              /* DUMMY - (do we need this?) */
-        outb(cached_21,0x21);
-        if ( need_eoi )
-            outb(0x60 + irq, 0x20);/* 'Specific EOI' to master */
-    }
-    spin_unlock_irqrestore(&i8259A_lock, flags);
-    return real_irq;
-
- spurious_8259A_irq:
-    /*
-     * this is the slow path - should happen rarely.
-     */
-    if (i8259A_irq_real(irq))
-        /*
-         * oops, the IRQ _is_ in service according to the
-         * 8259A - not spurious, go handle it.
-         */
-        goto handle_real_irq;
-
-    {
+    if ((cached_irq_mask & irqmask) && !i8259A_irq_real(irq)) {
         static int spurious_irq_mask;
-        real_irq = 0;
-        /*
-         * At this point we can be sure the IRQ is spurious,
-         * lets ACK and report it. [once per IRQ]
-         */
+        is_real_irq = 0;
+        /* Report spurious IRQ, once per IRQ line. */
         if (!(spurious_irq_mask & irqmask)) {
             printk("spurious 8259A interrupt: IRQ%d.\n", irq);
             spurious_irq_mask |= irqmask;
@@ -316,8 +282,27 @@ static bool_t _mask_and_ack_8259A_irq(un
          * but in Linux this does not cause problems and is
          * simpler for us.
          */
-        goto handle_real_irq;
     }
+
+    cached_irq_mask |= irqmask;
+
+    if (irq & 8) {
+        inb(0xA1);              /* DUMMY - (do we need this?) */
+        outb(cached_A1,0xA1);
+        if (!aeoi_mode) {
+            outb(0x60 + (irq & 7), 0xA0);/* 'Specific EOI' to slave */
+            outb(0x62,0x20);        /* 'Specific EOI' to master-IRQ2 */
+        }
+    } else {
+        inb(0x21);              /* DUMMY - (do we need this?) */
+        outb(cached_21,0x21);
+        if (!aeoi_mode)
+            outb(0x60 + irq, 0x20);/* 'Specific EOI' to master */
+    }
+
+    spin_unlock_irqrestore(&i8259A_lock, flags);
+
+    return is_real_irq;
 }
 
 static char irq_trigger[2];
@@ -339,7 +324,7 @@ static void save_ELCR(char *trigger)
 
 int i8259A_resume(void)
 {
-    init_8259A(i8259A_irq_type.ack == disable_8259A_irq);
+    init_8259A(aeoi_mode);
     restore_ELCR(irq_trigger);
     return 0;
 }

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:18 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:18 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw6-0000lv-EP; Fri, 31 Aug 2012 01:22:14 +0000
Received: from mail6.bemta4.messagelabs.com ([85.158.143.247])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw5-0000kz-Jk
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:13 +0000
Received: from [85.158.143.99:44949] by server-2.bemta-4.messagelabs.com id
	F7/DC-21239-5C110405; Fri, 31 Aug 2012 01:22:13 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-6.tower-216.messagelabs.com!1346376130!20699762!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17870 invoked from network); 31 Aug 2012 01:22:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-216.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:11 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw2-0002em-5p
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw1-0005i1-U3
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:09 +0000
Message-Id: <E1T7Fw1-0005i1-U3@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:09 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/i8259: Clean up
	_mask_and_ack_8259A_irq().
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Keir Fraser <keir@xen.org>
# Date 1346347040 -3600
# Node ID 9e5665f9f430a25e3447431047f1cea59320667f
# Parent  4f3fc4aadcc1efc544b850a98141dc0d0dcc73e2
x86/i8259: Clean up _mask_and_ack_8259A_irq().

Signed-off-by: Keir Fraser <keir@xen.org>
---


diff -r 4f3fc4aadcc1 -r 9e5665f9f430 xen/arch/x86/i8259.c
--- a/xen/arch/x86/i8259.c	Thu Aug 30 18:06:39 2012 +0100
+++ b/xen/arch/x86/i8259.c	Thu Aug 30 18:17:20 2012 +0100
@@ -123,6 +123,8 @@ static struct hw_interrupt_type __read_m
  * 8259A PIC functions to handle ISA devices:
  */
 
+#define aeoi_mode (i8259A_irq_type.ack == disable_8259A_irq)
+
 /*
  * This contains the irq mask for both 8259A irq controllers,
  */
@@ -248,10 +250,10 @@ static bool_t _mask_and_ack_8259A_irq(un
 {
     unsigned int irqmask = 1 << irq;
     unsigned long flags;
-    bool_t real_irq = 1; /* Assume real unless spurious */
-    bool_t need_eoi = i8259A_irq_type.ack != disable_8259A_irq;
+    bool_t is_real_irq = 1; /* Assume real unless spurious */
 
     spin_lock_irqsave(&i8259A_lock, flags);
+
     /*
      * Lightweight spurious IRQ detection. We do not want
      * to overdo spurious IRQ handling - it's usually a sign
@@ -267,46 +269,10 @@ static bool_t _mask_and_ack_8259A_irq(un
      * but should be enough to warn the user that there
      * is something bad going on ...
      */
-    if (cached_irq_mask & irqmask)
-        goto spurious_8259A_irq;
-    cached_irq_mask |= irqmask;
-
- handle_real_irq:
-    if (irq & 8) {
-        inb(0xA1);              /* DUMMY - (do we need this?) */
-        outb(cached_A1,0xA1);
-        if ( need_eoi )
-        {
-            outb(0x60 + (irq & 7), 0xA0);/* 'Specific EOI' to slave */
-            outb(0x62,0x20);        /* 'Specific EOI' to master-IRQ2 */
-        }
-    } else {
-        inb(0x21);              /* DUMMY - (do we need this?) */
-        outb(cached_21,0x21);
-        if ( need_eoi )
-            outb(0x60 + irq, 0x20);/* 'Specific EOI' to master */
-    }
-    spin_unlock_irqrestore(&i8259A_lock, flags);
-    return real_irq;
-
- spurious_8259A_irq:
-    /*
-     * this is the slow path - should happen rarely.
-     */
-    if (i8259A_irq_real(irq))
-        /*
-         * oops, the IRQ _is_ in service according to the
-         * 8259A - not spurious, go handle it.
-         */
-        goto handle_real_irq;
-
-    {
+    if ((cached_irq_mask & irqmask) && !i8259A_irq_real(irq)) {
         static int spurious_irq_mask;
-        real_irq = 0;
-        /*
-         * At this point we can be sure the IRQ is spurious,
-         * lets ACK and report it. [once per IRQ]
-         */
+        is_real_irq = 0;
+        /* Report spurious IRQ, once per IRQ line. */
         if (!(spurious_irq_mask & irqmask)) {
             printk("spurious 8259A interrupt: IRQ%d.\n", irq);
             spurious_irq_mask |= irqmask;
@@ -316,8 +282,27 @@ static bool_t _mask_and_ack_8259A_irq(un
          * but in Linux this does not cause problems and is
          * simpler for us.
          */
-        goto handle_real_irq;
     }
+
+    cached_irq_mask |= irqmask;
+
+    if (irq & 8) {
+        inb(0xA1);              /* DUMMY - (do we need this?) */
+        outb(cached_A1,0xA1);
+        if (!aeoi_mode) {
+            outb(0x60 + (irq & 7), 0xA0);/* 'Specific EOI' to slave */
+            outb(0x62,0x20);        /* 'Specific EOI' to master-IRQ2 */
+        }
+    } else {
+        inb(0x21);              /* DUMMY - (do we need this?) */
+        outb(cached_21,0x21);
+        if (!aeoi_mode)
+            outb(0x60 + irq, 0x20);/* 'Specific EOI' to master */
+    }
+
+    spin_unlock_irqrestore(&i8259A_lock, flags);
+
+    return is_real_irq;
 }
 
 static char irq_trigger[2];
@@ -339,7 +324,7 @@ static void save_ELCR(char *trigger)
 
 int i8259A_resume(void)
 {
-    init_8259A(i8259A_irq_type.ack == disable_8259A_irq);
+    init_8259A(aeoi_mode);
     restore_ELCR(irq_trigger);
     return 0;
 }

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw5-0000lh-Bj; Fri, 31 Aug 2012 01:22:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw4-0000lK-GJ
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:12 +0000
Received: from [85.158.139.83:14849] by server-10.bemta-5.messagelabs.com id
	21/CB-10969-3C110405; Fri, 31 Aug 2012 01:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-182.messagelabs.com!1346376130!27274063!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8583 invoked from network); 31 Aug 2012 01:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw1-0002ej-Qb
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw1-0005hm-DA
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:09 +0000
Message-Id: <E1T7Fw1-0005hm-DA@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/i8259: Handle bogus spurious
	interrupts more quietly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1346346399 -3600
# Node ID 4f3fc4aadcc1efc544b850a98141dc0d0dcc73e2
# Parent  825f784616220fb05fd929b9f9ae3313ce6cde75
x86/i8259: Handle bogus spurious interrupts more quietly

c/s 25336:edd7c7ad1ad2 introduced the concept of a bogus vector, for
in irqs delivered through the i8259 PIC after IO-APICs had been set
up.

However, if supurious PIC vectors are received, many "No irq handler
for vector" log messages can be seen on the console.

This patch adds to the bogus vector logic to detect spurious PIC
vectors and simply ignore them.  _mask_and_ack_8259A_irq() has been
modified to return a boolean indicating whether the irq is real or
not, and in the case of a spurious vector, the error in do_IRQ() is
not printed.

One complication is that now, _mask_and_ack_8259A_irq() can get called
whatever the ack mode is, so has been altered to work out whether it
should EOI the irq or not.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 825f78461622 -r 4f3fc4aadcc1 xen/arch/x86/i8259.c
--- a/xen/arch/x86/i8259.c	Thu Aug 30 17:58:23 2012 +0100
+++ b/xen/arch/x86/i8259.c	Thu Aug 30 18:06:39 2012 +0100
@@ -85,10 +85,12 @@ BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) BU
 
 static DEFINE_SPINLOCK(i8259A_lock);
 
-static void _mask_and_ack_8259A_irq(unsigned int irq);
+static bool_t _mask_and_ack_8259A_irq(unsigned int irq);
 
-void (*__read_mostly bogus_8259A_irq)(unsigned int irq) =
-    _mask_and_ack_8259A_irq;
+bool_t bogus_8259A_irq(unsigned int irq)
+{
+    return _mask_and_ack_8259A_irq(irq);
+}
 
 static void mask_and_ack_8259A_irq(struct irq_desc *desc)
 {
@@ -239,12 +241,15 @@ static inline int i8259A_irq_real(unsign
  * Careful! The 8259A is a fragile beast, it pretty
  * much _has_ to be done exactly like this (mask it
  * first, _then_ send the EOI, and the order of EOI
- * to the two 8259s is important!
+ * to the two 8259s is important!  Return a boolean
+ * indicating whether the irq was genuine or spurious.
  */
-static void _mask_and_ack_8259A_irq(unsigned int irq)
+static bool_t _mask_and_ack_8259A_irq(unsigned int irq)
 {
     unsigned int irqmask = 1 << irq;
     unsigned long flags;
+    bool_t real_irq = 1; /* Assume real unless spurious */
+    bool_t need_eoi = i8259A_irq_type.ack != disable_8259A_irq;
 
     spin_lock_irqsave(&i8259A_lock, flags);
     /*
@@ -270,15 +275,19 @@ static void _mask_and_ack_8259A_irq(unsi
     if (irq & 8) {
         inb(0xA1);              /* DUMMY - (do we need this?) */
         outb(cached_A1,0xA1);
-        outb(0x60 + (irq & 7), 0xA0);/* 'Specific EOI' to slave */
-        outb(0x62,0x20);        /* 'Specific EOI' to master-IRQ2 */
+        if ( need_eoi )
+        {
+            outb(0x60 + (irq & 7), 0xA0);/* 'Specific EOI' to slave */
+            outb(0x62,0x20);        /* 'Specific EOI' to master-IRQ2 */
+        }
     } else {
         inb(0x21);              /* DUMMY - (do we need this?) */
         outb(cached_21,0x21);
-        outb(0x60 + irq, 0x20);/* 'Specific EOI' to master */
+        if ( need_eoi )
+            outb(0x60 + irq, 0x20);/* 'Specific EOI' to master */
     }
     spin_unlock_irqrestore(&i8259A_lock, flags);
-    return;
+    return real_irq;
 
  spurious_8259A_irq:
     /*
@@ -293,6 +302,7 @@ static void _mask_and_ack_8259A_irq(unsi
 
     {
         static int spurious_irq_mask;
+        real_irq = 0;
         /*
          * At this point we can be sure the IRQ is spurious,
          * lets ACK and report it. [once per IRQ]
@@ -367,19 +377,13 @@ void __devinit init_8259A(int auto_eoi)
                                is to be investigated) */
 
     if (auto_eoi)
-    {
         /*
          * in AEOI mode we just have to mask the interrupt
          * when acking.
          */
         i8259A_irq_type.ack = disable_8259A_irq;
-        bogus_8259A_irq = _disable_8259A_irq;
-    }
     else
-    {
         i8259A_irq_type.ack = mask_and_ack_8259A_irq;
-        bogus_8259A_irq = _mask_and_ack_8259A_irq;
-    }
 
     udelay(100);            /* wait for 8259A to initialize */
 
diff -r 825f78461622 -r 4f3fc4aadcc1 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c	Thu Aug 30 17:58:23 2012 +0100
+++ b/xen/arch/x86/irq.c	Thu Aug 30 18:06:39 2012 +0100
@@ -817,11 +817,11 @@ void do_IRQ(struct cpu_user_regs *regs)
                 ack_APIC_irq();
             else
                 kind = "";
-            if ( vector >= FIRST_LEGACY_VECTOR &&
-                 vector <= LAST_LEGACY_VECTOR )
-                bogus_8259A_irq(vector - FIRST_LEGACY_VECTOR);
-            printk("CPU%u: No irq handler for vector %02x (IRQ %d%s)\n",
-                   smp_processor_id(), vector, irq, kind);
+            if ( ! ( vector >= FIRST_LEGACY_VECTOR &&
+                     vector <= LAST_LEGACY_VECTOR &&
+                     bogus_8259A_irq(vector - FIRST_LEGACY_VECTOR) ) )
+                printk("CPU%u: No irq handler for vector %02x (IRQ %d%s)\n",
+                       smp_processor_id(), vector, irq, kind);
             TRACE_1D(TRC_HW_IRQ_UNMAPPED_VECTOR, vector);
         }
         goto out_no_unlock;
diff -r 825f78461622 -r 4f3fc4aadcc1 xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h	Thu Aug 30 17:58:23 2012 +0100
+++ b/xen/include/asm-x86/irq.h	Thu Aug 30 18:06:39 2012 +0100
@@ -104,7 +104,7 @@ void mask_8259A(void);
 void unmask_8259A(void);
 void init_8259A(int aeoi);
 void make_8259A_irq(unsigned int irq);
-extern void (*bogus_8259A_irq)(unsigned int irq);
+bool_t bogus_8259A_irq(unsigned int irq);
 int i8259A_suspend(void);
 int i8259A_resume(void);
 

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

From xen-changelog-bounces@lists.xen.org Fri Aug 31 01:22:20 2012
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 31 Aug 2012 01:22:20 +0000
Received: from localhost ([127.0.0.1] helo=lists.xen.org)
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen-changelog-bounces@lists.xen.org>)
	id 1T7Fw5-0000lh-Bj; Fri, 31 Aug 2012 01:22:13 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw4-0000lK-GJ
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:12 +0000
Received: from [85.158.139.83:14849] by server-10.bemta-5.messagelabs.com id
	21/CB-10969-3C110405; Fri, 31 Aug 2012 01:22:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-13.tower-182.messagelabs.com!1346376130!27274063!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=
X-StarScan-Received: 
X-StarScan-Version: 6.6.1.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8583 invoked from network); 31 Aug 2012 01:22:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-182.messagelabs.com with AES256-SHA encrypted SMTP;
	31 Aug 2012 01:22:10 -0000
Received: from xenbits.xen.org ([50.57.170.242])
	by mail.xen.org with esmtp (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw1-0002ej-Qb
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1T7Fw1-0005hm-DA
	for xen-changelog@lists.xensource.com; Fri, 31 Aug 2012 01:22:09 +0000
Message-Id: <E1T7Fw1-0005hm-DA@xenbits.xen.org>
Date: Fri, 31 Aug 2012 01:22:08 +0000
From: Xen patchbot-unstable <patchbot@xen.org>
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen-unstable] x86/i8259: Handle bogus spurious
	interrupts more quietly
X-BeenThere: xen-changelog@lists.xen.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: xen-devel@lists.xensource.com
List-Id: "Change log for Mercurial \(receive only\)"
	<xen-changelog.lists.xen.org>
List-Unsubscribe: <http://lists.xen.org/cgi-bin/mailman/options/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xen.org>
List-Help: <mailto:xen-changelog-request@lists.xen.org?subject=help>
List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-changelog>, 
	<mailto:xen-changelog-request@lists.xen.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@citrix.com>
# Date 1346346399 -3600
# Node ID 4f3fc4aadcc1efc544b850a98141dc0d0dcc73e2
# Parent  825f784616220fb05fd929b9f9ae3313ce6cde75
x86/i8259: Handle bogus spurious interrupts more quietly

c/s 25336:edd7c7ad1ad2 introduced the concept of a bogus vector, for
in irqs delivered through the i8259 PIC after IO-APICs had been set
up.

However, if supurious PIC vectors are received, many "No irq handler
for vector" log messages can be seen on the console.

This patch adds to the bogus vector logic to detect spurious PIC
vectors and simply ignore them.  _mask_and_ack_8259A_irq() has been
modified to return a boolean indicating whether the irq is real or
not, and in the case of a spurious vector, the error in do_IRQ() is
not printed.

One complication is that now, _mask_and_ack_8259A_irq() can get called
whatever the ack mode is, so has been altered to work out whether it
should EOI the irq or not.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
---


diff -r 825f78461622 -r 4f3fc4aadcc1 xen/arch/x86/i8259.c
--- a/xen/arch/x86/i8259.c	Thu Aug 30 17:58:23 2012 +0100
+++ b/xen/arch/x86/i8259.c	Thu Aug 30 18:06:39 2012 +0100
@@ -85,10 +85,12 @@ BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) BU
 
 static DEFINE_SPINLOCK(i8259A_lock);
 
-static void _mask_and_ack_8259A_irq(unsigned int irq);
+static bool_t _mask_and_ack_8259A_irq(unsigned int irq);
 
-void (*__read_mostly bogus_8259A_irq)(unsigned int irq) =
-    _mask_and_ack_8259A_irq;
+bool_t bogus_8259A_irq(unsigned int irq)
+{
+    return _mask_and_ack_8259A_irq(irq);
+}
 
 static void mask_and_ack_8259A_irq(struct irq_desc *desc)
 {
@@ -239,12 +241,15 @@ static inline int i8259A_irq_real(unsign
  * Careful! The 8259A is a fragile beast, it pretty
  * much _has_ to be done exactly like this (mask it
  * first, _then_ send the EOI, and the order of EOI
- * to the two 8259s is important!
+ * to the two 8259s is important!  Return a boolean
+ * indicating whether the irq was genuine or spurious.
  */
-static void _mask_and_ack_8259A_irq(unsigned int irq)
+static bool_t _mask_and_ack_8259A_irq(unsigned int irq)
 {
     unsigned int irqmask = 1 << irq;
     unsigned long flags;
+    bool_t real_irq = 1; /* Assume real unless spurious */
+    bool_t need_eoi = i8259A_irq_type.ack != disable_8259A_irq;
 
     spin_lock_irqsave(&i8259A_lock, flags);
     /*
@@ -270,15 +275,19 @@ static void _mask_and_ack_8259A_irq(unsi
     if (irq & 8) {
         inb(0xA1);              /* DUMMY - (do we need this?) */
         outb(cached_A1,0xA1);
-        outb(0x60 + (irq & 7), 0xA0);/* 'Specific EOI' to slave */
-        outb(0x62,0x20);        /* 'Specific EOI' to master-IRQ2 */
+        if ( need_eoi )
+        {
+            outb(0x60 + (irq & 7), 0xA0);/* 'Specific EOI' to slave */
+            outb(0x62,0x20);        /* 'Specific EOI' to master-IRQ2 */
+        }
     } else {
         inb(0x21);              /* DUMMY - (do we need this?) */
         outb(cached_21,0x21);
-        outb(0x60 + irq, 0x20);/* 'Specific EOI' to master */
+        if ( need_eoi )
+            outb(0x60 + irq, 0x20);/* 'Specific EOI' to master */
     }
     spin_unlock_irqrestore(&i8259A_lock, flags);
-    return;
+    return real_irq;
 
  spurious_8259A_irq:
     /*
@@ -293,6 +302,7 @@ static void _mask_and_ack_8259A_irq(unsi
 
     {
         static int spurious_irq_mask;
+        real_irq = 0;
         /*
          * At this point we can be sure the IRQ is spurious,
          * lets ACK and report it. [once per IRQ]
@@ -367,19 +377,13 @@ void __devinit init_8259A(int auto_eoi)
                                is to be investigated) */
 
     if (auto_eoi)
-    {
         /*
          * in AEOI mode we just have to mask the interrupt
          * when acking.
          */
         i8259A_irq_type.ack = disable_8259A_irq;
-        bogus_8259A_irq = _disable_8259A_irq;
-    }
     else
-    {
         i8259A_irq_type.ack = mask_and_ack_8259A_irq;
-        bogus_8259A_irq = _mask_and_ack_8259A_irq;
-    }
 
     udelay(100);            /* wait for 8259A to initialize */
 
diff -r 825f78461622 -r 4f3fc4aadcc1 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c	Thu Aug 30 17:58:23 2012 +0100
+++ b/xen/arch/x86/irq.c	Thu Aug 30 18:06:39 2012 +0100
@@ -817,11 +817,11 @@ void do_IRQ(struct cpu_user_regs *regs)
                 ack_APIC_irq();
             else
                 kind = "";
-            if ( vector >= FIRST_LEGACY_VECTOR &&
-                 vector <= LAST_LEGACY_VECTOR )
-                bogus_8259A_irq(vector - FIRST_LEGACY_VECTOR);
-            printk("CPU%u: No irq handler for vector %02x (IRQ %d%s)\n",
-                   smp_processor_id(), vector, irq, kind);
+            if ( ! ( vector >= FIRST_LEGACY_VECTOR &&
+                     vector <= LAST_LEGACY_VECTOR &&
+                     bogus_8259A_irq(vector - FIRST_LEGACY_VECTOR) ) )
+                printk("CPU%u: No irq handler for vector %02x (IRQ %d%s)\n",
+                       smp_processor_id(), vector, irq, kind);
             TRACE_1D(TRC_HW_IRQ_UNMAPPED_VECTOR, vector);
         }
         goto out_no_unlock;
diff -r 825f78461622 -r 4f3fc4aadcc1 xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h	Thu Aug 30 17:58:23 2012 +0100
+++ b/xen/include/asm-x86/irq.h	Thu Aug 30 18:06:39 2012 +0100
@@ -104,7 +104,7 @@ void mask_8259A(void);
 void unmask_8259A(void);
 void init_8259A(int aeoi);
 void make_8259A_irq(unsigned int irq);
-extern void (*bogus_8259A_irq)(unsigned int irq);
+bool_t bogus_8259A_irq(unsigned int irq);
 int i8259A_suspend(void);
 int i8259A_resume(void);
 

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

