From xen-changelog-bounces@lists.xen.org Tue Apr 01 09:00:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Apr 2014 09:00:56 +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 1WUuYH-0005pj-AK; Tue, 01 Apr 2014 09:00: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 1WUuYG-0005pb-Kp
	for xen-changelog@lists.xensource.com; Tue, 01 Apr 2014 09:00:12 +0000
Received: from [85.158.139.211:28760] by server-14.bemta-5.messagelabs.com id
	EA/BE-15696-B108A335; Tue, 01 Apr 2014 09:00:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-206.messagelabs.com!1396342810!4626750!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29796 invoked from network); 1 Apr 2014 09:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Apr 2014 09: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 1WUuYD-0003QN-Sx
	for xen-changelog@lists.xensource.com; Tue, 01 Apr 2014 09:00:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1WUuYC-000673-DV
	for xen-changelog@lists.xensource.com; Tue, 01 Apr 2014 09:00:09 +0000
Message-Id: <E1WUuYC-000673-DV@xenbits.xen.org>
Date: Tue, 01 Apr 2014 09:00: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] pciback: fix memory leak in
	__xen_pcibk_add_pci_dev()
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 Daeseok Youn <daeseok.youn@gmail.com>
# Date 1396342464 -7200
# Node ID 52cb9a45cf3deb321d5b24d5c4c302a67ede16b1
# Parent  9d5980df7a806e7b3c2c3d864ab24d03c400890c
pciback: fix memory leak in __xen_pcibk_add_pci_dev()

It needs to free dev_entry when it failed to assign to a new slot on
the virtual PCI bus.

smatch says:
 drivers/xen/xen-pciback/vpci.c:142 __xen_pcibk_add_pci_dev() warn:
possible memory leak of 'dev_entry'

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>

Moved kfree() invocation out of locked region.

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


diff -r 9d5980df7a80 -r 52cb9a45cf3d drivers/xen/pciback/vpci.c
--- a/drivers/xen/pciback/vpci.c	Tue Mar 11 14:30:55 2014 +0100
+++ b/drivers/xen/pciback/vpci.c	Tue Apr 01 10:54:24 2014 +0200
@@ -134,9 +134,11 @@ int pciback_add_pci_dev(struct pciback_d
       unlock:
 	spin_unlock_irqrestore(&vpci_dev->lock, flags);
 
-	/* Publish this device. */
-	if(!err)
+	if (!err) {
+		/* Publish this device. */
 		err = publish_cb(pdev, 0, 0, PCI_DEVFN(slot, func), devid);
+	} else
+		kfree(dev_entry);
 
       out:
 	return err;

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

From xen-changelog-bounces@lists.xen.org Tue Apr 01 09:00:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 01 Apr 2014 09:00:56 +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 1WUuYH-0005pj-AK; Tue, 01 Apr 2014 09:00: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 1WUuYG-0005pb-Kp
	for xen-changelog@lists.xensource.com; Tue, 01 Apr 2014 09:00:12 +0000
Received: from [85.158.139.211:28760] by server-14.bemta-5.messagelabs.com id
	EA/BE-15696-B108A335; Tue, 01 Apr 2014 09:00:11 +0000
X-Env-Sender: xen@xenbits.xen.org
X-Msg-Ref: server-16.tower-206.messagelabs.com!1396342810!4626750!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29796 invoked from network); 1 Apr 2014 09:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	1 Apr 2014 09: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 1WUuYD-0003QN-Sx
	for xen-changelog@lists.xensource.com; Tue, 01 Apr 2014 09:00:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <xen@xenbits.xen.org>) id 1WUuYC-000673-DV
	for xen-changelog@lists.xensource.com; Tue, 01 Apr 2014 09:00:09 +0000
Message-Id: <E1WUuYC-000673-DV@xenbits.xen.org>
Date: Tue, 01 Apr 2014 09:00: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] pciback: fix memory leak in
	__xen_pcibk_add_pci_dev()
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 Daeseok Youn <daeseok.youn@gmail.com>
# Date 1396342464 -7200
# Node ID 52cb9a45cf3deb321d5b24d5c4c302a67ede16b1
# Parent  9d5980df7a806e7b3c2c3d864ab24d03c400890c
pciback: fix memory leak in __xen_pcibk_add_pci_dev()

It needs to free dev_entry when it failed to assign to a new slot on
the virtual PCI bus.

smatch says:
 drivers/xen/xen-pciback/vpci.c:142 __xen_pcibk_add_pci_dev() warn:
possible memory leak of 'dev_entry'

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>

Moved kfree() invocation out of locked region.

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


diff -r 9d5980df7a80 -r 52cb9a45cf3d drivers/xen/pciback/vpci.c
--- a/drivers/xen/pciback/vpci.c	Tue Mar 11 14:30:55 2014 +0100
+++ b/drivers/xen/pciback/vpci.c	Tue Apr 01 10:54:24 2014 +0200
@@ -134,9 +134,11 @@ int pciback_add_pci_dev(struct pciback_d
       unlock:
 	spin_unlock_irqrestore(&vpci_dev->lock, flags);
 
-	/* Publish this device. */
-	if(!err)
+	if (!err) {
+		/* Publish this device. */
 		err = publish_cb(pdev, 0, 0, PCI_DEVFN(slot, func), devid);
+	} else
+		kfree(dev_entry);
 
       out:
 	return err;

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:22:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:22: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 1WVCgi-0006eB-Ur; Wed, 02 Apr 2014 04:22:08 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgh-0006e3-2F
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:07 +0000
Received: from [193.109.254.147:18149] by server-11.bemta-14.messagelabs.com
	id 9F/38-09902-E609B335; Wed, 02 Apr 2014 04:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1396412524!5687348!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13788 invoked from network); 2 Apr 2014 04:22:05 -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;
	2 Apr 2014 04:22:05 -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 1WVCge-0000bY-2O
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgd-00007z-R7
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:03 +0000
Date: Wed, 02 Apr 2014 04:22:03 +0000
Message-Id: <E1WVCgd-00007z-R7@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: simplify do_hvm_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

commit 8d134c2e12730a4a3dce9873f4671f6dd8860baf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:30:10 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:30:10 2014 +0100

    x86/HVM: simplify do_hvm_op()
    
    - boundary checks in HVMOP_modified_memory, HVMOP_set_mem_type, and
      HVMOP_set_mem_access: all of these already check for overflow, so
      there's no need to range check the first _and_ last PFN (checking
      the last one suffices)
    - copying back interface structures that were previously copied from
      guest memory can use __copy_to_...(), since copy_from_...() already
      did the address range validation
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index b0da8e7..c74287d 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4291,7 +4291,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 a.value = d->arch.hvm_domain.params[a.index];
                 break;
             }
-            rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
+            rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
         }
 
         HVM_DBG_LOG(DBG_LEVEL_HCALL, "%s param %u = %"PRIx64,
@@ -4389,8 +4389,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail3;
 
         rc = -EINVAL;
-        if ( (a.first_pfn > domain_get_maximum_gpfn(d)) ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail3;
 
@@ -4419,7 +4418,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             /* Check for continuation if it's not the last interation */
             if ( a.nr > 0 && hypercall_preempt_check() )
             {
-                if ( copy_to_guest(arg, &a, 1) )
+                if ( __copy_to_guest(arg, &a, 1) )
                     rc = -EFAULT;
                 else
                     rc = -EAGAIN;
@@ -4468,7 +4467,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 a.mem_type =  HVMMEM_ram_rw;
             else
                 a.mem_type =  HVMMEM_mmio_dm;
-            rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
+            rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
         }
 
     param_fail_getmemtype:
@@ -4504,8 +4503,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail4;
 
         rc = -EINVAL;
-        if ( (a.first_pfn > domain_get_maximum_gpfn(d)) ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail4;
             
@@ -4561,7 +4559,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             /* Check for continuation if it's not the last interation */
             if ( a.nr > 0 && hypercall_preempt_check() )
             {
-                if ( copy_to_guest(arg, &a, 1) )
+                if ( __copy_to_guest(arg, &a, 1) )
                     rc = -EFAULT;
                 else
                     rc = -EAGAIN;
@@ -4598,9 +4596,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
         rc = -EINVAL;
         if ( (a.first_pfn != ~0ull) &&
-             ((a.first_pfn > domain_get_maximum_gpfn(d)) ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
-             ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
+             (((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
             goto param_fail5;
             
         rc = p2m_set_mem_access(d, a.first_pfn, a.nr, a.hvmmem_access);
@@ -4649,7 +4646,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail6;
 
         a.hvmmem_access = access;
-        rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
+        rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
 
     param_fail6:
         rcu_unlock_domain(d);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:22:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:22: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 1WVCgi-0006eB-Ur; Wed, 02 Apr 2014 04:22:08 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgh-0006e3-2F
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:07 +0000
Received: from [193.109.254.147:18149] by server-11.bemta-14.messagelabs.com
	id 9F/38-09902-E609B335; Wed, 02 Apr 2014 04:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1396412524!5687348!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13788 invoked from network); 2 Apr 2014 04:22:05 -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;
	2 Apr 2014 04:22:05 -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 1WVCge-0000bY-2O
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgd-00007z-R7
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:03 +0000
Date: Wed, 02 Apr 2014 04:22:03 +0000
Message-Id: <E1WVCgd-00007z-R7@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: simplify do_hvm_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

commit 8d134c2e12730a4a3dce9873f4671f6dd8860baf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:30:10 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:30:10 2014 +0100

    x86/HVM: simplify do_hvm_op()
    
    - boundary checks in HVMOP_modified_memory, HVMOP_set_mem_type, and
      HVMOP_set_mem_access: all of these already check for overflow, so
      there's no need to range check the first _and_ last PFN (checking
      the last one suffices)
    - copying back interface structures that were previously copied from
      guest memory can use __copy_to_...(), since copy_from_...() already
      did the address range validation
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index b0da8e7..c74287d 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4291,7 +4291,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 a.value = d->arch.hvm_domain.params[a.index];
                 break;
             }
-            rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
+            rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
         }
 
         HVM_DBG_LOG(DBG_LEVEL_HCALL, "%s param %u = %"PRIx64,
@@ -4389,8 +4389,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail3;
 
         rc = -EINVAL;
-        if ( (a.first_pfn > domain_get_maximum_gpfn(d)) ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail3;
 
@@ -4419,7 +4418,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             /* Check for continuation if it's not the last interation */
             if ( a.nr > 0 && hypercall_preempt_check() )
             {
-                if ( copy_to_guest(arg, &a, 1) )
+                if ( __copy_to_guest(arg, &a, 1) )
                     rc = -EFAULT;
                 else
                     rc = -EAGAIN;
@@ -4468,7 +4467,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 a.mem_type =  HVMMEM_ram_rw;
             else
                 a.mem_type =  HVMMEM_mmio_dm;
-            rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
+            rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
         }
 
     param_fail_getmemtype:
@@ -4504,8 +4503,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail4;
 
         rc = -EINVAL;
-        if ( (a.first_pfn > domain_get_maximum_gpfn(d)) ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail4;
             
@@ -4561,7 +4559,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             /* Check for continuation if it's not the last interation */
             if ( a.nr > 0 && hypercall_preempt_check() )
             {
-                if ( copy_to_guest(arg, &a, 1) )
+                if ( __copy_to_guest(arg, &a, 1) )
                     rc = -EFAULT;
                 else
                     rc = -EAGAIN;
@@ -4598,9 +4596,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
         rc = -EINVAL;
         if ( (a.first_pfn != ~0ull) &&
-             ((a.first_pfn > domain_get_maximum_gpfn(d)) ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
-             ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
+             (((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
             goto param_fail5;
             
         rc = p2m_set_mem_access(d, a.first_pfn, a.nr, a.hvmmem_access);
@@ -4649,7 +4646,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail6;
 
         a.hvmmem_access = access;
-        rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
+        rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
 
     param_fail6:
         rcu_unlock_domain(d);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:22:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:22: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 1WVCgu-0006eU-42; Wed, 02 Apr 2014 04:22:20 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgs-0006eM-F4
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:18 +0000
Received: from [85.158.137.68:23064] by server-17.bemta-3.messagelabs.com id
	6C/12-22741-9709B335; Wed, 02 Apr 2014 04:22:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1396412534!4440008!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2179 invoked from network); 2 Apr 2014 04:22:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:22:16 -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 1WVCgo-0000bb-Fw
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgo-00008N-9J
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:14 +0000
Date: Wed, 02 Apr 2014 04:22:14 +0000
Message-Id: <E1WVCgo-00008N-9J@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: fix preemption handling in
	do_hvm_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

commit 8bad6c5626129ffba04dbab3a38115b6f3669596
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:31:23 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:31:23 2014 +0100

    x86/HVM: fix preemption handling in do_hvm_op()
    
    Just like previously done for some mem-op hypercalls, undo preemption
    using the interface structures (altering it in ways the caller may not
    expect) and replace it by storing the continuation point in the high
    bits of sub-operation argument.
    
    This also changes the "nr" fields of struct xen_hvm_track_dirty_vram
    (operation already limited to 1Gb worth of pages) and struct
    xen_hvm_modified_memory to be only 32 bits wide, consistent with those
    of struct xen_set_mem{type,access}. If that's not acceptable for some
    reason, we'd need to shrink the HVMOP_op_bits (while still enforcing
    the [then higher] limit resulting from the need to be able to encode
    the continuation).
    
    Whether (and if so how) to adjust xc_hvm_track_dirty_vram(),
    xc_hvm_modified_memory(), xc_hvm_set_mem_type(), and
    xc_hvm_set_mem_access() to reflect the 32-bit restriction on "nr" is
    unclear: If the APIs need to remain stable, all four functions should
    probably check that there was no truncation. Preferably their
    parameters would be changed to uint32_t or unsigned int, though.
    
    As a minor cleanup, along with introducing the switch-wide "pfn" the
    redundant "d" is also being converted to a switch-wide one.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c          |   77 +++++++++++++++++----------------------
 xen/include/public/hvm/hvm_op.h |    8 ++--
 2 files changed, 37 insertions(+), 48 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index c74287d..d844c8c 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4053,20 +4053,25 @@ static int hvm_replace_event_channel(struct vcpu *v, domid_t remote_domid,
     return 0;
 }
 
+#define HVMOP_op_bits 32
+
 long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
 {
     struct domain *curr_d = current->domain;
+    unsigned long start_iter = op >> HVMOP_op_bits;
     long rc = 0;
 
-    switch ( op )
+    switch ( op &= ((1UL << HVMOP_op_bits) - 1) )
     {
+        struct domain *d;
+        unsigned long pfn;
+
     case HVMOP_set_param:
     case HVMOP_get_param:
     {
         struct xen_hvm_param a;
         struct hvm_ioreq_page *iorp;
-        struct domain *d;
         struct vcpu *v;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4330,7 +4335,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_track_dirty_vram:
     {
         struct xen_hvm_track_dirty_vram a;
-        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4371,7 +4375,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_modified_memory:
     {
         struct xen_hvm_modified_memory a;
-        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4389,7 +4392,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail3;
 
         rc = -EINVAL;
-        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( a.nr < start_iter ||
+             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail3;
 
@@ -4397,9 +4401,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( !paging_mode_log_dirty(d) )
             goto param_fail3;
 
-        while ( a.nr > 0 )
+        for ( pfn = a.first_pfn + start_iter; a.nr > start_iter; ++pfn )
         {
-            unsigned long pfn = a.first_pfn;
             struct page_info *page;
 
             page = get_page_from_gfn(d, pfn, NULL, P2M_UNSHARE);
@@ -4412,16 +4415,13 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 put_page(page);
             }
 
-            a.first_pfn++;
-            a.nr--;
+            ++pfn;
+            ++start_iter;
 
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > 0 && hypercall_preempt_check() )
+            if ( a.nr > start_iter && hypercall_preempt_check() )
             {
-                if ( __copy_to_guest(arg, &a, 1) )
-                    rc = -EFAULT;
-                else
-                    rc = -EAGAIN;
+                rc = -EAGAIN;
                 break;
             }
         }
@@ -4434,7 +4434,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_get_mem_type:
     {
         struct xen_hvm_get_mem_type a;
-        struct domain *d;
         p2m_type_t t;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4478,7 +4477,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_set_mem_type:
     {
         struct xen_hvm_set_mem_type a;
-        struct domain *d;
         
         /* Interface types to internal p2m types */
         static const p2m_type_t memtype[] = {
@@ -4503,20 +4501,19 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail4;
 
         rc = -EINVAL;
-        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( a.nr < start_iter ||
+             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail4;
             
         if ( a.hvmmem_type >= ARRAY_SIZE(memtype) )
             goto param_fail4;
 
-        while ( a.nr )
+        for ( pfn = a.first_pfn + start_iter; a.nr > start_iter; ++pfn )
         {
-            unsigned long pfn = a.first_pfn;
-            p2m_type_t t;
-            p2m_type_t nt;
-            mfn_t mfn;
-            mfn = get_gfn_unshare(d, pfn, &t);
+            p2m_type_t t, nt;
+
+            get_gfn_unshare(d, pfn, &t);
             if ( p2m_is_paging(t) )
             {
                 put_gfn(d, pfn);
@@ -4553,16 +4550,13 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             }
             put_gfn(d, pfn);
 
-            a.first_pfn++;
-            a.nr--;
+            ++pfn;
+            ++start_iter;
 
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > 0 && hypercall_preempt_check() )
+            if ( a.nr > start_iter && hypercall_preempt_check() )
             {
-                if ( __copy_to_guest(arg, &a, 1) )
-                    rc = -EFAULT;
-                else
-                    rc = -EAGAIN;
+                rc = -EAGAIN;
                 goto param_fail4;
             }
         }
@@ -4577,7 +4571,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_set_mem_access:
     {
         struct xen_hvm_set_mem_access a;
-        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4596,19 +4589,17 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
         rc = -EINVAL;
         if ( (a.first_pfn != ~0ull) &&
-             (((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+             (a.nr < start_iter ||
+              ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
               ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
             goto param_fail5;
             
-        rc = p2m_set_mem_access(d, a.first_pfn, a.nr, a.hvmmem_access);
+        rc = p2m_set_mem_access(d, a.first_pfn + start_iter, a.nr - start_iter,
+                                a.hvmmem_access);
         if ( rc > 0 )
         {
-            a.first_pfn += a.nr - rc;
-            a.nr = rc;
-            if ( __copy_to_guest(arg, &a, 1) )
-                rc = -EFAULT;
-            else
-                rc = -EAGAIN;
+            start_iter = a.nr - rc;
+            rc = -EAGAIN;
         }
 
     param_fail5:
@@ -4619,7 +4610,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_get_mem_access:
     {
         struct xen_hvm_get_mem_access a;
-        struct domain *d;
         hvmmem_access_t access;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4656,7 +4646,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_pagetable_dying:
     {
         struct xen_hvm_pagetable_dying a;
-        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4709,7 +4698,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_inject_trap: 
     {
         xen_hvm_inject_trap_t tr;
-        struct domain *d;
         struct vcpu *v;
 
         if ( copy_from_guest(&tr, arg, 1 ) )
@@ -4757,8 +4745,9 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     }
 
     if ( rc == -EAGAIN )
-        rc = hypercall_create_continuation(
-            __HYPERVISOR_hvm_op, "lh", op, arg);
+        rc = hypercall_create_continuation(__HYPERVISOR_hvm_op, "lh",
+                                           op | (start_iter << HVMOP_op_bits),
+                                           arg);
 
     return rc;
 }
diff --git a/xen/include/public/hvm/hvm_op.h b/xen/include/public/hvm/hvm_op.h
index a9aab4b..3204ec4 100644
--- a/xen/include/public/hvm/hvm_op.h
+++ b/xen/include/public/hvm/hvm_op.h
@@ -90,10 +90,10 @@ typedef enum {
 struct xen_hvm_track_dirty_vram {
     /* Domain to be tracked. */
     domid_t  domid;
+    /* Number of pages to track. */
+    uint32_t nr;
     /* First pfn to track. */
     uint64_aligned_t first_pfn;
-    /* Number of pages to track. */
-    uint64_aligned_t nr;
     /* OUT variable. */
     /* Dirty bitmap buffer. */
     XEN_GUEST_HANDLE_64(uint8) dirty_bitmap;
@@ -106,10 +106,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_hvm_track_dirty_vram_t);
 struct xen_hvm_modified_memory {
     /* Domain to be updated. */
     domid_t  domid;
+    /* Number of pages. */
+    uint32_t nr;
     /* First pfn. */
     uint64_aligned_t first_pfn;
-    /* Number of pages. */
-    uint64_aligned_t nr;
 };
 typedef struct xen_hvm_modified_memory xen_hvm_modified_memory_t;
 DEFINE_XEN_GUEST_HANDLE(xen_hvm_modified_memory_t);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:22:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:22: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 1WVCgu-0006eU-42; Wed, 02 Apr 2014 04:22:20 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgs-0006eM-F4
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:18 +0000
Received: from [85.158.137.68:23064] by server-17.bemta-3.messagelabs.com id
	6C/12-22741-9709B335; Wed, 02 Apr 2014 04:22:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1396412534!4440008!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2179 invoked from network); 2 Apr 2014 04:22:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:22:16 -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 1WVCgo-0000bb-Fw
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgo-00008N-9J
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:14 +0000
Date: Wed, 02 Apr 2014 04:22:14 +0000
Message-Id: <E1WVCgo-00008N-9J@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: fix preemption handling in
	do_hvm_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

commit 8bad6c5626129ffba04dbab3a38115b6f3669596
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:31:23 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:31:23 2014 +0100

    x86/HVM: fix preemption handling in do_hvm_op()
    
    Just like previously done for some mem-op hypercalls, undo preemption
    using the interface structures (altering it in ways the caller may not
    expect) and replace it by storing the continuation point in the high
    bits of sub-operation argument.
    
    This also changes the "nr" fields of struct xen_hvm_track_dirty_vram
    (operation already limited to 1Gb worth of pages) and struct
    xen_hvm_modified_memory to be only 32 bits wide, consistent with those
    of struct xen_set_mem{type,access}. If that's not acceptable for some
    reason, we'd need to shrink the HVMOP_op_bits (while still enforcing
    the [then higher] limit resulting from the need to be able to encode
    the continuation).
    
    Whether (and if so how) to adjust xc_hvm_track_dirty_vram(),
    xc_hvm_modified_memory(), xc_hvm_set_mem_type(), and
    xc_hvm_set_mem_access() to reflect the 32-bit restriction on "nr" is
    unclear: If the APIs need to remain stable, all four functions should
    probably check that there was no truncation. Preferably their
    parameters would be changed to uint32_t or unsigned int, though.
    
    As a minor cleanup, along with introducing the switch-wide "pfn" the
    redundant "d" is also being converted to a switch-wide one.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c          |   77 +++++++++++++++++----------------------
 xen/include/public/hvm/hvm_op.h |    8 ++--
 2 files changed, 37 insertions(+), 48 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index c74287d..d844c8c 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4053,20 +4053,25 @@ static int hvm_replace_event_channel(struct vcpu *v, domid_t remote_domid,
     return 0;
 }
 
+#define HVMOP_op_bits 32
+
 long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
 {
     struct domain *curr_d = current->domain;
+    unsigned long start_iter = op >> HVMOP_op_bits;
     long rc = 0;
 
-    switch ( op )
+    switch ( op &= ((1UL << HVMOP_op_bits) - 1) )
     {
+        struct domain *d;
+        unsigned long pfn;
+
     case HVMOP_set_param:
     case HVMOP_get_param:
     {
         struct xen_hvm_param a;
         struct hvm_ioreq_page *iorp;
-        struct domain *d;
         struct vcpu *v;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4330,7 +4335,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_track_dirty_vram:
     {
         struct xen_hvm_track_dirty_vram a;
-        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4371,7 +4375,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_modified_memory:
     {
         struct xen_hvm_modified_memory a;
-        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4389,7 +4392,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail3;
 
         rc = -EINVAL;
-        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( a.nr < start_iter ||
+             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail3;
 
@@ -4397,9 +4401,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( !paging_mode_log_dirty(d) )
             goto param_fail3;
 
-        while ( a.nr > 0 )
+        for ( pfn = a.first_pfn + start_iter; a.nr > start_iter; ++pfn )
         {
-            unsigned long pfn = a.first_pfn;
             struct page_info *page;
 
             page = get_page_from_gfn(d, pfn, NULL, P2M_UNSHARE);
@@ -4412,16 +4415,13 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 put_page(page);
             }
 
-            a.first_pfn++;
-            a.nr--;
+            ++pfn;
+            ++start_iter;
 
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > 0 && hypercall_preempt_check() )
+            if ( a.nr > start_iter && hypercall_preempt_check() )
             {
-                if ( __copy_to_guest(arg, &a, 1) )
-                    rc = -EFAULT;
-                else
-                    rc = -EAGAIN;
+                rc = -EAGAIN;
                 break;
             }
         }
@@ -4434,7 +4434,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_get_mem_type:
     {
         struct xen_hvm_get_mem_type a;
-        struct domain *d;
         p2m_type_t t;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4478,7 +4477,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_set_mem_type:
     {
         struct xen_hvm_set_mem_type a;
-        struct domain *d;
         
         /* Interface types to internal p2m types */
         static const p2m_type_t memtype[] = {
@@ -4503,20 +4501,19 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail4;
 
         rc = -EINVAL;
-        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( a.nr < start_iter ||
+             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail4;
             
         if ( a.hvmmem_type >= ARRAY_SIZE(memtype) )
             goto param_fail4;
 
-        while ( a.nr )
+        for ( pfn = a.first_pfn + start_iter; a.nr > start_iter; ++pfn )
         {
-            unsigned long pfn = a.first_pfn;
-            p2m_type_t t;
-            p2m_type_t nt;
-            mfn_t mfn;
-            mfn = get_gfn_unshare(d, pfn, &t);
+            p2m_type_t t, nt;
+
+            get_gfn_unshare(d, pfn, &t);
             if ( p2m_is_paging(t) )
             {
                 put_gfn(d, pfn);
@@ -4553,16 +4550,13 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             }
             put_gfn(d, pfn);
 
-            a.first_pfn++;
-            a.nr--;
+            ++pfn;
+            ++start_iter;
 
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > 0 && hypercall_preempt_check() )
+            if ( a.nr > start_iter && hypercall_preempt_check() )
             {
-                if ( __copy_to_guest(arg, &a, 1) )
-                    rc = -EFAULT;
-                else
-                    rc = -EAGAIN;
+                rc = -EAGAIN;
                 goto param_fail4;
             }
         }
@@ -4577,7 +4571,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_set_mem_access:
     {
         struct xen_hvm_set_mem_access a;
-        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4596,19 +4589,17 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
         rc = -EINVAL;
         if ( (a.first_pfn != ~0ull) &&
-             (((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+             (a.nr < start_iter ||
+              ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
               ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
             goto param_fail5;
             
-        rc = p2m_set_mem_access(d, a.first_pfn, a.nr, a.hvmmem_access);
+        rc = p2m_set_mem_access(d, a.first_pfn + start_iter, a.nr - start_iter,
+                                a.hvmmem_access);
         if ( rc > 0 )
         {
-            a.first_pfn += a.nr - rc;
-            a.nr = rc;
-            if ( __copy_to_guest(arg, &a, 1) )
-                rc = -EFAULT;
-            else
-                rc = -EAGAIN;
+            start_iter = a.nr - rc;
+            rc = -EAGAIN;
         }
 
     param_fail5:
@@ -4619,7 +4610,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_get_mem_access:
     {
         struct xen_hvm_get_mem_access a;
-        struct domain *d;
         hvmmem_access_t access;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4656,7 +4646,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_pagetable_dying:
     {
         struct xen_hvm_pagetable_dying a;
-        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4709,7 +4698,6 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_inject_trap: 
     {
         xen_hvm_inject_trap_t tr;
-        struct domain *d;
         struct vcpu *v;
 
         if ( copy_from_guest(&tr, arg, 1 ) )
@@ -4757,8 +4745,9 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     }
 
     if ( rc == -EAGAIN )
-        rc = hypercall_create_continuation(
-            __HYPERVISOR_hvm_op, "lh", op, arg);
+        rc = hypercall_create_continuation(__HYPERVISOR_hvm_op, "lh",
+                                           op | (start_iter << HVMOP_op_bits),
+                                           arg);
 
     return rc;
 }
diff --git a/xen/include/public/hvm/hvm_op.h b/xen/include/public/hvm/hvm_op.h
index a9aab4b..3204ec4 100644
--- a/xen/include/public/hvm/hvm_op.h
+++ b/xen/include/public/hvm/hvm_op.h
@@ -90,10 +90,10 @@ typedef enum {
 struct xen_hvm_track_dirty_vram {
     /* Domain to be tracked. */
     domid_t  domid;
+    /* Number of pages to track. */
+    uint32_t nr;
     /* First pfn to track. */
     uint64_aligned_t first_pfn;
-    /* Number of pages to track. */
-    uint64_aligned_t nr;
     /* OUT variable. */
     /* Dirty bitmap buffer. */
     XEN_GUEST_HANDLE_64(uint8) dirty_bitmap;
@@ -106,10 +106,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_hvm_track_dirty_vram_t);
 struct xen_hvm_modified_memory {
     /* Domain to be updated. */
     domid_t  domid;
+    /* Number of pages. */
+    uint32_t nr;
     /* First pfn. */
     uint64_aligned_t first_pfn;
-    /* Number of pages. */
-    uint64_aligned_t nr;
 };
 typedef struct xen_hvm_modified_memory xen_hvm_modified_memory_t;
 DEFINE_XEN_GUEST_HANDLE(xen_hvm_modified_memory_t);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:22:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:22:39 +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 1WVCh3-0006fI-6l; Wed, 02 Apr 2014 04:22:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCh1-0006f6-Ev
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:27 +0000
Received: from [193.109.254.147:18681] by server-2.bemta-14.messagelabs.com id
	B7/3D-21684-2809B335; Wed, 02 Apr 2014 04:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1396412544!5667583!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32479 invoked from network); 2 Apr 2014 04:22:25 -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;
	2 Apr 2014 04:22:25 -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 1WVCgy-0000bk-M5
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgy-00008j-KW
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:24 +0000
Date: Wed, 02 Apr 2014 04:22:24 +0000
Message-Id: <E1WVCgy-00008j-KW@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: correct CPUID leaf 80000008
	handling
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 ef437690af8b75e6758dce77af75a22b63982883
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:33:34 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:33:34 2014 +0100

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   27 ++++++++++++++-------------
 2 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index d844c8c..0eb5b28 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3012,6 +3012,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -3051,8 +3053,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -3069,7 +3069,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -3083,6 +3083,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, NULL, NULL, NULL, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, NULL, NULL, NULL, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 6a358d5..170c8c1 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int __init hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
     {
@@ -170,11 +170,7 @@ static int __init hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -463,7 +459,7 @@ bool_t mtrr_fix_range_msr_set(struct mtrr_state *m, uint32_t row,
 bool_t mtrr_var_range_msr_set(
     struct domain *d, struct mtrr_state *m, uint32_t msr, uint64_t msr_content)
 {
-    uint32_t index, phys_addr, eax, ebx, ecx, edx;
+    uint32_t index, phys_addr, eax;
     uint64_t msr_mask;
     uint64_t *var_range_base = (uint64_t*)m->var_ranges;
 
@@ -474,16 +470,21 @@ bool_t mtrr_var_range_msr_set(
     if ( unlikely(!valid_mtrr_type((uint8_t)msr_content)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, NULL, NULL, NULL);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, NULL, NULL, NULL);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:22:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:22:39 +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 1WVCh3-0006fI-6l; Wed, 02 Apr 2014 04:22:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCh1-0006f6-Ev
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:27 +0000
Received: from [193.109.254.147:18681] by server-2.bemta-14.messagelabs.com id
	B7/3D-21684-2809B335; Wed, 02 Apr 2014 04:22:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1396412544!5667583!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32479 invoked from network); 2 Apr 2014 04:22:25 -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;
	2 Apr 2014 04:22:25 -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 1WVCgy-0000bk-M5
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCgy-00008j-KW
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:24 +0000
Date: Wed, 02 Apr 2014 04:22:24 +0000
Message-Id: <E1WVCgy-00008j-KW@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: correct CPUID leaf 80000008
	handling
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 ef437690af8b75e6758dce77af75a22b63982883
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:33:34 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:33:34 2014 +0100

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   27 ++++++++++++++-------------
 2 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index d844c8c..0eb5b28 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3012,6 +3012,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -3051,8 +3053,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -3069,7 +3069,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -3083,6 +3083,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, NULL, NULL, NULL, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, NULL, NULL, NULL, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 6a358d5..170c8c1 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int __init hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
     {
@@ -170,11 +170,7 @@ static int __init hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -463,7 +459,7 @@ bool_t mtrr_fix_range_msr_set(struct mtrr_state *m, uint32_t row,
 bool_t mtrr_var_range_msr_set(
     struct domain *d, struct mtrr_state *m, uint32_t msr, uint64_t msr_content)
 {
-    uint32_t index, phys_addr, eax, ebx, ecx, edx;
+    uint32_t index, phys_addr, eax;
     uint64_t msr_mask;
     uint64_t *var_range_base = (uint64_t*)m->var_ranges;
 
@@ -474,16 +470,21 @@ bool_t mtrr_var_range_msr_set(
     if ( unlikely(!valid_mtrr_type((uint8_t)msr_content)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, NULL, NULL, NULL);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, NULL, NULL, NULL);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:22:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:22:49 +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 1WVChD-0006go-9i; Wed, 02 Apr 2014 04:22:39 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChC-0006gQ-CQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:38 +0000
Received: from [85.158.139.211:12087] by server-5.bemta-5.messagelabs.com id
	E7/D1-06049-D809B335; Wed, 02 Apr 2014 04:22:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1396412555!4825846!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28854 invoked from network); 2 Apr 2014 04:22:36 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:22:36 -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 1WVCh8-0000bv-Uc
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCh8-000096-QW
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:34 +0000
Date: Wed, 02 Apr 2014 04:22:34 +0000
Message-Id: <E1WVCh8-000096-QW@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/p2m: make p2m_change_type()
	behavior match p2m_change_entry_type_global()'s
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 e5ae6eefdfbc1816b050d02998f69f0b78d5c814
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:36:19 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:36:19 2014 +0100

    x86/p2m: make p2m_change_type() behavior match p2m_change_entry_type_global()'s
    
    - don't reset access permissions
    - don't shatter super pages
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m.c |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index ee527da..ec08e18 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -693,8 +693,7 @@ p2m_type_t p2m_change_type(struct domain *d, unsigned long gfn,
     return pt;
 }
 
-/* Modify the p2m type of a range of gfns from ot to nt.
- * Resets the access permissions. */
+/* Modify the p2m type of a range of gfns from ot to nt. */
 void p2m_change_type_range(struct domain *d, 
                            unsigned long start, unsigned long end,
                            p2m_type_t ot, p2m_type_t nt)
@@ -710,11 +709,29 @@ void p2m_change_type_range(struct domain *d,
     p2m_lock(p2m);
     p2m->defer_nested_flush = 1;
 
-    for ( gfn = start; gfn < end; gfn++ )
+    for ( gfn = start; gfn < end; )
     {
-        mfn = p2m->get_entry(p2m, gfn, &pt, &a, 0, NULL);
+        unsigned int order;
+
+        mfn = p2m->get_entry(p2m, gfn, &pt, &a, 0, &order);
+        while ( order > PAGE_ORDER_4K )
+        {
+            if ( pt != ot )
+                break;
+            if ( !(gfn & ((1UL << order) - 1)) &&
+                 end > (gfn | ((1UL << order) - 1)) )
+                break;
+            if ( order == PAGE_ORDER_1G )
+                order = PAGE_ORDER_2M;
+            else
+                order = PAGE_ORDER_4K;
+        }
         if ( pt == ot )
-            set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, nt, p2m->default_access);
+            set_p2m_entry(p2m, gfn, mfn, order, nt, a);
+        gfn += 1UL << order;
+        gfn &= -1UL << order;
+        if ( !gfn )
+            break;
     }
 
     p2m->defer_nested_flush = 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:22:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:22:49 +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 1WVChD-0006go-9i; Wed, 02 Apr 2014 04:22:39 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChC-0006gQ-CQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:38 +0000
Received: from [85.158.139.211:12087] by server-5.bemta-5.messagelabs.com id
	E7/D1-06049-D809B335; Wed, 02 Apr 2014 04:22:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1396412555!4825846!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28854 invoked from network); 2 Apr 2014 04:22:36 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:22:36 -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 1WVCh8-0000bv-Uc
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCh8-000096-QW
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:34 +0000
Date: Wed, 02 Apr 2014 04:22:34 +0000
Message-Id: <E1WVCh8-000096-QW@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/p2m: make p2m_change_type()
	behavior match p2m_change_entry_type_global()'s
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 e5ae6eefdfbc1816b050d02998f69f0b78d5c814
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:36:19 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:36:19 2014 +0100

    x86/p2m: make p2m_change_type() behavior match p2m_change_entry_type_global()'s
    
    - don't reset access permissions
    - don't shatter super pages
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m.c |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index ee527da..ec08e18 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -693,8 +693,7 @@ p2m_type_t p2m_change_type(struct domain *d, unsigned long gfn,
     return pt;
 }
 
-/* Modify the p2m type of a range of gfns from ot to nt.
- * Resets the access permissions. */
+/* Modify the p2m type of a range of gfns from ot to nt. */
 void p2m_change_type_range(struct domain *d, 
                            unsigned long start, unsigned long end,
                            p2m_type_t ot, p2m_type_t nt)
@@ -710,11 +709,29 @@ void p2m_change_type_range(struct domain *d,
     p2m_lock(p2m);
     p2m->defer_nested_flush = 1;
 
-    for ( gfn = start; gfn < end; gfn++ )
+    for ( gfn = start; gfn < end; )
     {
-        mfn = p2m->get_entry(p2m, gfn, &pt, &a, 0, NULL);
+        unsigned int order;
+
+        mfn = p2m->get_entry(p2m, gfn, &pt, &a, 0, &order);
+        while ( order > PAGE_ORDER_4K )
+        {
+            if ( pt != ot )
+                break;
+            if ( !(gfn & ((1UL << order) - 1)) &&
+                 end > (gfn | ((1UL << order) - 1)) )
+                break;
+            if ( order == PAGE_ORDER_1G )
+                order = PAGE_ORDER_2M;
+            else
+                order = PAGE_ORDER_4K;
+        }
         if ( pt == ot )
-            set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, nt, p2m->default_access);
+            set_p2m_entry(p2m, gfn, mfn, order, nt, a);
+        gfn += 1UL << order;
+        gfn &= -1UL << order;
+        if ( !gfn )
+            break;
     }
 
     p2m->defer_nested_flush = 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVChX-0006kC-IZ; Wed, 02 Apr 2014 04:22:59 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChW-0006jw-Dm
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:58 +0000
Received: from [193.109.254.147:13200] by server-4.bemta-14.messagelabs.com id
	DF/6A-02781-1A09B335; Wed, 02 Apr 2014 04:22:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1396412575!5672062!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10236 invoked from network); 2 Apr 2014 04:22:56 -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;
	2 Apr 2014 04:22:56 -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 1WVChT-0000c7-Bv
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChT-0000AN-Ay
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:55 +0000
Date: Wed, 02 Apr 2014 04:22:55 +0000
Message-Id: <E1WVChT-0000AN-Ay@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: also dump permissions and
	memory 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

commit 90e9c95f9713f413d6e7b2e19492d4e038a319b9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:42:43 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:42:43 2014 +0100

    x86/EPT: also dump permissions and memory types
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m-ept.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index ac4c8f8..99a1084 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -730,6 +730,14 @@ static void ept_dump_p2m_table(unsigned char key)
     unsigned long record_counter = 0;
     struct p2m_domain *p2m;
     struct ept_data *ept;
+    static const char memory_types[8][2] = {
+        [0 ... 7] = "?",
+        [MTRR_TYPE_UNCACHABLE]     = "UC",
+        [MTRR_TYPE_WRCOMB]         = "WC",
+        [MTRR_TYPE_WRTHROUGH]      = "WT",
+        [MTRR_TYPE_WRPROT]         = "WP",
+        [MTRR_TYPE_WRBACK]         = "WB",
+    };
 
     for_each_domain(d)
     {
@@ -759,8 +767,15 @@ static void ept_dump_p2m_table(unsigned char key)
                 if ( ept_entry->sa_p2mt == p2m_populate_on_demand )
                     printk("gfn: %13lx order: %2d PoD\n", gfn, order);
                 else
-                    printk("gfn: %13lx order: %2d mfn: %13lx\n",
-                           gfn, order, ept_entry->mfn + 0UL);
+                    printk("gfn: %13lx order: %2d mfn: %13lx %c%c%c %c%c%c\n",
+                           gfn, order, ept_entry->mfn + 0UL,
+                           ept_entry->r ? 'r' : ' ',
+                           ept_entry->w ? 'w' : ' ',
+                           ept_entry->x ? 'x' : ' ',
+                           memory_types[ept_entry->emt][0],
+                           memory_types[ept_entry->emt][1]
+                           ?: ept_entry->emt + '0',
+                           ept_entry->ipat ? '!' : ' ');
 
                 if ( !(record_counter++ % 100) )
                     process_pending_softirqs();
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVChX-0006kC-IZ; Wed, 02 Apr 2014 04:22:59 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChW-0006jw-Dm
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:58 +0000
Received: from [193.109.254.147:13200] by server-4.bemta-14.messagelabs.com id
	DF/6A-02781-1A09B335; Wed, 02 Apr 2014 04:22:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1396412575!5672062!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10236 invoked from network); 2 Apr 2014 04:22:56 -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;
	2 Apr 2014 04:22:56 -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 1WVChT-0000c7-Bv
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChT-0000AN-Ay
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:55 +0000
Date: Wed, 02 Apr 2014 04:22:55 +0000
Message-Id: <E1WVChT-0000AN-Ay@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: also dump permissions and
	memory 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

commit 90e9c95f9713f413d6e7b2e19492d4e038a319b9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:42:43 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:42:43 2014 +0100

    x86/EPT: also dump permissions and memory types
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m-ept.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index ac4c8f8..99a1084 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -730,6 +730,14 @@ static void ept_dump_p2m_table(unsigned char key)
     unsigned long record_counter = 0;
     struct p2m_domain *p2m;
     struct ept_data *ept;
+    static const char memory_types[8][2] = {
+        [0 ... 7] = "?",
+        [MTRR_TYPE_UNCACHABLE]     = "UC",
+        [MTRR_TYPE_WRCOMB]         = "WC",
+        [MTRR_TYPE_WRTHROUGH]      = "WT",
+        [MTRR_TYPE_WRPROT]         = "WP",
+        [MTRR_TYPE_WRBACK]         = "WB",
+    };
 
     for_each_domain(d)
     {
@@ -759,8 +767,15 @@ static void ept_dump_p2m_table(unsigned char key)
                 if ( ept_entry->sa_p2mt == p2m_populate_on_demand )
                     printk("gfn: %13lx order: %2d PoD\n", gfn, order);
                 else
-                    printk("gfn: %13lx order: %2d mfn: %13lx\n",
-                           gfn, order, ept_entry->mfn + 0UL);
+                    printk("gfn: %13lx order: %2d mfn: %13lx %c%c%c %c%c%c\n",
+                           gfn, order, ept_entry->mfn + 0UL,
+                           ept_entry->r ? 'r' : ' ',
+                           ept_entry->w ? 'w' : ' ',
+                           ept_entry->x ? 'x' : ' ',
+                           memory_types[ept_entry->emt][0],
+                           memory_types[ept_entry->emt][1]
+                           ?: ept_entry->emt + '0',
+                           ept_entry->ipat ? '!' : ' ');
 
                 if ( !(record_counter++ % 100) )
                     process_pending_softirqs();
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVChi-0006lb-LD; Wed, 02 Apr 2014 04:23:10 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChg-0006lH-Kb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:09 +0000
Received: from [85.158.137.68:28472] by server-15.bemta-3.messagelabs.com id
	AE/DC-13757-BA09B335; Wed, 02 Apr 2014 04:23:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1396412585!4440097!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4320 invoked from network); 2 Apr 2014 04:23:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:23: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 1WVChd-0000cg-Hb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChd-0000At-Gb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:05 +0000
Date: Wed, 02 Apr 2014 04:23:05 +0000
Message-Id: <E1WVChd-0000At-Gb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: relax treatment of APIC MFN
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 1f8b57779785bf9f55c16312bb1ec679929c314b
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:43:25 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:43:25 2014 +0100

    x86/EPT: relax treatment of APIC MFN
    
    There's no point in this being mapped UC by the guest due to using a
    respective PAT index - set the ignore-PAT flag to true.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/mtrr.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 170c8c1..df52a54 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -719,8 +719,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     if ( direct_mmio )
-        return mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn
-               ? MTRR_TYPE_UNCACHABLE : MTRR_TYPE_WRBACK;
+    {
+        if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+            return MTRR_TYPE_UNCACHABLE;
+        *ipat = 1;
+        return MTRR_TYPE_WRBACK;
+    }
 
     if ( iommu_snoop )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVChN-0006il-FB; Wed, 02 Apr 2014 04:22:49 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChM-0006iM-Ba
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:48 +0000
Received: from [85.158.139.211:19625] by server-10.bemta-5.messagelabs.com id
	95/BA-27081-7909B335; Wed, 02 Apr 2014 04:22:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1396412565!3068778!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15109 invoked from network); 2 Apr 2014 04:22:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:22:46 -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 1WVChJ-0000c1-67
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChJ-00009p-3m
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:45 +0000
Date: Wed, 02 Apr 2014 04:22:45 +0000
Message-Id: <E1WVChJ-00009p-3m@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: simplification and 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

commit 3d8d2bd048773ababfa65cc8781b9ab3f5cf0eb0
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:37:10 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:39:54 2014 +0100

    x86/EPT: simplification and cleanup
    
    - drop rsvd*_ prefixes from fields not really reserved anymore
    - replace odd uses of <expr> ? 1 : 0
    - drop pointless variables from ept_set_entry()
    - streamline IOMMU mirroring code in ept_set_entry()
    - don't open code is_epte_valid() (and properly use it when dumping)
    - streamline entry cloning in ept_split_super_page()
    - compact dumping code and output
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m-ept.c         |  102 ++++++++++++-------------------------
 xen/include/asm-x86/hvm/vmx/vmx.h |    8 ++--
 2 files changed, 36 insertions(+), 74 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 92d9e2d..ac4c8f8 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -182,14 +182,13 @@ static int ept_split_super_page(struct p2m_domain *p2m, ept_entry_t *ept_entry,
     {
         ept_entry_t *epte = table + i;
 
-        epte->epte = 0;
-        epte->emt = ept_entry->emt;
-        epte->ipat = ept_entry->ipat;
-        epte->sp = (level > 1) ? 1 : 0;
-        epte->access = ept_entry->access;
-        epte->sa_p2mt = ept_entry->sa_p2mt;
-        epte->mfn = ept_entry->mfn + i * trunk;
-        epte->rsvd2_snp = ( iommu_enabled && iommu_snoop ) ? 1 : 0;
+        *epte = *ept_entry;
+        epte->sp = (level > 1);
+        epte->mfn += i * trunk;
+        epte->snp = (iommu_enabled && iommu_snoop);
+        ASSERT(!epte->rsvd1);
+        ASSERT(!epte->avail1);
+        ASSERT(!epte->avail3);
 
         ept_p2m_type_to_flags(epte, epte->sa_p2mt, epte->access);
 
@@ -281,8 +280,6 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
 {
     ept_entry_t *table, *ept_entry = NULL;
     unsigned long gfn_remainder = gfn;
-    unsigned long offset = 0;
-    u32 index;
     int i, target = order / EPT_TABLE_ORDER;
     int rv = 0;
     int ret = 0;
@@ -324,13 +321,10 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
 
     ASSERT(ret != GUEST_TABLE_POD_PAGE || i != target);
 
-    index = gfn_remainder >> (i * EPT_TABLE_ORDER);
-    offset = gfn_remainder & ((1UL << (i * EPT_TABLE_ORDER)) - 1);
-
-    ept_entry = table + index;
+    ept_entry = table + (gfn_remainder >> (i * EPT_TABLE_ORDER));
 
     /* In case VT-d uses same page table, this flag is needed by VT-d */ 
-    vtd_pte_present = is_epte_present(ept_entry) ? 1 : 0;
+    vtd_pte_present = is_epte_present(ept_entry);
 
     /*
      * If we're here with i > target, we must be at a leaf node, and
@@ -364,10 +358,10 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                                                 direct_mmio);
 
             new_entry.ipat = ipat;
-            new_entry.sp = order ? 1 : 0;
+            new_entry.sp = !!order;
             new_entry.sa_p2mt = p2mt;
             new_entry.access = p2ma;
-            new_entry.rsvd2_snp = (iommu_enabled && iommu_snoop);
+            new_entry.snp = (iommu_enabled && iommu_snoop);
 
             new_entry.mfn = mfn_x(mfn);
 
@@ -406,17 +400,14 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         /* We just installed the pages we need. */
         ASSERT(i == target);
 
-        index = gfn_remainder >> (i * EPT_TABLE_ORDER);
-        offset = gfn_remainder & ((1UL << (i * EPT_TABLE_ORDER)) - 1);
-
-        ept_entry = table + index;
+        ept_entry = table + (gfn_remainder >> (i * EPT_TABLE_ORDER));
 
         new_entry.emt = epte_get_entry_emt(d, gfn, mfn, &ipat, direct_mmio);
         new_entry.ipat = ipat;
-        new_entry.sp = i ? 1 : 0;
+        new_entry.sp = !!i;
         new_entry.sa_p2mt = p2mt;
         new_entry.access = p2ma;
-        new_entry.rsvd2_snp = (iommu_enabled && iommu_snoop);
+        new_entry.snp = (iommu_enabled && iommu_snoop);
 
         /* the caller should take care of the previous page */
         new_entry.mfn = mfn_x(mfn);
@@ -445,36 +436,20 @@ out:
         ept_sync_domain(p2m);
 
     /* For non-nested p2m, may need to change VT-d page table.*/
-    if ( rv && !p2m_is_nestedp2m(p2m) && iommu_enabled &&
-         need_iommu(p2m->domain) && need_modify_vtd_table )
+    if ( rv && !p2m_is_nestedp2m(p2m) && need_iommu(d) &&
+         need_modify_vtd_table )
     {
         if ( iommu_hap_pt_share )
-            iommu_pte_flush(d, gfn, (u64*)ept_entry, order, vtd_pte_present);
+            iommu_pte_flush(d, gfn, &ept_entry->epte, order, vtd_pte_present);
         else
         {
             if ( p2mt == p2m_ram_rw )
-            {
-                if ( order > 0 )
-                {
-                    for ( i = 0; i < (1 << order); i++ )
-                        iommu_map_page(
-                            p2m->domain, gfn - offset + i, mfn_x(mfn) - offset + i,
-                            IOMMUF_readable | IOMMUF_writable);
-                }
-                else if ( !order )
-                    iommu_map_page(
-                        p2m->domain, gfn, mfn_x(mfn), IOMMUF_readable | IOMMUF_writable);
-            }
+                for ( i = 0; i < (1 << order); i++ )
+                    iommu_map_page(d, gfn + i, mfn_x(mfn) + i,
+                                   IOMMUF_readable | IOMMUF_writable);
             else
-            {
-                if ( order > 0 )
-                {
-                    for ( i = 0; i < (1 << order); i++ )
-                        iommu_unmap_page(p2m->domain, gfn - offset + i);
-                }
-                else if ( !order )
-                    iommu_unmap_page(p2m->domain, gfn);
-            }
+                for ( i = 0; i < (1 << order); i++ )
+                    iommu_unmap_page(d, gfn + i);
         }
     }
 
@@ -558,9 +533,7 @@ static mfn_t ept_get_entry(struct p2m_domain *p2m,
             goto out;
     }
 
-    /* Need to check for all-zeroes because typecode 0 is p2m_ram and an
-     * entirely empty entry shouldn't have RAM type. */
-    if ( ept_entry->epte != 0 && ept_entry->sa_p2mt != p2m_invalid )
+    if ( is_epte_valid(ept_entry) )
     {
         *t = ept_entry->sa_p2mt;
         *a = ept_entry->access;
@@ -750,12 +723,9 @@ static void ept_dump_p2m_table(unsigned char key)
 {
     struct domain *d;
     ept_entry_t *table, *ept_entry;
-    mfn_t mfn;
     int order;
     int i;
-    int is_pod;
     int ret = 0;
-    unsigned long index;
     unsigned long gfn, gfn_remainder;
     unsigned long record_counter = 0;
     struct p2m_domain *p2m;
@@ -768,12 +738,11 @@ static void ept_dump_p2m_table(unsigned char key)
 
         p2m = p2m_get_hostp2m(d);
         ept = &p2m->ept;
-        printk("\ndomain%d EPT p2m table: \n", d->domain_id);
+        printk("\ndomain%d EPT p2m table:\n", d->domain_id);
 
-        for ( gfn = 0; gfn <= p2m->max_mapped_pfn; gfn += (1 << order) )
+        for ( gfn = 0; gfn <= p2m->max_mapped_pfn; gfn += 1UL << order )
         {
             gfn_remainder = gfn;
-            mfn = _mfn(INVALID_MFN);
             table = map_domain_page(pagetable_get_pfn(p2m_get_pagetable(p2m)));
 
             for ( i = ept_get_wl(ept); i > 0; i-- )
@@ -784,25 +753,18 @@ static void ept_dump_p2m_table(unsigned char key)
             }
 
             order = i * EPT_TABLE_ORDER;
-
-            if ( ret == GUEST_TABLE_MAP_FAILED )
-                goto out;
-
-            index = gfn_remainder >> order;
-            ept_entry = table + index;
-            if ( ept_entry->sa_p2mt != p2m_invalid )
+            ept_entry = table + (gfn_remainder >> order);
+            if ( ret != GUEST_TABLE_MAP_FAILED && is_epte_valid(ept_entry) )
             {
-                ( ept_entry->sa_p2mt == p2m_populate_on_demand ) ? 
-                ( mfn = _mfn(INVALID_MFN), is_pod = 1 ) :
-                ( mfn = _mfn(ept_entry->mfn), is_pod = 0 );
-
-                printk("gfn: %-16lx  mfn: %-16lx  order: %2d  is_pod: %d\n",
-                       gfn, mfn_x(mfn), order, is_pod);
+                if ( ept_entry->sa_p2mt == p2m_populate_on_demand )
+                    printk("gfn: %13lx order: %2d PoD\n", gfn, order);
+                else
+                    printk("gfn: %13lx order: %2d mfn: %13lx\n",
+                           gfn, order, ept_entry->mfn + 0UL);
 
                 if ( !(record_counter++ % 100) )
                     process_pending_softirqs();
             }
-out:
             unmap_domain_page(table);
         }
     }
diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/asm-x86/hvm/vmx/vmx.h
index ac4380a..d4030990 100644
--- a/xen/include/asm-x86/hvm/vmx/vmx.h
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h
@@ -39,13 +39,13 @@ typedef union {
         sp          :   1,  /* bit 7 - Is this a superpage? */
         rsvd1       :   2,  /* bits 9:8 - Reserved for future use */
         avail1      :   1,  /* bit 10 - Software available 1 */
-        rsvd2_snp   :   1,  /* bit 11 - Used for VT-d snoop control
-                               in shared EPT/VT-d usage */
+        snp         :   1,  /* bit 11 - VT-d snoop control in shared
+                               EPT/VT-d usage */
         mfn         :   40, /* bits 51:12 - Machine physical frame number */
         sa_p2mt     :   6,  /* bits 57:52 - Software available 2 */
         access      :   4,  /* bits 61:58 - p2m_access_t */
-        rsvd3_tm    :   1,  /* bit 62 - Used for VT-d transient-mapping
-                               hint in shared EPT/VT-d usage */
+        tm          :   1,  /* bit 62 - VT-d transient-mapping hint in
+                               shared EPT/VT-d usage */
         avail3      :   1;  /* bit 63 - Software available 3 */
     };
     u64 epte;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVChi-0006lb-LD; Wed, 02 Apr 2014 04:23:10 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChg-0006lH-Kb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:09 +0000
Received: from [85.158.137.68:28472] by server-15.bemta-3.messagelabs.com id
	AE/DC-13757-BA09B335; Wed, 02 Apr 2014 04:23:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1396412585!4440097!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4320 invoked from network); 2 Apr 2014 04:23:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:23: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 1WVChd-0000cg-Hb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChd-0000At-Gb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:05 +0000
Date: Wed, 02 Apr 2014 04:23:05 +0000
Message-Id: <E1WVChd-0000At-Gb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: relax treatment of APIC MFN
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 1f8b57779785bf9f55c16312bb1ec679929c314b
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:43:25 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:43:25 2014 +0100

    x86/EPT: relax treatment of APIC MFN
    
    There's no point in this being mapped UC by the guest due to using a
    respective PAT index - set the ignore-PAT flag to true.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/mtrr.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 170c8c1..df52a54 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -719,8 +719,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     if ( direct_mmio )
-        return mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn
-               ? MTRR_TYPE_UNCACHABLE : MTRR_TYPE_WRBACK;
+    {
+        if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+            return MTRR_TYPE_UNCACHABLE;
+        *ipat = 1;
+        return MTRR_TYPE_WRBACK;
+    }
 
     if ( iommu_snoop )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVCht-0006ms-Nv; Wed, 02 Apr 2014 04:23:21 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChq-0006mO-TK
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:20 +0000
Received: from [85.158.137.68:34093] by server-16.bemta-3.messagelabs.com id
	99/F3-13481-6B09B335; Wed, 02 Apr 2014 04:23:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1396412596!4397927!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19791 invoked from network); 2 Apr 2014 04:23:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:23:17 -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 1WVChn-0000cm-NO
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChn-0000BH-Lb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:15 +0000
Date: Wed, 02 Apr 2014 04:23:15 +0000
Message-Id: <E1WVChn-0000BH-Lb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/vMTRR: pass domain to
	mtrr_*_msr_set()
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 226bc8ee4e0fd26bd3cbdb533eb447fdcd7a90bf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:44:44 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:44:44 2014 +0100

    x86/vMTRR: pass domain to mtrr_*_msr_set()
    
    This is in preparation for the next patch, and mtrr_def_type_msr_set()
    and mtrr_fix_range_msr_set() in sync with mtrr_var_range_msr_set() in
    this regard.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c     |   10 ++++++----
 xen/arch/x86/hvm/mtrr.c    |   11 ++++++-----
 xen/include/asm-x86/mtrr.h |   12 ++++++------
 3 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 0eb5b28..15bf7b7 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3294,13 +3294,15 @@ int hvm_msr_write_intercept(unsigned int msr, uint64_t msr_content)
     case MSR_MTRRdefType:
         if ( !mtrr )
             goto gp_fault;
-        if ( !mtrr_def_type_msr_set(&v->arch.hvm_vcpu.mtrr, msr_content) )
+        if ( !mtrr_def_type_msr_set(v->domain, &v->arch.hvm_vcpu.mtrr,
+                                    msr_content) )
            goto gp_fault;
         break;
     case MSR_MTRRfix64K_00000:
         if ( !mtrr )
             goto gp_fault;
-        if ( !mtrr_fix_range_msr_set(&v->arch.hvm_vcpu.mtrr, 0, msr_content) )
+        if ( !mtrr_fix_range_msr_set(v->domain, &v->arch.hvm_vcpu.mtrr, 0,
+                                     msr_content) )
             goto gp_fault;
         break;
     case MSR_MTRRfix16K_80000:
@@ -3308,7 +3310,7 @@ int hvm_msr_write_intercept(unsigned int msr, uint64_t msr_content)
         if ( !mtrr )
             goto gp_fault;
         index = msr - MSR_MTRRfix16K_80000 + 1;
-        if ( !mtrr_fix_range_msr_set(&v->arch.hvm_vcpu.mtrr,
+        if ( !mtrr_fix_range_msr_set(v->domain, &v->arch.hvm_vcpu.mtrr,
                                      index, msr_content) )
             goto gp_fault;
         break;
@@ -3316,7 +3318,7 @@ int hvm_msr_write_intercept(unsigned int msr, uint64_t msr_content)
         if ( !mtrr )
             goto gp_fault;
         index = msr - MSR_MTRRfix4K_C0000 + 3;
-        if ( !mtrr_fix_range_msr_set(&v->arch.hvm_vcpu.mtrr,
+        if ( !mtrr_fix_range_msr_set(v->domain, &v->arch.hvm_vcpu.mtrr,
                                      index, msr_content) )
             goto gp_fault;
         break;
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index df52a54..45c8e7b 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -412,7 +412,8 @@ static inline bool_t valid_mtrr_type(uint8_t type)
     return 0;
 }
 
-bool_t mtrr_def_type_msr_set(struct mtrr_state *m, uint64_t msr_content)
+bool_t mtrr_def_type_msr_set(struct domain *d, struct mtrr_state *m,
+                             uint64_t msr_content)
 {
     uint8_t def_type = msr_content & 0xff;
     uint8_t enabled = (msr_content >> 10) & 0x3;
@@ -436,8 +437,8 @@ bool_t mtrr_def_type_msr_set(struct mtrr_state *m, uint64_t msr_content)
     return 1;
 }
 
-bool_t mtrr_fix_range_msr_set(struct mtrr_state *m, uint32_t row,
-                              uint64_t msr_content)
+bool_t mtrr_fix_range_msr_set(struct domain *d, struct mtrr_state *m,
+                              uint32_t row, uint64_t msr_content)
 {
     uint64_t *fixed_range_base = (uint64_t *)m->fixed_ranges;
 
@@ -669,7 +670,7 @@ static int hvm_load_mtrr_msr(struct domain *d, hvm_domain_context_t *h)
     mtrr_state->mtrr_cap = hw_mtrr.msr_mtrr_cap;
 
     for ( i = 0; i < NUM_FIXED_MSR; i++ )
-        mtrr_fix_range_msr_set(mtrr_state, i, hw_mtrr.msr_mtrr_fixed[i]);
+        mtrr_fix_range_msr_set(d, mtrr_state, i, hw_mtrr.msr_mtrr_fixed[i]);
 
     for ( i = 0; i < MTRR_VCNT; i++ )
     {
@@ -681,7 +682,7 @@ static int hvm_load_mtrr_msr(struct domain *d, hvm_domain_context_t *h)
                                hw_mtrr.msr_mtrr_var[i * 2 + 1]);
     }
 
-    mtrr_def_type_msr_set(mtrr_state, hw_mtrr.msr_mtrr_def_type);
+    mtrr_def_type_msr_set(d, mtrr_state, hw_mtrr.msr_mtrr_def_type);
 
     return 0;
 }
diff --git a/xen/include/asm-x86/mtrr.h b/xen/include/asm-x86/mtrr.h
index c0afb4f..1b5993e 100644
--- a/xen/include/asm-x86/mtrr.h
+++ b/xen/include/asm-x86/mtrr.h
@@ -82,12 +82,12 @@ extern void mtrr_aps_sync_begin(void);
 extern void mtrr_aps_sync_end(void);
 extern void mtrr_bp_restore(void);
 
-extern bool_t mtrr_var_range_msr_set(
-    struct domain *d, struct mtrr_state *m,
-    uint32_t msr, uint64_t msr_content);
-extern bool_t mtrr_fix_range_msr_set(struct mtrr_state *v,
-				uint32_t row, uint64_t msr_content);
-extern bool_t mtrr_def_type_msr_set(struct mtrr_state *v, uint64_t msr_content);
+extern bool_t mtrr_var_range_msr_set(struct domain *, struct mtrr_state *,
+                                     uint32_t msr, uint64_t msr_content);
+extern bool_t mtrr_fix_range_msr_set(struct domain *, struct mtrr_state *,
+                                     uint32_t row, uint64_t msr_content);
+extern bool_t mtrr_def_type_msr_set(struct domain *, struct mtrr_state *,
+                                    uint64_t msr_content);
 extern bool_t pat_msr_set(uint64_t *pat, uint64_t msr);
 
 bool_t is_var_mtrr_overlapped(struct mtrr_state *m);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVChN-0006il-FB; Wed, 02 Apr 2014 04:22:49 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChM-0006iM-Ba
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:48 +0000
Received: from [85.158.139.211:19625] by server-10.bemta-5.messagelabs.com id
	95/BA-27081-7909B335; Wed, 02 Apr 2014 04:22:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1396412565!3068778!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15109 invoked from network); 2 Apr 2014 04:22:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:22:46 -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 1WVChJ-0000c1-67
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChJ-00009p-3m
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:22:45 +0000
Date: Wed, 02 Apr 2014 04:22:45 +0000
Message-Id: <E1WVChJ-00009p-3m@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: simplification and 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

commit 3d8d2bd048773ababfa65cc8781b9ab3f5cf0eb0
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:37:10 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:39:54 2014 +0100

    x86/EPT: simplification and cleanup
    
    - drop rsvd*_ prefixes from fields not really reserved anymore
    - replace odd uses of <expr> ? 1 : 0
    - drop pointless variables from ept_set_entry()
    - streamline IOMMU mirroring code in ept_set_entry()
    - don't open code is_epte_valid() (and properly use it when dumping)
    - streamline entry cloning in ept_split_super_page()
    - compact dumping code and output
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m-ept.c         |  102 ++++++++++++-------------------------
 xen/include/asm-x86/hvm/vmx/vmx.h |    8 ++--
 2 files changed, 36 insertions(+), 74 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 92d9e2d..ac4c8f8 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -182,14 +182,13 @@ static int ept_split_super_page(struct p2m_domain *p2m, ept_entry_t *ept_entry,
     {
         ept_entry_t *epte = table + i;
 
-        epte->epte = 0;
-        epte->emt = ept_entry->emt;
-        epte->ipat = ept_entry->ipat;
-        epte->sp = (level > 1) ? 1 : 0;
-        epte->access = ept_entry->access;
-        epte->sa_p2mt = ept_entry->sa_p2mt;
-        epte->mfn = ept_entry->mfn + i * trunk;
-        epte->rsvd2_snp = ( iommu_enabled && iommu_snoop ) ? 1 : 0;
+        *epte = *ept_entry;
+        epte->sp = (level > 1);
+        epte->mfn += i * trunk;
+        epte->snp = (iommu_enabled && iommu_snoop);
+        ASSERT(!epte->rsvd1);
+        ASSERT(!epte->avail1);
+        ASSERT(!epte->avail3);
 
         ept_p2m_type_to_flags(epte, epte->sa_p2mt, epte->access);
 
@@ -281,8 +280,6 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
 {
     ept_entry_t *table, *ept_entry = NULL;
     unsigned long gfn_remainder = gfn;
-    unsigned long offset = 0;
-    u32 index;
     int i, target = order / EPT_TABLE_ORDER;
     int rv = 0;
     int ret = 0;
@@ -324,13 +321,10 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
 
     ASSERT(ret != GUEST_TABLE_POD_PAGE || i != target);
 
-    index = gfn_remainder >> (i * EPT_TABLE_ORDER);
-    offset = gfn_remainder & ((1UL << (i * EPT_TABLE_ORDER)) - 1);
-
-    ept_entry = table + index;
+    ept_entry = table + (gfn_remainder >> (i * EPT_TABLE_ORDER));
 
     /* In case VT-d uses same page table, this flag is needed by VT-d */ 
-    vtd_pte_present = is_epte_present(ept_entry) ? 1 : 0;
+    vtd_pte_present = is_epte_present(ept_entry);
 
     /*
      * If we're here with i > target, we must be at a leaf node, and
@@ -364,10 +358,10 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                                                 direct_mmio);
 
             new_entry.ipat = ipat;
-            new_entry.sp = order ? 1 : 0;
+            new_entry.sp = !!order;
             new_entry.sa_p2mt = p2mt;
             new_entry.access = p2ma;
-            new_entry.rsvd2_snp = (iommu_enabled && iommu_snoop);
+            new_entry.snp = (iommu_enabled && iommu_snoop);
 
             new_entry.mfn = mfn_x(mfn);
 
@@ -406,17 +400,14 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         /* We just installed the pages we need. */
         ASSERT(i == target);
 
-        index = gfn_remainder >> (i * EPT_TABLE_ORDER);
-        offset = gfn_remainder & ((1UL << (i * EPT_TABLE_ORDER)) - 1);
-
-        ept_entry = table + index;
+        ept_entry = table + (gfn_remainder >> (i * EPT_TABLE_ORDER));
 
         new_entry.emt = epte_get_entry_emt(d, gfn, mfn, &ipat, direct_mmio);
         new_entry.ipat = ipat;
-        new_entry.sp = i ? 1 : 0;
+        new_entry.sp = !!i;
         new_entry.sa_p2mt = p2mt;
         new_entry.access = p2ma;
-        new_entry.rsvd2_snp = (iommu_enabled && iommu_snoop);
+        new_entry.snp = (iommu_enabled && iommu_snoop);
 
         /* the caller should take care of the previous page */
         new_entry.mfn = mfn_x(mfn);
@@ -445,36 +436,20 @@ out:
         ept_sync_domain(p2m);
 
     /* For non-nested p2m, may need to change VT-d page table.*/
-    if ( rv && !p2m_is_nestedp2m(p2m) && iommu_enabled &&
-         need_iommu(p2m->domain) && need_modify_vtd_table )
+    if ( rv && !p2m_is_nestedp2m(p2m) && need_iommu(d) &&
+         need_modify_vtd_table )
     {
         if ( iommu_hap_pt_share )
-            iommu_pte_flush(d, gfn, (u64*)ept_entry, order, vtd_pte_present);
+            iommu_pte_flush(d, gfn, &ept_entry->epte, order, vtd_pte_present);
         else
         {
             if ( p2mt == p2m_ram_rw )
-            {
-                if ( order > 0 )
-                {
-                    for ( i = 0; i < (1 << order); i++ )
-                        iommu_map_page(
-                            p2m->domain, gfn - offset + i, mfn_x(mfn) - offset + i,
-                            IOMMUF_readable | IOMMUF_writable);
-                }
-                else if ( !order )
-                    iommu_map_page(
-                        p2m->domain, gfn, mfn_x(mfn), IOMMUF_readable | IOMMUF_writable);
-            }
+                for ( i = 0; i < (1 << order); i++ )
+                    iommu_map_page(d, gfn + i, mfn_x(mfn) + i,
+                                   IOMMUF_readable | IOMMUF_writable);
             else
-            {
-                if ( order > 0 )
-                {
-                    for ( i = 0; i < (1 << order); i++ )
-                        iommu_unmap_page(p2m->domain, gfn - offset + i);
-                }
-                else if ( !order )
-                    iommu_unmap_page(p2m->domain, gfn);
-            }
+                for ( i = 0; i < (1 << order); i++ )
+                    iommu_unmap_page(d, gfn + i);
         }
     }
 
@@ -558,9 +533,7 @@ static mfn_t ept_get_entry(struct p2m_domain *p2m,
             goto out;
     }
 
-    /* Need to check for all-zeroes because typecode 0 is p2m_ram and an
-     * entirely empty entry shouldn't have RAM type. */
-    if ( ept_entry->epte != 0 && ept_entry->sa_p2mt != p2m_invalid )
+    if ( is_epte_valid(ept_entry) )
     {
         *t = ept_entry->sa_p2mt;
         *a = ept_entry->access;
@@ -750,12 +723,9 @@ static void ept_dump_p2m_table(unsigned char key)
 {
     struct domain *d;
     ept_entry_t *table, *ept_entry;
-    mfn_t mfn;
     int order;
     int i;
-    int is_pod;
     int ret = 0;
-    unsigned long index;
     unsigned long gfn, gfn_remainder;
     unsigned long record_counter = 0;
     struct p2m_domain *p2m;
@@ -768,12 +738,11 @@ static void ept_dump_p2m_table(unsigned char key)
 
         p2m = p2m_get_hostp2m(d);
         ept = &p2m->ept;
-        printk("\ndomain%d EPT p2m table: \n", d->domain_id);
+        printk("\ndomain%d EPT p2m table:\n", d->domain_id);
 
-        for ( gfn = 0; gfn <= p2m->max_mapped_pfn; gfn += (1 << order) )
+        for ( gfn = 0; gfn <= p2m->max_mapped_pfn; gfn += 1UL << order )
         {
             gfn_remainder = gfn;
-            mfn = _mfn(INVALID_MFN);
             table = map_domain_page(pagetable_get_pfn(p2m_get_pagetable(p2m)));
 
             for ( i = ept_get_wl(ept); i > 0; i-- )
@@ -784,25 +753,18 @@ static void ept_dump_p2m_table(unsigned char key)
             }
 
             order = i * EPT_TABLE_ORDER;
-
-            if ( ret == GUEST_TABLE_MAP_FAILED )
-                goto out;
-
-            index = gfn_remainder >> order;
-            ept_entry = table + index;
-            if ( ept_entry->sa_p2mt != p2m_invalid )
+            ept_entry = table + (gfn_remainder >> order);
+            if ( ret != GUEST_TABLE_MAP_FAILED && is_epte_valid(ept_entry) )
             {
-                ( ept_entry->sa_p2mt == p2m_populate_on_demand ) ? 
-                ( mfn = _mfn(INVALID_MFN), is_pod = 1 ) :
-                ( mfn = _mfn(ept_entry->mfn), is_pod = 0 );
-
-                printk("gfn: %-16lx  mfn: %-16lx  order: %2d  is_pod: %d\n",
-                       gfn, mfn_x(mfn), order, is_pod);
+                if ( ept_entry->sa_p2mt == p2m_populate_on_demand )
+                    printk("gfn: %13lx order: %2d PoD\n", gfn, order);
+                else
+                    printk("gfn: %13lx order: %2d mfn: %13lx\n",
+                           gfn, order, ept_entry->mfn + 0UL);
 
                 if ( !(record_counter++ % 100) )
                     process_pending_softirqs();
             }
-out:
             unmap_domain_page(table);
         }
     }
diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/asm-x86/hvm/vmx/vmx.h
index ac4380a..d4030990 100644
--- a/xen/include/asm-x86/hvm/vmx/vmx.h
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h
@@ -39,13 +39,13 @@ typedef union {
         sp          :   1,  /* bit 7 - Is this a superpage? */
         rsvd1       :   2,  /* bits 9:8 - Reserved for future use */
         avail1      :   1,  /* bit 10 - Software available 1 */
-        rsvd2_snp   :   1,  /* bit 11 - Used for VT-d snoop control
-                               in shared EPT/VT-d usage */
+        snp         :   1,  /* bit 11 - VT-d snoop control in shared
+                               EPT/VT-d usage */
         mfn         :   40, /* bits 51:12 - Machine physical frame number */
         sa_p2mt     :   6,  /* bits 57:52 - Software available 2 */
         access      :   4,  /* bits 61:58 - p2m_access_t */
-        rsvd3_tm    :   1,  /* bit 62 - Used for VT-d transient-mapping
-                               hint in shared EPT/VT-d usage */
+        tm          :   1,  /* bit 62 - VT-d transient-mapping hint in
+                               shared EPT/VT-d usage */
         avail3      :   1;  /* bit 63 - Software available 3 */
     };
     u64 epte;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVCht-0006ms-Nv; Wed, 02 Apr 2014 04:23:21 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChq-0006mO-TK
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:20 +0000
Received: from [85.158.137.68:34093] by server-16.bemta-3.messagelabs.com id
	99/F3-13481-6B09B335; Wed, 02 Apr 2014 04:23:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1396412596!4397927!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19791 invoked from network); 2 Apr 2014 04:23:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:23:17 -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 1WVChn-0000cm-NO
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChn-0000BH-Lb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:15 +0000
Date: Wed, 02 Apr 2014 04:23:15 +0000
Message-Id: <E1WVChn-0000BH-Lb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/vMTRR: pass domain to
	mtrr_*_msr_set()
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 226bc8ee4e0fd26bd3cbdb533eb447fdcd7a90bf
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Mar 28 13:44:44 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:44:44 2014 +0100

    x86/vMTRR: pass domain to mtrr_*_msr_set()
    
    This is in preparation for the next patch, and mtrr_def_type_msr_set()
    and mtrr_fix_range_msr_set() in sync with mtrr_var_range_msr_set() in
    this regard.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c     |   10 ++++++----
 xen/arch/x86/hvm/mtrr.c    |   11 ++++++-----
 xen/include/asm-x86/mtrr.h |   12 ++++++------
 3 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 0eb5b28..15bf7b7 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3294,13 +3294,15 @@ int hvm_msr_write_intercept(unsigned int msr, uint64_t msr_content)
     case MSR_MTRRdefType:
         if ( !mtrr )
             goto gp_fault;
-        if ( !mtrr_def_type_msr_set(&v->arch.hvm_vcpu.mtrr, msr_content) )
+        if ( !mtrr_def_type_msr_set(v->domain, &v->arch.hvm_vcpu.mtrr,
+                                    msr_content) )
            goto gp_fault;
         break;
     case MSR_MTRRfix64K_00000:
         if ( !mtrr )
             goto gp_fault;
-        if ( !mtrr_fix_range_msr_set(&v->arch.hvm_vcpu.mtrr, 0, msr_content) )
+        if ( !mtrr_fix_range_msr_set(v->domain, &v->arch.hvm_vcpu.mtrr, 0,
+                                     msr_content) )
             goto gp_fault;
         break;
     case MSR_MTRRfix16K_80000:
@@ -3308,7 +3310,7 @@ int hvm_msr_write_intercept(unsigned int msr, uint64_t msr_content)
         if ( !mtrr )
             goto gp_fault;
         index = msr - MSR_MTRRfix16K_80000 + 1;
-        if ( !mtrr_fix_range_msr_set(&v->arch.hvm_vcpu.mtrr,
+        if ( !mtrr_fix_range_msr_set(v->domain, &v->arch.hvm_vcpu.mtrr,
                                      index, msr_content) )
             goto gp_fault;
         break;
@@ -3316,7 +3318,7 @@ int hvm_msr_write_intercept(unsigned int msr, uint64_t msr_content)
         if ( !mtrr )
             goto gp_fault;
         index = msr - MSR_MTRRfix4K_C0000 + 3;
-        if ( !mtrr_fix_range_msr_set(&v->arch.hvm_vcpu.mtrr,
+        if ( !mtrr_fix_range_msr_set(v->domain, &v->arch.hvm_vcpu.mtrr,
                                      index, msr_content) )
             goto gp_fault;
         break;
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index df52a54..45c8e7b 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -412,7 +412,8 @@ static inline bool_t valid_mtrr_type(uint8_t type)
     return 0;
 }
 
-bool_t mtrr_def_type_msr_set(struct mtrr_state *m, uint64_t msr_content)
+bool_t mtrr_def_type_msr_set(struct domain *d, struct mtrr_state *m,
+                             uint64_t msr_content)
 {
     uint8_t def_type = msr_content & 0xff;
     uint8_t enabled = (msr_content >> 10) & 0x3;
@@ -436,8 +437,8 @@ bool_t mtrr_def_type_msr_set(struct mtrr_state *m, uint64_t msr_content)
     return 1;
 }
 
-bool_t mtrr_fix_range_msr_set(struct mtrr_state *m, uint32_t row,
-                              uint64_t msr_content)
+bool_t mtrr_fix_range_msr_set(struct domain *d, struct mtrr_state *m,
+                              uint32_t row, uint64_t msr_content)
 {
     uint64_t *fixed_range_base = (uint64_t *)m->fixed_ranges;
 
@@ -669,7 +670,7 @@ static int hvm_load_mtrr_msr(struct domain *d, hvm_domain_context_t *h)
     mtrr_state->mtrr_cap = hw_mtrr.msr_mtrr_cap;
 
     for ( i = 0; i < NUM_FIXED_MSR; i++ )
-        mtrr_fix_range_msr_set(mtrr_state, i, hw_mtrr.msr_mtrr_fixed[i]);
+        mtrr_fix_range_msr_set(d, mtrr_state, i, hw_mtrr.msr_mtrr_fixed[i]);
 
     for ( i = 0; i < MTRR_VCNT; i++ )
     {
@@ -681,7 +682,7 @@ static int hvm_load_mtrr_msr(struct domain *d, hvm_domain_context_t *h)
                                hw_mtrr.msr_mtrr_var[i * 2 + 1]);
     }
 
-    mtrr_def_type_msr_set(mtrr_state, hw_mtrr.msr_mtrr_def_type);
+    mtrr_def_type_msr_set(d, mtrr_state, hw_mtrr.msr_mtrr_def_type);
 
     return 0;
 }
diff --git a/xen/include/asm-x86/mtrr.h b/xen/include/asm-x86/mtrr.h
index c0afb4f..1b5993e 100644
--- a/xen/include/asm-x86/mtrr.h
+++ b/xen/include/asm-x86/mtrr.h
@@ -82,12 +82,12 @@ extern void mtrr_aps_sync_begin(void);
 extern void mtrr_aps_sync_end(void);
 extern void mtrr_bp_restore(void);
 
-extern bool_t mtrr_var_range_msr_set(
-    struct domain *d, struct mtrr_state *m,
-    uint32_t msr, uint64_t msr_content);
-extern bool_t mtrr_fix_range_msr_set(struct mtrr_state *v,
-				uint32_t row, uint64_t msr_content);
-extern bool_t mtrr_def_type_msr_set(struct mtrr_state *v, uint64_t msr_content);
+extern bool_t mtrr_var_range_msr_set(struct domain *, struct mtrr_state *,
+                                     uint32_t msr, uint64_t msr_content);
+extern bool_t mtrr_fix_range_msr_set(struct domain *, struct mtrr_state *,
+                                     uint32_t row, uint64_t msr_content);
+extern bool_t mtrr_def_type_msr_set(struct domain *, struct mtrr_state *,
+                                    uint64_t msr_content);
 extern bool_t pat_msr_set(uint64_t *pat, uint64_t msr);
 
 bool_t is_var_mtrr_overlapped(struct mtrr_state *m);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVCi1-0006oy-Qd; Wed, 02 Apr 2014 04:23:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCi0-0006ob-Ed
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:28 +0000
Received: from [193.109.254.147:16011] by server-1.bemta-14.messagelabs.com id
	4C/5F-00839-FB09B335; Wed, 02 Apr 2014 04:23:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-27.messagelabs.com!1396412606!5654435!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12631 invoked from network); 2 Apr 2014 04:23:26 -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;
	2 Apr 2014 04:23:26 -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 1WVChx-0000ct-Sv
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChx-0000Bg-S2
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:25 +0000
Date: Wed, 02 Apr 2014 04:23:25 +0000
Message-Id: <E1WVChx-0000Bg-S2@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] public/platform.h: replace unsigned
	long with xen_ulong_t
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 b021348231e942a342fd82e7a60193256236274d
Author:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
AuthorDate: Fri Mar 28 13:48:39 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:48:39 2014 +0100

    public/platform.h: replace unsigned long with xen_ulong_t
    
    Replace unsigned long with xen_ulong_t in public/platform.h.
    Also replace unsigned int with uint32_t for clarity. It is safe because
    unsigned int are 4 byte sized and 4 byte aligned an all the supported
    architectures.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/include/public/platform.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xen/include/public/platform.h b/xen/include/public/platform.h
index 4341f54..053b9fa 100644
--- a/xen/include/public/platform.h
+++ b/xen/include/public/platform.h
@@ -134,7 +134,7 @@ struct xenpf_efi_runtime_call {
      * where it holds the single returned value.
      */
     uint32_t misc;
-    unsigned long status;
+    xen_ulong_t status;
     union {
 #define XEN_EFI_GET_TIME_SET_CLEARS_NS 0x00000001
         struct {
@@ -168,7 +168,7 @@ struct xenpf_efi_runtime_call {
 #define XEN_EFI_VARIABLE_RUNTIME_ACCESS     0x00000004
         struct {
             XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
-            unsigned long size;
+            xen_ulong_t size;
             XEN_GUEST_HANDLE(void) data;
             struct xenpf_efi_guid {
                 uint32_t data1;
@@ -179,7 +179,7 @@ struct xenpf_efi_runtime_call {
         } get_variable, set_variable;
 
         struct {
-            unsigned long size;
+            xen_ulong_t size;
             XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
             struct xenpf_efi_guid vendor_guid;
         } get_next_variable_name;
@@ -194,14 +194,14 @@ struct xenpf_efi_runtime_call {
 
         struct {
             XEN_GUEST_HANDLE(void) capsule_header_array;
-            unsigned long capsule_count;
+            xen_ulong_t capsule_count;
             uint64_t max_capsule_size;
-            unsigned int reset_type;
+            uint32_t reset_type;
         } query_capsule_capabilities;
 
         struct {
             XEN_GUEST_HANDLE(void) capsule_header_array;
-            unsigned long capsule_count;
+            xen_ulong_t capsule_count;
             uint64_t sg_list; /* machine address */
         } update_capsule;
     } u;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23: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 1WVCi1-0006oy-Qd; Wed, 02 Apr 2014 04:23:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCi0-0006ob-Ed
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:28 +0000
Received: from [193.109.254.147:16011] by server-1.bemta-14.messagelabs.com id
	4C/5F-00839-FB09B335; Wed, 02 Apr 2014 04:23:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-27.messagelabs.com!1396412606!5654435!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12631 invoked from network); 2 Apr 2014 04:23:26 -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;
	2 Apr 2014 04:23:26 -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 1WVChx-0000ct-Sv
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVChx-0000Bg-S2
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:25 +0000
Date: Wed, 02 Apr 2014 04:23:25 +0000
Message-Id: <E1WVChx-0000Bg-S2@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] public/platform.h: replace unsigned
	long with xen_ulong_t
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 b021348231e942a342fd82e7a60193256236274d
Author:     Stefano Stabellini <stefano.stabellini@eu.citrix.com>
AuthorDate: Fri Mar 28 13:48:39 2014 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Mar 28 13:48:39 2014 +0100

    public/platform.h: replace unsigned long with xen_ulong_t
    
    Replace unsigned long with xen_ulong_t in public/platform.h.
    Also replace unsigned int with uint32_t for clarity. It is safe because
    unsigned int are 4 byte sized and 4 byte aligned an all the supported
    architectures.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/include/public/platform.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xen/include/public/platform.h b/xen/include/public/platform.h
index 4341f54..053b9fa 100644
--- a/xen/include/public/platform.h
+++ b/xen/include/public/platform.h
@@ -134,7 +134,7 @@ struct xenpf_efi_runtime_call {
      * where it holds the single returned value.
      */
     uint32_t misc;
-    unsigned long status;
+    xen_ulong_t status;
     union {
 #define XEN_EFI_GET_TIME_SET_CLEARS_NS 0x00000001
         struct {
@@ -168,7 +168,7 @@ struct xenpf_efi_runtime_call {
 #define XEN_EFI_VARIABLE_RUNTIME_ACCESS     0x00000004
         struct {
             XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
-            unsigned long size;
+            xen_ulong_t size;
             XEN_GUEST_HANDLE(void) data;
             struct xenpf_efi_guid {
                 uint32_t data1;
@@ -179,7 +179,7 @@ struct xenpf_efi_runtime_call {
         } get_variable, set_variable;
 
         struct {
-            unsigned long size;
+            xen_ulong_t size;
             XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
             struct xenpf_efi_guid vendor_guid;
         } get_next_variable_name;
@@ -194,14 +194,14 @@ struct xenpf_efi_runtime_call {
 
         struct {
             XEN_GUEST_HANDLE(void) capsule_header_array;
-            unsigned long capsule_count;
+            xen_ulong_t capsule_count;
             uint64_t max_capsule_size;
-            unsigned int reset_type;
+            uint32_t reset_type;
         } query_capsule_capabilities;
 
         struct {
             XEN_GUEST_HANDLE(void) capsule_header_array;
-            unsigned long capsule_count;
+            xen_ulong_t capsule_count;
             uint64_t sg_list; /* machine address */
         } update_capsule;
     } u;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23:41 +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 1WVCiD-0006rC-0F; Wed, 02 Apr 2014 04:23:41 +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 1WVCiB-0006qp-5g
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:39 +0000
Received: from [85.158.143.35:56577] by server-1.bemta-4.messagelabs.com id
	BB/BF-09853-AC09B335; Wed, 02 Apr 2014 04:23:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1396412616!6357837!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6942 invoked from network); 2 Apr 2014 04:23:37 -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;
	2 Apr 2014 04:23:37 -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 1WVCi8-0000d9-2f
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCi8-0000C7-18
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:36 +0000
Date: Wed, 02 Apr 2014 04:23:36 +0000
Message-Id: <E1WVCi8-0000C7-18@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "x86/HVM: fix preemption
	handling in do_hvm_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

commit 16b8b8551ee810639bc110d83f648aaae3ca2b32
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 1 10:41:29 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 10:41:29 2014 +0200

    Revert "x86/HVM: fix preemption handling in do_hvm_op()"
    
    This reverts commit 8bad6c5626129ffba04dbab3a38115b6f3669596
    (clearly broken for 32-bit callers, reportedly broken also
    for 64-bit Dom0 with qemu-trad).
---
 xen/arch/x86/hvm/hvm.c          |   77 ++++++++++++++++++++++-----------------
 xen/include/public/hvm/hvm_op.h |    8 ++--
 2 files changed, 48 insertions(+), 37 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 15bf7b7..5e89cf5 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4072,25 +4072,20 @@ static int hvm_replace_event_channel(struct vcpu *v, domid_t remote_domid,
     return 0;
 }
 
-#define HVMOP_op_bits 32
-
 long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
 {
     struct domain *curr_d = current->domain;
-    unsigned long start_iter = op >> HVMOP_op_bits;
     long rc = 0;
 
-    switch ( op &= ((1UL << HVMOP_op_bits) - 1) )
+    switch ( op )
     {
-        struct domain *d;
-        unsigned long pfn;
-
     case HVMOP_set_param:
     case HVMOP_get_param:
     {
         struct xen_hvm_param a;
         struct hvm_ioreq_page *iorp;
+        struct domain *d;
         struct vcpu *v;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4354,6 +4349,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_track_dirty_vram:
     {
         struct xen_hvm_track_dirty_vram a;
+        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4394,6 +4390,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_modified_memory:
     {
         struct xen_hvm_modified_memory a;
+        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4411,8 +4408,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail3;
 
         rc = -EINVAL;
-        if ( a.nr < start_iter ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail3;
 
@@ -4420,8 +4416,9 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( !paging_mode_log_dirty(d) )
             goto param_fail3;
 
-        for ( pfn = a.first_pfn + start_iter; a.nr > start_iter; ++pfn )
+        while ( a.nr > 0 )
         {
+            unsigned long pfn = a.first_pfn;
             struct page_info *page;
 
             page = get_page_from_gfn(d, pfn, NULL, P2M_UNSHARE);
@@ -4434,13 +4431,16 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 put_page(page);
             }
 
-            ++pfn;
-            ++start_iter;
+            a.first_pfn++;
+            a.nr--;
 
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > start_iter && hypercall_preempt_check() )
+            if ( a.nr > 0 && hypercall_preempt_check() )
             {
-                rc = -EAGAIN;
+                if ( __copy_to_guest(arg, &a, 1) )
+                    rc = -EFAULT;
+                else
+                    rc = -EAGAIN;
                 break;
             }
         }
@@ -4453,6 +4453,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_get_mem_type:
     {
         struct xen_hvm_get_mem_type a;
+        struct domain *d;
         p2m_type_t t;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4496,6 +4497,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_set_mem_type:
     {
         struct xen_hvm_set_mem_type a;
+        struct domain *d;
         
         /* Interface types to internal p2m types */
         static const p2m_type_t memtype[] = {
@@ -4520,19 +4522,20 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail4;
 
         rc = -EINVAL;
-        if ( a.nr < start_iter ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail4;
             
         if ( a.hvmmem_type >= ARRAY_SIZE(memtype) )
             goto param_fail4;
 
-        for ( pfn = a.first_pfn + start_iter; a.nr > start_iter; ++pfn )
+        while ( a.nr )
         {
-            p2m_type_t t, nt;
-
-            get_gfn_unshare(d, pfn, &t);
+            unsigned long pfn = a.first_pfn;
+            p2m_type_t t;
+            p2m_type_t nt;
+            mfn_t mfn;
+            mfn = get_gfn_unshare(d, pfn, &t);
             if ( p2m_is_paging(t) )
             {
                 put_gfn(d, pfn);
@@ -4569,13 +4572,16 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             }
             put_gfn(d, pfn);
 
-            ++pfn;
-            ++start_iter;
+            a.first_pfn++;
+            a.nr--;
 
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > start_iter && hypercall_preempt_check() )
+            if ( a.nr > 0 && hypercall_preempt_check() )
             {
-                rc = -EAGAIN;
+                if ( __copy_to_guest(arg, &a, 1) )
+                    rc = -EFAULT;
+                else
+                    rc = -EAGAIN;
                 goto param_fail4;
             }
         }
@@ -4590,6 +4596,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_set_mem_access:
     {
         struct xen_hvm_set_mem_access a;
+        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4608,17 +4615,19 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
         rc = -EINVAL;
         if ( (a.first_pfn != ~0ull) &&
-             (a.nr < start_iter ||
-              ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+             (((a.first_pfn + a.nr - 1) < a.first_pfn) ||
               ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
             goto param_fail5;
             
-        rc = p2m_set_mem_access(d, a.first_pfn + start_iter, a.nr - start_iter,
-                                a.hvmmem_access);
+        rc = p2m_set_mem_access(d, a.first_pfn, a.nr, a.hvmmem_access);
         if ( rc > 0 )
         {
-            start_iter = a.nr - rc;
-            rc = -EAGAIN;
+            a.first_pfn += a.nr - rc;
+            a.nr = rc;
+            if ( __copy_to_guest(arg, &a, 1) )
+                rc = -EFAULT;
+            else
+                rc = -EAGAIN;
         }
 
     param_fail5:
@@ -4629,6 +4638,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_get_mem_access:
     {
         struct xen_hvm_get_mem_access a;
+        struct domain *d;
         hvmmem_access_t access;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4665,6 +4675,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_pagetable_dying:
     {
         struct xen_hvm_pagetable_dying a;
+        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4717,6 +4728,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_inject_trap: 
     {
         xen_hvm_inject_trap_t tr;
+        struct domain *d;
         struct vcpu *v;
 
         if ( copy_from_guest(&tr, arg, 1 ) )
@@ -4764,9 +4776,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     }
 
     if ( rc == -EAGAIN )
-        rc = hypercall_create_continuation(__HYPERVISOR_hvm_op, "lh",
-                                           op | (start_iter << HVMOP_op_bits),
-                                           arg);
+        rc = hypercall_create_continuation(
+            __HYPERVISOR_hvm_op, "lh", op, arg);
 
     return rc;
 }
diff --git a/xen/include/public/hvm/hvm_op.h b/xen/include/public/hvm/hvm_op.h
index 3204ec4..a9aab4b 100644
--- a/xen/include/public/hvm/hvm_op.h
+++ b/xen/include/public/hvm/hvm_op.h
@@ -90,10 +90,10 @@ typedef enum {
 struct xen_hvm_track_dirty_vram {
     /* Domain to be tracked. */
     domid_t  domid;
-    /* Number of pages to track. */
-    uint32_t nr;
     /* First pfn to track. */
     uint64_aligned_t first_pfn;
+    /* Number of pages to track. */
+    uint64_aligned_t nr;
     /* OUT variable. */
     /* Dirty bitmap buffer. */
     XEN_GUEST_HANDLE_64(uint8) dirty_bitmap;
@@ -106,10 +106,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_hvm_track_dirty_vram_t);
 struct xen_hvm_modified_memory {
     /* Domain to be updated. */
     domid_t  domid;
-    /* Number of pages. */
-    uint32_t nr;
     /* First pfn. */
     uint64_aligned_t first_pfn;
+    /* Number of pages. */
+    uint64_aligned_t nr;
 };
 typedef struct xen_hvm_modified_memory xen_hvm_modified_memory_t;
 DEFINE_XEN_GUEST_HANDLE(xen_hvm_modified_memory_t);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23:41 +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 1WVCiD-0006rC-0F; Wed, 02 Apr 2014 04:23:41 +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 1WVCiB-0006qp-5g
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:39 +0000
Received: from [85.158.143.35:56577] by server-1.bemta-4.messagelabs.com id
	BB/BF-09853-AC09B335; Wed, 02 Apr 2014 04:23:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1396412616!6357837!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6942 invoked from network); 2 Apr 2014 04:23:37 -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;
	2 Apr 2014 04:23:37 -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 1WVCi8-0000d9-2f
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCi8-0000C7-18
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:36 +0000
Date: Wed, 02 Apr 2014 04:23:36 +0000
Message-Id: <E1WVCi8-0000C7-18@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "x86/HVM: fix preemption
	handling in do_hvm_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

commit 16b8b8551ee810639bc110d83f648aaae3ca2b32
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 1 10:41:29 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 10:41:29 2014 +0200

    Revert "x86/HVM: fix preemption handling in do_hvm_op()"
    
    This reverts commit 8bad6c5626129ffba04dbab3a38115b6f3669596
    (clearly broken for 32-bit callers, reportedly broken also
    for 64-bit Dom0 with qemu-trad).
---
 xen/arch/x86/hvm/hvm.c          |   77 ++++++++++++++++++++++-----------------
 xen/include/public/hvm/hvm_op.h |    8 ++--
 2 files changed, 48 insertions(+), 37 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 15bf7b7..5e89cf5 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4072,25 +4072,20 @@ static int hvm_replace_event_channel(struct vcpu *v, domid_t remote_domid,
     return 0;
 }
 
-#define HVMOP_op_bits 32
-
 long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
 {
     struct domain *curr_d = current->domain;
-    unsigned long start_iter = op >> HVMOP_op_bits;
     long rc = 0;
 
-    switch ( op &= ((1UL << HVMOP_op_bits) - 1) )
+    switch ( op )
     {
-        struct domain *d;
-        unsigned long pfn;
-
     case HVMOP_set_param:
     case HVMOP_get_param:
     {
         struct xen_hvm_param a;
         struct hvm_ioreq_page *iorp;
+        struct domain *d;
         struct vcpu *v;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4354,6 +4349,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_track_dirty_vram:
     {
         struct xen_hvm_track_dirty_vram a;
+        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4394,6 +4390,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_modified_memory:
     {
         struct xen_hvm_modified_memory a;
+        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4411,8 +4408,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail3;
 
         rc = -EINVAL;
-        if ( a.nr < start_iter ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail3;
 
@@ -4420,8 +4416,9 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( !paging_mode_log_dirty(d) )
             goto param_fail3;
 
-        for ( pfn = a.first_pfn + start_iter; a.nr > start_iter; ++pfn )
+        while ( a.nr > 0 )
         {
+            unsigned long pfn = a.first_pfn;
             struct page_info *page;
 
             page = get_page_from_gfn(d, pfn, NULL, P2M_UNSHARE);
@@ -4434,13 +4431,16 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 put_page(page);
             }
 
-            ++pfn;
-            ++start_iter;
+            a.first_pfn++;
+            a.nr--;
 
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > start_iter && hypercall_preempt_check() )
+            if ( a.nr > 0 && hypercall_preempt_check() )
             {
-                rc = -EAGAIN;
+                if ( __copy_to_guest(arg, &a, 1) )
+                    rc = -EFAULT;
+                else
+                    rc = -EAGAIN;
                 break;
             }
         }
@@ -4453,6 +4453,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_get_mem_type:
     {
         struct xen_hvm_get_mem_type a;
+        struct domain *d;
         p2m_type_t t;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4496,6 +4497,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_set_mem_type:
     {
         struct xen_hvm_set_mem_type a;
+        struct domain *d;
         
         /* Interface types to internal p2m types */
         static const p2m_type_t memtype[] = {
@@ -4520,19 +4522,20 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail4;
 
         rc = -EINVAL;
-        if ( a.nr < start_iter ||
-             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail4;
             
         if ( a.hvmmem_type >= ARRAY_SIZE(memtype) )
             goto param_fail4;
 
-        for ( pfn = a.first_pfn + start_iter; a.nr > start_iter; ++pfn )
+        while ( a.nr )
         {
-            p2m_type_t t, nt;
-
-            get_gfn_unshare(d, pfn, &t);
+            unsigned long pfn = a.first_pfn;
+            p2m_type_t t;
+            p2m_type_t nt;
+            mfn_t mfn;
+            mfn = get_gfn_unshare(d, pfn, &t);
             if ( p2m_is_paging(t) )
             {
                 put_gfn(d, pfn);
@@ -4569,13 +4572,16 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             }
             put_gfn(d, pfn);
 
-            ++pfn;
-            ++start_iter;
+            a.first_pfn++;
+            a.nr--;
 
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > start_iter && hypercall_preempt_check() )
+            if ( a.nr > 0 && hypercall_preempt_check() )
             {
-                rc = -EAGAIN;
+                if ( __copy_to_guest(arg, &a, 1) )
+                    rc = -EFAULT;
+                else
+                    rc = -EAGAIN;
                 goto param_fail4;
             }
         }
@@ -4590,6 +4596,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_set_mem_access:
     {
         struct xen_hvm_set_mem_access a;
+        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4608,17 +4615,19 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
         rc = -EINVAL;
         if ( (a.first_pfn != ~0ull) &&
-             (a.nr < start_iter ||
-              ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+             (((a.first_pfn + a.nr - 1) < a.first_pfn) ||
               ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
             goto param_fail5;
             
-        rc = p2m_set_mem_access(d, a.first_pfn + start_iter, a.nr - start_iter,
-                                a.hvmmem_access);
+        rc = p2m_set_mem_access(d, a.first_pfn, a.nr, a.hvmmem_access);
         if ( rc > 0 )
         {
-            start_iter = a.nr - rc;
-            rc = -EAGAIN;
+            a.first_pfn += a.nr - rc;
+            a.nr = rc;
+            if ( __copy_to_guest(arg, &a, 1) )
+                rc = -EFAULT;
+            else
+                rc = -EAGAIN;
         }
 
     param_fail5:
@@ -4629,6 +4638,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_get_mem_access:
     {
         struct xen_hvm_get_mem_access a;
+        struct domain *d;
         hvmmem_access_t access;
 
         if ( copy_from_guest(&a, arg, 1) )
@@ -4665,6 +4675,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_pagetable_dying:
     {
         struct xen_hvm_pagetable_dying a;
+        struct domain *d;
 
         if ( copy_from_guest(&a, arg, 1) )
             return -EFAULT;
@@ -4717,6 +4728,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     case HVMOP_inject_trap: 
     {
         xen_hvm_inject_trap_t tr;
+        struct domain *d;
         struct vcpu *v;
 
         if ( copy_from_guest(&tr, arg, 1 ) )
@@ -4764,9 +4776,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     }
 
     if ( rc == -EAGAIN )
-        rc = hypercall_create_continuation(__HYPERVISOR_hvm_op, "lh",
-                                           op | (start_iter << HVMOP_op_bits),
-                                           arg);
+        rc = hypercall_create_continuation(
+            __HYPERVISOR_hvm_op, "lh", op, arg);
 
     return rc;
 }
diff --git a/xen/include/public/hvm/hvm_op.h b/xen/include/public/hvm/hvm_op.h
index 3204ec4..a9aab4b 100644
--- a/xen/include/public/hvm/hvm_op.h
+++ b/xen/include/public/hvm/hvm_op.h
@@ -90,10 +90,10 @@ typedef enum {
 struct xen_hvm_track_dirty_vram {
     /* Domain to be tracked. */
     domid_t  domid;
-    /* Number of pages to track. */
-    uint32_t nr;
     /* First pfn to track. */
     uint64_aligned_t first_pfn;
+    /* Number of pages to track. */
+    uint64_aligned_t nr;
     /* OUT variable. */
     /* Dirty bitmap buffer. */
     XEN_GUEST_HANDLE_64(uint8) dirty_bitmap;
@@ -106,10 +106,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_hvm_track_dirty_vram_t);
 struct xen_hvm_modified_memory {
     /* Domain to be updated. */
     domid_t  domid;
-    /* Number of pages. */
-    uint32_t nr;
     /* First pfn. */
     uint64_aligned_t first_pfn;
+    /* Number of pages. */
+    uint64_aligned_t nr;
 };
 typedef struct xen_hvm_modified_memory xen_hvm_modified_memory_t;
 DEFINE_XEN_GUEST_HANDLE(xen_hvm_modified_memory_t);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23:50 +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 1WVCiM-0006sl-3B; Wed, 02 Apr 2014 04:23:50 +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 1WVCiK-0006sY-PV
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:48 +0000
Received: from [85.158.143.35:17361] by server-3.bemta-4.messagelabs.com id
	76/30-13602-4D09B335; Wed, 02 Apr 2014 04:23:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-21.messagelabs.com!1396412626!6317014!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17258 invoked from network); 2 Apr 2014 04:23:47 -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;
	2 Apr 2014 04:23:47 -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 1WVCiI-0000dF-7m
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCiI-0000DC-6E
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:46 +0000
Date: Wed, 02 Apr 2014 04:23:46 +0000
Message-Id: <E1WVCiI-0000DC-6E@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] MAINTAINERS: Add ARM UART drivers to
	"ARM ARCHITECTURE" part
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 00853e2786a5f192d307b97e5e0b158475223fc0
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Mar 12 10:12:29 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:03:46 2014 +0100

    MAINTAINERS: Add ARM UART drivers to "ARM ARCHITECTURE" part
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Keir Fraser <keir@xen.org>
---
 MAINTAINERS |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 15282ee..3f8810b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -130,6 +130,10 @@ S:	Supported
 L:	xen-devel@lists.xen.org
 F:	xen/arch/arm/
 F:	xen/include/asm-arm/
+F:	xen/drivers/char/dt-uart.c
+F:	xen/drivers/char/exynos4210-uart.c
+F:	xen/drivers/char/omap-uart.c
+F:	xen/drivers/char/pl011.c
 
 CPU POOLS
 M:	Juergen Gross <juergen.gross@ts.fujitsu.com>
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:23:50 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:23:50 +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 1WVCiM-0006sl-3B; Wed, 02 Apr 2014 04:23:50 +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 1WVCiK-0006sY-PV
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:48 +0000
Received: from [85.158.143.35:17361] by server-3.bemta-4.messagelabs.com id
	76/30-13602-4D09B335; Wed, 02 Apr 2014 04:23:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-21.messagelabs.com!1396412626!6317014!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17258 invoked from network); 2 Apr 2014 04:23:47 -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;
	2 Apr 2014 04:23:47 -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 1WVCiI-0000dF-7m
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCiI-0000DC-6E
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:46 +0000
Date: Wed, 02 Apr 2014 04:23:46 +0000
Message-Id: <E1WVCiI-0000DC-6E@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] MAINTAINERS: Add ARM UART drivers to
	"ARM ARCHITECTURE" part
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 00853e2786a5f192d307b97e5e0b158475223fc0
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Mar 12 10:12:29 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:03:46 2014 +0100

    MAINTAINERS: Add ARM UART drivers to "ARM ARCHITECTURE" part
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: Keir Fraser <keir@xen.org>
---
 MAINTAINERS |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 15282ee..3f8810b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -130,6 +130,10 @@ S:	Supported
 L:	xen-devel@lists.xen.org
 F:	xen/arch/arm/
 F:	xen/include/asm-arm/
+F:	xen/drivers/char/dt-uart.c
+F:	xen/drivers/char/exynos4210-uart.c
+F:	xen/drivers/char/omap-uart.c
+F:	xen/drivers/char/pl011.c
 
 CPU POOLS
 M:	Juergen Gross <juergen.gross@ts.fujitsu.com>
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24:01 +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 1WVCiX-0006uB-60; Wed, 02 Apr 2014 04:24:01 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCiV-0006ty-HY
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:59 +0000
Received: from [85.158.137.68:30075] by server-14.bemta-3.messagelabs.com id
	EA/B9-30903-ED09B335; Wed, 02 Apr 2014 04:23:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1396412636!2928429!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32447 invoked from network); 2 Apr 2014 04:23:57 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:23:57 -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 1WVCiS-0000dL-EF
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCiS-0000DY-Bn
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:56 +0000
Date: Wed, 02 Apr 2014 04:23:56 +0000
Message-Id: <E1WVCiS-0000DY-Bn@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxl: Correct libxl__zalloc()
	to take an unsigned number of bytes
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 76805ae56e4a8f389a3146b9d4816a8bbaf0150b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Mar 27 17:41:54 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:08:45 2014 +0100

    tools/libxl: Correct libxl__zalloc() to take an unsigned number of bytes
    
    Convert 'int bytes' to 'size_t size' to mirror malloc(3) which it is
    imitating, and calloc(3) which it is actually using.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 tools/libxl/libxl_internal.c |    6 +++---
 tools/libxl/libxl_internal.h |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index 1db48b6..6c105de 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -78,10 +78,10 @@ void libxl__free_all(libxl__gc *gc)
     gc->alloc_maxsize = 0;
 }
 
-void *libxl__zalloc(libxl__gc *gc, int bytes)
+void *libxl__zalloc(libxl__gc *gc, size_t size)
 {
-    void *ptr = calloc(bytes, 1);
-    if (!ptr) libxl__alloc_failed(CTX, __func__, bytes, 1);
+    void *ptr = calloc(size, 1);
+    if (!ptr) libxl__alloc_failed(CTX, __func__, size, 1);
 
     libxl__ptr_add(gc, ptr);
     return ptr;
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index b3a200d..be325bb 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -504,8 +504,8 @@ static inline int libxl__gc_is_real(const libxl__gc *gc)
 _hidden void libxl__ptr_add(libxl__gc *gc_opt, void *ptr /* may be NULL */) NN1;
 /* if this is the outermost libxl callframe then free all pointers in @gc */
 _hidden void libxl__free_all(libxl__gc *gc);
-/* allocate and zero @bytes. (similar to a gc'd malloc(3)+memzero()) */
-_hidden void *libxl__zalloc(libxl__gc *gc_opt, int bytes) NN1;
+/* allocate and zero @size. (similar to a gc'd malloc(3)+memzero()) */
+_hidden void *libxl__zalloc(libxl__gc *gc_opt, size_t size) NN1;
 /* allocate and zero memory for an array of @nmemb members of @size each.
  * (similar to a gc'd calloc(3)). */
 _hidden void *libxl__calloc(libxl__gc *gc_opt, size_t nmemb, size_t size) NN1;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24:01 +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 1WVCiX-0006uB-60; Wed, 02 Apr 2014 04:24:01 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCiV-0006ty-HY
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:59 +0000
Received: from [85.158.137.68:30075] by server-14.bemta-3.messagelabs.com id
	EA/B9-30903-ED09B335; Wed, 02 Apr 2014 04:23:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1396412636!2928429!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32447 invoked from network); 2 Apr 2014 04:23:57 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:23:57 -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 1WVCiS-0000dL-EF
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCiS-0000DY-Bn
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:23:56 +0000
Date: Wed, 02 Apr 2014 04:23:56 +0000
Message-Id: <E1WVCiS-0000DY-Bn@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxl: Correct libxl__zalloc()
	to take an unsigned number of bytes
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 76805ae56e4a8f389a3146b9d4816a8bbaf0150b
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Mar 27 17:41:54 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:08:45 2014 +0100

    tools/libxl: Correct libxl__zalloc() to take an unsigned number of bytes
    
    Convert 'int bytes' to 'size_t size' to mirror malloc(3) which it is
    imitating, and calloc(3) which it is actually using.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 tools/libxl/libxl_internal.c |    6 +++---
 tools/libxl/libxl_internal.h |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index 1db48b6..6c105de 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -78,10 +78,10 @@ void libxl__free_all(libxl__gc *gc)
     gc->alloc_maxsize = 0;
 }
 
-void *libxl__zalloc(libxl__gc *gc, int bytes)
+void *libxl__zalloc(libxl__gc *gc, size_t size)
 {
-    void *ptr = calloc(bytes, 1);
-    if (!ptr) libxl__alloc_failed(CTX, __func__, bytes, 1);
+    void *ptr = calloc(size, 1);
+    if (!ptr) libxl__alloc_failed(CTX, __func__, size, 1);
 
     libxl__ptr_add(gc, ptr);
     return ptr;
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index b3a200d..be325bb 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -504,8 +504,8 @@ static inline int libxl__gc_is_real(const libxl__gc *gc)
 _hidden void libxl__ptr_add(libxl__gc *gc_opt, void *ptr /* may be NULL */) NN1;
 /* if this is the outermost libxl callframe then free all pointers in @gc */
 _hidden void libxl__free_all(libxl__gc *gc);
-/* allocate and zero @bytes. (similar to a gc'd malloc(3)+memzero()) */
-_hidden void *libxl__zalloc(libxl__gc *gc_opt, int bytes) NN1;
+/* allocate and zero @size. (similar to a gc'd malloc(3)+memzero()) */
+_hidden void *libxl__zalloc(libxl__gc *gc_opt, size_t size) NN1;
 /* allocate and zero memory for an array of @nmemb members of @size each.
  * (similar to a gc'd calloc(3)). */
 _hidden void *libxl__calloc(libxl__gc *gc_opt, size_t nmemb, size_t size) NN1;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24:09 +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 1WVCif-0006vx-QH; Wed, 02 Apr 2014 04:24:09 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCif-0006vj-9Y
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:09 +0000
Received: from [193.109.254.147:17270] by server-16.bemta-14.messagelabs.com
	id 43/B9-16986-8E09B335; Wed, 02 Apr 2014 04:24:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1396412646!5686541!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16643 invoked from network); 2 Apr 2014 04:24:07 -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;
	2 Apr 2014 04:24:07 -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 1WVCic-0000du-JP
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCic-0000EG-IT
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:06 +0000
Date: Wed, 02 Apr 2014 04:24:06 +0000
Message-Id: <E1WVCic-0000EG-IT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxl: Introduce libxl__malloc()
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 e140001d755b80960342241e54566bcd545ddfd5
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Mar 27 17:41:55 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:08:48 2014 +0100

    tools/libxl: Introduce libxl__malloc()
    
    For those large allocations which are going to be filled immediately, where
    redundantly clearing the memory would just be a waste of time.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 tools/libxl/libxl_internal.c |    9 +++++++++
 tools/libxl/libxl_internal.h |    2 ++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index 6c105de..6c94d3e 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -78,6 +78,15 @@ void libxl__free_all(libxl__gc *gc)
     gc->alloc_maxsize = 0;
 }
 
+void *libxl__malloc(libxl__gc *gc, size_t size)
+{
+    void *ptr = malloc(size);
+    if (!ptr) libxl__alloc_failed(CTX, __func__, size, 1);
+
+    libxl__ptr_add(gc, ptr);
+    return ptr;
+}
+
 void *libxl__zalloc(libxl__gc *gc, size_t size)
 {
     void *ptr = calloc(size, 1);
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index be325bb..c2b73c4 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -504,6 +504,8 @@ static inline int libxl__gc_is_real(const libxl__gc *gc)
 _hidden void libxl__ptr_add(libxl__gc *gc_opt, void *ptr /* may be NULL */) NN1;
 /* if this is the outermost libxl callframe then free all pointers in @gc */
 _hidden void libxl__free_all(libxl__gc *gc);
+/* allocate @size bytes. (a gc'd malloc(3)) */
+_hidden void *libxl__malloc(libxl__gc *gc_opt, size_t size) NN1;
 /* allocate and zero @size. (similar to a gc'd malloc(3)+memzero()) */
 _hidden void *libxl__zalloc(libxl__gc *gc_opt, size_t size) NN1;
 /* allocate and zero memory for an array of @nmemb members of @size each.
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24:09 +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 1WVCif-0006vx-QH; Wed, 02 Apr 2014 04:24:09 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCif-0006vj-9Y
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:09 +0000
Received: from [193.109.254.147:17270] by server-16.bemta-14.messagelabs.com
	id 43/B9-16986-8E09B335; Wed, 02 Apr 2014 04:24:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1396412646!5686541!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16643 invoked from network); 2 Apr 2014 04:24:07 -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;
	2 Apr 2014 04:24:07 -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 1WVCic-0000du-JP
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCic-0000EG-IT
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:06 +0000
Date: Wed, 02 Apr 2014 04:24:06 +0000
Message-Id: <E1WVCic-0000EG-IT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxl: Introduce libxl__malloc()
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 e140001d755b80960342241e54566bcd545ddfd5
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Mar 27 17:41:55 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:08:48 2014 +0100

    tools/libxl: Introduce libxl__malloc()
    
    For those large allocations which are going to be filled immediately, where
    redundantly clearing the memory would just be a waste of time.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 tools/libxl/libxl_internal.c |    9 +++++++++
 tools/libxl/libxl_internal.h |    2 ++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index 6c105de..6c94d3e 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -78,6 +78,15 @@ void libxl__free_all(libxl__gc *gc)
     gc->alloc_maxsize = 0;
 }
 
+void *libxl__malloc(libxl__gc *gc, size_t size)
+{
+    void *ptr = malloc(size);
+    if (!ptr) libxl__alloc_failed(CTX, __func__, size, 1);
+
+    libxl__ptr_add(gc, ptr);
+    return ptr;
+}
+
 void *libxl__zalloc(libxl__gc *gc, size_t size)
 {
     void *ptr = calloc(size, 1);
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index be325bb..c2b73c4 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -504,6 +504,8 @@ static inline int libxl__gc_is_real(const libxl__gc *gc)
 _hidden void libxl__ptr_add(libxl__gc *gc_opt, void *ptr /* may be NULL */) NN1;
 /* if this is the outermost libxl callframe then free all pointers in @gc */
 _hidden void libxl__free_all(libxl__gc *gc);
+/* allocate @size bytes. (a gc'd malloc(3)) */
+_hidden void *libxl__malloc(libxl__gc *gc_opt, size_t size) NN1;
 /* allocate and zero @size. (similar to a gc'd malloc(3)+memzero()) */
 _hidden void *libxl__zalloc(libxl__gc *gc_opt, size_t size) NN1;
 /* allocate and zero memory for an array of @nmemb members of @size each.
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24: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 1WVCiq-0006y2-Tk; Wed, 02 Apr 2014 04:24:20 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCip-0006xo-SH
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:20 +0000
Received: from [193.109.254.147:17583] by server-16.bemta-14.messagelabs.com
	id 15/C9-16986-3F09B335; Wed, 02 Apr 2014 04:24:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1396412657!5687537!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20065 invoked from network); 2 Apr 2014 04:24:18 -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;
	2 Apr 2014 04:24:18 -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 1WVCin-0000eG-5t
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCim-0000En-Pd
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:17 +0000
Date: Wed, 02 Apr 2014 04:24:16 +0000
Message-Id: <E1WVCim-0000En-Pd@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs: Honour --{en,
	dis}able-xend when building docs
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 7dbfc2f8b054b97a6454f4d5fccf71cf6be53b6a
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Mar 28 11:24:04 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:17:27 2014 +0100

    docs: Honour --{en, dis}able-xend when building docs
    
    If a user has specified --disable-xend, they wont want the manpages either.
    
    Propagating this parameters requires reorganising the way in which the
    makefile chooses which documents to build.
    
    There is now a split of {MAN1,MAN5,MARKDOWN,TXT}SRC-y to select which
    documentation to build, which is separate from the patsubst section which
    generates appropriate paths to trigger the later rules.
    
    The manpages are quite easy to split between xend, xl and xenstore, and have
    been.  Items from misc/ are much harder and been left.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
    [ ijc -- reran autogen.sh as requested. ]
---
 config/Docs.mk.in |    3 +++
 docs/Makefile     |   38 ++++++++++++++++++++++++--------------
 docs/configure    |   40 ++++++++++++++++++++++++++++++++++++++++
 docs/configure.ac |    4 ++++
 4 files changed, 71 insertions(+), 14 deletions(-)

diff --git a/config/Docs.mk.in b/config/Docs.mk.in
index a2a72fd..03fac60 100644
--- a/config/Docs.mk.in
+++ b/config/Docs.mk.in
@@ -12,3 +12,6 @@ POD2HTML            := @POD2HTML@
 POD2TEXT            := @POD2TEXT@
 MARKDOWN            := @MARKDOWN@
 PERL                := @PERL@
+
+# Subsets of documentation to build
+CONFIG_XEND         := @xend@
diff --git a/docs/Makefile b/docs/Makefile
index 8d5d48e..06a9bc8 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -6,20 +6,30 @@ VERSION		:= $(shell $(MAKE) -C $(XEN_ROOT)/xen --no-print-directory xenversion)
 
 DOC_ARCHES      := arm x86_32 x86_64
 
-DOC_MAN5SRC	:= $(wildcard man/*.pod.5)
-DOC_MAN1SRC	:= $(wildcard man/*.pod.1)
-DOC_MAN1	:= $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
-DOC_MAN5	:= $(patsubst man/%.pod.5,man5/%.5,$(DOC_MAN5SRC))
-DOC_MARKDOWN	:= $(wildcard misc/*.markdown)
-DOC_HTML	:= $(patsubst %.markdown,html/%.html,$(DOC_MARKDOWN)) \
-		   $(patsubst man/%.pod.1,html/man/%.1.html,$(DOC_MAN1SRC)) \
-		   $(patsubst man/%.pod.5,html/man/%.5.html,$(DOC_MAN5SRC)) \
-		   $(patsubst %.txt,html/%.txt,$(wildcard misc/*.txt)) \
-		   $(patsubst %,html/hypercall/%/index.html,$(DOC_ARCHES))
-DOC_TXT         := $(patsubst %.txt,txt/%.txt,$(wildcard misc/*.txt)) \
-		   $(patsubst %.markdown,txt/%.txt,$(DOC_MARKDOWN)) \
-		   $(patsubst man/%.pod.1,txt/man/%.1.txt,$(DOC_MAN1SRC)) \
-		   $(patsubst man/%.pod.5,txt/man/%.5.txt,$(DOC_MAN5SRC))
+# Documentation sources to build
+MAN1SRC-y := $(wildcard man/xl*.pod.1)
+MAN1SRC-y += $(wildcard man/xenstore*.pod.1)
+MAN1SRC-$(CONFIG_XEND) += man/xm.pod.1
+
+MAN5SRC-y := $(wildcard man/xl*.pod.5)
+MAN5SRC-$(CONFIG_XEND) += man/xend-config.sxp.pod.5 man/xmdomain.cfg.pod.5
+
+MARKDOWNSRC-y := $(wildcard misc/*.markdown)
+
+TXTSRC-y := $(wildcard misc/*.txt)
+
+
+DOC_MAN1 := $(patsubst man/%.pod.1,man1/%.1,$(MAN1SRC-y))
+DOC_MAN5 := $(patsubst man/%.pod.5,man5/%.5,$(MAN5SRC-y))
+DOC_HTML := $(patsubst %.markdown,html/%.html,$(MARKDOWNSRC-y)) \
+            $(patsubst man/%.pod.1,html/man/%.1.html,$(MAN1SRC-y)) \
+            $(patsubst man/%.pod.5,html/man/%.5.html,$(MAN5SRC-y)) \
+            $(patsubst %.txt,html/%.txt,$(TXTSRC-y)) \
+            $(patsubst %,html/hypercall/%/index.html,$(DOC_ARCHES))
+DOC_TXT  := $(patsubst %.txt,txt/%.txt,$(TXTSRC-y)) \
+            $(patsubst %.markdown,txt/%.txt,$(MARKDOWNSRC-y)) \
+            $(patsubst man/%.pod.1,txt/man/%.1.txt,$(MAN1SRC-y)) \
+            $(patsubst man/%.pod.5,txt/man/%.5.txt,$(MAN5SRC-y))
 
 .PHONY: all
 all: build
diff --git a/docs/configure b/docs/configure
index 926da30..c54f431 100755
--- a/docs/configure
+++ b/docs/configure
@@ -588,6 +588,7 @@ ac_unique_file="misc/xen-command-line.markdown"
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 PERL
+xend
 MARKDOWN
 POD2TEXT
 POD2HTML
@@ -634,6 +635,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_xend
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1249,6 +1251,13 @@ if test -n "$ac_init_help"; then
    esac
   cat <<\_ACEOF
 
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-xend           Enable xend toolstack documentation (default is
+                          DISABLED)
+
 Some influential environment variables:
   FIG2DEV     Path to fig2dev tool
   POD2MAN     Path to pod2man tool
@@ -1732,6 +1741,12 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
 
+
+
+
+
+
+
     # Extract the first word of "fig2dev", so it can be a program name with args.
 set dummy fig2dev; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -1981,6 +1996,31 @@ $as_echo "$as_me: WARNING: markdown is not available so some documentation won't
 fi
 
 
+# Enable/disable options
+
+# Check whether --enable-xend was given.
+if test "${enable_xend+set}" = set; then :
+  enableval=$enable_xend;
+fi
+
+
+if test "x$enable_xend" = "xno"; then :
+
+    ax_cv_xend="n"
+
+elif test "x$enable_xend" = "xyes"; then :
+
+    ax_cv_xend="y"
+
+elif test -z $ax_cv_xend; then :
+
+    ax_cv_xend="n"
+
+fi
+xend=$ax_cv_xend
+
+
+
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
diff --git a/docs/configure.ac b/docs/configure.ac
index f0ebf00..7e6d1b1 100644
--- a/docs/configure.ac
+++ b/docs/configure.ac
@@ -11,6 +11,7 @@ AC_CONFIG_AUX_DIR([../])
 # M4 Macro includes
 m4_include([../m4/docs_tool.m4])
 m4_include([../m4/path_or_fail.m4])
+m4_include([../m4/features.m4])
 
 AX_DOCS_TOOL_PROG([FIG2DEV], [fig2dev])
 AX_DOCS_TOOL_PROG([POD2MAN], [pod2man])
@@ -18,6 +19,9 @@ AX_DOCS_TOOL_PROG([POD2HTML], [pod2html])
 AX_DOCS_TOOL_PROG([POD2TEXT], [pod2text])
 AX_DOCS_TOOL_PROGS([MARKDOWN], [markdown], [markdown markdown_py])
 
+# Enable/disable options
+AX_ARG_DEFAULT_DISABLE([xend], [Enable xend toolstack documentation])
+
 AC_ARG_VAR([PERL], [Path to Perl parser])
 AX_PATH_PROG_OR_FAIL([PERL], [perl])
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24: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 1WVCiq-0006y2-Tk; Wed, 02 Apr 2014 04:24:20 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCip-0006xo-SH
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:20 +0000
Received: from [193.109.254.147:17583] by server-16.bemta-14.messagelabs.com
	id 15/C9-16986-3F09B335; Wed, 02 Apr 2014 04:24:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1396412657!5687537!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20065 invoked from network); 2 Apr 2014 04:24:18 -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;
	2 Apr 2014 04:24:18 -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 1WVCin-0000eG-5t
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCim-0000En-Pd
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:17 +0000
Date: Wed, 02 Apr 2014 04:24:16 +0000
Message-Id: <E1WVCim-0000En-Pd@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs: Honour --{en,
	dis}able-xend when building docs
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 7dbfc2f8b054b97a6454f4d5fccf71cf6be53b6a
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Mar 28 11:24:04 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:17:27 2014 +0100

    docs: Honour --{en, dis}able-xend when building docs
    
    If a user has specified --disable-xend, they wont want the manpages either.
    
    Propagating this parameters requires reorganising the way in which the
    makefile chooses which documents to build.
    
    There is now a split of {MAN1,MAN5,MARKDOWN,TXT}SRC-y to select which
    documentation to build, which is separate from the patsubst section which
    generates appropriate paths to trigger the later rules.
    
    The manpages are quite easy to split between xend, xl and xenstore, and have
    been.  Items from misc/ are much harder and been left.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
    [ ijc -- reran autogen.sh as requested. ]
---
 config/Docs.mk.in |    3 +++
 docs/Makefile     |   38 ++++++++++++++++++++++++--------------
 docs/configure    |   40 ++++++++++++++++++++++++++++++++++++++++
 docs/configure.ac |    4 ++++
 4 files changed, 71 insertions(+), 14 deletions(-)

diff --git a/config/Docs.mk.in b/config/Docs.mk.in
index a2a72fd..03fac60 100644
--- a/config/Docs.mk.in
+++ b/config/Docs.mk.in
@@ -12,3 +12,6 @@ POD2HTML            := @POD2HTML@
 POD2TEXT            := @POD2TEXT@
 MARKDOWN            := @MARKDOWN@
 PERL                := @PERL@
+
+# Subsets of documentation to build
+CONFIG_XEND         := @xend@
diff --git a/docs/Makefile b/docs/Makefile
index 8d5d48e..06a9bc8 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -6,20 +6,30 @@ VERSION		:= $(shell $(MAKE) -C $(XEN_ROOT)/xen --no-print-directory xenversion)
 
 DOC_ARCHES      := arm x86_32 x86_64
 
-DOC_MAN5SRC	:= $(wildcard man/*.pod.5)
-DOC_MAN1SRC	:= $(wildcard man/*.pod.1)
-DOC_MAN1	:= $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
-DOC_MAN5	:= $(patsubst man/%.pod.5,man5/%.5,$(DOC_MAN5SRC))
-DOC_MARKDOWN	:= $(wildcard misc/*.markdown)
-DOC_HTML	:= $(patsubst %.markdown,html/%.html,$(DOC_MARKDOWN)) \
-		   $(patsubst man/%.pod.1,html/man/%.1.html,$(DOC_MAN1SRC)) \
-		   $(patsubst man/%.pod.5,html/man/%.5.html,$(DOC_MAN5SRC)) \
-		   $(patsubst %.txt,html/%.txt,$(wildcard misc/*.txt)) \
-		   $(patsubst %,html/hypercall/%/index.html,$(DOC_ARCHES))
-DOC_TXT         := $(patsubst %.txt,txt/%.txt,$(wildcard misc/*.txt)) \
-		   $(patsubst %.markdown,txt/%.txt,$(DOC_MARKDOWN)) \
-		   $(patsubst man/%.pod.1,txt/man/%.1.txt,$(DOC_MAN1SRC)) \
-		   $(patsubst man/%.pod.5,txt/man/%.5.txt,$(DOC_MAN5SRC))
+# Documentation sources to build
+MAN1SRC-y := $(wildcard man/xl*.pod.1)
+MAN1SRC-y += $(wildcard man/xenstore*.pod.1)
+MAN1SRC-$(CONFIG_XEND) += man/xm.pod.1
+
+MAN5SRC-y := $(wildcard man/xl*.pod.5)
+MAN5SRC-$(CONFIG_XEND) += man/xend-config.sxp.pod.5 man/xmdomain.cfg.pod.5
+
+MARKDOWNSRC-y := $(wildcard misc/*.markdown)
+
+TXTSRC-y := $(wildcard misc/*.txt)
+
+
+DOC_MAN1 := $(patsubst man/%.pod.1,man1/%.1,$(MAN1SRC-y))
+DOC_MAN5 := $(patsubst man/%.pod.5,man5/%.5,$(MAN5SRC-y))
+DOC_HTML := $(patsubst %.markdown,html/%.html,$(MARKDOWNSRC-y)) \
+            $(patsubst man/%.pod.1,html/man/%.1.html,$(MAN1SRC-y)) \
+            $(patsubst man/%.pod.5,html/man/%.5.html,$(MAN5SRC-y)) \
+            $(patsubst %.txt,html/%.txt,$(TXTSRC-y)) \
+            $(patsubst %,html/hypercall/%/index.html,$(DOC_ARCHES))
+DOC_TXT  := $(patsubst %.txt,txt/%.txt,$(TXTSRC-y)) \
+            $(patsubst %.markdown,txt/%.txt,$(MARKDOWNSRC-y)) \
+            $(patsubst man/%.pod.1,txt/man/%.1.txt,$(MAN1SRC-y)) \
+            $(patsubst man/%.pod.5,txt/man/%.5.txt,$(MAN5SRC-y))
 
 .PHONY: all
 all: build
diff --git a/docs/configure b/docs/configure
index 926da30..c54f431 100755
--- a/docs/configure
+++ b/docs/configure
@@ -588,6 +588,7 @@ ac_unique_file="misc/xen-command-line.markdown"
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 PERL
+xend
 MARKDOWN
 POD2TEXT
 POD2HTML
@@ -634,6 +635,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_xend
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1249,6 +1251,13 @@ if test -n "$ac_init_help"; then
    esac
   cat <<\_ACEOF
 
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-xend           Enable xend toolstack documentation (default is
+                          DISABLED)
+
 Some influential environment variables:
   FIG2DEV     Path to fig2dev tool
   POD2MAN     Path to pod2man tool
@@ -1732,6 +1741,12 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
 
+
+
+
+
+
+
     # Extract the first word of "fig2dev", so it can be a program name with args.
 set dummy fig2dev; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -1981,6 +1996,31 @@ $as_echo "$as_me: WARNING: markdown is not available so some documentation won't
 fi
 
 
+# Enable/disable options
+
+# Check whether --enable-xend was given.
+if test "${enable_xend+set}" = set; then :
+  enableval=$enable_xend;
+fi
+
+
+if test "x$enable_xend" = "xno"; then :
+
+    ax_cv_xend="n"
+
+elif test "x$enable_xend" = "xyes"; then :
+
+    ax_cv_xend="y"
+
+elif test -z $ax_cv_xend; then :
+
+    ax_cv_xend="n"
+
+fi
+xend=$ax_cv_xend
+
+
+
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
diff --git a/docs/configure.ac b/docs/configure.ac
index f0ebf00..7e6d1b1 100644
--- a/docs/configure.ac
+++ b/docs/configure.ac
@@ -11,6 +11,7 @@ AC_CONFIG_AUX_DIR([../])
 # M4 Macro includes
 m4_include([../m4/docs_tool.m4])
 m4_include([../m4/path_or_fail.m4])
+m4_include([../m4/features.m4])
 
 AX_DOCS_TOOL_PROG([FIG2DEV], [fig2dev])
 AX_DOCS_TOOL_PROG([POD2MAN], [pod2man])
@@ -18,6 +19,9 @@ AX_DOCS_TOOL_PROG([POD2HTML], [pod2html])
 AX_DOCS_TOOL_PROG([POD2TEXT], [pod2text])
 AX_DOCS_TOOL_PROGS([MARKDOWN], [markdown], [markdown markdown_py])
 
+# Enable/disable options
+AX_ARG_DEFAULT_DISABLE([xend], [Enable xend toolstack documentation])
+
 AC_ARG_VAR([PERL], [Path to Perl parser])
 AX_PATH_PROG_OR_FAIL([PERL], [perl])
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24: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 1WVCj1-00070M-3N; Wed, 02 Apr 2014 04:24:31 +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 1WVCiz-000706-TE
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:30 +0000
Received: from [85.158.143.35:18697] by server-1.bemta-4.messagelabs.com id
	F9/00-09853-DF09B335; Wed, 02 Apr 2014 04:24:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1396412667!6226900!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11298 invoked from network); 2 Apr 2014 04:24:28 -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;
	2 Apr 2014 04:24:28 -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 1WVCix-0000eM-Ek
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCix-0000F9-CP
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:27 +0000
Date: Wed, 02 Apr 2014 04:24:27 +0000
Message-Id: <E1WVCix-0000F9-CP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs/Makefile: Split the install 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

commit bbd3eeda9f95ccf486482b0c1737a65714390d35
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Mar 28 11:24:05 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:17:41 2014 +0100

    docs/Makefile: Split the install target
    
    Split the current install target into two subtargets, install-man-pages and
    install-html, with the main install target depending on both.
    
    This helps packagers who want the man pages to put in appropriate rpms/debs,
    but don't want to build the html developer docs.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 docs/Makefile |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/docs/Makefile b/docs/Makefile
index 06a9bc8..7cd7440 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -88,16 +88,20 @@ distclean: clean
 	rm -rf $(XEN_ROOT)/config/Docs.mk config.log config.status config.cache \
 		autom4te.cache
 
-.PHONY: install
-install: all
-	rm -rf $(DESTDIR)$(DOCDIR)
-	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
-
+.PHONY: install-man-pages
+install-man-pages: man-pages
 	$(INSTALL_DIR) $(DESTDIR)$(MANDIR)
 	cp -R man1 $(DESTDIR)$(MANDIR)
 	cp -R man5 $(DESTDIR)$(MANDIR)
+
+.PHONY: install-html
+install-html: html txt figs
+	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
 	[ ! -d html ] || cp -R html $(DESTDIR)$(DOCDIR)
 
+.PHONY: install
+install: install-man-pages install-html
+
 html/index.html: $(DOC_HTML) $(CURDIR)/gen-html-index INDEX
 	$(PERL) -w -- $(CURDIR)/gen-html-index -i INDEX html $(DOC_HTML)
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24: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 1WVCj1-00070M-3N; Wed, 02 Apr 2014 04:24:31 +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 1WVCiz-000706-TE
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:30 +0000
Received: from [85.158.143.35:18697] by server-1.bemta-4.messagelabs.com id
	F9/00-09853-DF09B335; Wed, 02 Apr 2014 04:24:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1396412667!6226900!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11298 invoked from network); 2 Apr 2014 04:24:28 -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;
	2 Apr 2014 04:24:28 -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 1WVCix-0000eM-Ek
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCix-0000F9-CP
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:27 +0000
Date: Wed, 02 Apr 2014 04:24:27 +0000
Message-Id: <E1WVCix-0000F9-CP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs/Makefile: Split the install 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

commit bbd3eeda9f95ccf486482b0c1737a65714390d35
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Mar 28 11:24:05 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:17:41 2014 +0100

    docs/Makefile: Split the install target
    
    Split the current install target into two subtargets, install-man-pages and
    install-html, with the main install target depending on both.
    
    This helps packagers who want the man pages to put in appropriate rpms/debs,
    but don't want to build the html developer docs.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 docs/Makefile |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/docs/Makefile b/docs/Makefile
index 06a9bc8..7cd7440 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -88,16 +88,20 @@ distclean: clean
 	rm -rf $(XEN_ROOT)/config/Docs.mk config.log config.status config.cache \
 		autom4te.cache
 
-.PHONY: install
-install: all
-	rm -rf $(DESTDIR)$(DOCDIR)
-	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
-
+.PHONY: install-man-pages
+install-man-pages: man-pages
 	$(INSTALL_DIR) $(DESTDIR)$(MANDIR)
 	cp -R man1 $(DESTDIR)$(MANDIR)
 	cp -R man5 $(DESTDIR)$(MANDIR)
+
+.PHONY: install-html
+install-html: html txt figs
+	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
 	[ ! -d html ] || cp -R html $(DESTDIR)$(DOCDIR)
 
+.PHONY: install
+install: install-man-pages install-html
+
 html/index.html: $(DOC_HTML) $(CURDIR)/gen-html-index INDEX
 	$(PERL) -w -- $(CURDIR)/gen-html-index -i INDEX html $(DOC_HTML)
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24:42 +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 1WVCjC-00072L-88; Wed, 02 Apr 2014 04:24:42 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjB-000728-BO
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:41 +0000
Received: from [85.158.137.68:31664] by server-13.bemta-3.messagelabs.com id
	86/ED-18692-8019B335; Wed, 02 Apr 2014 04:24:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1396412677!4421652!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11192 invoked from network); 2 Apr 2014 04:24:39 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:24:39 -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 1WVCj7-0000eS-LA
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCj7-0000FZ-JE
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:37 +0000
Date: Wed, 02 Apr 2014 04:24:37 +0000
Message-Id: <E1WVCj7-0000FZ-JE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Move p2m context save/restore
	in a separate 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

commit 84ca4629d0aa71dc45c969f625d069373fb88828
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Mar 19 15:43:37 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:18:37 2014 +0100

    xen/arm: Move p2m context save/restore in a separate function
    
    Introduce p2m_{save,restore}_state to save/restore p2m context.
    
    The both functions will take care of:
        - VTTBR: contains the pointer to the domain P2M
        - Update HCR_RW if the domain is 64 bit
        - SCTLR: contains bit to know if the MMU is enabled or not
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain.c     |   21 +++------------------
 xen/arch/arm/p2m.c        |   28 ++++++++++++++++++++++++++++
 xen/include/asm-arm/p2m.h |    4 ++++
 3 files changed, 35 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 46ee486..b125857 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -59,11 +59,12 @@ void idle_loop(void)
 
 static void ctxt_switch_from(struct vcpu *p)
 {
+    p2m_save_state(p);
+
     /* CP 15 */
     p->arch.csselr = READ_SYSREG(CSSELR_EL1);
 
     /* Control Registers */
-    p->arch.sctlr = READ_SYSREG(SCTLR_EL1);
     p->arch.cpacr = READ_SYSREG(CPACR_EL1);
 
     p->arch.contextidr = READ_SYSREG(CONTEXTIDR_EL1);
@@ -134,14 +135,7 @@ static void ctxt_switch_from(struct vcpu *p)
 
 static void ctxt_switch_to(struct vcpu *n)
 {
-    register_t hcr;
-
-    hcr = READ_SYSREG(HCR_EL2);
-    WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
-    isb();
-
-    p2m_load_VTTBR(n->domain);
-    isb();
+    p2m_restore_state(n);
 
     WRITE_SYSREG32(n->domain->arch.vpidr, VPIDR_EL2);
     WRITE_SYSREG(n->arch.vmpidr, VMPIDR_EL2);
@@ -189,7 +183,6 @@ static void ctxt_switch_to(struct vcpu *n)
     isb();
 
     /* Control Registers */
-    WRITE_SYSREG(n->arch.sctlr, SCTLR_EL1);
     WRITE_SYSREG(n->arch.cpacr, CPACR_EL1);
 
     WRITE_SYSREG(n->arch.contextidr, CONTEXTIDR_EL1);
@@ -214,14 +207,6 @@ static void ctxt_switch_to(struct vcpu *n)
 
     isb();
 
-    if ( is_32bit_domain(n->domain) )
-        hcr &= ~HCR_RW;
-    else
-        hcr |= HCR_RW;
-
-    WRITE_SYSREG(hcr, HCR_EL2);
-    isb();
-
     /* This is could trigger an hardware interrupt from the virtual
      * timer. The interrupt needs to be injected into the guest. */
     virt_timer_restore(n);
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index b9d8ca6..979fe5b 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -44,6 +44,34 @@ void p2m_load_VTTBR(struct domain *d)
     isb(); /* Ensure update is visible */
 }
 
+void p2m_save_state(struct vcpu *p)
+{
+    p->arch.sctlr = READ_SYSREG(SCTLR_EL1);
+}
+
+void p2m_restore_state(struct vcpu *n)
+{
+    register_t hcr;
+
+    hcr = READ_SYSREG(HCR_EL2);
+    WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
+    isb();
+
+    p2m_load_VTTBR(n->domain);
+    isb();
+
+    if ( is_32bit_domain(n->domain) )
+        hcr &= ~HCR_RW;
+    else
+        hcr |= HCR_RW;
+
+    WRITE_SYSREG(n->arch.sctlr, SCTLR_EL1);
+    isb();
+
+    WRITE_SYSREG(hcr, HCR_EL2);
+    isb();
+}
+
 static int p2m_first_level_index(paddr_t addr)
 {
     /*
diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index 3b39c45..e1013c8 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -75,6 +75,10 @@ int p2m_alloc_table(struct domain *d);
 /* */
 void p2m_load_VTTBR(struct domain *d);
 
+/* Context switch */
+void p2m_save_state(struct vcpu *p);
+void p2m_restore_state(struct vcpu *n);
+
 /* Look up the MFN corresponding to a domain's PFN. */
 paddr_t p2m_lookup(struct domain *d, paddr_t gpfn, p2m_type_t *t);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24:42 +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 1WVCjC-00072L-88; Wed, 02 Apr 2014 04:24:42 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjB-000728-BO
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:41 +0000
Received: from [85.158.137.68:31664] by server-13.bemta-3.messagelabs.com id
	86/ED-18692-8019B335; Wed, 02 Apr 2014 04:24:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1396412677!4421652!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11192 invoked from network); 2 Apr 2014 04:24:39 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:24:39 -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 1WVCj7-0000eS-LA
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCj7-0000FZ-JE
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:37 +0000
Date: Wed, 02 Apr 2014 04:24:37 +0000
Message-Id: <E1WVCj7-0000FZ-JE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Move p2m context save/restore
	in a separate 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

commit 84ca4629d0aa71dc45c969f625d069373fb88828
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Mar 19 15:43:37 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:18:37 2014 +0100

    xen/arm: Move p2m context save/restore in a separate function
    
    Introduce p2m_{save,restore}_state to save/restore p2m context.
    
    The both functions will take care of:
        - VTTBR: contains the pointer to the domain P2M
        - Update HCR_RW if the domain is 64 bit
        - SCTLR: contains bit to know if the MMU is enabled or not
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain.c     |   21 +++------------------
 xen/arch/arm/p2m.c        |   28 ++++++++++++++++++++++++++++
 xen/include/asm-arm/p2m.h |    4 ++++
 3 files changed, 35 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 46ee486..b125857 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -59,11 +59,12 @@ void idle_loop(void)
 
 static void ctxt_switch_from(struct vcpu *p)
 {
+    p2m_save_state(p);
+
     /* CP 15 */
     p->arch.csselr = READ_SYSREG(CSSELR_EL1);
 
     /* Control Registers */
-    p->arch.sctlr = READ_SYSREG(SCTLR_EL1);
     p->arch.cpacr = READ_SYSREG(CPACR_EL1);
 
     p->arch.contextidr = READ_SYSREG(CONTEXTIDR_EL1);
@@ -134,14 +135,7 @@ static void ctxt_switch_from(struct vcpu *p)
 
 static void ctxt_switch_to(struct vcpu *n)
 {
-    register_t hcr;
-
-    hcr = READ_SYSREG(HCR_EL2);
-    WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
-    isb();
-
-    p2m_load_VTTBR(n->domain);
-    isb();
+    p2m_restore_state(n);
 
     WRITE_SYSREG32(n->domain->arch.vpidr, VPIDR_EL2);
     WRITE_SYSREG(n->arch.vmpidr, VMPIDR_EL2);
@@ -189,7 +183,6 @@ static void ctxt_switch_to(struct vcpu *n)
     isb();
 
     /* Control Registers */
-    WRITE_SYSREG(n->arch.sctlr, SCTLR_EL1);
     WRITE_SYSREG(n->arch.cpacr, CPACR_EL1);
 
     WRITE_SYSREG(n->arch.contextidr, CONTEXTIDR_EL1);
@@ -214,14 +207,6 @@ static void ctxt_switch_to(struct vcpu *n)
 
     isb();
 
-    if ( is_32bit_domain(n->domain) )
-        hcr &= ~HCR_RW;
-    else
-        hcr |= HCR_RW;
-
-    WRITE_SYSREG(hcr, HCR_EL2);
-    isb();
-
     /* This is could trigger an hardware interrupt from the virtual
      * timer. The interrupt needs to be injected into the guest. */
     virt_timer_restore(n);
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index b9d8ca6..979fe5b 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -44,6 +44,34 @@ void p2m_load_VTTBR(struct domain *d)
     isb(); /* Ensure update is visible */
 }
 
+void p2m_save_state(struct vcpu *p)
+{
+    p->arch.sctlr = READ_SYSREG(SCTLR_EL1);
+}
+
+void p2m_restore_state(struct vcpu *n)
+{
+    register_t hcr;
+
+    hcr = READ_SYSREG(HCR_EL2);
+    WRITE_SYSREG(hcr & ~HCR_VM, HCR_EL2);
+    isb();
+
+    p2m_load_VTTBR(n->domain);
+    isb();
+
+    if ( is_32bit_domain(n->domain) )
+        hcr &= ~HCR_RW;
+    else
+        hcr |= HCR_RW;
+
+    WRITE_SYSREG(n->arch.sctlr, SCTLR_EL1);
+    isb();
+
+    WRITE_SYSREG(hcr, HCR_EL2);
+    isb();
+}
+
 static int p2m_first_level_index(paddr_t addr)
 {
     /*
diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index 3b39c45..e1013c8 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -75,6 +75,10 @@ int p2m_alloc_table(struct domain *d);
 /* */
 void p2m_load_VTTBR(struct domain *d);
 
+/* Context switch */
+void p2m_save_state(struct vcpu *p);
+void p2m_restore_state(struct vcpu *n);
+
 /* Look up the MFN corresponding to a domain's PFN. */
 paddr_t p2m_lookup(struct domain *d, paddr_t gpfn, p2m_type_t *t);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24:52 +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 1WVCjM-00074L-Az; Wed, 02 Apr 2014 04:24:52 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjK-00073y-8W
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:50 +0000
Received: from [193.109.254.147:20172] by server-4.bemta-14.messagelabs.com id
	45/1B-02781-1119B335; Wed, 02 Apr 2014 04:24:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1396412688!5676465!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14212 invoked from network); 2 Apr 2014 04:24:48 -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;
	2 Apr 2014 04:24:48 -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 1WVCjH-0000ea-RQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjH-0000GR-Q4
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:47 +0000
Date: Wed, 02 Apr 2014 04:24:47 +0000
Message-Id: <E1WVCjH-0000GR-Q4@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Use p2m_restore_state in
	construct_dom0
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 d6dd3a9ae7adead322e8ce96f83db96dce64c982
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Mar 19 15:43:38 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:23:42 2014 +0100

    xen/arm: Use p2m_restore_state in construct_dom0
    
    The address translation functions used while building dom0 rely on certain EL1
    state being configured. In particular they are subject to the behaviour of
    SCTLR_EL1.M (stage 1 MMU enabled).
    
    The Xen (and Linux) boot protocol require that the kernel be entered with the
    MMU disabled but they don't say anything explicitly about exception levels
    other than the one which is active when entering the kernels. Arguably the
    protocol could be said to apply to all exception levels but in any case we
    should cope with this and setup the EL1 state as necessary.
    
    Fu Wei discovered this when booting Xen from grub.efi over UEFI, it's not
    clear whether grub or UEFI is responsible for leaving stage 1 MMU enabled.
    
    Use directly the newly created function p2m_restore_state to retrieve a
    correct EL1 state to translate an address.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Reported-by: Fu Wei <fu.wei@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain_build.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index c9dda0e..502db84 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1021,14 +1021,7 @@ int construct_dom0(struct domain *d)
         return rc;
 
     /* The following loads use the domain's p2m */
-    p2m_load_VTTBR(d);
-#ifdef CONFIG_ARM_64
-    d->arch.type = kinfo.type;
-    if ( is_32bit_domain(d) )
-        WRITE_SYSREG(READ_SYSREG(HCR_EL2) & ~HCR_RW, HCR_EL2);
-    else
-        WRITE_SYSREG(READ_SYSREG(HCR_EL2) | HCR_RW, HCR_EL2);
-#endif
+    p2m_restore_state(v);
 
     /*
      * kernel_load will determine the placement of the initrd & fdt in
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:24:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:24:52 +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 1WVCjM-00074L-Az; Wed, 02 Apr 2014 04:24:52 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjK-00073y-8W
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:50 +0000
Received: from [193.109.254.147:20172] by server-4.bemta-14.messagelabs.com id
	45/1B-02781-1119B335; Wed, 02 Apr 2014 04:24:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1396412688!5676465!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14212 invoked from network); 2 Apr 2014 04:24:48 -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;
	2 Apr 2014 04:24:48 -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 1WVCjH-0000ea-RQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjH-0000GR-Q4
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:47 +0000
Date: Wed, 02 Apr 2014 04:24:47 +0000
Message-Id: <E1WVCjH-0000GR-Q4@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Use p2m_restore_state in
	construct_dom0
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 d6dd3a9ae7adead322e8ce96f83db96dce64c982
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Mar 19 15:43:38 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:23:42 2014 +0100

    xen/arm: Use p2m_restore_state in construct_dom0
    
    The address translation functions used while building dom0 rely on certain EL1
    state being configured. In particular they are subject to the behaviour of
    SCTLR_EL1.M (stage 1 MMU enabled).
    
    The Xen (and Linux) boot protocol require that the kernel be entered with the
    MMU disabled but they don't say anything explicitly about exception levels
    other than the one which is active when entering the kernels. Arguably the
    protocol could be said to apply to all exception levels but in any case we
    should cope with this and setup the EL1 state as necessary.
    
    Fu Wei discovered this when booting Xen from grub.efi over UEFI, it's not
    clear whether grub or UEFI is responsible for leaving stage 1 MMU enabled.
    
    Use directly the newly created function p2m_restore_state to retrieve a
    correct EL1 state to translate an address.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Reported-by: Fu Wei <fu.wei@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain_build.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index c9dda0e..502db84 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1021,14 +1021,7 @@ int construct_dom0(struct domain *d)
         return rc;
 
     /* The following loads use the domain's p2m */
-    p2m_load_VTTBR(d);
-#ifdef CONFIG_ARM_64
-    d->arch.type = kinfo.type;
-    if ( is_32bit_domain(d) )
-        WRITE_SYSREG(READ_SYSREG(HCR_EL2) & ~HCR_RW, HCR_EL2);
-    else
-        WRITE_SYSREG(READ_SYSREG(HCR_EL2) | HCR_RW, HCR_EL2);
-#endif
+    p2m_restore_state(v);
 
     /*
      * kernel_load will determine the placement of the initrd & fdt in
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25:04 +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 1WVCjY-00075z-Dz; Wed, 02 Apr 2014 04:25:04 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjW-00075k-30
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:03 +0000
Received: from [193.109.254.147:34677] by server-5.bemta-14.messagelabs.com id
	AA/CC-26413-D119B335; Wed, 02 Apr 2014 04:25:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1396412698!5686611!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19149 invoked from network); 2 Apr 2014 04:24:59 -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;
	2 Apr 2014 04:24:59 -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 1WVCjS-0000eg-2P
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjS-0000Gn-0z
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:58 +0000
Date: Wed, 02 Apr 2014 04:24:58 +0000
Message-Id: <E1WVCjS-0000Gn-0z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Don't need to export
	p2m_load_VTTBR
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 fa14745627adf0972b50da2d6e52375c4ed84c5d
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Mar 19 15:43:39 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:24:17 2014 +0100

    xen/arm: Don't need to export p2m_load_VTTBR
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/p2m.c        |    2 +-
 xen/include/asm-arm/p2m.h |    3 ---
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 979fe5b..403fd89 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -35,7 +35,7 @@ void dump_p2m_lookup(struct domain *d, paddr_t addr)
     unmap_domain_page(first);
 }
 
-void p2m_load_VTTBR(struct domain *d)
+static void p2m_load_VTTBR(struct domain *d)
 {
     if ( is_idle_domain(d) )
         return;
diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index e1013c8..bd71abe 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -72,9 +72,6 @@ int relinquish_p2m_mapping(struct domain *d);
  */
 int p2m_alloc_table(struct domain *d);
 
-/* */
-void p2m_load_VTTBR(struct domain *d);
-
 /* Context switch */
 void p2m_save_state(struct vcpu *p);
 void p2m_restore_state(struct vcpu *n);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25:04 +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 1WVCjY-00075z-Dz; Wed, 02 Apr 2014 04:25:04 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjW-00075k-30
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:03 +0000
Received: from [193.109.254.147:34677] by server-5.bemta-14.messagelabs.com id
	AA/CC-26413-D119B335; Wed, 02 Apr 2014 04:25:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1396412698!5686611!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19149 invoked from network); 2 Apr 2014 04:24:59 -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;
	2 Apr 2014 04:24:59 -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 1WVCjS-0000eg-2P
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:58 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjS-0000Gn-0z
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:24:58 +0000
Date: Wed, 02 Apr 2014 04:24:58 +0000
Message-Id: <E1WVCjS-0000Gn-0z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Don't need to export
	p2m_load_VTTBR
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 fa14745627adf0972b50da2d6e52375c4ed84c5d
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Mar 19 15:43:39 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:24:17 2014 +0100

    xen/arm: Don't need to export p2m_load_VTTBR
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/p2m.c        |    2 +-
 xen/include/asm-arm/p2m.h |    3 ---
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 979fe5b..403fd89 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -35,7 +35,7 @@ void dump_p2m_lookup(struct domain *d, paddr_t addr)
     unmap_domain_page(first);
 }
 
-void p2m_load_VTTBR(struct domain *d)
+static void p2m_load_VTTBR(struct domain *d)
 {
     if ( is_idle_domain(d) )
         return;
diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index e1013c8..bd71abe 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -72,9 +72,6 @@ int relinquish_p2m_mapping(struct domain *d);
  */
 int p2m_alloc_table(struct domain *d);
 
-/* */
-void p2m_load_VTTBR(struct domain *d);
-
 /* Context switch */
 void p2m_save_state(struct vcpu *p);
 void p2m_restore_state(struct vcpu *n);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25: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 1WVCjl-00078F-Gn; Wed, 02 Apr 2014 04:25:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjk-000785-6c
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:16 +0000
Received: from [85.158.139.211:20460] by server-8.bemta-5.messagelabs.com id
	C0/3A-11310-B219B335; Wed, 02 Apr 2014 04:25:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1396412713!3069028!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24619 invoked from network); 2 Apr 2014 04:25:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:25:14 -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 1WVCjh-0000fG-BF
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjc-0000HQ-7K
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:08 +0000
Date: Wed, 02 Apr 2014 04:25:08 +0000
Message-Id: <E1WVCjc-0000HQ-7K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/serial: Don't leak memory mapping
	if the serial initialization has failed
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 b9f1e8292185e0806378f97e2e4210e6ca311c46
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Fri Mar 28 15:11:57 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:26:55 2014 +0100

    xen/serial: Don't leak memory mapping if the serial initialization has failed
    
    The memory mapping leaked when the serial driver failed to retrieve
    the IRQ. We can safely move the call to ioremap after.
    
    Also use ioremap_cache instead of ioremap_attr in some serial drivers.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/drivers/char/exynos4210-uart.c |   13 +++++++------
 xen/drivers/char/omap-uart.c       |   15 ++++++++-------
 xen/drivers/char/pl011.c           |   15 +++++++--------
 3 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c
index 0619575..150d49b 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -334,12 +334,6 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
         return res;
     }
 
-    uart->regs = ioremap_nocache(addr, size);
-    if ( !uart->regs )
-    {
-        early_printk("exynos4210: Unable to map the UART memory\n");
-        return -ENOMEM;
-    }
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
@@ -347,6 +341,13 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
         return res;
     }
 
+    uart->regs = ioremap_nocache(addr, size);
+    if ( !uart->regs )
+    {
+        early_printk("exynos4210: Unable to map the UART memory\n");
+        return -ENOMEM;
+    }
+
     uart->vuart.base_addr = addr;
     uart->vuart.size = size;
     uart->vuart.data_off = UTXH;
diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c
index c1580ef..b29f610 100644
--- a/xen/drivers/char/omap-uart.c
+++ b/xen/drivers/char/omap-uart.c
@@ -326,13 +326,6 @@ static int __init omap_uart_init(struct dt_device_node *dev,
         return res;
     }
 
-    uart->regs = ioremap_attr(addr, size, PAGE_HYPERVISOR_NOCACHE);
-    if ( !uart->regs )
-    {
-        early_printk("omap-uart: Unable to map the UART memory\n");
-        return -ENOMEM;
-    }
-
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
@@ -340,6 +333,14 @@ static int __init omap_uart_init(struct dt_device_node *dev,
         return res;
     }
 
+    uart->regs = ioremap_nocache(addr, size);
+    if ( !uart->regs )
+    {
+        early_printk("omap-uart: Unable to map the UART memory\n");
+        return -ENOMEM;
+    }
+
+
     uart->vuart.base_addr = addr;
     uart->vuart.size = size;
     uart->vuart.data_off = UART_THR;
diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
index fd82511..fe99af6 100644
--- a/xen/drivers/char/pl011.c
+++ b/xen/drivers/char/pl011.c
@@ -248,14 +248,6 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
         return res;
     }
 
-    uart->regs = ioremap_attr(addr, size, PAGE_HYPERVISOR_NOCACHE);
-    if ( !uart->regs )
-    {
-        early_printk("pl011: Unable to map the UART memory\n");
-
-        return -ENOMEM;
-    }
-
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
@@ -263,6 +255,13 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
         return res;
     }
 
+    uart->regs = ioremap_nocache(addr, size);
+    if ( !uart->regs )
+    {
+        early_printk("pl011: Unable to map the UART memory\n");
+        return -ENOMEM;
+    }
+
     uart->vuart.base_addr = addr;
     uart->vuart.size = size;
     uart->vuart.data_off = DR;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25: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 1WVCjl-00078F-Gn; Wed, 02 Apr 2014 04:25:17 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjk-000785-6c
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:16 +0000
Received: from [85.158.139.211:20460] by server-8.bemta-5.messagelabs.com id
	C0/3A-11310-B219B335; Wed, 02 Apr 2014 04:25:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1396412713!3069028!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24619 invoked from network); 2 Apr 2014 04:25:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:25:14 -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 1WVCjh-0000fG-BF
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjc-0000HQ-7K
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:08 +0000
Date: Wed, 02 Apr 2014 04:25:08 +0000
Message-Id: <E1WVCjc-0000HQ-7K@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/serial: Don't leak memory mapping
	if the serial initialization has failed
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 b9f1e8292185e0806378f97e2e4210e6ca311c46
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Fri Mar 28 15:11:57 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:26:55 2014 +0100

    xen/serial: Don't leak memory mapping if the serial initialization has failed
    
    The memory mapping leaked when the serial driver failed to retrieve
    the IRQ. We can safely move the call to ioremap after.
    
    Also use ioremap_cache instead of ioremap_attr in some serial drivers.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/drivers/char/exynos4210-uart.c |   13 +++++++------
 xen/drivers/char/omap-uart.c       |   15 ++++++++-------
 xen/drivers/char/pl011.c           |   15 +++++++--------
 3 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c
index 0619575..150d49b 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -334,12 +334,6 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
         return res;
     }
 
-    uart->regs = ioremap_nocache(addr, size);
-    if ( !uart->regs )
-    {
-        early_printk("exynos4210: Unable to map the UART memory\n");
-        return -ENOMEM;
-    }
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
@@ -347,6 +341,13 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
         return res;
     }
 
+    uart->regs = ioremap_nocache(addr, size);
+    if ( !uart->regs )
+    {
+        early_printk("exynos4210: Unable to map the UART memory\n");
+        return -ENOMEM;
+    }
+
     uart->vuart.base_addr = addr;
     uart->vuart.size = size;
     uart->vuart.data_off = UTXH;
diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c
index c1580ef..b29f610 100644
--- a/xen/drivers/char/omap-uart.c
+++ b/xen/drivers/char/omap-uart.c
@@ -326,13 +326,6 @@ static int __init omap_uart_init(struct dt_device_node *dev,
         return res;
     }
 
-    uart->regs = ioremap_attr(addr, size, PAGE_HYPERVISOR_NOCACHE);
-    if ( !uart->regs )
-    {
-        early_printk("omap-uart: Unable to map the UART memory\n");
-        return -ENOMEM;
-    }
-
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
@@ -340,6 +333,14 @@ static int __init omap_uart_init(struct dt_device_node *dev,
         return res;
     }
 
+    uart->regs = ioremap_nocache(addr, size);
+    if ( !uart->regs )
+    {
+        early_printk("omap-uart: Unable to map the UART memory\n");
+        return -ENOMEM;
+    }
+
+
     uart->vuart.base_addr = addr;
     uart->vuart.size = size;
     uart->vuart.data_off = UART_THR;
diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
index fd82511..fe99af6 100644
--- a/xen/drivers/char/pl011.c
+++ b/xen/drivers/char/pl011.c
@@ -248,14 +248,6 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
         return res;
     }
 
-    uart->regs = ioremap_attr(addr, size, PAGE_HYPERVISOR_NOCACHE);
-    if ( !uart->regs )
-    {
-        early_printk("pl011: Unable to map the UART memory\n");
-
-        return -ENOMEM;
-    }
-
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
@@ -263,6 +255,13 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
         return res;
     }
 
+    uart->regs = ioremap_nocache(addr, size);
+    if ( !uart->regs )
+    {
+        early_printk("pl011: Unable to map the UART memory\n");
+        return -ENOMEM;
+    }
+
     uart->vuart.base_addr = addr;
     uart->vuart.size = size;
     uart->vuart.data_off = DR;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25: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 1WVCjw-0007A3-KY; Wed, 02 Apr 2014 04:25:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjv-00079o-I3
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:27 +0000
Received: from [193.109.254.147:35345] by server-11.bemta-14.messagelabs.com
	id E5/69-09902-6319B335; Wed, 02 Apr 2014 04:25:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1396412723!5670237!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17718 invoked from network); 2 Apr 2014 04:25:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:25:24 -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 1WVCjr-0000fO-GE
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjr-0000Ho-Ey
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:23 +0000
Date: Wed, 02 Apr 2014 04:25:23 +0000
Message-Id: <E1WVCjr-0000Ho-Ey@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: earlyprintk: move early_flush
	in early_puts
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 8cfbbb404c2a2bd4666da67437b092115506dab6
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:14 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:27:21 2014 +0100

    xen/arm: earlyprintk: move early_flush in early_puts
    
    early_puts function will be exported to be used in the console code. To
    avoid loosing characters (see why in commit cafdceb "xen/arm: avoid lost
    characters with early_printk), early_flush needs to be called in this
    function.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/early_printk.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c
index 2870a30..b59ea2e 100644
--- a/xen/arch/arm/early_printk.c
+++ b/xen/arch/arm/early_printk.c
@@ -29,12 +29,6 @@ static void __init early_puts(const char *s)
         early_putch(*s);
         s++;
     }
-}
-
-static void __init early_vprintk(const char *fmt, va_list args)
-{
-    vsnprintf(buf, sizeof(buf), fmt, args);
-    early_puts(buf);
 
     /*
      * Wait the UART has finished to transfer all characters before
@@ -43,6 +37,12 @@ static void __init early_vprintk(const char *fmt, va_list args)
     early_flush();
 }
 
+static void __init early_vprintk(const char *fmt, va_list args)
+{
+    vsnprintf(buf, sizeof(buf), fmt, args);
+    early_puts(buf);
+}
+
 void __init early_printk(const char *fmt, ...)
 {
     va_list args;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25: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 1WVCjw-0007A3-KY; Wed, 02 Apr 2014 04:25:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjv-00079o-I3
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:27 +0000
Received: from [193.109.254.147:35345] by server-11.bemta-14.messagelabs.com
	id E5/69-09902-6319B335; Wed, 02 Apr 2014 04:25:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1396412723!5670237!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17718 invoked from network); 2 Apr 2014 04:25:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:25:24 -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 1WVCjr-0000fO-GE
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCjr-0000Ho-Ey
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:23 +0000
Date: Wed, 02 Apr 2014 04:25:23 +0000
Message-Id: <E1WVCjr-0000Ho-Ey@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: earlyprintk: move early_flush
	in early_puts
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 8cfbbb404c2a2bd4666da67437b092115506dab6
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:14 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:27:21 2014 +0100

    xen/arm: earlyprintk: move early_flush in early_puts
    
    early_puts function will be exported to be used in the console code. To
    avoid loosing characters (see why in commit cafdceb "xen/arm: avoid lost
    characters with early_printk), early_flush needs to be called in this
    function.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/early_printk.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c
index 2870a30..b59ea2e 100644
--- a/xen/arch/arm/early_printk.c
+++ b/xen/arch/arm/early_printk.c
@@ -29,12 +29,6 @@ static void __init early_puts(const char *s)
         early_putch(*s);
         s++;
     }
-}
-
-static void __init early_vprintk(const char *fmt, va_list args)
-{
-    vsnprintf(buf, sizeof(buf), fmt, args);
-    early_puts(buf);
 
     /*
      * Wait the UART has finished to transfer all characters before
@@ -43,6 +37,12 @@ static void __init early_vprintk(const char *fmt, va_list args)
     early_flush();
 }
 
+static void __init early_vprintk(const char *fmt, va_list args)
+{
+    vsnprintf(buf, sizeof(buf), fmt, args);
+    early_puts(buf);
+}
+
 void __init early_printk(const char *fmt, ...)
 {
     va_list args;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25: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 1WVCk6-0007C0-06; Wed, 02 Apr 2014 04:25: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 1WVCk4-0007Bh-8W
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:36 +0000
Received: from [85.158.143.35:2561] by server-1.bemta-4.messagelabs.com id
	B5/70-09853-F319B335; Wed, 02 Apr 2014 04:25:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-21.messagelabs.com!1396412733!6359658!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12564 invoked from network); 2 Apr 2014 04:25:34 -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;
	2 Apr 2014 04:25:34 -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 1WVCk1-0000fU-MU
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCk1-0000IH-KQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:33 +0000
Date: Wed, 02 Apr 2014 04:25:33 +0000
Message-Id: <E1WVCk1-0000IH-KQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: earlyprintk: export early_puts
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 3504c3451f694d4b38c675c5ca53eff109d6784f
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:15 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:27:21 2014 +0100

    xen/arm: earlyprintk: export early_puts
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Cambpell <ian.campbell@citrix.com>
---
 xen/arch/arm/early_printk.c        |    2 +-
 xen/include/asm-arm/early_printk.h |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c
index b59ea2e..6b90998 100644
--- a/xen/arch/arm/early_printk.c
+++ b/xen/arch/arm/early_printk.c
@@ -21,7 +21,7 @@ void early_flush(void);
 /* Early printk buffer */
 static char __initdata buf[512];
 
-static void __init early_puts(const char *s)
+void early_puts(const char *s)
 {
     while (*s != '\0') {
         if (*s == '\n')
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index 8047141..100ae23 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -24,6 +24,7 @@
 
 #ifdef EARLY_PRINTK
 
+void early_puts(const char *s);
 void early_printk(const char *fmt, ...)
     __attribute__((format (printf, 1, 2)));
 void noreturn early_panic(const char *fmt, ...)
@@ -31,6 +32,8 @@ void noreturn early_panic(const char *fmt, ...)
 
 #else
 
+static inline void early_puts(const char *) {}
+
 static inline  __attribute__((format (printf, 1, 2))) void
 early_printk(const char *fmt, ...)
 {}
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25: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 1WVCk6-0007C0-06; Wed, 02 Apr 2014 04:25: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 1WVCk4-0007Bh-8W
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:36 +0000
Received: from [85.158.143.35:2561] by server-1.bemta-4.messagelabs.com id
	B5/70-09853-F319B335; Wed, 02 Apr 2014 04:25:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-21.messagelabs.com!1396412733!6359658!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12564 invoked from network); 2 Apr 2014 04:25:34 -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;
	2 Apr 2014 04:25:34 -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 1WVCk1-0000fU-MU
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCk1-0000IH-KQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:33 +0000
Date: Wed, 02 Apr 2014 04:25:33 +0000
Message-Id: <E1WVCk1-0000IH-KQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: earlyprintk: export early_puts
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 3504c3451f694d4b38c675c5ca53eff109d6784f
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:15 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:27:21 2014 +0100

    xen/arm: earlyprintk: export early_puts
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Cambpell <ian.campbell@citrix.com>
---
 xen/arch/arm/early_printk.c        |    2 +-
 xen/include/asm-arm/early_printk.h |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c
index b59ea2e..6b90998 100644
--- a/xen/arch/arm/early_printk.c
+++ b/xen/arch/arm/early_printk.c
@@ -21,7 +21,7 @@ void early_flush(void);
 /* Early printk buffer */
 static char __initdata buf[512];
 
-static void __init early_puts(const char *s)
+void early_puts(const char *s)
 {
     while (*s != '\0') {
         if (*s == '\n')
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index 8047141..100ae23 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -24,6 +24,7 @@
 
 #ifdef EARLY_PRINTK
 
+void early_puts(const char *s);
 void early_printk(const char *fmt, ...)
     __attribute__((format (printf, 1, 2)));
 void noreturn early_panic(const char *fmt, ...)
@@ -31,6 +32,8 @@ void noreturn early_panic(const char *fmt, ...)
 
 #else
 
+static inline void early_puts(const char *) {}
+
 static inline  __attribute__((format (printf, 1, 2))) void
 early_printk(const char *fmt, ...)
 {}
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25:49 +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 1WVCkH-0007E1-Du; Wed, 02 Apr 2014 04:25:49 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkG-0007Dd-Dr
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:48 +0000
Received: from [85.158.137.68:37500] by server-4.bemta-3.messagelabs.com id
	B0/4D-17399-B419B335; Wed, 02 Apr 2014 04:25:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1396412744!4421790!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10961 invoked from network); 2 Apr 2014 04:25:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:25:45 -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 1WVCkB-0000fc-SR
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkB-0000Is-QQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:43 +0000
Date: Wed, 02 Apr 2014 04:25:43 +0000
Message-Id: <E1WVCkB-0000Is-QQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Rename EARLY_PRINTK compile
	option to CONFIG_EARLY_PRINTK
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 2b69209a3069d1100947717268b5fb0894b7ad82
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:16 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:27:49 2014 +0100

    xen/arm: Rename EARLY_PRINTK compile option to CONFIG_EARLY_PRINTK
    
    Most of common compile option start with CONFIG_. Rename EARLY_PRINTK option
    to CONFIG_EARLY_PRINTK to be compliant.
    
    This option will be used in common code (eg console) later.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/Rules.mk              |    2 +-
 xen/arch/arm/arm32/head.S          |   18 +++++++++---------
 xen/arch/arm/arm64/head.S          |   18 +++++++++---------
 xen/include/asm-arm/early_printk.h |    6 +++---
 4 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index aa2e79f..c551afb 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -93,7 +93,7 @@ ifneq ($(EARLY_PRINTK_INC),)
 EARLY_PRINTK := y
 endif
 
-CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK
+CFLAGS-$(EARLY_PRINTK) += -DCONFIG_EARLY_PRINTK
 CFLAGS-$(EARLY_PRINTK_INIT_UART) += -DEARLY_PRINTK_INIT_UART
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\"
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index 39978cb..8a6594a 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -32,7 +32,7 @@
 #define PT_UPPER(x) (PT_##x & 0xf00)
 #define PT_LOWER(x) (PT_##x & 0x0ff)
 
-#if (defined (EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
+#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
 #include EARLY_PRINTK_INC
 #endif
 
@@ -57,7 +57,7 @@
  */
 /* Macro to print a string to the UART, if there is one.
  * Clobbers r0-r3. */
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 #define PRINT(_s)       \
         adr   r0, 98f ; \
         bl    puts    ; \
@@ -65,9 +65,9 @@
 98:     .asciz _s     ; \
         .align 2      ; \
 99:
-#else /* EARLY_PRINTK */
+#else /* CONFIG_EARLY_PRINTK */
 #define PRINT(s)
-#endif /* !EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
 
         .arm
 
@@ -147,7 +147,7 @@ common_start:
         b     2b
 1:
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
         ldr   r11, =EARLY_UART_BASE_ADDRESS  /* r11 := UART base address */
         teq   r12, #0                /* Boot CPU sets up the UART too */
         bleq  init_uart
@@ -318,7 +318,7 @@ paging:
         /* Now we can install the fixmap and dtb mappings, since we
          * don't need the 1:1 map any more */
         dsb
-#if defined(EARLY_PRINTK) /* Fixmap is only used by early printk */
+#if defined(CONFIG_EARLY_PRINTK) /* Fixmap is only used by early printk */
         /* Non-boot CPUs don't need to rebuild the fixmap itself, just
 	 * the mapping from boot_second to xen_fixmap */
         teq   r12, #0
@@ -480,7 +480,7 @@ ENTRY(relocate_xen)
 
         mov pc, lr
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 /* Bring up the UART.
  * r11: Early UART base address
  * Clobbers r0-r2 */
@@ -525,7 +525,7 @@ putn:
 hex:    .ascii "0123456789abcdef"
         .align 2
 
-#else  /* EARLY_PRINTK */
+#else  /* CONFIG_EARLY_PRINTK */
 
 init_uart:
 .global early_puts
@@ -533,7 +533,7 @@ early_puts:
 puts:
 putn:   mov   pc, lr
 
-#endif /* !EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
 
 /* This provides a C-API version of __lookup_processor_type */
 GLOBAL(lookup_processor_type)
diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 9547ef5..3077f1b 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -30,7 +30,7 @@
 #define PT_DEV    0xe71 /* nG=1 AF=1 SH=10 AP=01 NS=1 ATTR=100 T=0 P=1 */
 #define PT_DEV_L3 0xe73 /* nG=1 AF=1 SH=10 AP=01 NS=1 ATTR=100 T=1 P=1 */
 
-#if (defined (EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
+#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
 #include EARLY_PRINTK_INC
 #endif
 
@@ -71,7 +71,7 @@
 
 /* Macro to print a string to the UART, if there is one.
  * Clobbers x0-x3. */
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 #define PRINT(_s)       \
         adr   x0, 98f ; \
         bl    puts    ; \
@@ -79,9 +79,9 @@
 98:     .asciz _s     ; \
         .align 2      ; \
 99:
-#else /* EARLY_PRINTK */
+#else /* CONFIG_EARLY_PRINTK */
 #define PRINT(s)
-#endif /* !EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
 
         /*.aarch64*/
 
@@ -174,7 +174,7 @@ common_start:
         b     2b
 1:
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
         ldr   x23, =EARLY_UART_BASE_ADDRESS /* x23 := UART base address */
         cbnz  x22, 1f
         bl    init_uart                 /* Boot CPU sets up the UART too */
@@ -343,7 +343,7 @@ paging:
         /* Now we can install the fixmap and dtb mappings, since we
          * don't need the 1:1 map any more */
         dsb   sy
-#if defined(EARLY_PRINTK) /* Fixmap is only used by early printk */
+#if defined(CONFIG_EARLY_PRINTK) /* Fixmap is only used by early printk */
         /* Non-boot CPUs don't need to rebuild the fixmap itself, just
 	 * the mapping from boot_second to xen_fixmap */
         cbnz  x22, 1f
@@ -489,7 +489,7 @@ ENTRY(relocate_xen)
 
         ret
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 /* Bring up the UART.
  * x23: Early UART base address
  * Clobbers x0-x1 */
@@ -536,7 +536,7 @@ putn:
 hex:    .ascii "0123456789abcdef"
         .align 2
 
-#else  /* EARLY_PRINTK */
+#else  /* CONFIG_EARLY_PRINTK */
 
 init_uart:
 .global early_puts
@@ -544,7 +544,7 @@ early_puts:
 puts:
 putn:   ret
 
-#endif /* EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
 
 /* This provides a C-API version of __lookup_processor_type
  * TODO: For now, the implementation return NULL every time
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index 100ae23..5ef2ec4 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -12,7 +12,7 @@
 
 #include <xen/config.h>
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 
 /* need to add the uart address offset in page to the fixmap address */
 #define EARLY_UART_VIRTUAL_ADDRESS \
@@ -22,7 +22,7 @@
 
 #ifndef __ASSEMBLY__
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 
 void early_puts(const char *s);
 void early_printk(const char *fmt, ...)
@@ -42,7 +42,7 @@ static inline void noreturn
 __attribute__((format (printf, 1, 2))) early_panic(const char *fmt, ...)
 {while(1);}
 
-#endif
+#endif /* !CONFIG_EARLY_PRINTK */
 
 #endif	/* __ASSEMBLY__ */
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25:49 +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 1WVCkH-0007E1-Du; Wed, 02 Apr 2014 04:25:49 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkG-0007Dd-Dr
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:48 +0000
Received: from [85.158.137.68:37500] by server-4.bemta-3.messagelabs.com id
	B0/4D-17399-B419B335; Wed, 02 Apr 2014 04:25:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1396412744!4421790!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10961 invoked from network); 2 Apr 2014 04:25:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:25:45 -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 1WVCkB-0000fc-SR
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkB-0000Is-QQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:43 +0000
Date: Wed, 02 Apr 2014 04:25:43 +0000
Message-Id: <E1WVCkB-0000Is-QQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Rename EARLY_PRINTK compile
	option to CONFIG_EARLY_PRINTK
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 2b69209a3069d1100947717268b5fb0894b7ad82
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:16 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:27:49 2014 +0100

    xen/arm: Rename EARLY_PRINTK compile option to CONFIG_EARLY_PRINTK
    
    Most of common compile option start with CONFIG_. Rename EARLY_PRINTK option
    to CONFIG_EARLY_PRINTK to be compliant.
    
    This option will be used in common code (eg console) later.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/Rules.mk              |    2 +-
 xen/arch/arm/arm32/head.S          |   18 +++++++++---------
 xen/arch/arm/arm64/head.S          |   18 +++++++++---------
 xen/include/asm-arm/early_printk.h |    6 +++---
 4 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index aa2e79f..c551afb 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -93,7 +93,7 @@ ifneq ($(EARLY_PRINTK_INC),)
 EARLY_PRINTK := y
 endif
 
-CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK
+CFLAGS-$(EARLY_PRINTK) += -DCONFIG_EARLY_PRINTK
 CFLAGS-$(EARLY_PRINTK_INIT_UART) += -DEARLY_PRINTK_INIT_UART
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\"
 CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index 39978cb..8a6594a 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -32,7 +32,7 @@
 #define PT_UPPER(x) (PT_##x & 0xf00)
 #define PT_LOWER(x) (PT_##x & 0x0ff)
 
-#if (defined (EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
+#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
 #include EARLY_PRINTK_INC
 #endif
 
@@ -57,7 +57,7 @@
  */
 /* Macro to print a string to the UART, if there is one.
  * Clobbers r0-r3. */
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 #define PRINT(_s)       \
         adr   r0, 98f ; \
         bl    puts    ; \
@@ -65,9 +65,9 @@
 98:     .asciz _s     ; \
         .align 2      ; \
 99:
-#else /* EARLY_PRINTK */
+#else /* CONFIG_EARLY_PRINTK */
 #define PRINT(s)
-#endif /* !EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
 
         .arm
 
@@ -147,7 +147,7 @@ common_start:
         b     2b
 1:
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
         ldr   r11, =EARLY_UART_BASE_ADDRESS  /* r11 := UART base address */
         teq   r12, #0                /* Boot CPU sets up the UART too */
         bleq  init_uart
@@ -318,7 +318,7 @@ paging:
         /* Now we can install the fixmap and dtb mappings, since we
          * don't need the 1:1 map any more */
         dsb
-#if defined(EARLY_PRINTK) /* Fixmap is only used by early printk */
+#if defined(CONFIG_EARLY_PRINTK) /* Fixmap is only used by early printk */
         /* Non-boot CPUs don't need to rebuild the fixmap itself, just
 	 * the mapping from boot_second to xen_fixmap */
         teq   r12, #0
@@ -480,7 +480,7 @@ ENTRY(relocate_xen)
 
         mov pc, lr
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 /* Bring up the UART.
  * r11: Early UART base address
  * Clobbers r0-r2 */
@@ -525,7 +525,7 @@ putn:
 hex:    .ascii "0123456789abcdef"
         .align 2
 
-#else  /* EARLY_PRINTK */
+#else  /* CONFIG_EARLY_PRINTK */
 
 init_uart:
 .global early_puts
@@ -533,7 +533,7 @@ early_puts:
 puts:
 putn:   mov   pc, lr
 
-#endif /* !EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
 
 /* This provides a C-API version of __lookup_processor_type */
 GLOBAL(lookup_processor_type)
diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 9547ef5..3077f1b 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -30,7 +30,7 @@
 #define PT_DEV    0xe71 /* nG=1 AF=1 SH=10 AP=01 NS=1 ATTR=100 T=0 P=1 */
 #define PT_DEV_L3 0xe73 /* nG=1 AF=1 SH=10 AP=01 NS=1 ATTR=100 T=1 P=1 */
 
-#if (defined (EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
+#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
 #include EARLY_PRINTK_INC
 #endif
 
@@ -71,7 +71,7 @@
 
 /* Macro to print a string to the UART, if there is one.
  * Clobbers x0-x3. */
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 #define PRINT(_s)       \
         adr   x0, 98f ; \
         bl    puts    ; \
@@ -79,9 +79,9 @@
 98:     .asciz _s     ; \
         .align 2      ; \
 99:
-#else /* EARLY_PRINTK */
+#else /* CONFIG_EARLY_PRINTK */
 #define PRINT(s)
-#endif /* !EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
 
         /*.aarch64*/
 
@@ -174,7 +174,7 @@ common_start:
         b     2b
 1:
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
         ldr   x23, =EARLY_UART_BASE_ADDRESS /* x23 := UART base address */
         cbnz  x22, 1f
         bl    init_uart                 /* Boot CPU sets up the UART too */
@@ -343,7 +343,7 @@ paging:
         /* Now we can install the fixmap and dtb mappings, since we
          * don't need the 1:1 map any more */
         dsb   sy
-#if defined(EARLY_PRINTK) /* Fixmap is only used by early printk */
+#if defined(CONFIG_EARLY_PRINTK) /* Fixmap is only used by early printk */
         /* Non-boot CPUs don't need to rebuild the fixmap itself, just
 	 * the mapping from boot_second to xen_fixmap */
         cbnz  x22, 1f
@@ -489,7 +489,7 @@ ENTRY(relocate_xen)
 
         ret
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 /* Bring up the UART.
  * x23: Early UART base address
  * Clobbers x0-x1 */
@@ -536,7 +536,7 @@ putn:
 hex:    .ascii "0123456789abcdef"
         .align 2
 
-#else  /* EARLY_PRINTK */
+#else  /* CONFIG_EARLY_PRINTK */
 
 init_uart:
 .global early_puts
@@ -544,7 +544,7 @@ early_puts:
 puts:
 putn:   ret
 
-#endif /* EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
 
 /* This provides a C-API version of __lookup_processor_type
  * TODO: For now, the implementation return NULL every time
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index 100ae23..5ef2ec4 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -12,7 +12,7 @@
 
 #include <xen/config.h>
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 
 /* need to add the uart address offset in page to the fixmap address */
 #define EARLY_UART_VIRTUAL_ADDRESS \
@@ -22,7 +22,7 @@
 
 #ifndef __ASSEMBLY__
 
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
 
 void early_puts(const char *s);
 void early_printk(const char *fmt, ...)
@@ -42,7 +42,7 @@ static inline void noreturn
 __attribute__((format (printf, 1, 2))) early_panic(const char *fmt, ...)
 {while(1);}
 
-#endif
+#endif /* !CONFIG_EARLY_PRINTK */
 
 #endif	/* __ASSEMBLY__ */
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25:58 +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 1WVCkQ-0007FP-Gi; Wed, 02 Apr 2014 04:25:58 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkP-0007F5-I9
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:57 +0000
Received: from [85.158.137.68:43743] by server-16.bemta-3.messagelabs.com id
	44/15-13481-4519B335; Wed, 02 Apr 2014 04:25:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1396412754!4421805!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11149 invoked from network); 2 Apr 2014 04:25:55 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:25:55 -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 1WVCkM-0000fi-1j
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkM-0000K0-0X
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:54 +0000
Date: Wed, 02 Apr 2014 04:25:54 +0000
Message-Id: <E1WVCkM-0000K0-0X@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/console: Add support for early
	printk
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 6d9abc3f33329e49e96381ef016ac6db839bf682
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:17 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:30:33 2014 +0100

    xen/console: Add support for early printk
    
    On ARM, a function (early_printk) was introduced to output message when the
    serial port is not initialized.
    
    This solution is fragile because the developper needs to know when the serial
    port is initialized, to use either early_printk or printk. Moreover some
    functions (mainly in common code), only use printk. This will result to a loss
    of message sometimes.
    
    Directly call early_printk in console code when the serial port is not yet
    initialized. For this purpose use serial_steal_fn.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/arm/early_printk.c        |    1 +
 xen/drivers/char/console.c         |    6 +++++-
 xen/include/asm-arm/early_printk.h |    3 ---
 xen/include/xen/early_printk.h     |   21 +++++++++++++++++++++
 4 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c
index 6b90998..8aef152 100644
--- a/xen/arch/arm/early_printk.c
+++ b/xen/arch/arm/early_printk.c
@@ -13,6 +13,7 @@
 #include <xen/lib.h>
 #include <xen/stdarg.h>
 #include <xen/string.h>
+#include <xen/early_printk.h>
 #include <asm/early_printk.h>
 
 void early_putch(char c);
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 7fa9b78..50b4415 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -28,6 +28,7 @@
 #include <asm/debugger.h>
 #include <asm/div64.h>
 #include <xen/hypercall.h> /* for do_console_io */
+#include <xen/early_printk.h>
 
 /* console: comma-separated list of console outputs. */
 static char __initdata opt_console[30] = OPT_CONSOLE_STR;
@@ -255,7 +256,7 @@ long read_console_ring(struct xen_sysctl_readconsole *op)
 static char serial_rx_ring[SERIAL_RX_SIZE];
 static unsigned int serial_rx_cons, serial_rx_prod;
 
-static void (*serial_steal_fn)(const char *);
+static void (*serial_steal_fn)(const char *) = early_puts;
 
 int console_steal(int handle, void (*fn)(const char *))
 {
@@ -699,7 +700,10 @@ void __init console_init_preirq(void)
         else if ( !strncmp(p, "none", 4) )
             continue;
         else if ( (sh = serial_parse_handle(p)) >= 0 )
+        {
             sercon_handle = sh;
+            serial_steal_fn = NULL;
+        }
         else
         {
             char *q = strchr(p, ',');
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index 5ef2ec4..f5b801e 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -24,7 +24,6 @@
 
 #ifdef CONFIG_EARLY_PRINTK
 
-void early_puts(const char *s);
 void early_printk(const char *fmt, ...)
     __attribute__((format (printf, 1, 2)));
 void noreturn early_panic(const char *fmt, ...)
@@ -32,8 +31,6 @@ void noreturn early_panic(const char *fmt, ...)
 
 #else
 
-static inline void early_puts(const char *) {}
-
 static inline  __attribute__((format (printf, 1, 2))) void
 early_printk(const char *fmt, ...)
 {}
diff --git a/xen/include/xen/early_printk.h b/xen/include/xen/early_printk.h
new file mode 100644
index 0000000..2c3e1b3
--- /dev/null
+++ b/xen/include/xen/early_printk.h
@@ -0,0 +1,21 @@
+/*
+ * printk() for use before the console is initialized
+ */
+#ifndef __XEN_EARLY_PRINTK_H__
+#define __XEN_EARLY_PRINTK_H__
+
+#ifdef CONFIG_EARLY_PRINTK
+void early_puts(const char *s);
+#else
+#define early_puts NULL
+#endif
+
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:25:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:25:58 +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 1WVCkQ-0007FP-Gi; Wed, 02 Apr 2014 04:25:58 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkP-0007F5-I9
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:57 +0000
Received: from [85.158.137.68:43743] by server-16.bemta-3.messagelabs.com id
	44/15-13481-4519B335; Wed, 02 Apr 2014 04:25:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1396412754!4421805!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11149 invoked from network); 2 Apr 2014 04:25:55 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:25:55 -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 1WVCkM-0000fi-1j
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkM-0000K0-0X
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:25:54 +0000
Date: Wed, 02 Apr 2014 04:25:54 +0000
Message-Id: <E1WVCkM-0000K0-0X@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/console: Add support for early
	printk
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 6d9abc3f33329e49e96381ef016ac6db839bf682
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:17 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:30:33 2014 +0100

    xen/console: Add support for early printk
    
    On ARM, a function (early_printk) was introduced to output message when the
    serial port is not initialized.
    
    This solution is fragile because the developper needs to know when the serial
    port is initialized, to use either early_printk or printk. Moreover some
    functions (mainly in common code), only use printk. This will result to a loss
    of message sometimes.
    
    Directly call early_printk in console code when the serial port is not yet
    initialized. For this purpose use serial_steal_fn.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/arm/early_printk.c        |    1 +
 xen/drivers/char/console.c         |    6 +++++-
 xen/include/asm-arm/early_printk.h |    3 ---
 xen/include/xen/early_printk.h     |   21 +++++++++++++++++++++
 4 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c
index 6b90998..8aef152 100644
--- a/xen/arch/arm/early_printk.c
+++ b/xen/arch/arm/early_printk.c
@@ -13,6 +13,7 @@
 #include <xen/lib.h>
 #include <xen/stdarg.h>
 #include <xen/string.h>
+#include <xen/early_printk.h>
 #include <asm/early_printk.h>
 
 void early_putch(char c);
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 7fa9b78..50b4415 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -28,6 +28,7 @@
 #include <asm/debugger.h>
 #include <asm/div64.h>
 #include <xen/hypercall.h> /* for do_console_io */
+#include <xen/early_printk.h>
 
 /* console: comma-separated list of console outputs. */
 static char __initdata opt_console[30] = OPT_CONSOLE_STR;
@@ -255,7 +256,7 @@ long read_console_ring(struct xen_sysctl_readconsole *op)
 static char serial_rx_ring[SERIAL_RX_SIZE];
 static unsigned int serial_rx_cons, serial_rx_prod;
 
-static void (*serial_steal_fn)(const char *);
+static void (*serial_steal_fn)(const char *) = early_puts;
 
 int console_steal(int handle, void (*fn)(const char *))
 {
@@ -699,7 +700,10 @@ void __init console_init_preirq(void)
         else if ( !strncmp(p, "none", 4) )
             continue;
         else if ( (sh = serial_parse_handle(p)) >= 0 )
+        {
             sercon_handle = sh;
+            serial_steal_fn = NULL;
+        }
         else
         {
             char *q = strchr(p, ',');
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index 5ef2ec4..f5b801e 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -24,7 +24,6 @@
 
 #ifdef CONFIG_EARLY_PRINTK
 
-void early_puts(const char *s);
 void early_printk(const char *fmt, ...)
     __attribute__((format (printf, 1, 2)));
 void noreturn early_panic(const char *fmt, ...)
@@ -32,8 +31,6 @@ void noreturn early_panic(const char *fmt, ...)
 
 #else
 
-static inline void early_puts(const char *) {}
-
 static inline  __attribute__((format (printf, 1, 2))) void
 early_printk(const char *fmt, ...)
 {}
diff --git a/xen/include/xen/early_printk.h b/xen/include/xen/early_printk.h
new file mode 100644
index 0000000..2c3e1b3
--- /dev/null
+++ b/xen/include/xen/early_printk.h
@@ -0,0 +1,21 @@
+/*
+ * printk() for use before the console is initialized
+ */
+#ifndef __XEN_EARLY_PRINTK_H__
+#define __XEN_EARLY_PRINTK_H__
+
+#ifdef CONFIG_EARLY_PRINTK
+void early_puts(const char *s);
+#else
+#define early_puts NULL
+#endif
+
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26:09 +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 1WVCkb-0007H4-La; Wed, 02 Apr 2014 04:26:09 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCka-0007Gt-7t
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:08 +0000
Received: from [85.158.139.211:21960] by server-11.bemta-5.messagelabs.com id
	22/09-30804-F519B335; Wed, 02 Apr 2014 04:26:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1396412764!1917813!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23142 invoked from network); 2 Apr 2014 04:26:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:26:05 -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 1WVCkW-0000gK-8c
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkW-0000KY-6S
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:04 +0000
Date: Wed, 02 Apr 2014 04:26:04 +0000
Message-Id: <E1WVCkW-0000KY-6S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Replace early_{printk,
	panic} call to {printk, panic} call
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 5182275cfdf78d7e4546e955d5ac9947e14b76e0
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:18 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:30:58 2014 +0100

    xen/arm: Replace early_{printk, panic} call to {printk, panic} call
    
    Now that the console supports earlyprintk, we can get a rid of
    early_printk and early_panic calls.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/early_printk.c        |   33 ----------------
 xen/arch/arm/mm.c                  |    5 +-
 xen/arch/arm/setup.c               |   28 ++++++-------
 xen/common/device_tree.c           |   74 +++++++++++++++---------------------
 xen/drivers/char/dt-uart.c         |    9 ++--
 xen/drivers/char/exynos4210-uart.c |   13 ++----
 xen/drivers/char/omap-uart.c       |   13 +++---
 xen/drivers/char/pl011.c           |   13 +++---
 xen/drivers/video/arm_hdlcd.c      |   29 +++++++-------
 xen/include/asm-arm/early_printk.h |   23 -----------
 10 files changed, 81 insertions(+), 159 deletions(-)

diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c
index 8aef152..c85db69 100644
--- a/xen/arch/arm/early_printk.c
+++ b/xen/arch/arm/early_printk.c
@@ -14,14 +14,10 @@
 #include <xen/stdarg.h>
 #include <xen/string.h>
 #include <xen/early_printk.h>
-#include <asm/early_printk.h>
 
 void early_putch(char c);
 void early_flush(void);
 
-/* Early printk buffer */
-static char __initdata buf[512];
-
 void early_puts(const char *s)
 {
     while (*s != '\0') {
@@ -37,32 +33,3 @@ void early_puts(const char *s)
      */
     early_flush();
 }
-
-static void __init early_vprintk(const char *fmt, va_list args)
-{
-    vsnprintf(buf, sizeof(buf), fmt, args);
-    early_puts(buf);
-}
-
-void __init early_printk(const char *fmt, ...)
-{
-    va_list args;
-
-    va_start(args, fmt);
-    early_vprintk(fmt, args);
-    va_end(args);
-}
-
-void __init
-early_panic(const char *fmt, ...)
-{
-    va_list args;
-
-    va_start(args, fmt);
-    early_vprintk(fmt, args);
-    va_end(args);
-
-    early_printk("\n\nEarly Panic: Stopping\n");
-
-    while(1);
-}
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 6f1408b..3161d79 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -37,7 +37,6 @@
 #include <public/memory.h>
 #include <xen/sched.h>
 #include <xen/vmap.h>
-#include <asm/early_printk.h>
 #include <xsm/xsm.h>
 #include <xen/pfn.h>
 
@@ -651,8 +650,8 @@ void __init setup_xenheap_mappings(unsigned long base_mfn,
         xenheap_mfn_start = base_mfn;
 
     if ( base_mfn < xenheap_mfn_start )
-        early_panic("cannot add xenheap mapping at %lx below heap start %lx",
-                    base_mfn, xenheap_mfn_start);
+        panic("cannot add xenheap mapping at %lx below heap start %lx",
+              base_mfn, xenheap_mfn_start);
 
     end_mfn = base_mfn + nr_mfns;
 
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 154b707..0892a54 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -39,7 +39,6 @@
 #include <asm/page.h>
 #include <asm/current.h>
 #include <asm/setup.h>
-#include <asm/early_printk.h>
 #include <asm/gic.h>
 #include <asm/cpufeature.h>
 #include <asm/platform.h>
@@ -353,10 +352,10 @@ static paddr_t __init get_xen_paddr(void)
     }
 
     if ( !paddr )
-        early_panic("Not enough memory to relocate Xen");
+        panic("Not enough memory to relocate Xen");
 
-    early_printk("Placing Xen at 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
-                 paddr, paddr + min_size);
+    printk("Placing Xen at 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
+           paddr, paddr + min_size);
 
     early_info.modules.module[MOD_XEN].start = paddr;
     early_info.modules.module[MOD_XEN].size = min_size;
@@ -378,7 +377,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
     void *fdt;
 
     if ( !early_info.mem.nr_banks )
-        early_panic("No memory bank");
+        panic("No memory bank");
 
     /*
      * We are going to accumulate two regions here.
@@ -437,8 +436,8 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
 
     if ( i != early_info.mem.nr_banks )
     {
-        early_printk("WARNING: only using %d out of %d memory banks\n",
-                     i, early_info.mem.nr_banks);
+        printk("WARNING: only using %d out of %d memory banks\n",
+               i, early_info.mem.nr_banks);
         early_info.mem.nr_banks = i;
     }
 
@@ -472,14 +471,13 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
     } while ( xenheap_pages > 128<<(20-PAGE_SHIFT) );
 
     if ( ! e )
-        early_panic("Not not enough space for xenheap");
+        panic("Not not enough space for xenheap");
 
     domheap_pages = heap_pages - xenheap_pages;
 
-    early_printk("Xen heap: %"PRIpaddr"-%"PRIpaddr" (%lu pages)\n",
-                 e - (pfn_to_paddr(xenheap_pages)), e,
-                 xenheap_pages);
-    early_printk("Dom heap: %lu pages\n", domheap_pages);
+    printk("Xen heap: %"PRIpaddr"-%"PRIpaddr" (%lu pages)\n",
+            e - (pfn_to_paddr(xenheap_pages)), e, xenheap_pages);
+    printk("Dom heap: %lu pages\n", domheap_pages);
 
     setup_xenheap_mappings((e >> PAGE_SHIFT) - xenheap_pages, xenheap_pages);
 
@@ -613,8 +611,8 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
 
     if ( bank != early_info.mem.nr_banks )
     {
-        early_printk("WARNING: only using %d out of %d memory banks\n",
-                     bank, early_info.mem.nr_banks);
+        printk("WARNING: only using %d out of %d memory banks\n",
+               bank, early_info.mem.nr_banks);
         early_info.mem.nr_banks = bank;
     }
 
@@ -679,7 +677,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     fdt_size = device_tree_early_init(device_tree_flattened, fdt_paddr);
 
     cmdline = device_tree_bootargs(device_tree_flattened);
-    early_printk("Command line: %s\n", cmdline);
+    printk("Command line: %s\n", cmdline);
     cmdline_parse(cmdline);
 
     setup_pagetables(boot_phys_offset, get_xen_paddr());
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index e047d7f..74425ab 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -23,7 +23,6 @@
 #include <xen/cpumask.h>
 #include <xen/ctype.h>
 #include <xen/lib.h>
-#include <asm/early_printk.h>
 
 struct dt_early_info __initdata early_info;
 const void *device_tree_flattened;
@@ -54,21 +53,10 @@ struct dt_alias_prop {
 
 static LIST_HEAD(aliases_lookup);
 
-/* Some device tree functions may be called both before and after the
-   console is initialized. */
-#define dt_printk(fmt, ...)                         \
-    do                                              \
-    {                                               \
-        if ( system_state == SYS_STATE_early_boot ) \
-            early_printk(fmt, ## __VA_ARGS__);      \
-        else                                        \
-            printk(fmt, ## __VA_ARGS__);            \
-    } while (0)
-
 // #define DEBUG_DT
 
 #ifdef DEBUG_DT
-# define dt_dprintk(fmt, args...) dt_printk(XENLOG_DEBUG fmt, ##args)
+# define dt_dprintk(fmt, args...) printk(XENLOG_DEBUG fmt, ##args)
 static void dt_dump_addr(const char *s, const __be32 *addr, int na)
 {
     dt_dprintk("%s", s);
@@ -215,8 +203,8 @@ static int __init device_tree_for_each_node(const void *fdt,
 
         if ( depth >= DEVICE_TREE_MAX_DEPTH )
         {
-            dt_printk("Warning: device tree node `%s' is nested too deep\n",
-                      name);
+            printk("Warning: device tree node `%s' is nested too deep\n",
+                   name);
             continue;
         }
 
@@ -277,7 +265,7 @@ static int dump_node(const void *fdt, int node, const char *name, int depth,
 
     if ( name[0] == '\0' )
         name = "/";
-    dt_printk("%s%s:\n", prefix, name);
+    printk("%s%s:\n", prefix, name);
 
     for ( prop = fdt_first_property_offset(fdt, node);
           prop >= 0;
@@ -287,7 +275,7 @@ static int dump_node(const void *fdt, int node, const char *name, int depth,
 
         p = fdt_get_property_by_offset(fdt, prop, NULL);
 
-        dt_printk("%s  %s\n", prefix, fdt_string(fdt, fdt32_to_cpu(p->nameoff)));
+        printk("%s  %s\n", prefix, fdt_string(fdt, fdt32_to_cpu(p->nameoff)));
     }
 
     return 0;
@@ -316,15 +304,15 @@ static void __init process_memory_node(const void *fdt, int node,
 
     if ( address_cells < 1 || size_cells < 1 )
     {
-        early_printk("fdt: node `%s': invalid #address-cells or #size-cells",
-                     name);
+        printk("fdt: node `%s': invalid #address-cells or #size-cells",
+               name);
         return;
     }
 
     prop = fdt_get_property(fdt, node, "reg", NULL);
     if ( !prop )
     {
-        early_printk("fdt: node `%s': missing `reg' property\n", name);
+        printk("fdt: node `%s': missing `reg' property\n", name);
         return;
     }
 
@@ -357,16 +345,16 @@ static void __init process_multiboot_node(const void *fdt, int node,
     else if ( fdt_node_check_compatible(fdt, node, "xen,xsm-policy") == 0 )
         nr = MOD_XSM;
     else
-        early_panic("%s not a known xen multiboot type\n", name);
+        panic("%s not a known xen multiboot type\n", name);
 
     mod = &early_info.modules.module[nr];
 
     prop = fdt_get_property(fdt, node, "reg", &len);
     if ( !prop )
-        early_panic("node %s missing `reg' property\n", name);
+        panic("node %s missing `reg' property\n", name);
 
     if ( len < dt_cells_to_size(address_cells + size_cells) )
-        early_panic("fdt: node `%s': `reg` property length is too short\n",
+        panic("fdt: node `%s': `reg` property length is too short\n",
                     name);
 
     cell = (const __be32 *)prop->data;
@@ -377,7 +365,7 @@ static void __init process_multiboot_node(const void *fdt, int node,
     if ( prop )
     {
         if ( len > sizeof(mod->cmdline) )
-            early_panic("module %d command line too long\n", nr);
+            panic("module %d command line too long\n", nr);
 
         safe_strcpy(mod->cmdline, prop->data);
     }
@@ -397,7 +385,7 @@ static void __init process_chosen_node(const void *fdt, int node,
     paddr_t start, end;
     int len;
 
-    dt_printk("Checking for initrd in /chosen\n");
+    printk("Checking for initrd in /chosen\n");
 
     prop = fdt_get_property(fdt, node, "linux,initrd-start", &len);
     if ( !prop )
@@ -405,7 +393,7 @@ static void __init process_chosen_node(const void *fdt, int node,
         return;
     if ( len != sizeof(u32) && len != sizeof(u64) )
     {
-        dt_printk("linux,initrd-start property has invalid length %d\n", len);
+        printk("linux,initrd-start property has invalid length %d\n", len);
         return;
     }
     start = dt_read_number((void *)&prop->data, dt_size_to_cells(len));
@@ -413,24 +401,24 @@ static void __init process_chosen_node(const void *fdt, int node,
     prop = fdt_get_property(fdt, node, "linux,initrd-end", &len);
     if ( !prop )
     {
-        dt_printk("linux,initrd-end not present but -start was\n");
+        printk("linux,initrd-end not present but -start was\n");
         return;
     }
     if ( len != sizeof(u32) && len != sizeof(u64) )
     {
-        dt_printk("linux,initrd-end property has invalid length %d\n", len);
+        printk("linux,initrd-end property has invalid length %d\n", len);
         return;
     }
     end = dt_read_number((void *)&prop->data, dt_size_to_cells(len));
 
     if ( start >= end )
     {
-        dt_printk("linux,initrd limits invalid: %"PRIpaddr" >= %"PRIpaddr"\n",
+        printk("linux,initrd limits invalid: %"PRIpaddr" >= %"PRIpaddr"\n",
                   start, end);
         return;
     }
 
-    dt_printk("Initrd %"PRIpaddr"-%"PRIpaddr"\n", start, end);
+    printk("Initrd %"PRIpaddr"-%"PRIpaddr"\n", start, end);
 
     mod->start = start;
     mod->size = end - start;
@@ -460,12 +448,12 @@ static void __init early_print_info(void)
     int i, nr_rsvd;
 
     for ( i = 0; i < mi->nr_banks; i++ )
-        early_printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n",
+        printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n",
                      mi->bank[i].start,
                      mi->bank[i].start + mi->bank[i].size - 1);
-    early_printk("\n");
+    printk("\n");
     for ( i = 1 ; i < mods->nr_mods + 1; i++ )
-        early_printk("MODULE[%d]: %"PRIpaddr" - %"PRIpaddr" %s\n",
+        printk("MODULE[%d]: %"PRIpaddr" - %"PRIpaddr" %s\n",
                      i,
                      mods->module[i].start,
                      mods->module[i].start + mods->module[i].size,
@@ -478,10 +466,10 @@ static void __init early_print_info(void)
             continue;
         /* fdt_get_mem_rsv returns length */
         e += s;
-        early_printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n",
+        printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n",
                      i, s, e);
     }
-    early_printk("\n");
+    printk("\n");
 }
 
 /**
@@ -497,7 +485,7 @@ size_t __init device_tree_early_init(const void *fdt, paddr_t paddr)
 
     ret = fdt_check_header(fdt);
     if ( ret < 0 )
-        early_panic("No valid device tree\n");
+        panic("No valid device tree\n");
 
     mod = &early_info.modules.module[MOD_FDT];
     mod->start = paddr;
@@ -947,7 +935,7 @@ static int dt_translate_one(const struct dt_device_node *parent,
     ranges = dt_get_property(parent, rprop, &rlen);
     if ( ranges == NULL )
     {
-        dt_printk(XENLOG_ERR "DT: no ranges; cannot translate\n");
+        printk(XENLOG_ERR "DT: no ranges; cannot translate\n");
         return 1;
     }
     if ( rlen == 0 )
@@ -1017,7 +1005,7 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
     bus->count_cells(dev, &na, &ns);
     if ( !DT_CHECK_COUNTS(na, ns) )
     {
-        dt_printk(XENLOG_ERR "dt_parse: Bad cell count for device %s\n",
+        printk(XENLOG_ERR "dt_parse: Bad cell count for device %s\n",
                   dev->full_name);
         goto bail;
     }
@@ -1046,7 +1034,7 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
         pbus = dt_match_bus(parent);
         if ( pbus == NULL )
         {
-            dt_printk("DT: %s is not a valid bus\n", parent->full_name);
+            printk("DT: %s is not a valid bus\n", parent->full_name);
             break;
         }
         pbus->count_cells(dev, &pna, &pns);
@@ -1518,7 +1506,7 @@ static unsigned long __init unflatten_dt_node(const void *fdt,
     tag = be32_to_cpup((__be32 *)(*p));
     if ( tag != FDT_BEGIN_NODE )
     {
-        dt_printk(XENLOG_WARNING "Weird tag at start of node: %x\n", tag);
+        printk(XENLOG_WARNING "Weird tag at start of node: %x\n", tag);
         return mem;
     }
     *p += 4;
@@ -1720,7 +1708,7 @@ static unsigned long __init unflatten_dt_node(const void *fdt,
     }
     if ( tag != FDT_END_NODE )
     {
-        dt_printk(XENLOG_WARNING "Weird tag at end of node: %x\n", tag);
+        printk(XENLOG_WARNING "Weird tag at end of node: %x\n", tag);
         return mem;
     }
 
@@ -1769,10 +1757,10 @@ static void __init __unflatten_device_tree(const void *fdt,
     start = ((unsigned long)fdt) + fdt_off_dt_struct(fdt);
     unflatten_dt_node(fdt, mem, &start, NULL, &allnextp, 0);
     if ( be32_to_cpup((__be32 *)start) != FDT_END )
-        dt_printk(XENLOG_WARNING "Weird tag at end of tree: %08x\n",
+        printk(XENLOG_WARNING "Weird tag at end of tree: %08x\n",
                   *((u32 *)start));
     if ( be32_to_cpu(((__be32 *)mem)[size / 4]) != 0xdeadbeef )
-        dt_printk(XENLOG_WARNING "End of tree marker overwritten: %08x\n",
+        printk(XENLOG_WARNING "End of tree marker overwritten: %08x\n",
                   be32_to_cpu(((__be32 *)mem)[size / 4]));
     *allnextp = NULL;
 
diff --git a/xen/drivers/char/dt-uart.c b/xen/drivers/char/dt-uart.c
index d7204fb..fa92b5c 100644
--- a/xen/drivers/char/dt-uart.c
+++ b/xen/drivers/char/dt-uart.c
@@ -18,7 +18,6 @@
  */
 
 #include <asm/device.h>
-#include <asm/early_printk.h>
 #include <asm/types.h>
 #include <xen/console.h>
 #include <xen/device_tree.h>
@@ -44,7 +43,7 @@ void __init dt_uart_init(void)
 
     if ( !console_has("dtuart") || !strcmp(opt_dtuart, "") )
     {
-        early_printk("No console\n");
+        printk("No console\n");
         return;
     }
 
@@ -54,7 +53,7 @@ void __init dt_uart_init(void)
     else
         options = "";
 
-    early_printk("Looking for UART console %s\n", devpath);
+    printk("Looking for UART console %s\n", devpath);
     if ( *devpath == '/' )
         dev = dt_find_node_by_path(devpath);
     else
@@ -62,12 +61,12 @@ void __init dt_uart_init(void)
 
     if ( !dev )
     {
-        early_printk("Unable to find device \"%s\"\n", devpath);
+        printk("Unable to find device \"%s\"\n", devpath);
         return;
     }
 
     ret = device_init(dev, DEVICE_SERIAL, options);
 
     if ( ret )
-        early_printk("Unable to initialize serial: %d\n", ret);
+        printk("Unable to initialize serial: %d\n", ret);
 }
diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c
index 150d49b..d49e1fe 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -24,7 +24,6 @@
 #include <xen/init.h>
 #include <xen/irq.h>
 #include <xen/mm.h>
-#include <asm/early_printk.h>
 #include <asm/device.h>
 #include <asm/exynos4210-uart.h>
 #include <asm/io.h>
@@ -314,9 +313,7 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
     u64 addr, size;
 
     if ( strcmp(config, "") )
-    {
-        early_printk("WARNING: UART configuration is not supported\n");
-    }
+        printk("WARNING: UART configuration is not supported\n");
 
     uart = &exynos4210_com;
 
@@ -329,22 +326,22 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
     res = dt_device_get_address(dev, 0, &addr, &size);
     if ( res )
     {
-        early_printk("exynos4210: Unable to retrieve the base"
-                     " address of the UART\n");
+        printk("exynos4210: Unable to retrieve the base"
+               " address of the UART\n");
         return res;
     }
 
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
-        early_printk("exynos4210: Unable to retrieve the IRQ\n");
+        printk("exynos4210: Unable to retrieve the IRQ\n");
         return res;
     }
 
     uart->regs = ioremap_nocache(addr, size);
     if ( !uart->regs )
     {
-        early_printk("exynos4210: Unable to map the UART memory\n");
+        printk("exynos4210: Unable to map the UART memory\n");
         return -ENOMEM;
     }
 
diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c
index b29f610..49ae1a4 100644
--- a/xen/drivers/char/omap-uart.c
+++ b/xen/drivers/char/omap-uart.c
@@ -15,7 +15,6 @@
 #include <xen/serial.h>
 #include <xen/init.h>
 #include <xen/irq.h>
-#include <asm/early_printk.h>
 #include <xen/device_tree.h>
 #include <asm/device.h>
 #include <xen/errno.h>
@@ -301,14 +300,14 @@ static int __init omap_uart_init(struct dt_device_node *dev,
     u64 addr, size;
 
     if ( strcmp(config, "") )
-        early_printk("WARNING: UART configuration is not supported\n");
+        printk("WARNING: UART configuration is not supported\n");
 
     uart = &omap_com;
 
     res = dt_property_read_u32(dev, "clock-frequency", &clkspec);
     if ( !res )
     {
-        early_printk("omap-uart: Unable to retrieve the clock frequency\n");
+        printk("omap-uart: Unable to retrieve the clock frequency\n");
         return -EINVAL;
     }
 
@@ -321,22 +320,22 @@ static int __init omap_uart_init(struct dt_device_node *dev,
     res = dt_device_get_address(dev, 0, &addr, &size);
     if ( res )
     {
-        early_printk("omap-uart: Unable to retrieve the base"
-                     " address of the UART\n");
+        printk("omap-uart: Unable to retrieve the base"
+               " address of the UART\n");
         return res;
     }
 
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
-        early_printk("omap-uart: Unable to retrieve the IRQ\n");
+        printk("omap-uart: Unable to retrieve the IRQ\n");
         return res;
     }
 
     uart->regs = ioremap_nocache(addr, size);
     if ( !uart->regs )
     {
-        early_printk("omap-uart: Unable to map the UART memory\n");
+        printk("omap-uart: Unable to map the UART memory\n");
         return -ENOMEM;
     }
 
diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
index fe99af6..90bf0c6 100644
--- a/xen/drivers/char/pl011.c
+++ b/xen/drivers/char/pl011.c
@@ -22,7 +22,6 @@
 #include <xen/serial.h>
 #include <xen/init.h>
 #include <xen/irq.h>
-#include <asm/early_printk.h>
 #include <xen/device_tree.h>
 #include <xen/errno.h>
 #include <asm/device.h>
@@ -107,7 +106,7 @@ static void __init pl011_init_preirq(struct serial_port *port)
         /* Baud rate already set: read it out from the divisor latch. */
         divisor = (pl011_read(uart, IBRD) << 6) | (pl011_read(uart, FBRD));
         if (!divisor)
-            early_panic("pl011: No Baud rate configured\n");
+            panic("pl011: No Baud rate configured\n");
         uart->baud = (uart->clock_hz << 2) / divisor;
     }
     /* This write must follow FBRD and IBRD writes. */
@@ -229,7 +228,7 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
 
     if ( strcmp(config, "") )
     {
-        early_printk("WARNING: UART configuration is not supported\n");
+        printk("WARNING: UART configuration is not supported\n");
     }
 
     uart = &pl011_com;
@@ -243,22 +242,22 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
     res = dt_device_get_address(dev, 0, &addr, &size);
     if ( res )
     {
-        early_printk("pl011: Unable to retrieve the base"
-                     " address of the UART\n");
+        printk("pl011: Unable to retrieve the base"
+               " address of the UART\n");
         return res;
     }
 
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
-        early_printk("pl011: Unable to retrieve the IRQ\n");
+        printk("pl011: Unable to retrieve the IRQ\n");
         return res;
     }
 
     uart->regs = ioremap_nocache(addr, size);
     if ( !uart->regs )
     {
-        early_printk("pl011: Unable to map the UART memory\n");
+        printk("pl011: Unable to map the UART memory\n");
         return -ENOMEM;
     }
 
diff --git a/xen/drivers/video/arm_hdlcd.c b/xen/drivers/video/arm_hdlcd.c
index e5ad18d..841d0d0 100644
--- a/xen/drivers/video/arm_hdlcd.c
+++ b/xen/drivers/video/arm_hdlcd.c
@@ -25,7 +25,6 @@
 #include <xen/libfdt/libfdt.h>
 #include <xen/init.h>
 #include <xen/mm.h>
-#include <asm/early_printk.h>
 #include "font.h"
 #include "lfb.h"
 #include "modelines.h"
@@ -123,21 +122,21 @@ void __init video_init(void)
 
     if ( !dev )
     {
-        early_printk("HDLCD: Cannot find node compatible with \"arm,hdcld\"\n");
+        printk("HDLCD: Cannot find node compatible with \"arm,hdcld\"\n");
         return;
     }
 
     res = dt_device_get_address(dev, 0, &hdlcd_start, &hdlcd_size);
     if ( !res )
     {
-        early_printk("HDLCD: Unable to retrieve MMIO base address\n");
+        printk("HDLCD: Unable to retrieve MMIO base address\n");
         return;
     }
 
     cells = dt_get_property(dev, "framebuffer", &lenp);
     if ( !cells )
     {
-        early_printk("HDLCD: Unable to retrieve framebuffer property\n");
+        printk("HDLCD: Unable to retrieve framebuffer property\n");
         return;
     }
 
@@ -146,13 +145,13 @@ void __init video_init(void)
 
     if ( !hdlcd_start )
     {
-        early_printk(KERN_ERR "HDLCD: address missing from device tree, disabling driver\n");
+        printk(KERN_ERR "HDLCD: address missing from device tree, disabling driver\n");
         return;
     }
 
     if ( !framebuffer_start )
     {
-        early_printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n");
+        printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n");
         return;
     }
 
@@ -166,13 +165,13 @@ void __init video_init(void)
     else if ( strlen(mode_string) < strlen("800x600@60") ||
             strlen(mode_string) > sizeof(_mode_string) - 1 )
     {
-        early_printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string);
+        printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string);
         return;
     } else {
         char *s = strchr(mode_string, '-');
         if ( !s )
         {
-            early_printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n",
+            printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n",
                          mode_string);
             get_color_masks("32", &c);
             memcpy(_mode_string, mode_string, strlen(mode_string) + 1);
@@ -180,13 +179,13 @@ void __init video_init(void)
         } else {
             if ( strlen(s) < 6 )
             {
-                early_printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string);
+                printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string);
                 return;
             }
             s++;
             if ( get_color_masks(s, &c) < 0 )
             {
-                early_printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s);
+                printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s);
                 return;
             }
             bytes_per_pixel = simple_strtoll(s, NULL, 10) / 8;
@@ -205,23 +204,23 @@ void __init video_init(void)
     }
     if ( !videomode )
     {
-        early_printk(KERN_WARNING "HDLCD: unsupported videomode %s\n",
-                     _mode_string);
+        printk(KERN_WARNING "HDLCD: unsupported videomode %s\n",
+               _mode_string);
         return;
     }
 
     if ( framebuffer_size < bytes_per_pixel * videomode->xres * videomode->yres )
     {
-        early_printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n");
+        printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n");
         return;
     }
 
-    early_printk(KERN_INFO "Initializing HDLCD driver\n");
+    printk(KERN_INFO "Initializing HDLCD driver\n");
 
     lfb = ioremap_wc(framebuffer_start, framebuffer_size);
     if ( !lfb )
     {
-        early_printk(KERN_ERR "Couldn't map the framebuffer\n");
+        printk(KERN_ERR "Couldn't map the framebuffer\n");
         return;
     }
     memset(lfb, 0x00, bytes_per_pixel * videomode->xres * videomode->yres);
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index f5b801e..8c3d6a8 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -18,29 +18,6 @@
 #define EARLY_UART_VIRTUAL_ADDRESS \
     (FIXMAP_ADDR(FIXMAP_CONSOLE) +(EARLY_UART_BASE_ADDRESS & ~PAGE_MASK))
 
-#endif
-
-#ifndef __ASSEMBLY__
-
-#ifdef CONFIG_EARLY_PRINTK
-
-void early_printk(const char *fmt, ...)
-    __attribute__((format (printf, 1, 2)));
-void noreturn early_panic(const char *fmt, ...)
-    __attribute__((format (printf, 1, 2)));
-
-#else
-
-static inline  __attribute__((format (printf, 1, 2))) void
-early_printk(const char *fmt, ...)
-{}
-
-static inline void noreturn
-__attribute__((format (printf, 1, 2))) early_panic(const char *fmt, ...)
-{while(1);}
-
 #endif /* !CONFIG_EARLY_PRINTK */
 
-#endif	/* __ASSEMBLY__ */
-
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26:09 +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 1WVCkb-0007H4-La; Wed, 02 Apr 2014 04:26:09 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCka-0007Gt-7t
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:08 +0000
Received: from [85.158.139.211:21960] by server-11.bemta-5.messagelabs.com id
	22/09-30804-F519B335; Wed, 02 Apr 2014 04:26:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1396412764!1917813!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23142 invoked from network); 2 Apr 2014 04:26:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:26:05 -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 1WVCkW-0000gK-8c
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkW-0000KY-6S
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:04 +0000
Date: Wed, 02 Apr 2014 04:26:04 +0000
Message-Id: <E1WVCkW-0000KY-6S@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Replace early_{printk,
	panic} call to {printk, panic} call
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 5182275cfdf78d7e4546e955d5ac9947e14b76e0
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Mar 13 15:09:18 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:30:58 2014 +0100

    xen/arm: Replace early_{printk, panic} call to {printk, panic} call
    
    Now that the console supports earlyprintk, we can get a rid of
    early_printk and early_panic calls.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/early_printk.c        |   33 ----------------
 xen/arch/arm/mm.c                  |    5 +-
 xen/arch/arm/setup.c               |   28 ++++++-------
 xen/common/device_tree.c           |   74 +++++++++++++++---------------------
 xen/drivers/char/dt-uart.c         |    9 ++--
 xen/drivers/char/exynos4210-uart.c |   13 ++----
 xen/drivers/char/omap-uart.c       |   13 +++---
 xen/drivers/char/pl011.c           |   13 +++---
 xen/drivers/video/arm_hdlcd.c      |   29 +++++++-------
 xen/include/asm-arm/early_printk.h |   23 -----------
 10 files changed, 81 insertions(+), 159 deletions(-)

diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c
index 8aef152..c85db69 100644
--- a/xen/arch/arm/early_printk.c
+++ b/xen/arch/arm/early_printk.c
@@ -14,14 +14,10 @@
 #include <xen/stdarg.h>
 #include <xen/string.h>
 #include <xen/early_printk.h>
-#include <asm/early_printk.h>
 
 void early_putch(char c);
 void early_flush(void);
 
-/* Early printk buffer */
-static char __initdata buf[512];
-
 void early_puts(const char *s)
 {
     while (*s != '\0') {
@@ -37,32 +33,3 @@ void early_puts(const char *s)
      */
     early_flush();
 }
-
-static void __init early_vprintk(const char *fmt, va_list args)
-{
-    vsnprintf(buf, sizeof(buf), fmt, args);
-    early_puts(buf);
-}
-
-void __init early_printk(const char *fmt, ...)
-{
-    va_list args;
-
-    va_start(args, fmt);
-    early_vprintk(fmt, args);
-    va_end(args);
-}
-
-void __init
-early_panic(const char *fmt, ...)
-{
-    va_list args;
-
-    va_start(args, fmt);
-    early_vprintk(fmt, args);
-    va_end(args);
-
-    early_printk("\n\nEarly Panic: Stopping\n");
-
-    while(1);
-}
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 6f1408b..3161d79 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -37,7 +37,6 @@
 #include <public/memory.h>
 #include <xen/sched.h>
 #include <xen/vmap.h>
-#include <asm/early_printk.h>
 #include <xsm/xsm.h>
 #include <xen/pfn.h>
 
@@ -651,8 +650,8 @@ void __init setup_xenheap_mappings(unsigned long base_mfn,
         xenheap_mfn_start = base_mfn;
 
     if ( base_mfn < xenheap_mfn_start )
-        early_panic("cannot add xenheap mapping at %lx below heap start %lx",
-                    base_mfn, xenheap_mfn_start);
+        panic("cannot add xenheap mapping at %lx below heap start %lx",
+              base_mfn, xenheap_mfn_start);
 
     end_mfn = base_mfn + nr_mfns;
 
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 154b707..0892a54 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -39,7 +39,6 @@
 #include <asm/page.h>
 #include <asm/current.h>
 #include <asm/setup.h>
-#include <asm/early_printk.h>
 #include <asm/gic.h>
 #include <asm/cpufeature.h>
 #include <asm/platform.h>
@@ -353,10 +352,10 @@ static paddr_t __init get_xen_paddr(void)
     }
 
     if ( !paddr )
-        early_panic("Not enough memory to relocate Xen");
+        panic("Not enough memory to relocate Xen");
 
-    early_printk("Placing Xen at 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
-                 paddr, paddr + min_size);
+    printk("Placing Xen at 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
+           paddr, paddr + min_size);
 
     early_info.modules.module[MOD_XEN].start = paddr;
     early_info.modules.module[MOD_XEN].size = min_size;
@@ -378,7 +377,7 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
     void *fdt;
 
     if ( !early_info.mem.nr_banks )
-        early_panic("No memory bank");
+        panic("No memory bank");
 
     /*
      * We are going to accumulate two regions here.
@@ -437,8 +436,8 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
 
     if ( i != early_info.mem.nr_banks )
     {
-        early_printk("WARNING: only using %d out of %d memory banks\n",
-                     i, early_info.mem.nr_banks);
+        printk("WARNING: only using %d out of %d memory banks\n",
+               i, early_info.mem.nr_banks);
         early_info.mem.nr_banks = i;
     }
 
@@ -472,14 +471,13 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
     } while ( xenheap_pages > 128<<(20-PAGE_SHIFT) );
 
     if ( ! e )
-        early_panic("Not not enough space for xenheap");
+        panic("Not not enough space for xenheap");
 
     domheap_pages = heap_pages - xenheap_pages;
 
-    early_printk("Xen heap: %"PRIpaddr"-%"PRIpaddr" (%lu pages)\n",
-                 e - (pfn_to_paddr(xenheap_pages)), e,
-                 xenheap_pages);
-    early_printk("Dom heap: %lu pages\n", domheap_pages);
+    printk("Xen heap: %"PRIpaddr"-%"PRIpaddr" (%lu pages)\n",
+            e - (pfn_to_paddr(xenheap_pages)), e, xenheap_pages);
+    printk("Dom heap: %lu pages\n", domheap_pages);
 
     setup_xenheap_mappings((e >> PAGE_SHIFT) - xenheap_pages, xenheap_pages);
 
@@ -613,8 +611,8 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)
 
     if ( bank != early_info.mem.nr_banks )
     {
-        early_printk("WARNING: only using %d out of %d memory banks\n",
-                     bank, early_info.mem.nr_banks);
+        printk("WARNING: only using %d out of %d memory banks\n",
+               bank, early_info.mem.nr_banks);
         early_info.mem.nr_banks = bank;
     }
 
@@ -679,7 +677,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     fdt_size = device_tree_early_init(device_tree_flattened, fdt_paddr);
 
     cmdline = device_tree_bootargs(device_tree_flattened);
-    early_printk("Command line: %s\n", cmdline);
+    printk("Command line: %s\n", cmdline);
     cmdline_parse(cmdline);
 
     setup_pagetables(boot_phys_offset, get_xen_paddr());
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index e047d7f..74425ab 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -23,7 +23,6 @@
 #include <xen/cpumask.h>
 #include <xen/ctype.h>
 #include <xen/lib.h>
-#include <asm/early_printk.h>
 
 struct dt_early_info __initdata early_info;
 const void *device_tree_flattened;
@@ -54,21 +53,10 @@ struct dt_alias_prop {
 
 static LIST_HEAD(aliases_lookup);
 
-/* Some device tree functions may be called both before and after the
-   console is initialized. */
-#define dt_printk(fmt, ...)                         \
-    do                                              \
-    {                                               \
-        if ( system_state == SYS_STATE_early_boot ) \
-            early_printk(fmt, ## __VA_ARGS__);      \
-        else                                        \
-            printk(fmt, ## __VA_ARGS__);            \
-    } while (0)
-
 // #define DEBUG_DT
 
 #ifdef DEBUG_DT
-# define dt_dprintk(fmt, args...) dt_printk(XENLOG_DEBUG fmt, ##args)
+# define dt_dprintk(fmt, args...) printk(XENLOG_DEBUG fmt, ##args)
 static void dt_dump_addr(const char *s, const __be32 *addr, int na)
 {
     dt_dprintk("%s", s);
@@ -215,8 +203,8 @@ static int __init device_tree_for_each_node(const void *fdt,
 
         if ( depth >= DEVICE_TREE_MAX_DEPTH )
         {
-            dt_printk("Warning: device tree node `%s' is nested too deep\n",
-                      name);
+            printk("Warning: device tree node `%s' is nested too deep\n",
+                   name);
             continue;
         }
 
@@ -277,7 +265,7 @@ static int dump_node(const void *fdt, int node, const char *name, int depth,
 
     if ( name[0] == '\0' )
         name = "/";
-    dt_printk("%s%s:\n", prefix, name);
+    printk("%s%s:\n", prefix, name);
 
     for ( prop = fdt_first_property_offset(fdt, node);
           prop >= 0;
@@ -287,7 +275,7 @@ static int dump_node(const void *fdt, int node, const char *name, int depth,
 
         p = fdt_get_property_by_offset(fdt, prop, NULL);
 
-        dt_printk("%s  %s\n", prefix, fdt_string(fdt, fdt32_to_cpu(p->nameoff)));
+        printk("%s  %s\n", prefix, fdt_string(fdt, fdt32_to_cpu(p->nameoff)));
     }
 
     return 0;
@@ -316,15 +304,15 @@ static void __init process_memory_node(const void *fdt, int node,
 
     if ( address_cells < 1 || size_cells < 1 )
     {
-        early_printk("fdt: node `%s': invalid #address-cells or #size-cells",
-                     name);
+        printk("fdt: node `%s': invalid #address-cells or #size-cells",
+               name);
         return;
     }
 
     prop = fdt_get_property(fdt, node, "reg", NULL);
     if ( !prop )
     {
-        early_printk("fdt: node `%s': missing `reg' property\n", name);
+        printk("fdt: node `%s': missing `reg' property\n", name);
         return;
     }
 
@@ -357,16 +345,16 @@ static void __init process_multiboot_node(const void *fdt, int node,
     else if ( fdt_node_check_compatible(fdt, node, "xen,xsm-policy") == 0 )
         nr = MOD_XSM;
     else
-        early_panic("%s not a known xen multiboot type\n", name);
+        panic("%s not a known xen multiboot type\n", name);
 
     mod = &early_info.modules.module[nr];
 
     prop = fdt_get_property(fdt, node, "reg", &len);
     if ( !prop )
-        early_panic("node %s missing `reg' property\n", name);
+        panic("node %s missing `reg' property\n", name);
 
     if ( len < dt_cells_to_size(address_cells + size_cells) )
-        early_panic("fdt: node `%s': `reg` property length is too short\n",
+        panic("fdt: node `%s': `reg` property length is too short\n",
                     name);
 
     cell = (const __be32 *)prop->data;
@@ -377,7 +365,7 @@ static void __init process_multiboot_node(const void *fdt, int node,
     if ( prop )
     {
         if ( len > sizeof(mod->cmdline) )
-            early_panic("module %d command line too long\n", nr);
+            panic("module %d command line too long\n", nr);
 
         safe_strcpy(mod->cmdline, prop->data);
     }
@@ -397,7 +385,7 @@ static void __init process_chosen_node(const void *fdt, int node,
     paddr_t start, end;
     int len;
 
-    dt_printk("Checking for initrd in /chosen\n");
+    printk("Checking for initrd in /chosen\n");
 
     prop = fdt_get_property(fdt, node, "linux,initrd-start", &len);
     if ( !prop )
@@ -405,7 +393,7 @@ static void __init process_chosen_node(const void *fdt, int node,
         return;
     if ( len != sizeof(u32) && len != sizeof(u64) )
     {
-        dt_printk("linux,initrd-start property has invalid length %d\n", len);
+        printk("linux,initrd-start property has invalid length %d\n", len);
         return;
     }
     start = dt_read_number((void *)&prop->data, dt_size_to_cells(len));
@@ -413,24 +401,24 @@ static void __init process_chosen_node(const void *fdt, int node,
     prop = fdt_get_property(fdt, node, "linux,initrd-end", &len);
     if ( !prop )
     {
-        dt_printk("linux,initrd-end not present but -start was\n");
+        printk("linux,initrd-end not present but -start was\n");
         return;
     }
     if ( len != sizeof(u32) && len != sizeof(u64) )
     {
-        dt_printk("linux,initrd-end property has invalid length %d\n", len);
+        printk("linux,initrd-end property has invalid length %d\n", len);
         return;
     }
     end = dt_read_number((void *)&prop->data, dt_size_to_cells(len));
 
     if ( start >= end )
     {
-        dt_printk("linux,initrd limits invalid: %"PRIpaddr" >= %"PRIpaddr"\n",
+        printk("linux,initrd limits invalid: %"PRIpaddr" >= %"PRIpaddr"\n",
                   start, end);
         return;
     }
 
-    dt_printk("Initrd %"PRIpaddr"-%"PRIpaddr"\n", start, end);
+    printk("Initrd %"PRIpaddr"-%"PRIpaddr"\n", start, end);
 
     mod->start = start;
     mod->size = end - start;
@@ -460,12 +448,12 @@ static void __init early_print_info(void)
     int i, nr_rsvd;
 
     for ( i = 0; i < mi->nr_banks; i++ )
-        early_printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n",
+        printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n",
                      mi->bank[i].start,
                      mi->bank[i].start + mi->bank[i].size - 1);
-    early_printk("\n");
+    printk("\n");
     for ( i = 1 ; i < mods->nr_mods + 1; i++ )
-        early_printk("MODULE[%d]: %"PRIpaddr" - %"PRIpaddr" %s\n",
+        printk("MODULE[%d]: %"PRIpaddr" - %"PRIpaddr" %s\n",
                      i,
                      mods->module[i].start,
                      mods->module[i].start + mods->module[i].size,
@@ -478,10 +466,10 @@ static void __init early_print_info(void)
             continue;
         /* fdt_get_mem_rsv returns length */
         e += s;
-        early_printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n",
+        printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n",
                      i, s, e);
     }
-    early_printk("\n");
+    printk("\n");
 }
 
 /**
@@ -497,7 +485,7 @@ size_t __init device_tree_early_init(const void *fdt, paddr_t paddr)
 
     ret = fdt_check_header(fdt);
     if ( ret < 0 )
-        early_panic("No valid device tree\n");
+        panic("No valid device tree\n");
 
     mod = &early_info.modules.module[MOD_FDT];
     mod->start = paddr;
@@ -947,7 +935,7 @@ static int dt_translate_one(const struct dt_device_node *parent,
     ranges = dt_get_property(parent, rprop, &rlen);
     if ( ranges == NULL )
     {
-        dt_printk(XENLOG_ERR "DT: no ranges; cannot translate\n");
+        printk(XENLOG_ERR "DT: no ranges; cannot translate\n");
         return 1;
     }
     if ( rlen == 0 )
@@ -1017,7 +1005,7 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
     bus->count_cells(dev, &na, &ns);
     if ( !DT_CHECK_COUNTS(na, ns) )
     {
-        dt_printk(XENLOG_ERR "dt_parse: Bad cell count for device %s\n",
+        printk(XENLOG_ERR "dt_parse: Bad cell count for device %s\n",
                   dev->full_name);
         goto bail;
     }
@@ -1046,7 +1034,7 @@ static u64 __dt_translate_address(const struct dt_device_node *dev,
         pbus = dt_match_bus(parent);
         if ( pbus == NULL )
         {
-            dt_printk("DT: %s is not a valid bus\n", parent->full_name);
+            printk("DT: %s is not a valid bus\n", parent->full_name);
             break;
         }
         pbus->count_cells(dev, &pna, &pns);
@@ -1518,7 +1506,7 @@ static unsigned long __init unflatten_dt_node(const void *fdt,
     tag = be32_to_cpup((__be32 *)(*p));
     if ( tag != FDT_BEGIN_NODE )
     {
-        dt_printk(XENLOG_WARNING "Weird tag at start of node: %x\n", tag);
+        printk(XENLOG_WARNING "Weird tag at start of node: %x\n", tag);
         return mem;
     }
     *p += 4;
@@ -1720,7 +1708,7 @@ static unsigned long __init unflatten_dt_node(const void *fdt,
     }
     if ( tag != FDT_END_NODE )
     {
-        dt_printk(XENLOG_WARNING "Weird tag at end of node: %x\n", tag);
+        printk(XENLOG_WARNING "Weird tag at end of node: %x\n", tag);
         return mem;
     }
 
@@ -1769,10 +1757,10 @@ static void __init __unflatten_device_tree(const void *fdt,
     start = ((unsigned long)fdt) + fdt_off_dt_struct(fdt);
     unflatten_dt_node(fdt, mem, &start, NULL, &allnextp, 0);
     if ( be32_to_cpup((__be32 *)start) != FDT_END )
-        dt_printk(XENLOG_WARNING "Weird tag at end of tree: %08x\n",
+        printk(XENLOG_WARNING "Weird tag at end of tree: %08x\n",
                   *((u32 *)start));
     if ( be32_to_cpu(((__be32 *)mem)[size / 4]) != 0xdeadbeef )
-        dt_printk(XENLOG_WARNING "End of tree marker overwritten: %08x\n",
+        printk(XENLOG_WARNING "End of tree marker overwritten: %08x\n",
                   be32_to_cpu(((__be32 *)mem)[size / 4]));
     *allnextp = NULL;
 
diff --git a/xen/drivers/char/dt-uart.c b/xen/drivers/char/dt-uart.c
index d7204fb..fa92b5c 100644
--- a/xen/drivers/char/dt-uart.c
+++ b/xen/drivers/char/dt-uart.c
@@ -18,7 +18,6 @@
  */
 
 #include <asm/device.h>
-#include <asm/early_printk.h>
 #include <asm/types.h>
 #include <xen/console.h>
 #include <xen/device_tree.h>
@@ -44,7 +43,7 @@ void __init dt_uart_init(void)
 
     if ( !console_has("dtuart") || !strcmp(opt_dtuart, "") )
     {
-        early_printk("No console\n");
+        printk("No console\n");
         return;
     }
 
@@ -54,7 +53,7 @@ void __init dt_uart_init(void)
     else
         options = "";
 
-    early_printk("Looking for UART console %s\n", devpath);
+    printk("Looking for UART console %s\n", devpath);
     if ( *devpath == '/' )
         dev = dt_find_node_by_path(devpath);
     else
@@ -62,12 +61,12 @@ void __init dt_uart_init(void)
 
     if ( !dev )
     {
-        early_printk("Unable to find device \"%s\"\n", devpath);
+        printk("Unable to find device \"%s\"\n", devpath);
         return;
     }
 
     ret = device_init(dev, DEVICE_SERIAL, options);
 
     if ( ret )
-        early_printk("Unable to initialize serial: %d\n", ret);
+        printk("Unable to initialize serial: %d\n", ret);
 }
diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c
index 150d49b..d49e1fe 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -24,7 +24,6 @@
 #include <xen/init.h>
 #include <xen/irq.h>
 #include <xen/mm.h>
-#include <asm/early_printk.h>
 #include <asm/device.h>
 #include <asm/exynos4210-uart.h>
 #include <asm/io.h>
@@ -314,9 +313,7 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
     u64 addr, size;
 
     if ( strcmp(config, "") )
-    {
-        early_printk("WARNING: UART configuration is not supported\n");
-    }
+        printk("WARNING: UART configuration is not supported\n");
 
     uart = &exynos4210_com;
 
@@ -329,22 +326,22 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
     res = dt_device_get_address(dev, 0, &addr, &size);
     if ( res )
     {
-        early_printk("exynos4210: Unable to retrieve the base"
-                     " address of the UART\n");
+        printk("exynos4210: Unable to retrieve the base"
+               " address of the UART\n");
         return res;
     }
 
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
-        early_printk("exynos4210: Unable to retrieve the IRQ\n");
+        printk("exynos4210: Unable to retrieve the IRQ\n");
         return res;
     }
 
     uart->regs = ioremap_nocache(addr, size);
     if ( !uart->regs )
     {
-        early_printk("exynos4210: Unable to map the UART memory\n");
+        printk("exynos4210: Unable to map the UART memory\n");
         return -ENOMEM;
     }
 
diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c
index b29f610..49ae1a4 100644
--- a/xen/drivers/char/omap-uart.c
+++ b/xen/drivers/char/omap-uart.c
@@ -15,7 +15,6 @@
 #include <xen/serial.h>
 #include <xen/init.h>
 #include <xen/irq.h>
-#include <asm/early_printk.h>
 #include <xen/device_tree.h>
 #include <asm/device.h>
 #include <xen/errno.h>
@@ -301,14 +300,14 @@ static int __init omap_uart_init(struct dt_device_node *dev,
     u64 addr, size;
 
     if ( strcmp(config, "") )
-        early_printk("WARNING: UART configuration is not supported\n");
+        printk("WARNING: UART configuration is not supported\n");
 
     uart = &omap_com;
 
     res = dt_property_read_u32(dev, "clock-frequency", &clkspec);
     if ( !res )
     {
-        early_printk("omap-uart: Unable to retrieve the clock frequency\n");
+        printk("omap-uart: Unable to retrieve the clock frequency\n");
         return -EINVAL;
     }
 
@@ -321,22 +320,22 @@ static int __init omap_uart_init(struct dt_device_node *dev,
     res = dt_device_get_address(dev, 0, &addr, &size);
     if ( res )
     {
-        early_printk("omap-uart: Unable to retrieve the base"
-                     " address of the UART\n");
+        printk("omap-uart: Unable to retrieve the base"
+               " address of the UART\n");
         return res;
     }
 
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
-        early_printk("omap-uart: Unable to retrieve the IRQ\n");
+        printk("omap-uart: Unable to retrieve the IRQ\n");
         return res;
     }
 
     uart->regs = ioremap_nocache(addr, size);
     if ( !uart->regs )
     {
-        early_printk("omap-uart: Unable to map the UART memory\n");
+        printk("omap-uart: Unable to map the UART memory\n");
         return -ENOMEM;
     }
 
diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
index fe99af6..90bf0c6 100644
--- a/xen/drivers/char/pl011.c
+++ b/xen/drivers/char/pl011.c
@@ -22,7 +22,6 @@
 #include <xen/serial.h>
 #include <xen/init.h>
 #include <xen/irq.h>
-#include <asm/early_printk.h>
 #include <xen/device_tree.h>
 #include <xen/errno.h>
 #include <asm/device.h>
@@ -107,7 +106,7 @@ static void __init pl011_init_preirq(struct serial_port *port)
         /* Baud rate already set: read it out from the divisor latch. */
         divisor = (pl011_read(uart, IBRD) << 6) | (pl011_read(uart, FBRD));
         if (!divisor)
-            early_panic("pl011: No Baud rate configured\n");
+            panic("pl011: No Baud rate configured\n");
         uart->baud = (uart->clock_hz << 2) / divisor;
     }
     /* This write must follow FBRD and IBRD writes. */
@@ -229,7 +228,7 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
 
     if ( strcmp(config, "") )
     {
-        early_printk("WARNING: UART configuration is not supported\n");
+        printk("WARNING: UART configuration is not supported\n");
     }
 
     uart = &pl011_com;
@@ -243,22 +242,22 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
     res = dt_device_get_address(dev, 0, &addr, &size);
     if ( res )
     {
-        early_printk("pl011: Unable to retrieve the base"
-                     " address of the UART\n");
+        printk("pl011: Unable to retrieve the base"
+               " address of the UART\n");
         return res;
     }
 
     res = dt_device_get_irq(dev, 0, &uart->irq);
     if ( res )
     {
-        early_printk("pl011: Unable to retrieve the IRQ\n");
+        printk("pl011: Unable to retrieve the IRQ\n");
         return res;
     }
 
     uart->regs = ioremap_nocache(addr, size);
     if ( !uart->regs )
     {
-        early_printk("pl011: Unable to map the UART memory\n");
+        printk("pl011: Unable to map the UART memory\n");
         return -ENOMEM;
     }
 
diff --git a/xen/drivers/video/arm_hdlcd.c b/xen/drivers/video/arm_hdlcd.c
index e5ad18d..841d0d0 100644
--- a/xen/drivers/video/arm_hdlcd.c
+++ b/xen/drivers/video/arm_hdlcd.c
@@ -25,7 +25,6 @@
 #include <xen/libfdt/libfdt.h>
 #include <xen/init.h>
 #include <xen/mm.h>
-#include <asm/early_printk.h>
 #include "font.h"
 #include "lfb.h"
 #include "modelines.h"
@@ -123,21 +122,21 @@ void __init video_init(void)
 
     if ( !dev )
     {
-        early_printk("HDLCD: Cannot find node compatible with \"arm,hdcld\"\n");
+        printk("HDLCD: Cannot find node compatible with \"arm,hdcld\"\n");
         return;
     }
 
     res = dt_device_get_address(dev, 0, &hdlcd_start, &hdlcd_size);
     if ( !res )
     {
-        early_printk("HDLCD: Unable to retrieve MMIO base address\n");
+        printk("HDLCD: Unable to retrieve MMIO base address\n");
         return;
     }
 
     cells = dt_get_property(dev, "framebuffer", &lenp);
     if ( !cells )
     {
-        early_printk("HDLCD: Unable to retrieve framebuffer property\n");
+        printk("HDLCD: Unable to retrieve framebuffer property\n");
         return;
     }
 
@@ -146,13 +145,13 @@ void __init video_init(void)
 
     if ( !hdlcd_start )
     {
-        early_printk(KERN_ERR "HDLCD: address missing from device tree, disabling driver\n");
+        printk(KERN_ERR "HDLCD: address missing from device tree, disabling driver\n");
         return;
     }
 
     if ( !framebuffer_start )
     {
-        early_printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n");
+        printk(KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n");
         return;
     }
 
@@ -166,13 +165,13 @@ void __init video_init(void)
     else if ( strlen(mode_string) < strlen("800x600@60") ||
             strlen(mode_string) > sizeof(_mode_string) - 1 )
     {
-        early_printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string);
+        printk(KERN_ERR "HDLCD: invalid modeline=%s\n", mode_string);
         return;
     } else {
         char *s = strchr(mode_string, '-');
         if ( !s )
         {
-            early_printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n",
+            printk(KERN_INFO "HDLCD: bpp not found in modeline %s, assume 32 bpp\n",
                          mode_string);
             get_color_masks("32", &c);
             memcpy(_mode_string, mode_string, strlen(mode_string) + 1);
@@ -180,13 +179,13 @@ void __init video_init(void)
         } else {
             if ( strlen(s) < 6 )
             {
-                early_printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string);
+                printk(KERN_ERR "HDLCD: invalid mode %s\n", mode_string);
                 return;
             }
             s++;
             if ( get_color_masks(s, &c) < 0 )
             {
-                early_printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s);
+                printk(KERN_WARNING "HDLCD: unsupported bpp %s\n", s);
                 return;
             }
             bytes_per_pixel = simple_strtoll(s, NULL, 10) / 8;
@@ -205,23 +204,23 @@ void __init video_init(void)
     }
     if ( !videomode )
     {
-        early_printk(KERN_WARNING "HDLCD: unsupported videomode %s\n",
-                     _mode_string);
+        printk(KERN_WARNING "HDLCD: unsupported videomode %s\n",
+               _mode_string);
         return;
     }
 
     if ( framebuffer_size < bytes_per_pixel * videomode->xres * videomode->yres )
     {
-        early_printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n");
+        printk(KERN_ERR "HDLCD: the framebuffer is too small, disabling the HDLCD driver\n");
         return;
     }
 
-    early_printk(KERN_INFO "Initializing HDLCD driver\n");
+    printk(KERN_INFO "Initializing HDLCD driver\n");
 
     lfb = ioremap_wc(framebuffer_start, framebuffer_size);
     if ( !lfb )
     {
-        early_printk(KERN_ERR "Couldn't map the framebuffer\n");
+        printk(KERN_ERR "Couldn't map the framebuffer\n");
         return;
     }
     memset(lfb, 0x00, bytes_per_pixel * videomode->xres * videomode->yres);
diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index f5b801e..8c3d6a8 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -18,29 +18,6 @@
 #define EARLY_UART_VIRTUAL_ADDRESS \
     (FIXMAP_ADDR(FIXMAP_CONSOLE) +(EARLY_UART_BASE_ADDRESS & ~PAGE_MASK))
 
-#endif
-
-#ifndef __ASSEMBLY__
-
-#ifdef CONFIG_EARLY_PRINTK
-
-void early_printk(const char *fmt, ...)
-    __attribute__((format (printf, 1, 2)));
-void noreturn early_panic(const char *fmt, ...)
-    __attribute__((format (printf, 1, 2)));
-
-#else
-
-static inline  __attribute__((format (printf, 1, 2))) void
-early_printk(const char *fmt, ...)
-{}
-
-static inline void noreturn
-__attribute__((format (printf, 1, 2))) early_panic(const char *fmt, ...)
-{while(1);}
-
 #endif /* !CONFIG_EARLY_PRINTK */
 
-#endif	/* __ASSEMBLY__ */
-
 #endif
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26: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 1WVCkl-0007J3-UJ; Wed, 02 Apr 2014 04:26:19 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkk-0007Ik-IK
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:18 +0000
Received: from [193.109.254.147:33007] by server-15.bemta-14.messagelabs.com
	id F9/E6-15813-9619B335; Wed, 02 Apr 2014 04:26:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1396412774!4936758!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7151 invoked from network); 2 Apr 2014 04:26:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:26:15 -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 1WVCkg-0000gQ-Eo
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkg-0000L0-DQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:14 +0000
Date: Wed, 02 Apr 2014 04:26:14 +0000
Message-Id: <E1WVCkg-0000L0-DQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] pv-grub: correct sizeof usage
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 0ac7e6a2c5f617c47bb99c9e799a0de53fa3290c
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sat Mar 29 18:08:08 2014 +1300
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:32:05 2014 +0100

    pv-grub: correct sizeof usage
    
    We were lucky that sizeof(frame) >= sizeof(*frame) anyway.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 stubdom/grub/mini-os.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 64ab962..9d4bcc7 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -333,7 +333,7 @@ struct frame {
 static void minios_transmit (struct nic *nic, const char *d, unsigned int t,
                              unsigned int s, const char *p)
 {
-    struct frame *frame = alloca(sizeof(frame) + s);
+    struct frame *frame = alloca(sizeof(*frame) + s);
 
     memcpy(frame->dest, d, ETH_ALEN);
     memcpy(frame->src, nic->node_addr, ETH_ALEN);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26: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 1WVCkl-0007J3-UJ; Wed, 02 Apr 2014 04:26:19 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkk-0007Ik-IK
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:18 +0000
Received: from [193.109.254.147:33007] by server-15.bemta-14.messagelabs.com
	id F9/E6-15813-9619B335; Wed, 02 Apr 2014 04:26:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1396412774!4936758!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7151 invoked from network); 2 Apr 2014 04:26:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:26:15 -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 1WVCkg-0000gQ-Eo
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkg-0000L0-DQ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:14 +0000
Date: Wed, 02 Apr 2014 04:26:14 +0000
Message-Id: <E1WVCkg-0000L0-DQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] pv-grub: correct sizeof usage
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 0ac7e6a2c5f617c47bb99c9e799a0de53fa3290c
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Sat Mar 29 18:08:08 2014 +1300
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 1 11:32:05 2014 +0100

    pv-grub: correct sizeof usage
    
    We were lucky that sizeof(frame) >= sizeof(*frame) anyway.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 stubdom/grub/mini-os.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 64ab962..9d4bcc7 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -333,7 +333,7 @@ struct frame {
 static void minios_transmit (struct nic *nic, const char *d, unsigned int t,
                              unsigned int s, const char *p)
 {
-    struct frame *frame = alloca(sizeof(frame) + s);
+    struct frame *frame = alloca(sizeof(*frame) + s);
 
     memcpy(frame->dest, d, ETH_ALEN);
     memcpy(frame->src, nic->node_addr, ETH_ALEN);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26: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 1WVCkv-0007L0-1H; Wed, 02 Apr 2014 04:26:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkt-0007Ka-5S
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:27 +0000
Received: from [193.109.254.147:23032] by server-1.bemta-14.messagelabs.com id
	07/60-00839-2719B335; Wed, 02 Apr 2014 04:26:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1396412784!5666534!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25891 invoked from network); 2 Apr 2014 04:26:25 -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;
	2 Apr 2014 04:26:25 -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 1WVCkq-0000gW-KK
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkq-0000LM-IY
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:24 +0000
Date: Wed, 02 Apr 2014 04:26:24 +0000
Message-Id: <E1WVCkq-0000LM-IY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] cpupool: cpupool_unassign_cpu is only
	used internally
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 7b0e1a5913a506ee8194035af0317118d6258a05
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Apr 1 16:44:50 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 16:44:50 2014 +0200

    cpupool: cpupool_unassign_cpu is only used internally
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
---
 xen/common/cpupool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index 933de78..4a0e569 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -307,7 +307,7 @@ out:
  * - last cpu and still active domains in cpupool
  * - cpu just being unplugged
  */
-int cpupool_unassign_cpu(struct cpupool *c, unsigned int cpu)
+static int cpupool_unassign_cpu(struct cpupool *c, unsigned int cpu)
 {
     int work_cpu;
     int ret;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26: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 1WVCkv-0007L0-1H; Wed, 02 Apr 2014 04:26:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkt-0007Ka-5S
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:27 +0000
Received: from [193.109.254.147:23032] by server-1.bemta-14.messagelabs.com id
	07/60-00839-2719B335; Wed, 02 Apr 2014 04:26:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1396412784!5666534!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25891 invoked from network); 2 Apr 2014 04:26:25 -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;
	2 Apr 2014 04:26:25 -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 1WVCkq-0000gW-KK
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCkq-0000LM-IY
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:24 +0000
Date: Wed, 02 Apr 2014 04:26:24 +0000
Message-Id: <E1WVCkq-0000LM-IY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] cpupool: cpupool_unassign_cpu is only
	used internally
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 7b0e1a5913a506ee8194035af0317118d6258a05
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Apr 1 16:44:50 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 16:44:50 2014 +0200

    cpupool: cpupool_unassign_cpu is only used internally
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
---
 xen/common/cpupool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index 933de78..4a0e569 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -307,7 +307,7 @@ out:
  * - last cpu and still active domains in cpupool
  * - cpu just being unplugged
  */
-int cpupool_unassign_cpu(struct cpupool *c, unsigned int cpu)
+static int cpupool_unassign_cpu(struct cpupool *c, unsigned int cpu)
 {
     int work_cpu;
     int ret;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26:39 +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 1WVCl5-0007Mz-4A; Wed, 02 Apr 2014 04:26:39 +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 1WVCl3-0007Mc-Bp
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:37 +0000
Received: from [85.158.143.35:24753] by server-2.bemta-4.messagelabs.com id
	96/45-06539-C719B335; Wed, 02 Apr 2014 04:26:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1396412795!6331000!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16035 invoked from network); 2 Apr 2014 04:26:35 -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;
	2 Apr 2014 04:26:35 -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 1WVCl0-0000ge-Oe
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCl0-0000Lm-Nb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:34 +0000
Date: Wed, 02 Apr 2014 04:26:34 +0000
Message-Id: <E1WVCl0-0000Lm-Nb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] kexec: propagate ENOMEM result in
	error handling
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 66c6349265d6536d0b77cd958ee3e5074e86233a
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Tue Apr 1 16:48:02 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 16:48:02 2014 +0200

    kexec: propagate ENOMEM result in error handling
    
    ...otherwise if kimage_alloc_control_page fails (presumably due to
    out-of-memory; see the invocation just before this one), the caller of
    do_kimage_alloc will think the call was successful.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
---
 xen/common/kimage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/common/kimage.c b/xen/common/kimage.c
index 91943f1..9b79a5e 100644
--- a/xen/common/kimage.c
+++ b/xen/common/kimage.c
@@ -182,6 +182,7 @@ static int do_kimage_alloc(struct kexec_image **rimage, paddr_t entry,
         goto out;
 
     /* Add an empty indirection page. */
+    result = -ENOMEM;
     image->entry_page = kimage_alloc_control_page(image, 0);
     if ( !image->entry_page )
         goto out;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26:39 +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 1WVCl5-0007Mz-4A; Wed, 02 Apr 2014 04:26:39 +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 1WVCl3-0007Mc-Bp
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:37 +0000
Received: from [85.158.143.35:24753] by server-2.bemta-4.messagelabs.com id
	96/45-06539-C719B335; Wed, 02 Apr 2014 04:26:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1396412795!6331000!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16035 invoked from network); 2 Apr 2014 04:26:35 -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;
	2 Apr 2014 04:26:35 -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 1WVCl0-0000ge-Oe
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCl0-0000Lm-Nb
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:34 +0000
Date: Wed, 02 Apr 2014 04:26:34 +0000
Message-Id: <E1WVCl0-0000Lm-Nb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] kexec: propagate ENOMEM result in
	error handling
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 66c6349265d6536d0b77cd958ee3e5074e86233a
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Tue Apr 1 16:48:02 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 16:48:02 2014 +0200

    kexec: propagate ENOMEM result in error handling
    
    ...otherwise if kimage_alloc_control_page fails (presumably due to
    out-of-memory; see the invocation just before this one), the caller of
    do_kimage_alloc will think the call was successful.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
---
 xen/common/kimage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/common/kimage.c b/xen/common/kimage.c
index 91943f1..9b79a5e 100644
--- a/xen/common/kimage.c
+++ b/xen/common/kimage.c
@@ -182,6 +182,7 @@ static int do_kimage_alloc(struct kexec_image **rimage, paddr_t entry,
         goto out;
 
     /* Add an empty indirection page. */
+    result = -ENOMEM;
     image->entry_page = kimage_alloc_control_page(image, 0);
     if ( !image->entry_page )
         goto out;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26:48 +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 1WVClE-0007OY-6l; Wed, 02 Apr 2014 04:26:48 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClD-0007ON-Kk
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:47 +0000
Received: from [85.158.139.211:24074] by server-10.bemta-5.messagelabs.com id
	89/AC-27081-6819B335; Wed, 02 Apr 2014 04:26:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1396412805!4857774!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7944 invoked from network); 2 Apr 2014 04:26:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:26:46 -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 1WVClA-0000gk-UZ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClA-0000MB-T6
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:44 +0000
Date: Wed, 02 Apr 2014 04:26:44 +0000
Message-Id: <E1WVClA-0000MB-T6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] VMX: fix PAT value seen by guest
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 fce79f8ce91dc45f3a4d699ee67c49e6cbeb1197
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 1 16:49:18 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 16:49:18 2014 +0200

    VMX: fix PAT value seen by guest
    
    The XSA-60 fixes introduced a window during which the guest PAT gets
    forced to all zeros. This shouldn't be visible to the guest. Therefore
    we need to intercept PAT MSR accesses during that time period.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 94f3db2..77ce167 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1033,6 +1033,8 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
 
             vmx_get_guest_pat(v, pat);
             vmx_set_guest_pat(v, uc_pat);
+            vmx_enable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                         MSR_TYPE_R | MSR_TYPE_W);
 
             wbinvd();               /* flush possibly polluted cache */
             hvm_asid_flush_vcpu(v); /* invalidate memory type cached in TLB */
@@ -1042,6 +1044,9 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
         {
             v->arch.hvm_vcpu.cache_mode = NORMAL_CACHE_MODE;
             vmx_set_guest_pat(v, *pat);
+            if ( !iommu_enabled || iommu_snoop )
+                vmx_disable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                              MSR_TYPE_R | MSR_TYPE_W);
             hvm_asid_flush_vcpu(v); /* no need to flush cache */
         }
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26:48 +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 1WVClE-0007OY-6l; Wed, 02 Apr 2014 04:26:48 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClD-0007ON-Kk
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:47 +0000
Received: from [85.158.139.211:24074] by server-10.bemta-5.messagelabs.com id
	89/AC-27081-6819B335; Wed, 02 Apr 2014 04:26:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1396412805!4857774!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7944 invoked from network); 2 Apr 2014 04:26:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:26:46 -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 1WVClA-0000gk-UZ
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClA-0000MB-T6
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:44 +0000
Date: Wed, 02 Apr 2014 04:26:44 +0000
Message-Id: <E1WVClA-0000MB-T6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] VMX: fix PAT value seen by guest
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 fce79f8ce91dc45f3a4d699ee67c49e6cbeb1197
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 1 16:49:18 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 16:49:18 2014 +0200

    VMX: fix PAT value seen by guest
    
    The XSA-60 fixes introduced a window during which the guest PAT gets
    forced to all zeros. This shouldn't be visible to the guest. Therefore
    we need to intercept PAT MSR accesses during that time period.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 94f3db2..77ce167 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1033,6 +1033,8 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
 
             vmx_get_guest_pat(v, pat);
             vmx_set_guest_pat(v, uc_pat);
+            vmx_enable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                         MSR_TYPE_R | MSR_TYPE_W);
 
             wbinvd();               /* flush possibly polluted cache */
             hvm_asid_flush_vcpu(v); /* invalidate memory type cached in TLB */
@@ -1042,6 +1044,9 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
         {
             v->arch.hvm_vcpu.cache_mode = NORMAL_CACHE_MODE;
             vmx_set_guest_pat(v, *pat);
+            if ( !iommu_enabled || iommu_snoop )
+                vmx_disable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                              MSR_TYPE_R | MSR_TYPE_W);
             hvm_asid_flush_vcpu(v); /* no need to flush cache */
         }
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26:59 +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 1WVClP-0007Qa-AN; Wed, 02 Apr 2014 04:26:59 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClN-0007QC-TX
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:58 +0000
Received: from [85.158.139.211:24374] by server-16.bemta-5.messagelabs.com id
	16/FC-19700-1919B335; Wed, 02 Apr 2014 04:26:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1396412815!4884416!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17160 invoked from network); 2 Apr 2014 04:26:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:26:56 -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 1WVClL-0000gx-45
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClL-0000N6-38
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:55 +0000
Date: Wed, 02 Apr 2014 04:26:55 +0000
Message-Id: <E1WVClL-0000N6-38@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] include: fix Makefile for FreeBSD
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="===============3536946651598451724=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============3536946651598451724==
Content-Type: text/plain

commit 0e1eed0bea78f3c215e1ce8d9de264d62d927bb8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 1 18:20:58 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 18:20:58 2014 +0200

    include: fix Makefile for FreeBSD
    
    Don't use non-standard extensions:
    - \t in bracket expressions
    - \+ in basic regular expressions
    
    Reported-by: Roger Pau Monné<roger.pau@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Roger Pau Monné<roger.pau@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/include/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/include/Makefile b/xen/include/Makefile
index d6f0cf7..f7ccbc9 100644
--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -76,10 +76,10 @@ compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst $(BASEDIR)/tools/get-fields.sh M
 .PRECIOUS: compat/.xlat/%.lst
 compat/.xlat/%.lst: xlat.lst Makefile
 	mkdir -p $(@D)
-	grep -v '^[ \t]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -e 's,[ \t]\+$*\.h[ \t]*$$,,p' >$@.new
+	grep -v '^[[:blank:]]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new
 	$(call move-if-changed,$@.new,$@)
 
-xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -e 's,^[?!][ \t]\+[^ \t]\+[ \t]\+,,p' xlat.lst | uniq)
+xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:blank:]]+[^[:blank:]]+[[:blank:]]+,,p' xlat.lst | uniq)
 xlat-y := $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y))
 
 compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) Makefile
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============3536946651598451724==
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
--===============3536946651598451724==--

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:26:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:26:59 +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 1WVClP-0007Qa-AN; Wed, 02 Apr 2014 04:26:59 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClN-0007QC-TX
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:58 +0000
Received: from [85.158.139.211:24374] by server-16.bemta-5.messagelabs.com id
	16/FC-19700-1919B335; Wed, 02 Apr 2014 04:26:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1396412815!4884416!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17160 invoked from network); 2 Apr 2014 04:26:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	2 Apr 2014 04:26:56 -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 1WVClL-0000gx-45
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClL-0000N6-38
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:26:55 +0000
Date: Wed, 02 Apr 2014 04:26:55 +0000
Message-Id: <E1WVClL-0000N6-38@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] include: fix Makefile for FreeBSD
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="===============3536946651598451724=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============3536946651598451724==
Content-Type: text/plain

commit 0e1eed0bea78f3c215e1ce8d9de264d62d927bb8
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 1 18:20:58 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 18:20:58 2014 +0200

    include: fix Makefile for FreeBSD
    
    Don't use non-standard extensions:
    - \t in bracket expressions
    - \+ in basic regular expressions
    
    Reported-by: Roger Pau Monné<roger.pau@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Roger Pau Monné<roger.pau@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/include/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/include/Makefile b/xen/include/Makefile
index d6f0cf7..f7ccbc9 100644
--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -76,10 +76,10 @@ compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst $(BASEDIR)/tools/get-fields.sh M
 .PRECIOUS: compat/.xlat/%.lst
 compat/.xlat/%.lst: xlat.lst Makefile
 	mkdir -p $(@D)
-	grep -v '^[ \t]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -e 's,[ \t]\+$*\.h[ \t]*$$,,p' >$@.new
+	grep -v '^[[:blank:]]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new
 	$(call move-if-changed,$@.new,$@)
 
-xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -e 's,^[?!][ \t]\+[^ \t]\+[ \t]\+,,p' xlat.lst | uniq)
+xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:blank:]]+[^[:blank:]]+[[:blank:]]+,,p' xlat.lst | uniq)
 xlat-y := $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y))
 
 compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) Makefile
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============3536946651598451724==
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
--===============3536946651598451724==--

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:27:08 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:27:08 +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 1WVClY-0007SA-Db; Wed, 02 Apr 2014 04:27:08 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClX-0007Rv-SP
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:08 +0000
Received: from [193.109.254.147:50049] by server-5.bemta-14.messagelabs.com id
	9B/8D-26413-B919B335; Wed, 02 Apr 2014 04:27:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1396412825!5666762!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30005 invoked from network); 2 Apr 2014 04:27:06 -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;
	2 Apr 2014 04:27: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 1WVClV-0000hW-A5
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClV-0000Nc-8h
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:05 +0000
Date: Wed, 02 Apr 2014 04:27:05 +0000
Message-Id: <E1WVClV-0000Nc-8h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] fix sed usage in build rules
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="===============8093685134547397148=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============8093685134547397148==
Content-Type: text/plain

commit 3be448811f3702a5b52a21d0a55683c018122759
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 1 18:21:43 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 18:21:43 2014 +0200

    fix sed usage in build rules
    
    Apparently FreeBSD sed is more picky than GNU sed, wanting a semicolon
    at the end of a brace enclosed statement list.
    
    Reported-by: Roger Pau Monné<roger.pau@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/Rules.mk                 |    2 +-
 xen/arch/x86/boot/build32.mk |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 42c713f..b0d4634 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -170,7 +170,7 @@ SPECIAL_DATA_SECTIONS := rodata $(foreach n,1 2 4 8,rodata.str1.$(n)) \
 			 $(foreach r,rel rel.ro,data.$(r) data.$(r).local)
 
 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o Makefile
-	$(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p}' | while read idx name sz rest; do \
+	$(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx name sz rest; do \
 		case "$$name" in \
 		.text|.text.*|.data|.data.*|.bss) \
 			test $$sz != 0 || continue; \
diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk
index a2d4b34..a36f620 100644
--- a/xen/arch/x86/boot/build32.mk
+++ b/xen/arch/x86/boot/build32.mk
@@ -20,7 +20,7 @@ CFLAGS := $(filter-out -flto,$(CFLAGS))
 
 %.o: %.c
 	$(CC) $(CFLAGS) -c -fpic $< -o $@
-	$(OBJDUMP) -h $@ | sed -n '/[0-9]/{s,00*,0,g;p}' |\
+	$(OBJDUMP) -h $@ | sed -n '/[0-9]/{s,00*,0,g;p;}' |\
 		while read idx name sz rest; do \
 			case "$$name" in \
 			.data|.data.*|.rodata|.rodata.*|.bss|.bss.*) \
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============8093685134547397148==
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
--===============8093685134547397148==--

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:27:08 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:27:08 +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 1WVClY-0007SA-Db; Wed, 02 Apr 2014 04:27:08 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClX-0007Rv-SP
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:08 +0000
Received: from [193.109.254.147:50049] by server-5.bemta-14.messagelabs.com id
	9B/8D-26413-B919B335; Wed, 02 Apr 2014 04:27:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1396412825!5666762!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30005 invoked from network); 2 Apr 2014 04:27:06 -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;
	2 Apr 2014 04:27: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 1WVClV-0000hW-A5
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClV-0000Nc-8h
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:05 +0000
Date: Wed, 02 Apr 2014 04:27:05 +0000
Message-Id: <E1WVClV-0000Nc-8h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] fix sed usage in build rules
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="===============8093685134547397148=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============8093685134547397148==
Content-Type: text/plain

commit 3be448811f3702a5b52a21d0a55683c018122759
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 1 18:21:43 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 18:21:43 2014 +0200

    fix sed usage in build rules
    
    Apparently FreeBSD sed is more picky than GNU sed, wanting a semicolon
    at the end of a brace enclosed statement list.
    
    Reported-by: Roger Pau Monné<roger.pau@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/Rules.mk                 |    2 +-
 xen/arch/x86/boot/build32.mk |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 42c713f..b0d4634 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -170,7 +170,7 @@ SPECIAL_DATA_SECTIONS := rodata $(foreach n,1 2 4 8,rodata.str1.$(n)) \
 			 $(foreach r,rel rel.ro,data.$(r) data.$(r).local)
 
 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o Makefile
-	$(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p}' | while read idx name sz rest; do \
+	$(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx name sz rest; do \
 		case "$$name" in \
 		.text|.text.*|.data|.data.*|.bss) \
 			test $$sz != 0 || continue; \
diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk
index a2d4b34..a36f620 100644
--- a/xen/arch/x86/boot/build32.mk
+++ b/xen/arch/x86/boot/build32.mk
@@ -20,7 +20,7 @@ CFLAGS := $(filter-out -flto,$(CFLAGS))
 
 %.o: %.c
 	$(CC) $(CFLAGS) -c -fpic $< -o $@
-	$(OBJDUMP) -h $@ | sed -n '/[0-9]/{s,00*,0,g;p}' |\
+	$(OBJDUMP) -h $@ | sed -n '/[0-9]/{s,00*,0,g;p;}' |\
 		while read idx name sz rest; do \
 			case "$$name" in \
 			.data|.data.*|.rodata|.rodata.*|.bss|.bss.*) \
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============8093685134547397148==
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
--===============8093685134547397148==--

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:27:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:27: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 1WVClj-0007Tt-H0; Wed, 02 Apr 2014 04:27:19 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCli-0007TY-9A
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:18 +0000
Received: from [193.109.254.147:28480] by server-6.bemta-14.messagelabs.com id
	97/D9-13066-5A19B335; Wed, 02 Apr 2014 04:27:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1396412835!5625027!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19455 invoked from network); 2 Apr 2014 04:27:16 -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;
	2 Apr 2014 04:27:16 -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 1WVClf-0000hf-Fo
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClf-0000O1-ES
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:15 +0000
Date: Wed, 02 Apr 2014 04:27:15 +0000
Message-Id: <E1WVClf-0000O1-ES@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] evtchn: rearrange fields
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 fd17ce9bb46f859853a4f2e8c48b2e537906a4d5
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Tue Apr 1 18:22:40 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 18:22:40 2014 +0200

    evtchn: rearrange fields
    
    Event channel arrays are allocated in blocks with EVTCHNS_PER_BUCKET
    elements, which must be a power of 2.  When XSM is disabled, struct
    evtchn is 32 bytes including padding; however, when XSM is enabled, the
    structure becomes larger and EVTCHNS_PER_BUCKET is halved.  Rearranging
    some of the fields in struct evtchn allows a 4-byte XSM field to fit
    within the 32-byte structure.
    
    This rearrangement turns the xen_consumer field of struct evtchn into a
    bitfield and adjusts the xen_consumers array to fit the number of
    addressable elements from this value.  Since there are currently only
    two users of this array, only 3 bits (7 values) are reserved.  This
    field is also used rarely enough that the slight overhead from applying
    a bitmask should not cause problems.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/event_channel.c |    2 +-
 xen/include/xen/sched.h    |    9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index db952af..83bc7df 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -59,7 +59,7 @@
  * with a pointer, we stash them dynamically in a small lookup array which
  * can be indexed by a small integer.
  */
-static xen_event_channel_notification_t xen_consumers[8];
+static xen_event_channel_notification_t xen_consumers[NR_XEN_CONSUMERS];
 
 /* Default notification action: wake up from wait_on_xen_event_channel(). */
 static void default_xen_notification_fn(struct vcpu *v, unsigned int port)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index b9ba379..94c7db3 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -68,6 +68,9 @@ extern struct domain *dom0;
 #define EVTCHNS_PER_GROUP  (BUCKETS_PER_GROUP * EVTCHNS_PER_BUCKET)
 #define NR_EVTCHN_GROUPS   DIV_ROUND_UP(MAX_NR_EVTCHNS, EVTCHNS_PER_GROUP)
 
+#define XEN_CONSUMER_BITS 3
+#define NR_XEN_CONSUMERS ((1 << XEN_CONSUMER_BITS) - 1)
+
 struct evtchn
 {
 #define ECS_FREE         0 /* Channel is available for use.                  */
@@ -78,7 +81,8 @@ struct evtchn
 #define ECS_VIRQ         5 /* Channel is bound to a virtual IRQ line.        */
 #define ECS_IPI          6 /* Channel is bound to a virtual IPI line.        */
     u8  state;             /* ECS_* */
-    u8  xen_consumer;      /* Consumer in Xen, if any? (0 = send to guest) */
+    u8  xen_consumer:XEN_CONSUMER_BITS; /* Consumer in Xen if nonzero */
+    u8  pending:1;
     u16 notify_vcpu_id;    /* VCPU for local delivery notification */
     u32 port;
     union {
@@ -97,9 +101,8 @@ struct evtchn
         u16 virq;      /* state == ECS_VIRQ */
     } u;
     u8 priority;
-    u8 pending:1;
-    u16 last_vcpu_id;
     u8 last_priority;
+    u16 last_vcpu_id;
 #ifdef XSM_ENABLE
     union {
 #ifdef XSM_NEED_GENERIC_EVTCHN_SSID
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:27:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:27: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 1WVClj-0007Tt-H0; Wed, 02 Apr 2014 04:27:19 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCli-0007TY-9A
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:18 +0000
Received: from [193.109.254.147:28480] by server-6.bemta-14.messagelabs.com id
	97/D9-13066-5A19B335; Wed, 02 Apr 2014 04:27:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1396412835!5625027!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19455 invoked from network); 2 Apr 2014 04:27:16 -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;
	2 Apr 2014 04:27:16 -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 1WVClf-0000hf-Fo
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClf-0000O1-ES
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:15 +0000
Date: Wed, 02 Apr 2014 04:27:15 +0000
Message-Id: <E1WVClf-0000O1-ES@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] evtchn: rearrange fields
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 fd17ce9bb46f859853a4f2e8c48b2e537906a4d5
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Tue Apr 1 18:22:40 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 18:22:40 2014 +0200

    evtchn: rearrange fields
    
    Event channel arrays are allocated in blocks with EVTCHNS_PER_BUCKET
    elements, which must be a power of 2.  When XSM is disabled, struct
    evtchn is 32 bytes including padding; however, when XSM is enabled, the
    structure becomes larger and EVTCHNS_PER_BUCKET is halved.  Rearranging
    some of the fields in struct evtchn allows a 4-byte XSM field to fit
    within the 32-byte structure.
    
    This rearrangement turns the xen_consumer field of struct evtchn into a
    bitfield and adjusts the xen_consumers array to fit the number of
    addressable elements from this value.  Since there are currently only
    two users of this array, only 3 bits (7 values) are reserved.  This
    field is also used rarely enough that the slight overhead from applying
    a bitmask should not cause problems.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/event_channel.c |    2 +-
 xen/include/xen/sched.h    |    9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index db952af..83bc7df 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -59,7 +59,7 @@
  * with a pointer, we stash them dynamically in a small lookup array which
  * can be indexed by a small integer.
  */
-static xen_event_channel_notification_t xen_consumers[8];
+static xen_event_channel_notification_t xen_consumers[NR_XEN_CONSUMERS];
 
 /* Default notification action: wake up from wait_on_xen_event_channel(). */
 static void default_xen_notification_fn(struct vcpu *v, unsigned int port)
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index b9ba379..94c7db3 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -68,6 +68,9 @@ extern struct domain *dom0;
 #define EVTCHNS_PER_GROUP  (BUCKETS_PER_GROUP * EVTCHNS_PER_BUCKET)
 #define NR_EVTCHN_GROUPS   DIV_ROUND_UP(MAX_NR_EVTCHNS, EVTCHNS_PER_GROUP)
 
+#define XEN_CONSUMER_BITS 3
+#define NR_XEN_CONSUMERS ((1 << XEN_CONSUMER_BITS) - 1)
+
 struct evtchn
 {
 #define ECS_FREE         0 /* Channel is available for use.                  */
@@ -78,7 +81,8 @@ struct evtchn
 #define ECS_VIRQ         5 /* Channel is bound to a virtual IRQ line.        */
 #define ECS_IPI          6 /* Channel is bound to a virtual IPI line.        */
     u8  state;             /* ECS_* */
-    u8  xen_consumer;      /* Consumer in Xen, if any? (0 = send to guest) */
+    u8  xen_consumer:XEN_CONSUMER_BITS; /* Consumer in Xen if nonzero */
+    u8  pending:1;
     u16 notify_vcpu_id;    /* VCPU for local delivery notification */
     u32 port;
     union {
@@ -97,9 +101,8 @@ struct evtchn
         u16 virq;      /* state == ECS_VIRQ */
     } u;
     u8 priority;
-    u8 pending:1;
-    u16 last_vcpu_id;
     u8 last_priority;
+    u16 last_vcpu_id;
 #ifdef XSM_ENABLE
     union {
 #ifdef XSM_NEED_GENERIC_EVTCHN_SSID
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:27:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:27: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 1WVClt-0007VU-Jj; Wed, 02 Apr 2014 04:27:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCls-0007VH-7U
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:28 +0000
Received: from [193.109.254.147:39074] by server-1.bemta-14.messagelabs.com id
	CA/B0-00839-FA19B335; Wed, 02 Apr 2014 04:27:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1396412845!5677052!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27735 invoked from network); 2 Apr 2014 04:27: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;
	2 Apr 2014 04:27:26 -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 1WVClp-0000hl-MN
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClp-0000OO-K7
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:25 +0000
Date: Wed, 02 Apr 2014 04:27:25 +0000
Message-Id: <E1WVClp-0000OO-K7@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] crypto: rijndael: fix compilation with
	Clang 3.5
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 836b363c55d4f3b2b9994a42d33cbbe09a024961
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Apr 1 18:24:43 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 18:24:43 2014 +0200

    crypto: rijndael: fix compilation with Clang 3.5
    
    Td0, Td1, Td2, Td3, Td4 are only used when NEED_RIJNDAEL is defined.
    
    rijndael.c:383:18: error: unused variable 'Td0' [-Werror,-Wunused-const-variable]
    static const u32 Td0[256] = {
                     ^
    rijndael.c:449:18: error: unused variable 'Td1' [-Werror,-Wunused-const-variable]
    static const u32 Td1[256] = {
                     ^
    rijndael.c:515:18: error: unused variable 'Td2' [-Werror,-Wunused-const-variable]
    static const u32 Td2[256] = {
                     ^
    rijndael.c:581:18: error: unused variable 'Td3' [-Werror,-Wunused-const-variable]
    static const u32 Td3[256] = {
                     ^
    rijndael.c:647:18: error: unused variable 'Td4' [-Werror,-Wunused-const-variable]
    static const u32 Td4[256] = {
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/crypto/rijndael.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/xen/crypto/rijndael.c b/xen/crypto/rijndael.c
index b7cd0d1..9de0992 100644
--- a/xen/crypto/rijndael.c
+++ b/xen/crypto/rijndael.c
@@ -380,6 +380,8 @@ static const u32 Te4[256] = {
     0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU,
     0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U,
 };
+
+#ifdef NEED_RIJNDAEL_DECRYPT
 static const u32 Td0[256] = {
     0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U,
     0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U,
@@ -710,6 +712,7 @@ static const u32 Td4[256] = {
     0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U,
     0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU,
 };
+#endif
 static const u32 rcon[] = {
 	0x01000000, 0x02000000, 0x04000000, 0x08000000,
 	0x10000000, 0x20000000, 0x40000000, 0x80000000,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 02 04:27:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 02 Apr 2014 04:27: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 1WVClt-0007VU-Jj; Wed, 02 Apr 2014 04:27:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVCls-0007VH-7U
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:28 +0000
Received: from [193.109.254.147:39074] by server-1.bemta-14.messagelabs.com id
	CA/B0-00839-FA19B335; Wed, 02 Apr 2014 04:27:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1396412845!5677052!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27735 invoked from network); 2 Apr 2014 04:27: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;
	2 Apr 2014 04:27:26 -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 1WVClp-0000hl-MN
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVClp-0000OO-K7
	for xen-changelog@lists.xensource.com; Wed, 02 Apr 2014 04:27:25 +0000
Date: Wed, 02 Apr 2014 04:27:25 +0000
Message-Id: <E1WVClp-0000OO-K7@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] crypto: rijndael: fix compilation with
	Clang 3.5
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 836b363c55d4f3b2b9994a42d33cbbe09a024961
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Tue Apr 1 18:24:43 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 1 18:24:43 2014 +0200

    crypto: rijndael: fix compilation with Clang 3.5
    
    Td0, Td1, Td2, Td3, Td4 are only used when NEED_RIJNDAEL is defined.
    
    rijndael.c:383:18: error: unused variable 'Td0' [-Werror,-Wunused-const-variable]
    static const u32 Td0[256] = {
                     ^
    rijndael.c:449:18: error: unused variable 'Td1' [-Werror,-Wunused-const-variable]
    static const u32 Td1[256] = {
                     ^
    rijndael.c:515:18: error: unused variable 'Td2' [-Werror,-Wunused-const-variable]
    static const u32 Td2[256] = {
                     ^
    rijndael.c:581:18: error: unused variable 'Td3' [-Werror,-Wunused-const-variable]
    static const u32 Td3[256] = {
                     ^
    rijndael.c:647:18: error: unused variable 'Td4' [-Werror,-Wunused-const-variable]
    static const u32 Td4[256] = {
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/crypto/rijndael.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/xen/crypto/rijndael.c b/xen/crypto/rijndael.c
index b7cd0d1..9de0992 100644
--- a/xen/crypto/rijndael.c
+++ b/xen/crypto/rijndael.c
@@ -380,6 +380,8 @@ static const u32 Te4[256] = {
     0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU,
     0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U,
 };
+
+#ifdef NEED_RIJNDAEL_DECRYPT
 static const u32 Td0[256] = {
     0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U,
     0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U,
@@ -710,6 +712,7 @@ static const u32 Td4[256] = {
     0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U,
     0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU,
 };
+#endif
 static const u32 rcon[] = {
 	0x01000000, 0x02000000, 0x04000000, 0x08000000,
 	0x10000000, 0x20000000, 0x40000000, 0x80000000,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 01:44:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 01:44: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 1WVWhL-00074T-HP; Thu, 03 Apr 2014 01:44:07 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhK-00074O-Jx
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:06 +0000
Received: from [193.109.254.147:58937] by server-14.bemta-14.messagelabs.com
	id 50/AC-08195-5ECBC335; Thu, 03 Apr 2014 01:44:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1396489444!5912470!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25865 invoked from network); 3 Apr 2014 01:44:05 -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;
	3 Apr 2014 01:44:05 -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 1WVWhH-0005Xv-SP
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhH-0007AB-Dw
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:03 +0000
Date: Thu, 03 Apr 2014 01:44:03 +0000
Message-Id: <E1WVWhH-0007AB-Dw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] ns16550: setup default lsr_mask for DT
	systems 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

commit 5674cfe0abdba85dda5fb7fa2e96ecda639f6820
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 11:55:54 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 2 14:08:25 2014 +0100

    ns16550: setup default lsr_mask for DT systems too
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Tested-By: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
    Tested-By: Chen Baozi <baozich@gmail.com>
    Cc: keir@xen.org
---
 xen/drivers/char/ns16550.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 429d786..2dd32b2 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1129,6 +1129,8 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
     uart->stop_bits = 1;
     /* Default is no transmit FIFO. */
     uart->fifo_size = 1;
+    /* Default lsr_mask = UART_LSR_THRE */
+    uart->lsr_mask = UART_LSR_THRE;
 
     res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
     if ( res )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 01:44:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 01:44: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 1WVWhL-00074T-HP; Thu, 03 Apr 2014 01:44:07 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhK-00074O-Jx
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:06 +0000
Received: from [193.109.254.147:58937] by server-14.bemta-14.messagelabs.com
	id 50/AC-08195-5ECBC335; Thu, 03 Apr 2014 01:44:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1396489444!5912470!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25865 invoked from network); 3 Apr 2014 01:44:05 -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;
	3 Apr 2014 01:44:05 -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 1WVWhH-0005Xv-SP
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhH-0007AB-Dw
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:03 +0000
Date: Thu, 03 Apr 2014 01:44:03 +0000
Message-Id: <E1WVWhH-0007AB-Dw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] ns16550: setup default lsr_mask for DT
	systems 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

commit 5674cfe0abdba85dda5fb7fa2e96ecda639f6820
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 11:55:54 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 2 14:08:25 2014 +0100

    ns16550: setup default lsr_mask for DT systems too
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Tested-By: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
    Tested-By: Chen Baozi <baozich@gmail.com>
    Cc: keir@xen.org
---
 xen/drivers/char/ns16550.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 429d786..2dd32b2 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1129,6 +1129,8 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
     uart->stop_bits = 1;
     /* Default is no transmit FIFO. */
     uart->fifo_size = 1;
+    /* Default lsr_mask = UART_LSR_THRE */
+    uart->lsr_mask = UART_LSR_THRE;
 
     res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
     if ( res )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 01:44:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 01:44: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 1WVWhW-000751-LS; Thu, 03 Apr 2014 01:44:18 +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 1WVWhU-00074r-Te
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:17 +0000
Received: from [85.158.143.35:62055] by server-1.bemta-4.messagelabs.com id
	3E/7D-09853-0FCBC335; Thu, 03 Apr 2014 01:44:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1396489454!6624934!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30522 invoked from network); 3 Apr 2014 01:44:15 -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;
	3 Apr 2014 01:44:15 -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 1WVWhS-0005Y1-1f
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhS-0007Ad-0b
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:14 +0000
Date: Thu, 03 Apr 2014 01:44:14 +0000
Message-Id: <E1WVWhS-0007Ad-0b@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] ns16550: make some initialisation
	common
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 a0eddd939d6e11e71a6fbfe4fe8329fd80194275
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 11:55:55 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 2 14:08:25 2014 +0100

    ns16550: make some initialisation common
    
    Should avoid accidents like forgetting to init lsr_mask for DT devices in the
    future.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Keir Fraser <keir@xen.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/char/ns16550.c |   35 +++++++++++++++++++----------------
 1 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 2dd32b2..44e13b7 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1076,6 +1076,21 @@ static void __init ns16550_parse_port_config(
     serial_register_uart(uart - ns16550_com, &ns16550_driver, uart);
 }
 
+static void ns16550_init_common(struct ns16550 *uart)
+{
+    uart->clock_hz  = UART_CLOCK_HZ;
+
+#ifdef HAS_PCI
+    uart->enable_ro = 0;
+#endif
+
+    /* Default is no transmit FIFO. */
+    uart->fifo_size = 1;
+
+    /* Default lsr_mask = UART_LSR_THRE */
+    uart->lsr_mask  = UART_LSR_THRE;
+}
+
 void __init ns16550_init(int index, struct ns16550_defaults *defaults)
 {
     struct ns16550 *uart;
@@ -1085,10 +1100,11 @@ void __init ns16550_init(int index, struct ns16550_defaults *defaults)
 
     uart = &ns16550_com[index];
 
+    ns16550_init_common(uart);
+
     uart->baud      = (defaults->baud ? :
                        console_has((index == 0) ? "com1" : "com2")
                        ? BAUD_AUTO : 0);
-    uart->clock_hz  = UART_CLOCK_HZ;
     uart->data_bits = defaults->data_bits;
     uart->parity    = parse_parity_char(defaults->parity);
     uart->stop_bits = defaults->stop_bits;
@@ -1098,16 +1114,6 @@ void __init ns16550_init(int index, struct ns16550_defaults *defaults)
     uart->reg_width = 1;
     uart->reg_shift = 0;
 
-#ifdef HAS_PCI
-    uart->enable_ro = 0;
-#endif
-
-    /* Default is no transmit FIFO. */
-    uart->fifo_size = 1;
-
-    /* Default lsr_mask = UART_LSR_THRE */
-    uart->lsr_mask = UART_LSR_THRE;
-
     ns16550_parse_port_config(uart, (index == 0) ? opt_com1 : opt_com2);
 }
 
@@ -1122,15 +1128,12 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
 
     uart = &ns16550_com[0];
 
+    ns16550_init_common(uart);
+
     uart->baud      = BAUD_AUTO;
-    uart->clock_hz  = UART_CLOCK_HZ;
     uart->data_bits = 8;
     uart->parity    = UART_PARITY_NONE;
     uart->stop_bits = 1;
-    /* Default is no transmit FIFO. */
-    uart->fifo_size = 1;
-    /* Default lsr_mask = UART_LSR_THRE */
-    uart->lsr_mask = UART_LSR_THRE;
 
     res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
     if ( res )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 01:44:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 01:44: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 1WVWhW-000751-LS; Thu, 03 Apr 2014 01:44:18 +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 1WVWhU-00074r-Te
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:17 +0000
Received: from [85.158.143.35:62055] by server-1.bemta-4.messagelabs.com id
	3E/7D-09853-0FCBC335; Thu, 03 Apr 2014 01:44:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1396489454!6624934!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30522 invoked from network); 3 Apr 2014 01:44:15 -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;
	3 Apr 2014 01:44:15 -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 1WVWhS-0005Y1-1f
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhS-0007Ad-0b
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:14 +0000
Date: Thu, 03 Apr 2014 01:44:14 +0000
Message-Id: <E1WVWhS-0007Ad-0b@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] ns16550: make some initialisation
	common
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 a0eddd939d6e11e71a6fbfe4fe8329fd80194275
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 11:55:55 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 2 14:08:25 2014 +0100

    ns16550: make some initialisation common
    
    Should avoid accidents like forgetting to init lsr_mask for DT devices in the
    future.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Keir Fraser <keir@xen.org>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/char/ns16550.c |   35 +++++++++++++++++++----------------
 1 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 2dd32b2..44e13b7 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1076,6 +1076,21 @@ static void __init ns16550_parse_port_config(
     serial_register_uart(uart - ns16550_com, &ns16550_driver, uart);
 }
 
+static void ns16550_init_common(struct ns16550 *uart)
+{
+    uart->clock_hz  = UART_CLOCK_HZ;
+
+#ifdef HAS_PCI
+    uart->enable_ro = 0;
+#endif
+
+    /* Default is no transmit FIFO. */
+    uart->fifo_size = 1;
+
+    /* Default lsr_mask = UART_LSR_THRE */
+    uart->lsr_mask  = UART_LSR_THRE;
+}
+
 void __init ns16550_init(int index, struct ns16550_defaults *defaults)
 {
     struct ns16550 *uart;
@@ -1085,10 +1100,11 @@ void __init ns16550_init(int index, struct ns16550_defaults *defaults)
 
     uart = &ns16550_com[index];
 
+    ns16550_init_common(uart);
+
     uart->baud      = (defaults->baud ? :
                        console_has((index == 0) ? "com1" : "com2")
                        ? BAUD_AUTO : 0);
-    uart->clock_hz  = UART_CLOCK_HZ;
     uart->data_bits = defaults->data_bits;
     uart->parity    = parse_parity_char(defaults->parity);
     uart->stop_bits = defaults->stop_bits;
@@ -1098,16 +1114,6 @@ void __init ns16550_init(int index, struct ns16550_defaults *defaults)
     uart->reg_width = 1;
     uart->reg_shift = 0;
 
-#ifdef HAS_PCI
-    uart->enable_ro = 0;
-#endif
-
-    /* Default is no transmit FIFO. */
-    uart->fifo_size = 1;
-
-    /* Default lsr_mask = UART_LSR_THRE */
-    uart->lsr_mask = UART_LSR_THRE;
-
     ns16550_parse_port_config(uart, (index == 0) ? opt_com1 : opt_com2);
 }
 
@@ -1122,15 +1128,12 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
 
     uart = &ns16550_com[0];
 
+    ns16550_init_common(uart);
+
     uart->baud      = BAUD_AUTO;
-    uart->clock_hz  = UART_CLOCK_HZ;
     uart->data_bits = 8;
     uart->parity    = UART_PARITY_NONE;
     uart->stop_bits = 1;
-    /* Default is no transmit FIFO. */
-    uart->fifo_size = 1;
-    /* Default lsr_mask = UART_LSR_THRE */
-    uart->lsr_mask = UART_LSR_THRE;
 
     res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
     if ( res )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 01:44:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 01:44: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 1WVWhg-00076O-O6; Thu, 03 Apr 2014 01:44:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhf-00075z-0h
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:27 +0000
Received: from [193.109.254.147:47119] by server-16.bemta-14.messagelabs.com
	id 6B/A7-16986-AFCBC335; Thu, 03 Apr 2014 01:44:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1396489464!5182807!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17446 invoked from network); 3 Apr 2014 01:44:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	3 Apr 2014 01:44:25 -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 1WVWhc-0005Y8-81
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhc-0007BZ-5s
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:24 +0000
Date: Thu, 03 Apr 2014 01:44:24 +0000
Message-Id: <E1WVWhc-0007BZ-5s@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Merge branch 'staging' of
	ssh://xenbits.xen.org/home/xen/git/xen into staging
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 30e3704323949387a8a52a4521e09f3279953732
Merge: a0eddd939d6e11e71a6fbfe4fe8329fd80194275 836b363c55d4f3b2b9994a42d33cbbe09a024961
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 2 14:15:56 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 2 14:15:56 2014 +0100

    Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into staging

 xen/Rules.mk                 |    2 +-
 xen/arch/x86/boot/build32.mk |    2 +-
 xen/arch/x86/hvm/vmx/vmx.c   |    5 +++++
 xen/common/cpupool.c         |    2 +-
 xen/common/event_channel.c   |    2 +-
 xen/common/kimage.c          |    1 +
 xen/crypto/rijndael.c        |    3 +++
 xen/include/Makefile         |    4 ++--
 xen/include/xen/sched.h      |    9 ++++++---
 9 files changed, 21 insertions(+), 9 deletions(-)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 01:44:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 01:44: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 1WVWhg-00076O-O6; Thu, 03 Apr 2014 01:44:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhf-00075z-0h
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:27 +0000
Received: from [193.109.254.147:47119] by server-16.bemta-14.messagelabs.com
	id 6B/A7-16986-AFCBC335; Thu, 03 Apr 2014 01:44:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1396489464!5182807!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17446 invoked from network); 3 Apr 2014 01:44:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	3 Apr 2014 01:44:25 -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 1WVWhc-0005Y8-81
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhc-0007BZ-5s
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:24 +0000
Date: Thu, 03 Apr 2014 01:44:24 +0000
Message-Id: <E1WVWhc-0007BZ-5s@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Merge branch 'staging' of
	ssh://xenbits.xen.org/home/xen/git/xen into staging
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 30e3704323949387a8a52a4521e09f3279953732
Merge: a0eddd939d6e11e71a6fbfe4fe8329fd80194275 836b363c55d4f3b2b9994a42d33cbbe09a024961
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 2 14:15:56 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 2 14:15:56 2014 +0100

    Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into staging

 xen/Rules.mk                 |    2 +-
 xen/arch/x86/boot/build32.mk |    2 +-
 xen/arch/x86/hvm/vmx/vmx.c   |    5 +++++
 xen/common/cpupool.c         |    2 +-
 xen/common/event_channel.c   |    2 +-
 xen/common/kimage.c          |    1 +
 xen/crypto/rijndael.c        |    3 +++
 xen/include/Makefile         |    4 ++--
 xen/include/xen/sched.h      |    9 ++++++---
 9 files changed, 21 insertions(+), 9 deletions(-)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 01:44:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 01:44:40 +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 1WVWhq-00077c-Qq; Thu, 03 Apr 2014 01:44: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 1WVWho-00077F-W7
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:37 +0000
Received: from [85.158.143.35:55365] by server-2.bemta-4.messagelabs.com id
	EC/0E-06539-40DBC335; Thu, 03 Apr 2014 01:44:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1396489474!5882303!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11201 invoked from network); 3 Apr 2014 01:44:35 -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;
	3 Apr 2014 01:44:35 -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 1WVWhm-0005YI-Ce
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhm-0007C1-Aj
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:34 +0000
Date: Thu, 03 Apr 2014 01:44:34 +0000
Message-Id: <E1WVWhm-0007C1-Aj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] common/domctl: some functions are only
	used internally
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 b205e6f314c84bdbf506c44b24af103c61fbbf17
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Apr 2 17:46:35 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 2 17:46:35 2014 +0200

    common/domctl: some functions are only used internally
    
    The list of function above are only used internally in common/domctl.c.
        - bitmap_to_xenctl_bitmap
        - xenctl_bitmap_to_bitmap
        - nodemask_to_xenctl_bitmap
        - xenctl_bitmap_to_nodemask
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/domctl.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 7cf610a..5342e5d 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -33,9 +33,9 @@
 static DEFINE_SPINLOCK(domctl_lock);
 DEFINE_SPINLOCK(vcpu_alloc_lock);
 
-int bitmap_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_bitmap,
-                            const unsigned long *bitmap,
-                            unsigned int nbits)
+static int bitmap_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_bitmap,
+                                   const unsigned long *bitmap,
+                                   unsigned int nbits)
 {
     unsigned int guest_bytes, copy_bytes, i;
     uint8_t zero = 0;
@@ -63,9 +63,9 @@ int bitmap_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_bitmap,
     return err;
 }
 
-int xenctl_bitmap_to_bitmap(unsigned long *bitmap,
-                            const struct xenctl_bitmap *xenctl_bitmap,
-                            unsigned int nbits)
+static int xenctl_bitmap_to_bitmap(unsigned long *bitmap,
+                                   const struct xenctl_bitmap *xenctl_bitmap,
+                                   unsigned int nbits)
 {
     unsigned int guest_bytes, copy_bytes;
     int err = 0;
@@ -118,15 +118,15 @@ int xenctl_bitmap_to_cpumask(cpumask_var_t *cpumask,
     return err;
 }
 
-int nodemask_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_nodemap,
-                              const nodemask_t *nodemask)
+static int nodemask_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_nodemap,
+                                     const nodemask_t *nodemask)
 {
     return bitmap_to_xenctl_bitmap(xenctl_nodemap, nodes_addr(*nodemask),
                                    MAX_NUMNODES);
 }
 
-int xenctl_bitmap_to_nodemask(nodemask_t *nodemask,
-                              const struct xenctl_bitmap *xenctl_nodemap)
+static int xenctl_bitmap_to_nodemask(nodemask_t *nodemask,
+                                     const struct xenctl_bitmap *xenctl_nodemap)
 {
     return xenctl_bitmap_to_bitmap(nodes_addr(*nodemask), xenctl_nodemap,
                                    MAX_NUMNODES);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 01:44:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 01:44:40 +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 1WVWhq-00077c-Qq; Thu, 03 Apr 2014 01:44: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 1WVWho-00077F-W7
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:37 +0000
Received: from [85.158.143.35:55365] by server-2.bemta-4.messagelabs.com id
	EC/0E-06539-40DBC335; Thu, 03 Apr 2014 01:44:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1396489474!5882303!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11201 invoked from network); 3 Apr 2014 01:44:35 -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;
	3 Apr 2014 01:44:35 -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 1WVWhm-0005YI-Ce
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVWhm-0007C1-Aj
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 01:44:34 +0000
Date: Thu, 03 Apr 2014 01:44:34 +0000
Message-Id: <E1WVWhm-0007C1-Aj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] common/domctl: some functions are only
	used internally
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 b205e6f314c84bdbf506c44b24af103c61fbbf17
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Apr 2 17:46:35 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 2 17:46:35 2014 +0200

    common/domctl: some functions are only used internally
    
    The list of function above are only used internally in common/domctl.c.
        - bitmap_to_xenctl_bitmap
        - xenctl_bitmap_to_bitmap
        - nodemask_to_xenctl_bitmap
        - xenctl_bitmap_to_nodemask
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/domctl.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 7cf610a..5342e5d 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -33,9 +33,9 @@
 static DEFINE_SPINLOCK(domctl_lock);
 DEFINE_SPINLOCK(vcpu_alloc_lock);
 
-int bitmap_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_bitmap,
-                            const unsigned long *bitmap,
-                            unsigned int nbits)
+static int bitmap_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_bitmap,
+                                   const unsigned long *bitmap,
+                                   unsigned int nbits)
 {
     unsigned int guest_bytes, copy_bytes, i;
     uint8_t zero = 0;
@@ -63,9 +63,9 @@ int bitmap_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_bitmap,
     return err;
 }
 
-int xenctl_bitmap_to_bitmap(unsigned long *bitmap,
-                            const struct xenctl_bitmap *xenctl_bitmap,
-                            unsigned int nbits)
+static int xenctl_bitmap_to_bitmap(unsigned long *bitmap,
+                                   const struct xenctl_bitmap *xenctl_bitmap,
+                                   unsigned int nbits)
 {
     unsigned int guest_bytes, copy_bytes;
     int err = 0;
@@ -118,15 +118,15 @@ int xenctl_bitmap_to_cpumask(cpumask_var_t *cpumask,
     return err;
 }
 
-int nodemask_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_nodemap,
-                              const nodemask_t *nodemask)
+static int nodemask_to_xenctl_bitmap(struct xenctl_bitmap *xenctl_nodemap,
+                                     const nodemask_t *nodemask)
 {
     return bitmap_to_xenctl_bitmap(xenctl_nodemap, nodes_addr(*nodemask),
                                    MAX_NUMNODES);
 }
 
-int xenctl_bitmap_to_nodemask(nodemask_t *nodemask,
-                              const struct xenctl_bitmap *xenctl_nodemap)
+static int xenctl_bitmap_to_nodemask(nodemask_t *nodemask,
+                                     const struct xenctl_bitmap *xenctl_nodemap)
 {
     return xenctl_bitmap_to_bitmap(nodes_addr(*nodemask), xenctl_nodemap,
                                    MAX_NUMNODES);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 19:22:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 19: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 1WVnDC-0003iN-LV; Thu, 03 Apr 2014 19:22:06 +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 1WVnDB-0003iI-9T
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 19:22:05 +0000
Received: from [85.158.143.35:53810] by server-3.bemta-4.messagelabs.com id
	04/F1-13602-CD4BD335; Thu, 03 Apr 2014 19:22:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1396552923!6828704!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20564 invoked from network); 3 Apr 2014 19:22: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;
	3 Apr 2014 19:22: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 1WVnD8-0001WL-UK
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 19:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVnD8-0006sf-MY
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 19:22:02 +0000
Date: Thu, 03 Apr 2014 19:22:02 +0000
Message-Id: <E1WVnD8-0006sf-MY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/mm: Fix compile with
	DEBUG_TRACE_DUMP turned on
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 0b17a5583ee32b4c01dae24827efbe518a696537
Author:     Aravindh Puthiyaparambil <aravindp@cisco.com>
AuthorDate: Mon Mar 31 17:32:54 2014 -0700
Commit:     Tim Deegan <tim@xen.org>
CommitDate: Thu Apr 3 10:29:50 2014 +0100

    x86/mm: Fix compile with DEBUG_TRACE_DUMP turned on
    
    Signed-off-by: Aravindh Puthiyaparambil <aravindp@cisco.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index ec08e18..13d5e76 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -422,14 +422,13 @@ int p2m_alloc_table(struct p2m_domain *p2m)
         goto error;
     p2m->defer_nested_flush = 0;
 
-    P2M_PRINTK("p2m table initialised (%u pages)\n", page_count);
+    P2M_PRINTK("p2m table initialised for slot zero\n");
     p2m_unlock(p2m);
     return 0;
 
     spin_unlock(&p2m->domain->page_alloc_lock);
  error:
-    P2M_PRINTK("failed to initialize p2m table, gfn=%05lx, mfn=%"
-               PRI_mfn "\n", gfn, mfn_x(mfn));
+    P2M_PRINTK("failed to initialise p2m table for slot zero\n");
     p2m_unlock(p2m);
     return -ENOMEM;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Thu Apr 03 19:22:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 03 Apr 2014 19: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 1WVnDC-0003iN-LV; Thu, 03 Apr 2014 19:22:06 +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 1WVnDB-0003iI-9T
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 19:22:05 +0000
Received: from [85.158.143.35:53810] by server-3.bemta-4.messagelabs.com id
	04/F1-13602-CD4BD335; Thu, 03 Apr 2014 19:22:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1396552923!6828704!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20564 invoked from network); 3 Apr 2014 19:22: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;
	3 Apr 2014 19:22: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 1WVnD8-0001WL-UK
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 19:22:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WVnD8-0006sf-MY
	for xen-changelog@lists.xensource.com; Thu, 03 Apr 2014 19:22:02 +0000
Date: Thu, 03 Apr 2014 19:22:02 +0000
Message-Id: <E1WVnD8-0006sf-MY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/mm: Fix compile with
	DEBUG_TRACE_DUMP turned on
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 0b17a5583ee32b4c01dae24827efbe518a696537
Author:     Aravindh Puthiyaparambil <aravindp@cisco.com>
AuthorDate: Mon Mar 31 17:32:54 2014 -0700
Commit:     Tim Deegan <tim@xen.org>
CommitDate: Thu Apr 3 10:29:50 2014 +0100

    x86/mm: Fix compile with DEBUG_TRACE_DUMP turned on
    
    Signed-off-by: Aravindh Puthiyaparambil <aravindp@cisco.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index ec08e18..13d5e76 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -422,14 +422,13 @@ int p2m_alloc_table(struct p2m_domain *p2m)
         goto error;
     p2m->defer_nested_flush = 0;
 
-    P2M_PRINTK("p2m table initialised (%u pages)\n", page_count);
+    P2M_PRINTK("p2m table initialised for slot zero\n");
     p2m_unlock(p2m);
     return 0;
 
     spin_unlock(&p2m->domain->page_alloc_lock);
  error:
-    P2M_PRINTK("failed to initialize p2m table, gfn=%05lx, mfn=%"
-               PRI_mfn "\n", gfn, mfn_x(mfn));
+    P2M_PRINTK("failed to initialise p2m table for slot zero\n");
     p2m_unlock(p2m);
     return -ENOMEM;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:33:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:33: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 1WWDbi-00055r-7T; Fri, 04 Apr 2014 23:33:10 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbg-00055l-IY
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:08 +0000
Received: from [85.158.137.68:48719] by server-7.bemta-3.messagelabs.com id
	D9/72-04151-3314F335; Fri, 04 Apr 2014 23:33:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1396654385!5108672!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29307 invoked from network); 4 Apr 2014 23:33:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:33: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 1WWDbc-0002s4-VS
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbc-0007zJ-It
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:04 +0000
Date: Fri, 04 Apr 2014 23:33:04 +0000
Message-Id: <E1WWDbc-0007zJ-It@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: fix preemption handling in
	do_hvm_op() (try 2)
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 e8b87b57b4dfce2fd72b0e3d8319bf4e012f962c
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Wed Apr 2 09:09:00 2014 +0100
Commit:     Tim Deegan <tim@xen.org>
CommitDate: Thu Apr 3 10:48:10 2014 +0100

    x86/HVM: fix preemption handling in do_hvm_op() (try 2)
    
    Just like previously done for some mem-op hypercalls, undo preemption
    using the interface structures (altering it in ways the caller may not
    expect) and replace it by storing the continuation point in the high
    bits of sub-operation argument.
    
    This also changes the "nr" fields of struct xen_hvm_track_dirty_vram
    (operation already limited to 1Gb worth of pages) and struct
    xen_hvm_modified_memory to be only 32 bits wide, consistent with those
    of struct xen_set_mem{type,access}. If that's not acceptable for some
    reason, we'd need to shrink the HVMOP_op_bits (while still enforcing
    the [then higher] limit resulting from the need to be able to encode
    the continuation).
    
    Whether (and if so how) to adjust xc_hvm_track_dirty_vram(),
    xc_hvm_modified_memory(), xc_hvm_set_mem_type(), and
    xc_hvm_set_mem_access() to reflect the 32-bit restriction on "nr" is
    unclear: If the APIs need to remain stable, all four functions should
    probably check that there was no truncation. Preferably their
    parameters would be changed to uint32_t or unsigned int, though.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c          |   62 ++++++++++++++++++--------------------
 xen/arch/x86/mm/p2m.c           |   13 +++-----
 xen/include/asm-x86/p2m.h       |    4 +-
 xen/include/public/hvm/hvm_op.h |    8 ++--
 4 files changed, 40 insertions(+), 47 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 5e89cf5..38c491e 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4072,13 +4072,16 @@ static int hvm_replace_event_channel(struct vcpu *v, domid_t remote_domid,
     return 0;
 }
 
+#define HVMOP_op_mask 0xff
+
 long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
 {
     struct domain *curr_d = current->domain;
+    unsigned long start_iter = op & ~HVMOP_op_mask;
     long rc = 0;
 
-    switch ( op )
+    switch ( op &= HVMOP_op_mask )
     {
     case HVMOP_set_param:
     case HVMOP_get_param:
@@ -4408,7 +4411,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail3;
 
         rc = -EINVAL;
-        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( a.nr < start_iter ||
+             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail3;
 
@@ -4416,9 +4420,9 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( !paging_mode_log_dirty(d) )
             goto param_fail3;
 
-        while ( a.nr > 0 )
+        while ( a.nr > start_iter )
         {
-            unsigned long pfn = a.first_pfn;
+            unsigned long pfn = a.first_pfn + start_iter;
             struct page_info *page;
 
             page = get_page_from_gfn(d, pfn, NULL, P2M_UNSHARE);
@@ -4431,16 +4435,11 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 put_page(page);
             }
 
-            a.first_pfn++;
-            a.nr--;
-
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > 0 && hypercall_preempt_check() )
+            if ( a.nr > ++start_iter && !(start_iter & HVMOP_op_mask) &&
+                 hypercall_preempt_check() )
             {
-                if ( __copy_to_guest(arg, &a, 1) )
-                    rc = -EFAULT;
-                else
-                    rc = -EAGAIN;
+                rc = -EAGAIN;
                 break;
             }
         }
@@ -4522,16 +4521,17 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail4;
 
         rc = -EINVAL;
-        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( a.nr < start_iter ||
+             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail4;
             
         if ( a.hvmmem_type >= ARRAY_SIZE(memtype) )
             goto param_fail4;
 
-        while ( a.nr )
+        while ( a.nr > start_iter )
         {
-            unsigned long pfn = a.first_pfn;
+            unsigned long pfn = a.first_pfn + start_iter;
             p2m_type_t t;
             p2m_type_t nt;
             mfn_t mfn;
@@ -4572,16 +4572,11 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             }
             put_gfn(d, pfn);
 
-            a.first_pfn++;
-            a.nr--;
-
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > 0 && hypercall_preempt_check() )
+            if ( a.nr > ++start_iter && !(start_iter & HVMOP_op_mask) &&
+                 hypercall_preempt_check() )
             {
-                if ( __copy_to_guest(arg, &a, 1) )
-                    rc = -EFAULT;
-                else
-                    rc = -EAGAIN;
+                rc = -EAGAIN;
                 goto param_fail4;
             }
         }
@@ -4615,19 +4610,17 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
         rc = -EINVAL;
         if ( (a.first_pfn != ~0ull) &&
-             (((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+             (a.nr < start_iter ||
+              ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
               ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
             goto param_fail5;
             
-        rc = p2m_set_mem_access(d, a.first_pfn, a.nr, a.hvmmem_access);
+        rc = p2m_set_mem_access(d, a.first_pfn, a.nr, start_iter,
+                                HVMOP_op_mask, a.hvmmem_access);
         if ( rc > 0 )
         {
-            a.first_pfn += a.nr - rc;
-            a.nr = rc;
-            if ( __copy_to_guest(arg, &a, 1) )
-                rc = -EFAULT;
-            else
-                rc = -EAGAIN;
+            start_iter = rc;
+            rc = -EAGAIN;
         }
 
     param_fail5:
@@ -4776,8 +4769,11 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     }
 
     if ( rc == -EAGAIN )
-        rc = hypercall_create_continuation(
-            __HYPERVISOR_hvm_op, "lh", op, arg);
+    {
+        ASSERT(!(start_iter & HVMOP_op_mask));
+        rc = hypercall_create_continuation(__HYPERVISOR_hvm_op, "lh",
+                                           op | start_iter, arg);
+    }
 
     return rc;
 }
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 13d5e76..fcc3ed6 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -1350,13 +1350,13 @@ void p2m_mem_access_resume(struct domain *d)
 /* Set access type for a region of pfns.
  * If start_pfn == -1ul, sets the default access type */
 long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
-                        hvmmem_access_t access)
+                        uint32_t start, uint32_t mask, hvmmem_access_t access)
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
     p2m_access_t a, _a;
     p2m_type_t t;
     mfn_t mfn;
-    long rc;
+    long rc = 0;
 
     /* N.B. _not_ static: initializer depends on p2m->default_access */
     p2m_access_t memaccess[] = {
@@ -1385,11 +1385,8 @@ long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
         return 0;
     }
 
-    if ( !nr )
-        return 0;
-
     p2m_lock(p2m);
-    for ( ; ; ++pfn )
+    for ( pfn += start; nr > start; ++pfn )
     {
         mfn = p2m->get_entry(p2m, pfn, &t, &_a, 0, NULL);
         if ( p2m->set_entry(p2m, pfn, mfn, PAGE_ORDER_4K, t, a) == 0 )
@@ -1399,9 +1396,9 @@ long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
         }
 
         /* Check for continuation if it's not the last interation. */
-        if ( !--nr || hypercall_preempt_check() )
+        if ( nr > ++start && !(start & mask) && hypercall_preempt_check() )
         {
-            rc = nr;
+            rc = start;
             break;
         }
     }
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index a2cb1b7..d644f82 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -576,8 +576,8 @@ void p2m_mem_access_resume(struct domain *d);
 
 /* Set access type for a region of pfns.
  * If start_pfn == -1ul, sets the default access type */
-long p2m_set_mem_access(struct domain *d, unsigned long start_pfn,
-                        uint32_t nr, hvmmem_access_t access);
+long p2m_set_mem_access(struct domain *d, unsigned long start_pfn, uint32_t nr,
+                        uint32_t start, uint32_t mask, hvmmem_access_t access);
 
 /* Get access type for a pfn
  * If pfn == -1ul, gets the default access type */
diff --git a/xen/include/public/hvm/hvm_op.h b/xen/include/public/hvm/hvm_op.h
index a9aab4b..3204ec4 100644
--- a/xen/include/public/hvm/hvm_op.h
+++ b/xen/include/public/hvm/hvm_op.h
@@ -90,10 +90,10 @@ typedef enum {
 struct xen_hvm_track_dirty_vram {
     /* Domain to be tracked. */
     domid_t  domid;
+    /* Number of pages to track. */
+    uint32_t nr;
     /* First pfn to track. */
     uint64_aligned_t first_pfn;
-    /* Number of pages to track. */
-    uint64_aligned_t nr;
     /* OUT variable. */
     /* Dirty bitmap buffer. */
     XEN_GUEST_HANDLE_64(uint8) dirty_bitmap;
@@ -106,10 +106,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_hvm_track_dirty_vram_t);
 struct xen_hvm_modified_memory {
     /* Domain to be updated. */
     domid_t  domid;
+    /* Number of pages. */
+    uint32_t nr;
     /* First pfn. */
     uint64_aligned_t first_pfn;
-    /* Number of pages. */
-    uint64_aligned_t nr;
 };
 typedef struct xen_hvm_modified_memory xen_hvm_modified_memory_t;
 DEFINE_XEN_GUEST_HANDLE(xen_hvm_modified_memory_t);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:33:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:33: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 1WWDbi-00055r-7T; Fri, 04 Apr 2014 23:33:10 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbg-00055l-IY
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:08 +0000
Received: from [85.158.137.68:48719] by server-7.bemta-3.messagelabs.com id
	D9/72-04151-3314F335; Fri, 04 Apr 2014 23:33:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1396654385!5108672!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29307 invoked from network); 4 Apr 2014 23:33:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:33: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 1WWDbc-0002s4-VS
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbc-0007zJ-It
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:04 +0000
Date: Fri, 04 Apr 2014 23:33:04 +0000
Message-Id: <E1WWDbc-0007zJ-It@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: fix preemption handling in
	do_hvm_op() (try 2)
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 e8b87b57b4dfce2fd72b0e3d8319bf4e012f962c
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Wed Apr 2 09:09:00 2014 +0100
Commit:     Tim Deegan <tim@xen.org>
CommitDate: Thu Apr 3 10:48:10 2014 +0100

    x86/HVM: fix preemption handling in do_hvm_op() (try 2)
    
    Just like previously done for some mem-op hypercalls, undo preemption
    using the interface structures (altering it in ways the caller may not
    expect) and replace it by storing the continuation point in the high
    bits of sub-operation argument.
    
    This also changes the "nr" fields of struct xen_hvm_track_dirty_vram
    (operation already limited to 1Gb worth of pages) and struct
    xen_hvm_modified_memory to be only 32 bits wide, consistent with those
    of struct xen_set_mem{type,access}. If that's not acceptable for some
    reason, we'd need to shrink the HVMOP_op_bits (while still enforcing
    the [then higher] limit resulting from the need to be able to encode
    the continuation).
    
    Whether (and if so how) to adjust xc_hvm_track_dirty_vram(),
    xc_hvm_modified_memory(), xc_hvm_set_mem_type(), and
    xc_hvm_set_mem_access() to reflect the 32-bit restriction on "nr" is
    unclear: If the APIs need to remain stable, all four functions should
    probably check that there was no truncation. Preferably their
    parameters would be changed to uint32_t or unsigned int, though.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/hvm/hvm.c          |   62 ++++++++++++++++++--------------------
 xen/arch/x86/mm/p2m.c           |   13 +++-----
 xen/include/asm-x86/p2m.h       |    4 +-
 xen/include/public/hvm/hvm_op.h |    8 ++--
 4 files changed, 40 insertions(+), 47 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 5e89cf5..38c491e 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -4072,13 +4072,16 @@ static int hvm_replace_event_channel(struct vcpu *v, domid_t remote_domid,
     return 0;
 }
 
+#define HVMOP_op_mask 0xff
+
 long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
 {
     struct domain *curr_d = current->domain;
+    unsigned long start_iter = op & ~HVMOP_op_mask;
     long rc = 0;
 
-    switch ( op )
+    switch ( op &= HVMOP_op_mask )
     {
     case HVMOP_set_param:
     case HVMOP_get_param:
@@ -4408,7 +4411,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail3;
 
         rc = -EINVAL;
-        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( a.nr < start_iter ||
+             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail3;
 
@@ -4416,9 +4420,9 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
         if ( !paging_mode_log_dirty(d) )
             goto param_fail3;
 
-        while ( a.nr > 0 )
+        while ( a.nr > start_iter )
         {
-            unsigned long pfn = a.first_pfn;
+            unsigned long pfn = a.first_pfn + start_iter;
             struct page_info *page;
 
             page = get_page_from_gfn(d, pfn, NULL, P2M_UNSHARE);
@@ -4431,16 +4435,11 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
                 put_page(page);
             }
 
-            a.first_pfn++;
-            a.nr--;
-
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > 0 && hypercall_preempt_check() )
+            if ( a.nr > ++start_iter && !(start_iter & HVMOP_op_mask) &&
+                 hypercall_preempt_check() )
             {
-                if ( __copy_to_guest(arg, &a, 1) )
-                    rc = -EFAULT;
-                else
-                    rc = -EAGAIN;
+                rc = -EAGAIN;
                 break;
             }
         }
@@ -4522,16 +4521,17 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             goto param_fail4;
 
         rc = -EINVAL;
-        if ( ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+        if ( a.nr < start_iter ||
+             ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
              ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
             goto param_fail4;
             
         if ( a.hvmmem_type >= ARRAY_SIZE(memtype) )
             goto param_fail4;
 
-        while ( a.nr )
+        while ( a.nr > start_iter )
         {
-            unsigned long pfn = a.first_pfn;
+            unsigned long pfn = a.first_pfn + start_iter;
             p2m_type_t t;
             p2m_type_t nt;
             mfn_t mfn;
@@ -4572,16 +4572,11 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
             }
             put_gfn(d, pfn);
 
-            a.first_pfn++;
-            a.nr--;
-
             /* Check for continuation if it's not the last interation */
-            if ( a.nr > 0 && hypercall_preempt_check() )
+            if ( a.nr > ++start_iter && !(start_iter & HVMOP_op_mask) &&
+                 hypercall_preempt_check() )
             {
-                if ( __copy_to_guest(arg, &a, 1) )
-                    rc = -EFAULT;
-                else
-                    rc = -EAGAIN;
+                rc = -EAGAIN;
                 goto param_fail4;
             }
         }
@@ -4615,19 +4610,17 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
 
         rc = -EINVAL;
         if ( (a.first_pfn != ~0ull) &&
-             (((a.first_pfn + a.nr - 1) < a.first_pfn) ||
+             (a.nr < start_iter ||
+              ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
               ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
             goto param_fail5;
             
-        rc = p2m_set_mem_access(d, a.first_pfn, a.nr, a.hvmmem_access);
+        rc = p2m_set_mem_access(d, a.first_pfn, a.nr, start_iter,
+                                HVMOP_op_mask, a.hvmmem_access);
         if ( rc > 0 )
         {
-            a.first_pfn += a.nr - rc;
-            a.nr = rc;
-            if ( __copy_to_guest(arg, &a, 1) )
-                rc = -EFAULT;
-            else
-                rc = -EAGAIN;
+            start_iter = rc;
+            rc = -EAGAIN;
         }
 
     param_fail5:
@@ -4776,8 +4769,11 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
     }
 
     if ( rc == -EAGAIN )
-        rc = hypercall_create_continuation(
-            __HYPERVISOR_hvm_op, "lh", op, arg);
+    {
+        ASSERT(!(start_iter & HVMOP_op_mask));
+        rc = hypercall_create_continuation(__HYPERVISOR_hvm_op, "lh",
+                                           op | start_iter, arg);
+    }
 
     return rc;
 }
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 13d5e76..fcc3ed6 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -1350,13 +1350,13 @@ void p2m_mem_access_resume(struct domain *d)
 /* Set access type for a region of pfns.
  * If start_pfn == -1ul, sets the default access type */
 long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
-                        hvmmem_access_t access)
+                        uint32_t start, uint32_t mask, hvmmem_access_t access)
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
     p2m_access_t a, _a;
     p2m_type_t t;
     mfn_t mfn;
-    long rc;
+    long rc = 0;
 
     /* N.B. _not_ static: initializer depends on p2m->default_access */
     p2m_access_t memaccess[] = {
@@ -1385,11 +1385,8 @@ long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
         return 0;
     }
 
-    if ( !nr )
-        return 0;
-
     p2m_lock(p2m);
-    for ( ; ; ++pfn )
+    for ( pfn += start; nr > start; ++pfn )
     {
         mfn = p2m->get_entry(p2m, pfn, &t, &_a, 0, NULL);
         if ( p2m->set_entry(p2m, pfn, mfn, PAGE_ORDER_4K, t, a) == 0 )
@@ -1399,9 +1396,9 @@ long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
         }
 
         /* Check for continuation if it's not the last interation. */
-        if ( !--nr || hypercall_preempt_check() )
+        if ( nr > ++start && !(start & mask) && hypercall_preempt_check() )
         {
-            rc = nr;
+            rc = start;
             break;
         }
     }
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index a2cb1b7..d644f82 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -576,8 +576,8 @@ void p2m_mem_access_resume(struct domain *d);
 
 /* Set access type for a region of pfns.
  * If start_pfn == -1ul, sets the default access type */
-long p2m_set_mem_access(struct domain *d, unsigned long start_pfn,
-                        uint32_t nr, hvmmem_access_t access);
+long p2m_set_mem_access(struct domain *d, unsigned long start_pfn, uint32_t nr,
+                        uint32_t start, uint32_t mask, hvmmem_access_t access);
 
 /* Get access type for a pfn
  * If pfn == -1ul, gets the default access type */
diff --git a/xen/include/public/hvm/hvm_op.h b/xen/include/public/hvm/hvm_op.h
index a9aab4b..3204ec4 100644
--- a/xen/include/public/hvm/hvm_op.h
+++ b/xen/include/public/hvm/hvm_op.h
@@ -90,10 +90,10 @@ typedef enum {
 struct xen_hvm_track_dirty_vram {
     /* Domain to be tracked. */
     domid_t  domid;
+    /* Number of pages to track. */
+    uint32_t nr;
     /* First pfn to track. */
     uint64_aligned_t first_pfn;
-    /* Number of pages to track. */
-    uint64_aligned_t nr;
     /* OUT variable. */
     /* Dirty bitmap buffer. */
     XEN_GUEST_HANDLE_64(uint8) dirty_bitmap;
@@ -106,10 +106,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_hvm_track_dirty_vram_t);
 struct xen_hvm_modified_memory {
     /* Domain to be updated. */
     domid_t  domid;
+    /* Number of pages. */
+    uint32_t nr;
     /* First pfn. */
     uint64_aligned_t first_pfn;
-    /* Number of pages. */
-    uint64_aligned_t nr;
 };
 typedef struct xen_hvm_modified_memory xen_hvm_modified_memory_t;
 DEFINE_XEN_GUEST_HANDLE(xen_hvm_modified_memory_t);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:33:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23: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 1WWDbr-00056G-C1; Fri, 04 Apr 2014 23:33:19 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbq-00056A-E3
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:18 +0000
Received: from [85.158.139.211:43704] by server-2.bemta-5.messagelabs.com id
	00/57-12074-D314F335; Fri, 04 Apr 2014 23:33:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1396654395!2668411!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18903 invoked from network); 4 Apr 2014 23:33:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:33:16 -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 1WWDbn-0002s7-Gb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbn-0007zh-51
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:15 +0000
Date: Fri, 04 Apr 2014 23:33:15 +0000
Message-Id: <E1WWDbn-0007zh-51@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: fix setting mem access to
	default
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 ca0f21841ddc4b2e2f4e4a74e2e39b70bd6b0aff
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Wed Apr 2 09:09:33 2014 +0100
Commit:     Tim Deegan <tim@xen.org>
CommitDate: Thu Apr 3 10:48:48 2014 +0100

    x86/HVM: fix setting mem access to default
    
    commit 3b0bcb89 ("x86/mm/p2m: Move p2m code in HVMOP_[gs]et_mem_access
    into p2m.c") introduced an off-by-one mistake forcing an input of
    HVMMEM_access_default to always fail. Since related, also eliminate the
    inefficient setup of an on-stack array for each function invocation.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m.c |   39 +++++++++++++++++++++++----------------
 1 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index fcc3ed6..c38f334 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -1358,25 +1358,32 @@ long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
     mfn_t mfn;
     long rc = 0;
 
-    /* N.B. _not_ static: initializer depends on p2m->default_access */
-    p2m_access_t memaccess[] = {
-        p2m_access_n,
-        p2m_access_r,
-        p2m_access_w,
-        p2m_access_rw,
-        p2m_access_x,
-        p2m_access_rx,
-        p2m_access_wx,
-        p2m_access_rwx,
-        p2m_access_rx2rw,
-        p2m_access_n2rwx,
-        p2m->default_access,
+    static const p2m_access_t memaccess[] = {
+#define ACCESS(ac) [HVMMEM_access_##ac] = p2m_access_##ac
+        ACCESS(n),
+        ACCESS(r),
+        ACCESS(w),
+        ACCESS(rw),
+        ACCESS(x),
+        ACCESS(rx),
+        ACCESS(wx),
+        ACCESS(rwx),
+        ACCESS(rx2rw),
+        ACCESS(n2rwx),
+#undef ACCESS
     };
 
-    if ( (unsigned) access >= HVMMEM_access_default )
+    switch ( access )
+    {
+    case 0 ... ARRAY_SIZE(memaccess) - 1:
+        a = memaccess[access];
+        break;
+    case HVMMEM_access_default:
+        a = p2m->default_access;
+        break;
+    default:
         return -EINVAL;
-
-    a = memaccess[access];
+    }
 
     /* If request to set default access */
     if ( pfn == ~0ul )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:33:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23: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 1WWDbr-00056G-C1; Fri, 04 Apr 2014 23:33:19 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbq-00056A-E3
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:18 +0000
Received: from [85.158.139.211:43704] by server-2.bemta-5.messagelabs.com id
	00/57-12074-D314F335; Fri, 04 Apr 2014 23:33:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1396654395!2668411!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18903 invoked from network); 4 Apr 2014 23:33:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:33:16 -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 1WWDbn-0002s7-Gb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbn-0007zh-51
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:15 +0000
Date: Fri, 04 Apr 2014 23:33:15 +0000
Message-Id: <E1WWDbn-0007zh-51@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: fix setting mem access to
	default
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 ca0f21841ddc4b2e2f4e4a74e2e39b70bd6b0aff
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Wed Apr 2 09:09:33 2014 +0100
Commit:     Tim Deegan <tim@xen.org>
CommitDate: Thu Apr 3 10:48:48 2014 +0100

    x86/HVM: fix setting mem access to default
    
    commit 3b0bcb89 ("x86/mm/p2m: Move p2m code in HVMOP_[gs]et_mem_access
    into p2m.c") introduced an off-by-one mistake forcing an input of
    HVMMEM_access_default to always fail. Since related, also eliminate the
    inefficient setup of an on-stack array for each function invocation.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m.c |   39 +++++++++++++++++++++++----------------
 1 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index fcc3ed6..c38f334 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -1358,25 +1358,32 @@ long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
     mfn_t mfn;
     long rc = 0;
 
-    /* N.B. _not_ static: initializer depends on p2m->default_access */
-    p2m_access_t memaccess[] = {
-        p2m_access_n,
-        p2m_access_r,
-        p2m_access_w,
-        p2m_access_rw,
-        p2m_access_x,
-        p2m_access_rx,
-        p2m_access_wx,
-        p2m_access_rwx,
-        p2m_access_rx2rw,
-        p2m_access_n2rwx,
-        p2m->default_access,
+    static const p2m_access_t memaccess[] = {
+#define ACCESS(ac) [HVMMEM_access_##ac] = p2m_access_##ac
+        ACCESS(n),
+        ACCESS(r),
+        ACCESS(w),
+        ACCESS(rw),
+        ACCESS(x),
+        ACCESS(rx),
+        ACCESS(wx),
+        ACCESS(rwx),
+        ACCESS(rx2rw),
+        ACCESS(n2rwx),
+#undef ACCESS
     };
 
-    if ( (unsigned) access >= HVMMEM_access_default )
+    switch ( access )
+    {
+    case 0 ... ARRAY_SIZE(memaccess) - 1:
+        a = memaccess[access];
+        break;
+    case HVMMEM_access_default:
+        a = p2m->default_access;
+        break;
+    default:
         return -EINVAL;
-
-    a = memaccess[access];
+    }
 
     /* If request to set default access */
     if ( pfn == ~0ul )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:33:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:33:42 +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 1WWDcD-00058X-HD; Fri, 04 Apr 2014 23:33:41 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcB-000584-Sf
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:40 +0000
Received: from [85.158.137.68:49310] by server-13.bemta-3.messagelabs.com id
	9E/C3-18692-3514F335; Fri, 04 Apr 2014 23:33:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1396654416!5108709!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30469 invoked from network); 4 Apr 2014 23:33:37 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:33:37 -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 1WWDc8-0002sL-Am
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDc8-00080e-5I
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:36 +0000
Date: Fri, 04 Apr 2014 23:33:36 +0000
Message-Id: <E1WWDc8-00080e-5I@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: clarify naming of the Xen
	TLB flushing functions
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 c291ecbcb9a2db39b1bba5b81b9e0ca2565794b0
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 09:59:40 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:40 2014 +0100

    xen: arm: clarify naming of the Xen TLB flushing functions
    
    All of the flush_xen_*_tlb functions operate on the local processor only. Add
    _local to the name and update the comments to clarify.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/mm.c                |   24 ++++++++++++------------
 xen/include/asm-arm/arm32/page.h |   21 +++++++++++++--------
 xen/include/asm-arm/arm64/page.h |   20 ++++++++++++--------
 3 files changed, 37 insertions(+), 28 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 3161d79..d523f77 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -215,7 +215,7 @@ void set_fixmap(unsigned map, unsigned long mfn, unsigned attributes)
     pte.pt.table = 1; /* 4k mappings always have this bit set */
     pte.pt.xn = 1;
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
-    flush_xen_data_tlb_range_va(FIXMAP_ADDR(map), PAGE_SIZE);
+    flush_xen_data_tlb_range_va_local(FIXMAP_ADDR(map), PAGE_SIZE);
 }
 
 /* Remove a mapping from a fixmap entry */
@@ -223,7 +223,7 @@ void clear_fixmap(unsigned map)
 {
     lpae_t pte = {0};
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
-    flush_xen_data_tlb_range_va(FIXMAP_ADDR(map), PAGE_SIZE);
+    flush_xen_data_tlb_range_va_local(FIXMAP_ADDR(map), PAGE_SIZE);
 }
 
 #ifdef CONFIG_DOMAIN_PAGE
@@ -301,7 +301,7 @@ void *map_domain_page(unsigned long mfn)
      * We may not have flushed this specific subpage at map time,
      * since we only flush the 4k page not the superpage
      */
-    flush_xen_data_tlb_range_va(va, PAGE_SIZE);
+    flush_xen_data_tlb_range_va_local(va, PAGE_SIZE);
 
     return (void *)va;
 }
@@ -403,7 +403,7 @@ void __init remove_early_mappings(void)
 {
     lpae_t pte = {0};
     write_pte(xen_second + second_table_offset(BOOT_FDT_VIRT_START), pte);
-    flush_xen_data_tlb_range_va(BOOT_FDT_VIRT_START, SECOND_SIZE);
+    flush_xen_data_tlb_range_va_local(BOOT_FDT_VIRT_START, SECOND_SIZE);
 }
 
 extern void relocate_xen(uint64_t ttbr, void *src, void *dst, size_t len);
@@ -421,7 +421,7 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)
     dest_va = BOOT_RELOC_VIRT_START;
     pte = mfn_to_xen_entry(xen_paddr >> PAGE_SHIFT, WRITEALLOC);
     write_pte(xen_second + second_table_offset(dest_va), pte);
-    flush_xen_data_tlb_range_va(dest_va, SECOND_SIZE);
+    flush_xen_data_tlb_range_va_local(dest_va, SECOND_SIZE);
 
     /* Calculate virt-to-phys offset for the new location */
     phys_offset = xen_paddr - (unsigned long) _start;
@@ -473,7 +473,7 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)
     dest_va = BOOT_RELOC_VIRT_START;
     pte = mfn_to_xen_entry(xen_paddr >> PAGE_SHIFT, WRITEALLOC);
     write_pte(boot_second + second_table_offset(dest_va), pte);
-    flush_xen_data_tlb_range_va(dest_va, SECOND_SIZE);
+    flush_xen_data_tlb_range_va_local(dest_va, SECOND_SIZE);
 #ifdef CONFIG_ARM_64
     ttbr = (uintptr_t) xen_pgtable + phys_offset;
 #else
@@ -521,7 +521,7 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)
     /* From now on, no mapping may be both writable and executable. */
     WRITE_SYSREG32(READ_SYSREG32(SCTLR_EL2) | SCTLR_WXN, SCTLR_EL2);
     /* Flush everything after setting WXN bit. */
-    flush_xen_text_tlb();
+    flush_xen_text_tlb_local();
 
 #ifdef CONFIG_ARM_32
     per_cpu(xen_pgtable, 0) = cpu0_pgtable;
@@ -594,7 +594,7 @@ void __cpuinit mmu_init_secondary_cpu(void)
 {
     /* From now on, no mapping may be both writable and executable. */
     WRITE_SYSREG32(READ_SYSREG32(SCTLR_EL2) | SCTLR_WXN, SCTLR_EL2);
-    flush_xen_text_tlb();
+    flush_xen_text_tlb_local();
 }
 
 /* Create Xen's mappings of memory.
@@ -622,7 +622,7 @@ static void __init create_32mb_mappings(lpae_t *second,
         write_pte(p + i, pte);
         pte.pt.base += 1 << LPAE_SHIFT;
     }
-    flush_xen_data_tlb();
+    flush_xen_data_tlb_local();
 }
 
 #ifdef CONFIG_ARM_32
@@ -701,7 +701,7 @@ void __init setup_xenheap_mappings(unsigned long base_mfn,
         vaddr += FIRST_SIZE;
     }
 
-    flush_xen_data_tlb();
+    flush_xen_data_tlb_local();
 }
 #endif
 
@@ -845,7 +845,7 @@ static int create_xen_entries(enum xenmap_operation op,
                 BUG();
         }
     }
-    flush_xen_data_tlb_range_va(virt, PAGE_SIZE * nr_mfns);
+    flush_xen_data_tlb_range_va_local(virt, PAGE_SIZE * nr_mfns);
 
     rc = 0;
 
@@ -908,7 +908,7 @@ static void set_pte_flags_on_range(const char *p, unsigned long l, enum mg mg)
         }
         write_pte(xen_xenmap + i, pte);
     }
-    flush_xen_text_tlb();
+    flush_xen_text_tlb_local();
 }
 
 /* Release all __init and __initdata ranges to be reused */
diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index 191a108..b0a2025 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -27,13 +27,15 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
 #define __clean_and_invalidate_xen_dcache_one(R) STORE_CP32(R, DCCIMVAC)
 
 /*
- * Flush all hypervisor mappings from the TLB and branch predictor.
+ * Flush all hypervisor mappings from the TLB and branch predictor of
+ * the local processor.
+ *
  * This is needed after changing Xen code mappings.
  *
  * The caller needs to issue the necessary DSB and D-cache flushes
  * before calling flush_xen_text_tlb.
  */
-static inline void flush_xen_text_tlb(void)
+static inline void flush_xen_text_tlb_local(void)
 {
     register unsigned long r0 asm ("r0");
     asm volatile (
@@ -47,10 +49,11 @@ static inline void flush_xen_text_tlb(void)
 }
 
 /*
- * Flush all hypervisor mappings from the data TLB. This is not
- * sufficient when changing code mappings or for self modifying code.
+ * Flush all hypervisor mappings from the data TLB of the local
+ * processor. This is not sufficient when changing code mappings or
+ * for self modifying code.
  */
-static inline void flush_xen_data_tlb(void)
+static inline void flush_xen_data_tlb_local(void)
 {
     register unsigned long r0 asm ("r0");
     asm volatile("dsb;" /* Ensure preceding are visible */
@@ -61,10 +64,12 @@ static inline void flush_xen_data_tlb(void)
 }
 
 /*
- * Flush a range of VA's hypervisor mappings from the data TLB. This is not
- * sufficient when changing code mappings or for self modifying code.
+ * Flush a range of VA's hypervisor mappings from the data TLB of the
+ * local processor. This is not sufficient when changing code mappings
+ * or for self modifying code.
  */
-static inline void flush_xen_data_tlb_range_va(unsigned long va, unsigned long size)
+static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
+                                                     unsigned long size)
 {
     unsigned long end = va + size;
     dsb(sy); /* Ensure preceding are visible */
diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index 20b4c5a..65332a3 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -22,13 +22,14 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
 #define __clean_and_invalidate_xen_dcache_one(R) "dc  civac, %" #R ";"
 
 /*
- * Flush all hypervisor mappings from the TLB
+ * Flush all hypervisor mappings from the TLB of the local processor.
+ *
  * This is needed after changing Xen code mappings.
  *
  * The caller needs to issue the necessary DSB and D-cache flushes
  * before calling flush_xen_text_tlb.
  */
-static inline void flush_xen_text_tlb(void)
+static inline void flush_xen_text_tlb_local(void)
 {
     asm volatile (
         "isb;"       /* Ensure synchronization with previous changes to text */
@@ -40,10 +41,11 @@ static inline void flush_xen_text_tlb(void)
 }
 
 /*
- * Flush all hypervisor mappings from the data TLB. This is not
- * sufficient when changing code mappings or for self modifying code.
+ * Flush all hypervisor mappings from the data TLB of the local
+ * processor. This is not sufficient when changing code mappings or
+ * for self modifying code.
  */
-static inline void flush_xen_data_tlb(void)
+static inline void flush_xen_data_tlb_local(void)
 {
     asm volatile (
         "dsb    sy;"                    /* Ensure visibility of PTE writes */
@@ -54,10 +56,12 @@ static inline void flush_xen_data_tlb(void)
 }
 
 /*
- * Flush a range of VA's hypervisor mappings from the data TLB. This is not
- * sufficient when changing code mappings or for self modifying code.
+ * Flush a range of VA's hypervisor mappings from the data TLB of the
+ * local processor. This is not sufficient when changing code mappings
+ * or for self modifying code.
  */
-static inline void flush_xen_data_tlb_range_va(unsigned long va, unsigned long size)
+static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
+                                                     unsigned long size)
 {
     unsigned long end = va + size;
     dsb(sy); /* Ensure preceding are visible */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:33:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:33:42 +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 1WWDcC-00058F-Ey; Fri, 04 Apr 2014 23:33:40 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcA-00057x-OG
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:38 +0000
Received: from [193.109.254.147:13056] by server-15.bemta-14.messagelabs.com
	id 67/A4-15813-2514F335; Fri, 04 Apr 2014 23:33:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-27.messagelabs.com!1396654406!6383356!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5524 invoked from network); 4 Apr 2014 23:33:37 -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;
	4 Apr 2014 23:33:37 -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 1WWDby-0002sA-11
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbx-000803-N3
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:25 +0000
Date: Fri, 04 Apr 2014 23:33:25 +0000
Message-Id: <E1WWDbx-000803-N3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/mm: fix checks against
	max_mapped_pfn
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 088ee1d47b65d6bb92de61b404805f4ca92e3240
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Thu Apr 3 08:47:28 2014 +0100
Commit:     Tim Deegan <tim@xen.org>
CommitDate: Thu Apr 3 12:08:43 2014 +0100

    x86/mm: fix checks against max_mapped_pfn
    
    This value is an inclusive one, i.e. this fixes an off-by-one in memory
    sharing and an off-by-two in shadow code.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/mem_sharing.c   |    4 ++--
 xen/arch/x86/mm/shadow/common.c |    4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 7ed6594..237d346 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -1267,8 +1267,8 @@ int relinquish_shared_pages(struct domain *d)
         return 0;
 
     p2m_lock(p2m);
-    for (gfn = p2m->next_shared_gfn_to_relinquish; 
-         gfn < p2m->max_mapped_pfn; gfn++ )
+    for ( gfn = p2m->next_shared_gfn_to_relinquish;
+          gfn <= p2m->max_mapped_pfn; gfn++ )
     {
         p2m_access_t a;
         p2m_type_t t;
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 517b5f1..9258d2a 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -3487,9 +3487,7 @@ int shadow_track_dirty_vram(struct domain *d,
     struct sh_dirty_vram *dirty_vram = d->arch.hvm_domain.dirty_vram;
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
 
-    if (end_pfn < begin_pfn
-            || begin_pfn > p2m->max_mapped_pfn
-            || end_pfn >= p2m->max_mapped_pfn)
+    if ( end_pfn < begin_pfn || end_pfn > p2m->max_mapped_pfn + 1 )
         return -EINVAL;
 
     /* We perform p2m lookups, so lock the p2m upfront to avoid deadlock */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:33:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:33:42 +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 1WWDcD-00058X-HD; Fri, 04 Apr 2014 23:33:41 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcB-000584-Sf
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:40 +0000
Received: from [85.158.137.68:49310] by server-13.bemta-3.messagelabs.com id
	9E/C3-18692-3514F335; Fri, 04 Apr 2014 23:33:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1396654416!5108709!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30469 invoked from network); 4 Apr 2014 23:33:37 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:33:37 -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 1WWDc8-0002sL-Am
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDc8-00080e-5I
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:36 +0000
Date: Fri, 04 Apr 2014 23:33:36 +0000
Message-Id: <E1WWDc8-00080e-5I@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: clarify naming of the Xen
	TLB flushing functions
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 c291ecbcb9a2db39b1bba5b81b9e0ca2565794b0
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 09:59:40 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:40 2014 +0100

    xen: arm: clarify naming of the Xen TLB flushing functions
    
    All of the flush_xen_*_tlb functions operate on the local processor only. Add
    _local to the name and update the comments to clarify.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/mm.c                |   24 ++++++++++++------------
 xen/include/asm-arm/arm32/page.h |   21 +++++++++++++--------
 xen/include/asm-arm/arm64/page.h |   20 ++++++++++++--------
 3 files changed, 37 insertions(+), 28 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 3161d79..d523f77 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -215,7 +215,7 @@ void set_fixmap(unsigned map, unsigned long mfn, unsigned attributes)
     pte.pt.table = 1; /* 4k mappings always have this bit set */
     pte.pt.xn = 1;
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
-    flush_xen_data_tlb_range_va(FIXMAP_ADDR(map), PAGE_SIZE);
+    flush_xen_data_tlb_range_va_local(FIXMAP_ADDR(map), PAGE_SIZE);
 }
 
 /* Remove a mapping from a fixmap entry */
@@ -223,7 +223,7 @@ void clear_fixmap(unsigned map)
 {
     lpae_t pte = {0};
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
-    flush_xen_data_tlb_range_va(FIXMAP_ADDR(map), PAGE_SIZE);
+    flush_xen_data_tlb_range_va_local(FIXMAP_ADDR(map), PAGE_SIZE);
 }
 
 #ifdef CONFIG_DOMAIN_PAGE
@@ -301,7 +301,7 @@ void *map_domain_page(unsigned long mfn)
      * We may not have flushed this specific subpage at map time,
      * since we only flush the 4k page not the superpage
      */
-    flush_xen_data_tlb_range_va(va, PAGE_SIZE);
+    flush_xen_data_tlb_range_va_local(va, PAGE_SIZE);
 
     return (void *)va;
 }
@@ -403,7 +403,7 @@ void __init remove_early_mappings(void)
 {
     lpae_t pte = {0};
     write_pte(xen_second + second_table_offset(BOOT_FDT_VIRT_START), pte);
-    flush_xen_data_tlb_range_va(BOOT_FDT_VIRT_START, SECOND_SIZE);
+    flush_xen_data_tlb_range_va_local(BOOT_FDT_VIRT_START, SECOND_SIZE);
 }
 
 extern void relocate_xen(uint64_t ttbr, void *src, void *dst, size_t len);
@@ -421,7 +421,7 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)
     dest_va = BOOT_RELOC_VIRT_START;
     pte = mfn_to_xen_entry(xen_paddr >> PAGE_SHIFT, WRITEALLOC);
     write_pte(xen_second + second_table_offset(dest_va), pte);
-    flush_xen_data_tlb_range_va(dest_va, SECOND_SIZE);
+    flush_xen_data_tlb_range_va_local(dest_va, SECOND_SIZE);
 
     /* Calculate virt-to-phys offset for the new location */
     phys_offset = xen_paddr - (unsigned long) _start;
@@ -473,7 +473,7 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)
     dest_va = BOOT_RELOC_VIRT_START;
     pte = mfn_to_xen_entry(xen_paddr >> PAGE_SHIFT, WRITEALLOC);
     write_pte(boot_second + second_table_offset(dest_va), pte);
-    flush_xen_data_tlb_range_va(dest_va, SECOND_SIZE);
+    flush_xen_data_tlb_range_va_local(dest_va, SECOND_SIZE);
 #ifdef CONFIG_ARM_64
     ttbr = (uintptr_t) xen_pgtable + phys_offset;
 #else
@@ -521,7 +521,7 @@ void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)
     /* From now on, no mapping may be both writable and executable. */
     WRITE_SYSREG32(READ_SYSREG32(SCTLR_EL2) | SCTLR_WXN, SCTLR_EL2);
     /* Flush everything after setting WXN bit. */
-    flush_xen_text_tlb();
+    flush_xen_text_tlb_local();
 
 #ifdef CONFIG_ARM_32
     per_cpu(xen_pgtable, 0) = cpu0_pgtable;
@@ -594,7 +594,7 @@ void __cpuinit mmu_init_secondary_cpu(void)
 {
     /* From now on, no mapping may be both writable and executable. */
     WRITE_SYSREG32(READ_SYSREG32(SCTLR_EL2) | SCTLR_WXN, SCTLR_EL2);
-    flush_xen_text_tlb();
+    flush_xen_text_tlb_local();
 }
 
 /* Create Xen's mappings of memory.
@@ -622,7 +622,7 @@ static void __init create_32mb_mappings(lpae_t *second,
         write_pte(p + i, pte);
         pte.pt.base += 1 << LPAE_SHIFT;
     }
-    flush_xen_data_tlb();
+    flush_xen_data_tlb_local();
 }
 
 #ifdef CONFIG_ARM_32
@@ -701,7 +701,7 @@ void __init setup_xenheap_mappings(unsigned long base_mfn,
         vaddr += FIRST_SIZE;
     }
 
-    flush_xen_data_tlb();
+    flush_xen_data_tlb_local();
 }
 #endif
 
@@ -845,7 +845,7 @@ static int create_xen_entries(enum xenmap_operation op,
                 BUG();
         }
     }
-    flush_xen_data_tlb_range_va(virt, PAGE_SIZE * nr_mfns);
+    flush_xen_data_tlb_range_va_local(virt, PAGE_SIZE * nr_mfns);
 
     rc = 0;
 
@@ -908,7 +908,7 @@ static void set_pte_flags_on_range(const char *p, unsigned long l, enum mg mg)
         }
         write_pte(xen_xenmap + i, pte);
     }
-    flush_xen_text_tlb();
+    flush_xen_text_tlb_local();
 }
 
 /* Release all __init and __initdata ranges to be reused */
diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index 191a108..b0a2025 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -27,13 +27,15 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
 #define __clean_and_invalidate_xen_dcache_one(R) STORE_CP32(R, DCCIMVAC)
 
 /*
- * Flush all hypervisor mappings from the TLB and branch predictor.
+ * Flush all hypervisor mappings from the TLB and branch predictor of
+ * the local processor.
+ *
  * This is needed after changing Xen code mappings.
  *
  * The caller needs to issue the necessary DSB and D-cache flushes
  * before calling flush_xen_text_tlb.
  */
-static inline void flush_xen_text_tlb(void)
+static inline void flush_xen_text_tlb_local(void)
 {
     register unsigned long r0 asm ("r0");
     asm volatile (
@@ -47,10 +49,11 @@ static inline void flush_xen_text_tlb(void)
 }
 
 /*
- * Flush all hypervisor mappings from the data TLB. This is not
- * sufficient when changing code mappings or for self modifying code.
+ * Flush all hypervisor mappings from the data TLB of the local
+ * processor. This is not sufficient when changing code mappings or
+ * for self modifying code.
  */
-static inline void flush_xen_data_tlb(void)
+static inline void flush_xen_data_tlb_local(void)
 {
     register unsigned long r0 asm ("r0");
     asm volatile("dsb;" /* Ensure preceding are visible */
@@ -61,10 +64,12 @@ static inline void flush_xen_data_tlb(void)
 }
 
 /*
- * Flush a range of VA's hypervisor mappings from the data TLB. This is not
- * sufficient when changing code mappings or for self modifying code.
+ * Flush a range of VA's hypervisor mappings from the data TLB of the
+ * local processor. This is not sufficient when changing code mappings
+ * or for self modifying code.
  */
-static inline void flush_xen_data_tlb_range_va(unsigned long va, unsigned long size)
+static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
+                                                     unsigned long size)
 {
     unsigned long end = va + size;
     dsb(sy); /* Ensure preceding are visible */
diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index 20b4c5a..65332a3 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -22,13 +22,14 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
 #define __clean_and_invalidate_xen_dcache_one(R) "dc  civac, %" #R ";"
 
 /*
- * Flush all hypervisor mappings from the TLB
+ * Flush all hypervisor mappings from the TLB of the local processor.
+ *
  * This is needed after changing Xen code mappings.
  *
  * The caller needs to issue the necessary DSB and D-cache flushes
  * before calling flush_xen_text_tlb.
  */
-static inline void flush_xen_text_tlb(void)
+static inline void flush_xen_text_tlb_local(void)
 {
     asm volatile (
         "isb;"       /* Ensure synchronization with previous changes to text */
@@ -40,10 +41,11 @@ static inline void flush_xen_text_tlb(void)
 }
 
 /*
- * Flush all hypervisor mappings from the data TLB. This is not
- * sufficient when changing code mappings or for self modifying code.
+ * Flush all hypervisor mappings from the data TLB of the local
+ * processor. This is not sufficient when changing code mappings or
+ * for self modifying code.
  */
-static inline void flush_xen_data_tlb(void)
+static inline void flush_xen_data_tlb_local(void)
 {
     asm volatile (
         "dsb    sy;"                    /* Ensure visibility of PTE writes */
@@ -54,10 +56,12 @@ static inline void flush_xen_data_tlb(void)
 }
 
 /*
- * Flush a range of VA's hypervisor mappings from the data TLB. This is not
- * sufficient when changing code mappings or for self modifying code.
+ * Flush a range of VA's hypervisor mappings from the data TLB of the
+ * local processor. This is not sufficient when changing code mappings
+ * or for self modifying code.
  */
-static inline void flush_xen_data_tlb_range_va(unsigned long va, unsigned long size)
+static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
+                                                     unsigned long size)
 {
     unsigned long end = va + size;
     dsb(sy); /* Ensure preceding are visible */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:33:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:33:42 +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 1WWDcC-00058F-Ey; Fri, 04 Apr 2014 23:33:40 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcA-00057x-OG
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:38 +0000
Received: from [193.109.254.147:13056] by server-15.bemta-14.messagelabs.com
	id 67/A4-15813-2514F335; Fri, 04 Apr 2014 23:33:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-27.messagelabs.com!1396654406!6383356!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5524 invoked from network); 4 Apr 2014 23:33:37 -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;
	4 Apr 2014 23:33:37 -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 1WWDby-0002sA-11
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDbx-000803-N3
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:25 +0000
Date: Fri, 04 Apr 2014 23:33:25 +0000
Message-Id: <E1WWDbx-000803-N3@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/mm: fix checks against
	max_mapped_pfn
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 088ee1d47b65d6bb92de61b404805f4ca92e3240
Author:     Jan Beulich <JBeulich@suse.com>
AuthorDate: Thu Apr 3 08:47:28 2014 +0100
Commit:     Tim Deegan <tim@xen.org>
CommitDate: Thu Apr 3 12:08:43 2014 +0100

    x86/mm: fix checks against max_mapped_pfn
    
    This value is an inclusive one, i.e. this fixes an off-by-one in memory
    sharing and an off-by-two in shadow code.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/mem_sharing.c   |    4 ++--
 xen/arch/x86/mm/shadow/common.c |    4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 7ed6594..237d346 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -1267,8 +1267,8 @@ int relinquish_shared_pages(struct domain *d)
         return 0;
 
     p2m_lock(p2m);
-    for (gfn = p2m->next_shared_gfn_to_relinquish; 
-         gfn < p2m->max_mapped_pfn; gfn++ )
+    for ( gfn = p2m->next_shared_gfn_to_relinquish;
+          gfn <= p2m->max_mapped_pfn; gfn++ )
     {
         p2m_access_t a;
         p2m_type_t t;
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 517b5f1..9258d2a 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -3487,9 +3487,7 @@ int shadow_track_dirty_vram(struct domain *d,
     struct sh_dirty_vram *dirty_vram = d->arch.hvm_domain.dirty_vram;
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
 
-    if (end_pfn < begin_pfn
-            || begin_pfn > p2m->max_mapped_pfn
-            || end_pfn >= p2m->max_mapped_pfn)
+    if ( end_pfn < begin_pfn || end_pfn > p2m->max_mapped_pfn + 1 )
         return -EINVAL;
 
     /* We perform p2m lookups, so lock the p2m upfront to avoid deadlock */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:34:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:34:00 +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 1WWDcM-0005Ao-Ls; Fri, 04 Apr 2014 23:33:50 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcL-0005AU-IQ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:49 +0000
Received: from [85.158.137.68:49522] by server-3.bemta-3.messagelabs.com id
	C8/54-05289-C514F335; Fri, 04 Apr 2014 23:33:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1396654426!3863814!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17644 invoked from network); 4 Apr 2014 23:33:47 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:33:47 -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 1WWDcI-0002sU-H6
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcI-00081W-F9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:46 +0000
Date: Fri, 04 Apr 2014 23:33:46 +0000
Message-Id: <E1WWDcI-00081W-F9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: consolidate body of
	flush_xen_data_tlb_range_va_local
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 67a126eabdedb5aba5da0945104d176ac3ce0946
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 09:59:41 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:40 2014 +0100

    xen: arm: consolidate body of flush_xen_data_tlb_range_va_local
    
    This is almost identical on both sub architectures.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- fixed coding style ]
---
 xen/include/asm-arm/arm32/page.h |   19 +++----------------
 xen/include/asm-arm/arm64/page.h |   19 +++----------------
 xen/include/asm-arm/page.h       |   19 +++++++++++++++++++
 3 files changed, 25 insertions(+), 32 deletions(-)

diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index b0a2025..d839d03 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -63,23 +63,10 @@ static inline void flush_xen_data_tlb_local(void)
                  : : "r" (r0) /* dummy */: "memory");
 }
 
-/*
- * Flush a range of VA's hypervisor mappings from the data TLB of the
- * local processor. This is not sufficient when changing code mappings
- * or for self modifying code.
- */
-static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
-                                                     unsigned long size)
+/* Flush TLB of local processor for address va. */
+static inline void __flush_xen_data_tlb_one_local(vaddr_t va)
 {
-    unsigned long end = va + size;
-    dsb(sy); /* Ensure preceding are visible */
-    while ( va < end ) {
-        asm volatile(STORE_CP32(0, TLBIMVAH)
-                     : : "r" (va) : "memory");
-        va += PAGE_SIZE;
-    }
-    dsb(sy); /* Ensure completion of the TLB flush */
-    isb();
+    asm volatile(STORE_CP32(0, TLBIMVAH) : : "r" (va) : "memory");
 }
 
 /* Ask the MMU to translate a VA for us */
diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index 65332a3..897d79b 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -55,23 +55,10 @@ static inline void flush_xen_data_tlb_local(void)
         : : : "memory");
 }
 
-/*
- * Flush a range of VA's hypervisor mappings from the data TLB of the
- * local processor. This is not sufficient when changing code mappings
- * or for self modifying code.
- */
-static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
-                                                     unsigned long size)
+/* Flush TLB of local processor for address va. */
+static inline void  __flush_xen_data_tlb_one_local(vaddr_t va)
 {
-    unsigned long end = va + size;
-    dsb(sy); /* Ensure preceding are visible */
-    while ( va < end ) {
-        asm volatile("tlbi vae2, %0;"
-                     : : "r" (va>>PAGE_SHIFT) : "memory");
-        va += PAGE_SIZE;
-    }
-    dsb(sy); /* Ensure completion of the TLB flush */
-    isb();
+    asm volatile("tlbi vae2, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
 }
 
 /* Ask the MMU to translate a VA for us */
diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
index d18ec2a..d58ad1d 100644
--- a/xen/include/asm-arm/page.h
+++ b/xen/include/asm-arm/page.h
@@ -306,6 +306,25 @@ static inline void clean_and_invalidate_xen_dcache_va_range
             : : "r" (_p), "m" (*_p));                                   \
 } while (0)
 
+/*
+ * Flush a range of VA's hypervisor mappings from the data TLB of the
+ * local processor. This is not sufficient when changing code mappings
+ * or for self modifying code.
+ */
+static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
+                                                     unsigned long size)
+{
+    unsigned long end = va + size;
+    dsb(sy); /* Ensure preceding are visible */
+    while ( va < end )
+    {
+        __flush_xen_data_tlb_one_local(va);
+        va += PAGE_SIZE;
+    }
+    dsb(sy); /* Ensure completion of the TLB flush */
+    isb();
+}
+
 /* Flush the dcache for an entire page. */
 void flush_page_to_ram(unsigned long mfn);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:34:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:34:00 +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 1WWDcM-0005Ao-Ls; Fri, 04 Apr 2014 23:33:50 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcL-0005AU-IQ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:49 +0000
Received: from [85.158.137.68:49522] by server-3.bemta-3.messagelabs.com id
	C8/54-05289-C514F335; Fri, 04 Apr 2014 23:33:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-31.messagelabs.com!1396654426!3863814!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17644 invoked from network); 4 Apr 2014 23:33:47 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:33:47 -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 1WWDcI-0002sU-H6
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcI-00081W-F9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:46 +0000
Date: Fri, 04 Apr 2014 23:33:46 +0000
Message-Id: <E1WWDcI-00081W-F9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: consolidate body of
	flush_xen_data_tlb_range_va_local
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 67a126eabdedb5aba5da0945104d176ac3ce0946
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 09:59:41 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:40 2014 +0100

    xen: arm: consolidate body of flush_xen_data_tlb_range_va_local
    
    This is almost identical on both sub architectures.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- fixed coding style ]
---
 xen/include/asm-arm/arm32/page.h |   19 +++----------------
 xen/include/asm-arm/arm64/page.h |   19 +++----------------
 xen/include/asm-arm/page.h       |   19 +++++++++++++++++++
 3 files changed, 25 insertions(+), 32 deletions(-)

diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index b0a2025..d839d03 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -63,23 +63,10 @@ static inline void flush_xen_data_tlb_local(void)
                  : : "r" (r0) /* dummy */: "memory");
 }
 
-/*
- * Flush a range of VA's hypervisor mappings from the data TLB of the
- * local processor. This is not sufficient when changing code mappings
- * or for self modifying code.
- */
-static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
-                                                     unsigned long size)
+/* Flush TLB of local processor for address va. */
+static inline void __flush_xen_data_tlb_one_local(vaddr_t va)
 {
-    unsigned long end = va + size;
-    dsb(sy); /* Ensure preceding are visible */
-    while ( va < end ) {
-        asm volatile(STORE_CP32(0, TLBIMVAH)
-                     : : "r" (va) : "memory");
-        va += PAGE_SIZE;
-    }
-    dsb(sy); /* Ensure completion of the TLB flush */
-    isb();
+    asm volatile(STORE_CP32(0, TLBIMVAH) : : "r" (va) : "memory");
 }
 
 /* Ask the MMU to translate a VA for us */
diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index 65332a3..897d79b 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -55,23 +55,10 @@ static inline void flush_xen_data_tlb_local(void)
         : : : "memory");
 }
 
-/*
- * Flush a range of VA's hypervisor mappings from the data TLB of the
- * local processor. This is not sufficient when changing code mappings
- * or for self modifying code.
- */
-static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
-                                                     unsigned long size)
+/* Flush TLB of local processor for address va. */
+static inline void  __flush_xen_data_tlb_one_local(vaddr_t va)
 {
-    unsigned long end = va + size;
-    dsb(sy); /* Ensure preceding are visible */
-    while ( va < end ) {
-        asm volatile("tlbi vae2, %0;"
-                     : : "r" (va>>PAGE_SHIFT) : "memory");
-        va += PAGE_SIZE;
-    }
-    dsb(sy); /* Ensure completion of the TLB flush */
-    isb();
+    asm volatile("tlbi vae2, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
 }
 
 /* Ask the MMU to translate a VA for us */
diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
index d18ec2a..d58ad1d 100644
--- a/xen/include/asm-arm/page.h
+++ b/xen/include/asm-arm/page.h
@@ -306,6 +306,25 @@ static inline void clean_and_invalidate_xen_dcache_va_range
             : : "r" (_p), "m" (*_p));                                   \
 } while (0)
 
+/*
+ * Flush a range of VA's hypervisor mappings from the data TLB of the
+ * local processor. This is not sufficient when changing code mappings
+ * or for self modifying code.
+ */
+static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
+                                                     unsigned long size)
+{
+    unsigned long end = va + size;
+    dsb(sy); /* Ensure preceding are visible */
+    while ( va < end )
+    {
+        __flush_xen_data_tlb_one_local(va);
+        va += PAGE_SIZE;
+    }
+    dsb(sy); /* Ensure completion of the TLB flush */
+    isb();
+}
+
 /* Flush the dcache for an entire page. */
 void flush_page_to_ram(unsigned long mfn);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:34:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:34:10 +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 1WWDcW-0005CG-Of; Fri, 04 Apr 2014 23:34:00 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcV-0005Br-Ht
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:59 +0000
Received: from [193.109.254.147:11841] by server-5.bemta-14.messagelabs.com id
	D1/5E-26413-6614F335; Fri, 04 Apr 2014 23:33:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-27.messagelabs.com!1396654436!6391844!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1069 invoked from network); 4 Apr 2014 23:33:57 -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;
	4 Apr 2014 23:33:57 -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 1WWDcS-0002sa-NJ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcS-00081s-LJ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:56 +0000
Date: Fri, 04 Apr 2014 23:33:56 +0000
Message-Id: <E1WWDcS-00081s-LJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: flush TLB on all CPUs when
	setting or clearing fixmaps
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 965bdbf4b6da3fdfcc7dd4d53a859dad8a7c6115
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 09:59:42 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: arm: flush TLB on all CPUs when setting or clearing fixmaps
    
    These mappings are global and therefore need flushing on all processors. Add
    flush_all_xen_data_tlb_range_va which accomplishes this.
    
    Likewise when removing the early mappings
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- fixed coding style ]
---
 xen/arch/arm/mm.c                |    6 +++---
 xen/include/asm-arm/arm32/page.h |    7 +++++++
 xen/include/asm-arm/arm64/page.h |    7 +++++++
 xen/include/asm-arm/page.h       |   19 +++++++++++++++++++
 4 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index d523f77..362bc8d 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -215,7 +215,7 @@ void set_fixmap(unsigned map, unsigned long mfn, unsigned attributes)
     pte.pt.table = 1; /* 4k mappings always have this bit set */
     pte.pt.xn = 1;
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
-    flush_xen_data_tlb_range_va_local(FIXMAP_ADDR(map), PAGE_SIZE);
+    flush_xen_data_tlb_range_va(FIXMAP_ADDR(map), PAGE_SIZE);
 }
 
 /* Remove a mapping from a fixmap entry */
@@ -223,7 +223,7 @@ void clear_fixmap(unsigned map)
 {
     lpae_t pte = {0};
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
-    flush_xen_data_tlb_range_va_local(FIXMAP_ADDR(map), PAGE_SIZE);
+    flush_xen_data_tlb_range_va(FIXMAP_ADDR(map), PAGE_SIZE);
 }
 
 #ifdef CONFIG_DOMAIN_PAGE
@@ -403,7 +403,7 @@ void __init remove_early_mappings(void)
 {
     lpae_t pte = {0};
     write_pte(xen_second + second_table_offset(BOOT_FDT_VIRT_START), pte);
-    flush_xen_data_tlb_range_va_local(BOOT_FDT_VIRT_START, SECOND_SIZE);
+    flush_xen_data_tlb_range_va(BOOT_FDT_VIRT_START, SECOND_SIZE);
 }
 
 extern void relocate_xen(uint64_t ttbr, void *src, void *dst, size_t len);
diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index d839d03..ead6b97 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -69,6 +69,13 @@ static inline void __flush_xen_data_tlb_one_local(vaddr_t va)
     asm volatile(STORE_CP32(0, TLBIMVAH) : : "r" (va) : "memory");
 }
 
+/* Flush TLB of all processors in the inner-shareable domain for
+ * address va. */
+static inline void __flush_xen_data_tlb_one(vaddr_t va)
+{
+    asm volatile(STORE_CP32(0, TLBIMVAHIS) : : "r" (va) : "memory");
+}
+
 /* Ask the MMU to translate a VA for us */
 static inline uint64_t __va_to_par(vaddr_t va)
 {
diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index 897d79b..d7ee2fc 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -61,6 +61,13 @@ static inline void  __flush_xen_data_tlb_one_local(vaddr_t va)
     asm volatile("tlbi vae2, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
 }
 
+/* Flush TLB of all processors in the inner-shareable domain for
+ * address va. */
+static inline void __flush_xen_data_tlb_one(vaddr_t va)
+{
+    asm volatile("tlbi vae2is, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
+}
+
 /* Ask the MMU to translate a VA for us */
 static inline uint64_t __va_to_par(vaddr_t va)
 {
diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
index d58ad1d..877aa2a 100644
--- a/xen/include/asm-arm/page.h
+++ b/xen/include/asm-arm/page.h
@@ -325,6 +325,25 @@ static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
     isb();
 }
 
+/*
+ * Flush a range of VA's hypervisor mappings from the data TLB of all
+ * processors in the inner-shareable domain. This is not sufficient
+ * when changing code mappings or for self modifying code.
+ */
+static inline void flush_xen_data_tlb_range_va(unsigned long va,
+                                               unsigned long size)
+{
+    unsigned long end = va + size;
+    dsb(sy); /* Ensure preceding are visible */
+    while ( va < end )
+    {
+        __flush_xen_data_tlb_one(va);
+        va += PAGE_SIZE;
+    }
+    dsb(sy); /* Ensure completion of the TLB flush */
+    isb();
+}
+
 /* Flush the dcache for an entire page. */
 void flush_page_to_ram(unsigned long mfn);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:34:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:34:10 +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 1WWDcW-0005CG-Of; Fri, 04 Apr 2014 23:34:00 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcV-0005Br-Ht
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:59 +0000
Received: from [193.109.254.147:11841] by server-5.bemta-14.messagelabs.com id
	D1/5E-26413-6614F335; Fri, 04 Apr 2014 23:33:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-27.messagelabs.com!1396654436!6391844!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1069 invoked from network); 4 Apr 2014 23:33:57 -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;
	4 Apr 2014 23:33:57 -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 1WWDcS-0002sa-NJ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcS-00081s-LJ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:33:56 +0000
Date: Fri, 04 Apr 2014 23:33:56 +0000
Message-Id: <E1WWDcS-00081s-LJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: flush TLB on all CPUs when
	setting or clearing fixmaps
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 965bdbf4b6da3fdfcc7dd4d53a859dad8a7c6115
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 09:59:42 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: arm: flush TLB on all CPUs when setting or clearing fixmaps
    
    These mappings are global and therefore need flushing on all processors. Add
    flush_all_xen_data_tlb_range_va which accomplishes this.
    
    Likewise when removing the early mappings
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- fixed coding style ]
---
 xen/arch/arm/mm.c                |    6 +++---
 xen/include/asm-arm/arm32/page.h |    7 +++++++
 xen/include/asm-arm/arm64/page.h |    7 +++++++
 xen/include/asm-arm/page.h       |   19 +++++++++++++++++++
 4 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index d523f77..362bc8d 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -215,7 +215,7 @@ void set_fixmap(unsigned map, unsigned long mfn, unsigned attributes)
     pte.pt.table = 1; /* 4k mappings always have this bit set */
     pte.pt.xn = 1;
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
-    flush_xen_data_tlb_range_va_local(FIXMAP_ADDR(map), PAGE_SIZE);
+    flush_xen_data_tlb_range_va(FIXMAP_ADDR(map), PAGE_SIZE);
 }
 
 /* Remove a mapping from a fixmap entry */
@@ -223,7 +223,7 @@ void clear_fixmap(unsigned map)
 {
     lpae_t pte = {0};
     write_pte(xen_fixmap + third_table_offset(FIXMAP_ADDR(map)), pte);
-    flush_xen_data_tlb_range_va_local(FIXMAP_ADDR(map), PAGE_SIZE);
+    flush_xen_data_tlb_range_va(FIXMAP_ADDR(map), PAGE_SIZE);
 }
 
 #ifdef CONFIG_DOMAIN_PAGE
@@ -403,7 +403,7 @@ void __init remove_early_mappings(void)
 {
     lpae_t pte = {0};
     write_pte(xen_second + second_table_offset(BOOT_FDT_VIRT_START), pte);
-    flush_xen_data_tlb_range_va_local(BOOT_FDT_VIRT_START, SECOND_SIZE);
+    flush_xen_data_tlb_range_va(BOOT_FDT_VIRT_START, SECOND_SIZE);
 }
 
 extern void relocate_xen(uint64_t ttbr, void *src, void *dst, size_t len);
diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index d839d03..ead6b97 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -69,6 +69,13 @@ static inline void __flush_xen_data_tlb_one_local(vaddr_t va)
     asm volatile(STORE_CP32(0, TLBIMVAH) : : "r" (va) : "memory");
 }
 
+/* Flush TLB of all processors in the inner-shareable domain for
+ * address va. */
+static inline void __flush_xen_data_tlb_one(vaddr_t va)
+{
+    asm volatile(STORE_CP32(0, TLBIMVAHIS) : : "r" (va) : "memory");
+}
+
 /* Ask the MMU to translate a VA for us */
 static inline uint64_t __va_to_par(vaddr_t va)
 {
diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index 897d79b..d7ee2fc 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -61,6 +61,13 @@ static inline void  __flush_xen_data_tlb_one_local(vaddr_t va)
     asm volatile("tlbi vae2, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
 }
 
+/* Flush TLB of all processors in the inner-shareable domain for
+ * address va. */
+static inline void __flush_xen_data_tlb_one(vaddr_t va)
+{
+    asm volatile("tlbi vae2is, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
+}
+
 /* Ask the MMU to translate a VA for us */
 static inline uint64_t __va_to_par(vaddr_t va)
 {
diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
index d58ad1d..877aa2a 100644
--- a/xen/include/asm-arm/page.h
+++ b/xen/include/asm-arm/page.h
@@ -325,6 +325,25 @@ static inline void flush_xen_data_tlb_range_va_local(unsigned long va,
     isb();
 }
 
+/*
+ * Flush a range of VA's hypervisor mappings from the data TLB of all
+ * processors in the inner-shareable domain. This is not sufficient
+ * when changing code mappings or for self modifying code.
+ */
+static inline void flush_xen_data_tlb_range_va(unsigned long va,
+                                               unsigned long size)
+{
+    unsigned long end = va + size;
+    dsb(sy); /* Ensure preceding are visible */
+    while ( va < end )
+    {
+        __flush_xen_data_tlb_one(va);
+        va += PAGE_SIZE;
+    }
+    dsb(sy); /* Ensure completion of the TLB flush */
+    isb();
+}
+
 /* Flush the dcache for an entire page. */
 void flush_page_to_ram(unsigned long mfn);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:34:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:34: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 1WWDcg-0005Dg-Rz; Fri, 04 Apr 2014 23:34:10 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcf-0005DJ-BC
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:09 +0000
Received: from [193.109.254.147:41074] by server-8.bemta-14.messagelabs.com id
	7C/C1-01877-0714F335; Fri, 04 Apr 2014 23:34:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1396654447!6403421!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32598 invoked from network); 4 Apr 2014 23:34:07 -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;
	4 Apr 2014 23:34:07 -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 1WWDcc-0002t9-Tm
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcc-00082O-SP
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:06 +0000
Date: Fri, 04 Apr 2014 23:34:06 +0000
Message-Id: <E1WWDcc-00082O-SP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: don't force the compiler
	to allocate a dummy register
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 3bd940bead554573c3a11d6c2fbcefaccc6c57e6
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 09:59:43 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: arm32: don't force the compiler to allocate a dummy register
    
    TLBIALLH, ICIALLU and BPIALL make no use of their register argument. Instead
    of making the compiler allocate a dummy register just hardcode r0, there is no
    need to represent this in the inline asm since the register is neither
    clobbered nor used in any way.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/include/asm-arm/arm32/page.h      |   14 ++++++--------
 xen/include/asm-arm/arm32/processor.h |    4 ++++
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index ead6b97..3f2bdc9 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -37,15 +37,14 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
  */
 static inline void flush_xen_text_tlb_local(void)
 {
-    register unsigned long r0 asm ("r0");
     asm volatile (
         "isb;"                        /* Ensure synchronization with previous changes to text */
-        STORE_CP32(0, TLBIALLH)       /* Flush hypervisor TLB */
-        STORE_CP32(0, ICIALLU)        /* Flush I-cache */
-        STORE_CP32(0, BPIALL)         /* Flush branch predictor */
+        CMD_CP32(TLBIALLH)            /* Flush hypervisor TLB */
+        CMD_CP32(ICIALLU)             /* Flush I-cache */
+        CMD_CP32(BPIALL)              /* Flush branch predictor */
         "dsb;"                        /* Ensure completion of TLB+BP flush */
         "isb;"
-        : : "r" (r0) /*dummy*/ : "memory");
+        : : : "memory");
 }
 
 /*
@@ -55,12 +54,11 @@ static inline void flush_xen_text_tlb_local(void)
  */
 static inline void flush_xen_data_tlb_local(void)
 {
-    register unsigned long r0 asm ("r0");
     asm volatile("dsb;" /* Ensure preceding are visible */
-                 STORE_CP32(0, TLBIALLH)
+                 CMD_CP32(TLBIALLH)
                  "dsb;" /* Ensure completion of the TLB flush */
                  "isb;"
-                 : : "r" (r0) /* dummy */: "memory");
+                 : : : "memory");
 }
 
 /* Flush TLB of local processor for address va. */
diff --git a/xen/include/asm-arm/arm32/processor.h b/xen/include/asm-arm/arm32/processor.h
index 8a35cee..f41644d 100644
--- a/xen/include/asm-arm/arm32/processor.h
+++ b/xen/include/asm-arm/arm32/processor.h
@@ -69,6 +69,10 @@ struct cpu_user_regs
 #define LOAD_CP64(r, name...)  "mrrc " __stringify(CP64(%r, %H##r, name)) ";"
 #define STORE_CP64(r, name...) "mcrr " __stringify(CP64(%r, %H##r, name)) ";"
 
+/* Issue a CP operation which takes no argument,
+ * uses r0 as a placeholder register. */
+#define CMD_CP32(name...)      "mcr " __stringify(CP32(r0, name)) ";"
+
 #ifndef __ASSEMBLY__
 
 /* C wrappers */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:34:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:34: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 1WWDcg-0005Dg-Rz; Fri, 04 Apr 2014 23:34:10 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcf-0005DJ-BC
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:09 +0000
Received: from [193.109.254.147:41074] by server-8.bemta-14.messagelabs.com id
	7C/C1-01877-0714F335; Fri, 04 Apr 2014 23:34:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1396654447!6403421!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32598 invoked from network); 4 Apr 2014 23:34:07 -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;
	4 Apr 2014 23:34:07 -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 1WWDcc-0002t9-Tm
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcc-00082O-SP
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:06 +0000
Date: Fri, 04 Apr 2014 23:34:06 +0000
Message-Id: <E1WWDcc-00082O-SP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: don't force the compiler
	to allocate a dummy register
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 3bd940bead554573c3a11d6c2fbcefaccc6c57e6
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 09:59:43 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: arm32: don't force the compiler to allocate a dummy register
    
    TLBIALLH, ICIALLU and BPIALL make no use of their register argument. Instead
    of making the compiler allocate a dummy register just hardcode r0, there is no
    need to represent this in the inline asm since the register is neither
    clobbered nor used in any way.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/include/asm-arm/arm32/page.h      |   14 ++++++--------
 xen/include/asm-arm/arm32/processor.h |    4 ++++
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index ead6b97..3f2bdc9 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -37,15 +37,14 @@ static inline void write_pte(lpae_t *p, lpae_t pte)
  */
 static inline void flush_xen_text_tlb_local(void)
 {
-    register unsigned long r0 asm ("r0");
     asm volatile (
         "isb;"                        /* Ensure synchronization with previous changes to text */
-        STORE_CP32(0, TLBIALLH)       /* Flush hypervisor TLB */
-        STORE_CP32(0, ICIALLU)        /* Flush I-cache */
-        STORE_CP32(0, BPIALL)         /* Flush branch predictor */
+        CMD_CP32(TLBIALLH)            /* Flush hypervisor TLB */
+        CMD_CP32(ICIALLU)             /* Flush I-cache */
+        CMD_CP32(BPIALL)              /* Flush branch predictor */
         "dsb;"                        /* Ensure completion of TLB+BP flush */
         "isb;"
-        : : "r" (r0) /*dummy*/ : "memory");
+        : : : "memory");
 }
 
 /*
@@ -55,12 +54,11 @@ static inline void flush_xen_text_tlb_local(void)
  */
 static inline void flush_xen_data_tlb_local(void)
 {
-    register unsigned long r0 asm ("r0");
     asm volatile("dsb;" /* Ensure preceding are visible */
-                 STORE_CP32(0, TLBIALLH)
+                 CMD_CP32(TLBIALLH)
                  "dsb;" /* Ensure completion of the TLB flush */
                  "isb;"
-                 : : "r" (r0) /* dummy */: "memory");
+                 : : : "memory");
 }
 
 /* Flush TLB of local processor for address va. */
diff --git a/xen/include/asm-arm/arm32/processor.h b/xen/include/asm-arm/arm32/processor.h
index 8a35cee..f41644d 100644
--- a/xen/include/asm-arm/arm32/processor.h
+++ b/xen/include/asm-arm/arm32/processor.h
@@ -69,6 +69,10 @@ struct cpu_user_regs
 #define LOAD_CP64(r, name...)  "mrrc " __stringify(CP64(%r, %H##r, name)) ";"
 #define STORE_CP64(r, name...) "mcrr " __stringify(CP64(%r, %H##r, name)) ";"
 
+/* Issue a CP operation which takes no argument,
+ * uses r0 as a placeholder register. */
+#define CMD_CP32(name...)      "mcr " __stringify(CP32(r0, name)) ";"
+
 #ifndef __ASSEMBLY__
 
 /* C wrappers */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:02 +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 1WWDdC-0005I2-3z; Fri, 04 Apr 2014 23:34:42 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdA-0005Ho-9B
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:40 +0000
Received: from [193.109.254.147:41543] by server-5.bemta-14.messagelabs.com id
	64/7E-26413-F814F335; Fri, 04 Apr 2014 23:34:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1396654477!6405219!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13746 invoked from network); 4 Apr 2014 23:34:38 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:34:38 -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 1WWDd7-0002tQ-Er
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDd7-00083e-Cb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:37 +0000
Date: Fri, 04 Apr 2014 23:34:37 +0000
Message-Id: <E1WWDd7-00083e-Cb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: resync bitops with Linux
	v3.14-rc7
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="===============4634261838309911105=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============4634261838309911105==
Content-Type: text/plain

commit 7baf9ace8faa95700a5d7a537e2b2b4f2cab6bab
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:37 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: arm32: resync bitops with Linux v3.14-rc7
    
    This pulls in the following Linux commits:
    
    commit c36ef4b1762302a493c6cb754073bded084700e2
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Wed Nov 23 11:28:25 2011 +0100
    
        ARM: 7171/1: unwind: add unwind directives to bitops assembly macros
    
        The bitops functions (e.g. _test_and_set_bit) on ARM do not have unwind
        annotations and therefore the kernel cannot backtrace out of them on a
        fatal error (for example, NULL pointer dereference).
    
        This patch annotates the bitops assembly macros with UNWIND annotations
        so that we can produce a meaningful backtrace on error. Callers of the
        macros are modified to pass their function name as a macro parameter,
        enforcing that the macros are used as standalone function implementations.
    
        Acked-by: Dave Martin <dave.martin@linaro.org>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    commit d779c07dd72098a7416d907494f958213b7726f3
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Thu Jun 27 12:01:51 2013 +0100
    
        ARM: bitops: prefetch the destination word for write prior to strex
    
        The cost of changing a cacheline from shared to exclusive state can be
        significant, especially when this is triggered by an exclusive store,
        since it may result in having to retry the transaction.
    
        This patch prefixes our atomic bitops implementation with prefetchw,
        to try and grab the line in exclusive state from the start. The testop
        macro is left alone, since the barrier semantics limit the usefulness
        of prefetching data.
    
        Acked-by: Nicolas Pitre <nico@linaro.org>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
    
    commit b7ec699405f55667caeb46d96229d75bf33a83ad
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Tue Nov 19 15:46:11 2013 +0100
    
        ARM: 7893/1: bitops: only emit .arch_extension mp if CONFIG_SMP
    
        Uwe reported a build failure when targetting a NOMMU platform with my
        recent prefetch changes:
    
          arch/arm/lib/changebit.S: Assembler messages:
          arch/arm/lib/changebit.S:15: Error: architectural extension `mp' is
                            not allowed for the current base architecture
    
        This is due to use of the .arch_extension mp directive immediately prior
        to an ALT_SMP(...) instruction. Whilst the ALT_SMP macro will expand to
        nothing if !CONFIG_SMP, gas will still choke on the directive.
    
        This patch fixes the issue by only emitting the sequence (including the
        directive) if CONFIG_SMP=y.
    
        Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm32/lib/bitops.h        |   17 +++++++++++++++--
 xen/arch/arm/arm32/lib/changebit.S     |    4 +---
 xen/arch/arm/arm32/lib/clearbit.S      |    4 +---
 xen/arch/arm/arm32/lib/setbit.S        |    4 +---
 xen/arch/arm/arm32/lib/testchangebit.S |    4 +---
 xen/arch/arm/arm32/lib/testclearbit.S  |    4 +---
 xen/arch/arm/arm32/lib/testsetbit.S    |    4 +---
 7 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/xen/arch/arm/arm32/lib/bitops.h b/xen/arch/arm/arm32/lib/bitops.h
index 689f2e8..25784c3 100644
--- a/xen/arch/arm/arm32/lib/bitops.h
+++ b/xen/arch/arm/arm32/lib/bitops.h
@@ -1,13 +1,20 @@
 #include <xen/config.h>
 
 #if __LINUX_ARM_ARCH__ >= 6
-	.macro	bitop, instr
+	.macro	bitop, name, instr
+ENTRY(	\name		)
+UNWIND(	.fnstart	)
 	ands	ip, r1, #3
 	strneb	r1, [ip]		@ assert word-aligned
 	mov	r2, #1
 	and	r3, r0, #31		@ Get bit offset
 	mov	r0, r0, lsr #5
 	add	r1, r1, r0, lsl #2	@ Get word offset
+#if __LINUX_ARM_ARCH__ >= 7 && defined(CONFIG_SMP)
+	.arch_extension	mp
+	ALT_SMP(W(pldw)	[r1])
+	ALT_UP(W(nop))
+#endif
 	mov	r3, r2, lsl r3
 1:	ldrex	r2, [r1]
 	\instr	r2, r2, r3
@@ -15,9 +22,13 @@
 	cmp	r0, #0
 	bne	1b
 	bx	lr
+UNWIND(	.fnend		)
+ENDPROC(\name		)
 	.endm
 
-	.macro	testop, instr, store
+	.macro	testop, name, instr, store
+ENTRY(	\name		)
+UNWIND(	.fnstart	)
 	ands	ip, r1, #3
 	strneb	r1, [ip]		@ assert word-aligned
 	mov	r2, #1
@@ -36,6 +47,8 @@
 	cmp	r0, #0
 	movne	r0, #1
 2:	bx	lr
+UNWIND(	.fnend		)
+ENDPROC(\name		)
 	.endm
 #else
 	.macro	bitop, name, instr
diff --git a/xen/arch/arm/arm32/lib/changebit.S b/xen/arch/arm/arm32/lib/changebit.S
index 62954bc..11f41d2 100644
--- a/xen/arch/arm/arm32/lib/changebit.S
+++ b/xen/arch/arm/arm32/lib/changebit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_change_bit)
-	bitop	eor
-ENDPROC(_change_bit)
+bitop	_change_bit, eor
diff --git a/xen/arch/arm/arm32/lib/clearbit.S b/xen/arch/arm/arm32/lib/clearbit.S
index 42ce416..1b6a569 100644
--- a/xen/arch/arm/arm32/lib/clearbit.S
+++ b/xen/arch/arm/arm32/lib/clearbit.S
@@ -14,6 +14,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_clear_bit)
-	bitop	bic
-ENDPROC(_clear_bit)
+bitop	_clear_bit, bic
diff --git a/xen/arch/arm/arm32/lib/setbit.S b/xen/arch/arm/arm32/lib/setbit.S
index c828851..1f4ef56 100644
--- a/xen/arch/arm/arm32/lib/setbit.S
+++ b/xen/arch/arm/arm32/lib/setbit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
 	.text
 
-ENTRY(_set_bit)
-	bitop	orr
-ENDPROC(_set_bit)
+bitop	_set_bit, orr
diff --git a/xen/arch/arm/arm32/lib/testchangebit.S b/xen/arch/arm/arm32/lib/testchangebit.S
index a7f527c..7f4635c 100644
--- a/xen/arch/arm/arm32/lib/testchangebit.S
+++ b/xen/arch/arm/arm32/lib/testchangebit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_test_and_change_bit)
-	testop	eor, str
-ENDPROC(_test_and_change_bit)
+testop	_test_and_change_bit, eor, str
diff --git a/xen/arch/arm/arm32/lib/testclearbit.S b/xen/arch/arm/arm32/lib/testclearbit.S
index 8f39c72..4d4152f 100644
--- a/xen/arch/arm/arm32/lib/testclearbit.S
+++ b/xen/arch/arm/arm32/lib/testclearbit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_test_and_clear_bit)
-	testop	bicne, strne
-ENDPROC(_test_and_clear_bit)
+testop	_test_and_clear_bit, bicne, strne
diff --git a/xen/arch/arm/arm32/lib/testsetbit.S b/xen/arch/arm/arm32/lib/testsetbit.S
index 1b8d273..54f48f9 100644
--- a/xen/arch/arm/arm32/lib/testsetbit.S
+++ b/xen/arch/arm/arm32/lib/testsetbit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_test_and_set_bit)
-	testop	orreq, streq
-ENDPROC(_test_and_set_bit)
+testop	_test_and_set_bit, orreq, streq
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============4634261838309911105==
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
--===============4634261838309911105==--

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:02 +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 1WWDdC-0005I2-3z; Fri, 04 Apr 2014 23:34:42 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdA-0005Ho-9B
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:40 +0000
Received: from [193.109.254.147:41543] by server-5.bemta-14.messagelabs.com id
	64/7E-26413-F814F335; Fri, 04 Apr 2014 23:34:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1396654477!6405219!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13746 invoked from network); 4 Apr 2014 23:34:38 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:34:38 -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 1WWDd7-0002tQ-Er
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDd7-00083e-Cb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:37 +0000
Date: Fri, 04 Apr 2014 23:34:37 +0000
Message-Id: <E1WWDd7-00083e-Cb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: resync bitops with Linux
	v3.14-rc7
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="===============4634261838309911105=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============4634261838309911105==
Content-Type: text/plain

commit 7baf9ace8faa95700a5d7a537e2b2b4f2cab6bab
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:37 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: arm32: resync bitops with Linux v3.14-rc7
    
    This pulls in the following Linux commits:
    
    commit c36ef4b1762302a493c6cb754073bded084700e2
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Wed Nov 23 11:28:25 2011 +0100
    
        ARM: 7171/1: unwind: add unwind directives to bitops assembly macros
    
        The bitops functions (e.g. _test_and_set_bit) on ARM do not have unwind
        annotations and therefore the kernel cannot backtrace out of them on a
        fatal error (for example, NULL pointer dereference).
    
        This patch annotates the bitops assembly macros with UNWIND annotations
        so that we can produce a meaningful backtrace on error. Callers of the
        macros are modified to pass their function name as a macro parameter,
        enforcing that the macros are used as standalone function implementations.
    
        Acked-by: Dave Martin <dave.martin@linaro.org>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    commit d779c07dd72098a7416d907494f958213b7726f3
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Thu Jun 27 12:01:51 2013 +0100
    
        ARM: bitops: prefetch the destination word for write prior to strex
    
        The cost of changing a cacheline from shared to exclusive state can be
        significant, especially when this is triggered by an exclusive store,
        since it may result in having to retry the transaction.
    
        This patch prefixes our atomic bitops implementation with prefetchw,
        to try and grab the line in exclusive state from the start. The testop
        macro is left alone, since the barrier semantics limit the usefulness
        of prefetching data.
    
        Acked-by: Nicolas Pitre <nico@linaro.org>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
    
    commit b7ec699405f55667caeb46d96229d75bf33a83ad
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Tue Nov 19 15:46:11 2013 +0100
    
        ARM: 7893/1: bitops: only emit .arch_extension mp if CONFIG_SMP
    
        Uwe reported a build failure when targetting a NOMMU platform with my
        recent prefetch changes:
    
          arch/arm/lib/changebit.S: Assembler messages:
          arch/arm/lib/changebit.S:15: Error: architectural extension `mp' is
                            not allowed for the current base architecture
    
        This is due to use of the .arch_extension mp directive immediately prior
        to an ALT_SMP(...) instruction. Whilst the ALT_SMP macro will expand to
        nothing if !CONFIG_SMP, gas will still choke on the directive.
    
        This patch fixes the issue by only emitting the sequence (including the
        directive) if CONFIG_SMP=y.
    
        Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm32/lib/bitops.h        |   17 +++++++++++++++--
 xen/arch/arm/arm32/lib/changebit.S     |    4 +---
 xen/arch/arm/arm32/lib/clearbit.S      |    4 +---
 xen/arch/arm/arm32/lib/setbit.S        |    4 +---
 xen/arch/arm/arm32/lib/testchangebit.S |    4 +---
 xen/arch/arm/arm32/lib/testclearbit.S  |    4 +---
 xen/arch/arm/arm32/lib/testsetbit.S    |    4 +---
 7 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/xen/arch/arm/arm32/lib/bitops.h b/xen/arch/arm/arm32/lib/bitops.h
index 689f2e8..25784c3 100644
--- a/xen/arch/arm/arm32/lib/bitops.h
+++ b/xen/arch/arm/arm32/lib/bitops.h
@@ -1,13 +1,20 @@
 #include <xen/config.h>
 
 #if __LINUX_ARM_ARCH__ >= 6
-	.macro	bitop, instr
+	.macro	bitop, name, instr
+ENTRY(	\name		)
+UNWIND(	.fnstart	)
 	ands	ip, r1, #3
 	strneb	r1, [ip]		@ assert word-aligned
 	mov	r2, #1
 	and	r3, r0, #31		@ Get bit offset
 	mov	r0, r0, lsr #5
 	add	r1, r1, r0, lsl #2	@ Get word offset
+#if __LINUX_ARM_ARCH__ >= 7 && defined(CONFIG_SMP)
+	.arch_extension	mp
+	ALT_SMP(W(pldw)	[r1])
+	ALT_UP(W(nop))
+#endif
 	mov	r3, r2, lsl r3
 1:	ldrex	r2, [r1]
 	\instr	r2, r2, r3
@@ -15,9 +22,13 @@
 	cmp	r0, #0
 	bne	1b
 	bx	lr
+UNWIND(	.fnend		)
+ENDPROC(\name		)
 	.endm
 
-	.macro	testop, instr, store
+	.macro	testop, name, instr, store
+ENTRY(	\name		)
+UNWIND(	.fnstart	)
 	ands	ip, r1, #3
 	strneb	r1, [ip]		@ assert word-aligned
 	mov	r2, #1
@@ -36,6 +47,8 @@
 	cmp	r0, #0
 	movne	r0, #1
 2:	bx	lr
+UNWIND(	.fnend		)
+ENDPROC(\name		)
 	.endm
 #else
 	.macro	bitop, name, instr
diff --git a/xen/arch/arm/arm32/lib/changebit.S b/xen/arch/arm/arm32/lib/changebit.S
index 62954bc..11f41d2 100644
--- a/xen/arch/arm/arm32/lib/changebit.S
+++ b/xen/arch/arm/arm32/lib/changebit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_change_bit)
-	bitop	eor
-ENDPROC(_change_bit)
+bitop	_change_bit, eor
diff --git a/xen/arch/arm/arm32/lib/clearbit.S b/xen/arch/arm/arm32/lib/clearbit.S
index 42ce416..1b6a569 100644
--- a/xen/arch/arm/arm32/lib/clearbit.S
+++ b/xen/arch/arm/arm32/lib/clearbit.S
@@ -14,6 +14,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_clear_bit)
-	bitop	bic
-ENDPROC(_clear_bit)
+bitop	_clear_bit, bic
diff --git a/xen/arch/arm/arm32/lib/setbit.S b/xen/arch/arm/arm32/lib/setbit.S
index c828851..1f4ef56 100644
--- a/xen/arch/arm/arm32/lib/setbit.S
+++ b/xen/arch/arm/arm32/lib/setbit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
 	.text
 
-ENTRY(_set_bit)
-	bitop	orr
-ENDPROC(_set_bit)
+bitop	_set_bit, orr
diff --git a/xen/arch/arm/arm32/lib/testchangebit.S b/xen/arch/arm/arm32/lib/testchangebit.S
index a7f527c..7f4635c 100644
--- a/xen/arch/arm/arm32/lib/testchangebit.S
+++ b/xen/arch/arm/arm32/lib/testchangebit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_test_and_change_bit)
-	testop	eor, str
-ENDPROC(_test_and_change_bit)
+testop	_test_and_change_bit, eor, str
diff --git a/xen/arch/arm/arm32/lib/testclearbit.S b/xen/arch/arm/arm32/lib/testclearbit.S
index 8f39c72..4d4152f 100644
--- a/xen/arch/arm/arm32/lib/testclearbit.S
+++ b/xen/arch/arm/arm32/lib/testclearbit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_test_and_clear_bit)
-	testop	bicne, strne
-ENDPROC(_test_and_clear_bit)
+testop	_test_and_clear_bit, bicne, strne
diff --git a/xen/arch/arm/arm32/lib/testsetbit.S b/xen/arch/arm/arm32/lib/testsetbit.S
index 1b8d273..54f48f9 100644
--- a/xen/arch/arm/arm32/lib/testsetbit.S
+++ b/xen/arch/arm/arm32/lib/testsetbit.S
@@ -13,6 +13,4 @@
 #include "bitops.h"
                 .text
 
-ENTRY(_test_and_set_bit)
-	testop	orreq, streq
-ENDPROC(_test_and_set_bit)
+testop	_test_and_set_bit, orreq, streq
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============4634261838309911105==
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
--===============4634261838309911105==--

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:02 +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 1WWDdM-0005JT-8J; Fri, 04 Apr 2014 23:34:52 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdK-0005J9-DM
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:50 +0000
Received: from [85.158.139.211:45064] by server-12.bemta-5.messagelabs.com id
	DD/3A-03824-9914F335; Fri, 04 Apr 2014 23:34:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1396654487!5615357!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15720 invoked from network); 4 Apr 2014 23:34:49 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:34:49 -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 1WWDdH-0002tT-O9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdH-00084j-JC
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:47 +0000
Date: Fri, 04 Apr 2014 23:34:47 +0000
Message-Id: <E1WWDdH-00084j-JC@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: ensure cmpxchg has full
	barrier semantics
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 ade960be492d0c12648fe86a121808d27adab8f9
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:38 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: arm32: ensure cmpxchg has full barrier semantics
    
    Unrelated reads/writes should not pass the xchg.
    
    Provide cmpxchg_local for parity with arm64, although it appears to be unused.
    It also helps make the reason for the separation of __cmpxchg_mb more
    apparent.
    
    With this our cmpxchg is in sync with Linux v3.14-rc7.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm32/system.h |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/xen/include/asm-arm/arm32/system.h b/xen/include/asm-arm/arm32/system.h
index 9f233fe..dfaa3b6 100644
--- a/xen/include/asm-arm/arm32/system.h
+++ b/xen/include/asm-arm/arm32/system.h
@@ -113,9 +113,29 @@ static always_inline unsigned long __cmpxchg(
     return oldval;
 }
 
-#define cmpxchg(ptr,o,n)                                                \
-    ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),            \
-                                   (unsigned long)(n),sizeof(*(ptr))))
+static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
+					 unsigned long new, int size)
+{
+	unsigned long ret;
+
+	smp_mb();
+	ret = __cmpxchg(ptr, old, new, size);
+	smp_mb();
+
+	return ret;
+}
+
+#define cmpxchg(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
+					  (unsigned long)(o),		\
+					  (unsigned long)(n),		\
+					  sizeof(*(ptr))))
+
+#define cmpxchg_local(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
+				       (unsigned long)(o),		\
+				       (unsigned long)(n),		\
+				       sizeof(*(ptr))))
 
 #define local_irq_disable() asm volatile ( "cpsid i @ local_irq_disable\n" : : : "cc" )
 #define local_irq_enable()  asm volatile ( "cpsie i @ local_irq_enable\n" : : : "cc" )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:02 +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 1WWDdM-0005JT-8J; Fri, 04 Apr 2014 23:34:52 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdK-0005J9-DM
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:50 +0000
Received: from [85.158.139.211:45064] by server-12.bemta-5.messagelabs.com id
	DD/3A-03824-9914F335; Fri, 04 Apr 2014 23:34:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1396654487!5615357!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15720 invoked from network); 4 Apr 2014 23:34:49 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:34:49 -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 1WWDdH-0002tT-O9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdH-00084j-JC
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:47 +0000
Date: Fri, 04 Apr 2014 23:34:47 +0000
Message-Id: <E1WWDdH-00084j-JC@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: ensure cmpxchg has full
	barrier semantics
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 ade960be492d0c12648fe86a121808d27adab8f9
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:38 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: arm32: ensure cmpxchg has full barrier semantics
    
    Unrelated reads/writes should not pass the xchg.
    
    Provide cmpxchg_local for parity with arm64, although it appears to be unused.
    It also helps make the reason for the separation of __cmpxchg_mb more
    apparent.
    
    With this our cmpxchg is in sync with Linux v3.14-rc7.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm32/system.h |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/xen/include/asm-arm/arm32/system.h b/xen/include/asm-arm/arm32/system.h
index 9f233fe..dfaa3b6 100644
--- a/xen/include/asm-arm/arm32/system.h
+++ b/xen/include/asm-arm/arm32/system.h
@@ -113,9 +113,29 @@ static always_inline unsigned long __cmpxchg(
     return oldval;
 }
 
-#define cmpxchg(ptr,o,n)                                                \
-    ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),            \
-                                   (unsigned long)(n),sizeof(*(ptr))))
+static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
+					 unsigned long new, int size)
+{
+	unsigned long ret;
+
+	smp_mb();
+	ret = __cmpxchg(ptr, old, new, size);
+	smp_mb();
+
+	return ret;
+}
+
+#define cmpxchg(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
+					  (unsigned long)(o),		\
+					  (unsigned long)(n),		\
+					  sizeof(*(ptr))))
+
+#define cmpxchg_local(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
+				       (unsigned long)(o),		\
+				       (unsigned long)(n),		\
+				       sizeof(*(ptr))))
 
 #define local_irq_disable() asm volatile ( "cpsid i @ local_irq_disable\n" : : : "cc" )
 #define local_irq_enable()  asm volatile ( "cpsie i @ local_irq_enable\n" : : : "cc" )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:02 +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 1WWDcq-0005Fa-Up; Fri, 04 Apr 2014 23:34:20 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcp-0005F6-QN
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:20 +0000
Received: from [85.158.137.68:9969] by server-4.bemta-3.messagelabs.com id
	0F/CD-17399-B714F335; Fri, 04 Apr 2014 23:34:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1396654457!5130836!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12763 invoked from network); 4 Apr 2014 23:34:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:34:18 -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 1WWDcn-0002tF-2q
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcn-00082m-1L
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:17 +0000
Date: Fri, 04 Apr 2014 23:34:17 +0000
Message-Id: <E1WWDcn-00082m-1L@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "xen/arm: Allocate memory for
	dom0 from the bottom with the 1:1 Workaround"
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 1be5c1947fd52f5faaf6b678a829d47b0ec88bfd
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 2 13:03:36 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround"
    
    This reverts commit 6c21cb36e263de2db8716b477157a5b6cd531e1e.
    
    The Linux = issue which this works around was fixed in v3.13 via f52bb722547f
    "ARM: mm: Correct virt_to_phys patching for 64 bit physical addresses".
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/domain_build.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 502db84..a0b73d2 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -69,19 +69,12 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo)
 {
     paddr_t start;
     paddr_t size;
-    struct page_info *pg = NULL;
+    struct page_info *pg;
     unsigned int order = get_order_from_bytes(dom0_mem);
     int res;
     paddr_t spfn;
-    unsigned int bits;
-
-    for ( bits = PAGE_SHIFT + 1; bits < PADDR_BITS; bits++ )
-    {
-        pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
-        if ( pg != NULL )
-            break;
-    }
 
+    pg = alloc_domheap_pages(d, order, 0);
     if ( !pg )
         panic("Failed to allocate contiguous memory for dom0");
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:02 +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 1WWDcq-0005Fa-Up; Fri, 04 Apr 2014 23:34:20 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcp-0005F6-QN
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:20 +0000
Received: from [85.158.137.68:9969] by server-4.bemta-3.messagelabs.com id
	0F/CD-17399-B714F335; Fri, 04 Apr 2014 23:34:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1396654457!5130836!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12763 invoked from network); 4 Apr 2014 23:34:18 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:34:18 -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 1WWDcn-0002tF-2q
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcn-00082m-1L
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:17 +0000
Date: Fri, 04 Apr 2014 23:34:17 +0000
Message-Id: <E1WWDcn-00082m-1L@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "xen/arm: Allocate memory for
	dom0 from the bottom with the 1:1 Workaround"
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 1be5c1947fd52f5faaf6b678a829d47b0ec88bfd
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 2 13:03:36 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround"
    
    This reverts commit 6c21cb36e263de2db8716b477157a5b6cd531e1e.
    
    The Linux = issue which this works around was fixed in v3.13 via f52bb722547f
    "ARM: mm: Correct virt_to_phys patching for 64 bit physical addresses".
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/domain_build.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 502db84..a0b73d2 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -69,19 +69,12 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo)
 {
     paddr_t start;
     paddr_t size;
-    struct page_info *pg = NULL;
+    struct page_info *pg;
     unsigned int order = get_order_from_bytes(dom0_mem);
     int res;
     paddr_t spfn;
-    unsigned int bits;
-
-    for ( bits = PAGE_SHIFT + 1; bits < PADDR_BITS; bits++ )
-    {
-        pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
-        if ( pg != NULL )
-            break;
-    }
 
+    pg = alloc_domheap_pages(d, order, 0);
     if ( !pg )
         panic("Failed to allocate contiguous memory for dom0");
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:02 +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 1WWDd2-0005HA-1I; Fri, 04 Apr 2014 23:34:32 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDd0-0005Go-7F
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:30 +0000
Received: from [85.158.139.211:40626] by server-11.bemta-5.messagelabs.com id
	27/3D-30804-5814F335; Fri, 04 Apr 2014 23:34:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1396654467!5601673!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21822 invoked from network); 4 Apr 2014 23:34:28 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:34:28 -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 1WWDcx-0002tL-7b
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcx-00083E-6N
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:27 +0000
Date: Fri, 04 Apr 2014 23:34:27 +0000
Message-Id: <E1WWDcx-00083E-6N@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: x86 & generic: change to
	__builtin_prefetch()
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 630017f420f111e0c0332dbd99df30ebb8fed207
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:36 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: x86 & generic: change to __builtin_prefetch()
    
    Quoting Andi Kleen in Linux b483570a13be from 2007:
        gcc 3.2+ supports __builtin_prefetch, so it's possible to use it on all
        architectures. Change the generic fallback in linux/prefetch.h to use it
        instead of noping it out. gcc should do the right thing when the
        architecture doesn't support prefetching
    
        Undefine the x86-64 inline assembler version and use the fallback.
    
    ARM wants to use the builtins.
    
    Fix a pair of spelling errors, one of which was from Lucas De Marchi in the
    Linux tree.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Cc: Keir Fraser <keir@xen.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/xen/prefetch.h |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/xen/include/xen/prefetch.h b/xen/include/xen/prefetch.h
index 8d7d3ff..ba73998 100644
--- a/xen/include/xen/prefetch.h
+++ b/xen/include/xen/prefetch.h
@@ -28,24 +28,17 @@
 	prefetchw(x)	- prefetches the cacheline at "x" for write
 	spin_lock_prefetch(x) - prefectches the spinlock *x for taking
 	
-	there is also PREFETCH_STRIDE which is the architecure-prefered 
+	there is also PREFETCH_STRIDE which is the architecture-preferred
 	"lookahead" size for prefetching streamed operations.
 	
 */
 
-/*
- *	These cannot be do{}while(0) macros. See the mental gymnastics in
- *	the loop macro.
- */
- 
 #ifndef ARCH_HAS_PREFETCH
-#define ARCH_HAS_PREFETCH
-static inline void prefetch(const void *x) {;}
+#define prefetch(x) __builtin_prefetch(x)
 #endif
 
 #ifndef ARCH_HAS_PREFETCHW
-#define ARCH_HAS_PREFETCHW
-static inline void prefetchw(const void *x) {;}
+#define prefetchw(x) __builtin_prefetch(x,1)
 #endif
 
 #ifndef ARCH_HAS_SPINLOCK_PREFETCH
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:02 +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 1WWDd2-0005HA-1I; Fri, 04 Apr 2014 23:34:32 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDd0-0005Go-7F
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:30 +0000
Received: from [85.158.139.211:40626] by server-11.bemta-5.messagelabs.com id
	27/3D-30804-5814F335; Fri, 04 Apr 2014 23:34:29 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1396654467!5601673!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21822 invoked from network); 4 Apr 2014 23:34:28 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:34:28 -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 1WWDcx-0002tL-7b
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDcx-00083E-6N
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:27 +0000
Date: Fri, 04 Apr 2014 23:34:27 +0000
Message-Id: <E1WWDcx-00083E-6N@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: x86 & generic: change to
	__builtin_prefetch()
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 630017f420f111e0c0332dbd99df30ebb8fed207
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:36 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:41 2014 +0100

    xen: x86 & generic: change to __builtin_prefetch()
    
    Quoting Andi Kleen in Linux b483570a13be from 2007:
        gcc 3.2+ supports __builtin_prefetch, so it's possible to use it on all
        architectures. Change the generic fallback in linux/prefetch.h to use it
        instead of noping it out. gcc should do the right thing when the
        architecture doesn't support prefetching
    
        Undefine the x86-64 inline assembler version and use the fallback.
    
    ARM wants to use the builtins.
    
    Fix a pair of spelling errors, one of which was from Lucas De Marchi in the
    Linux tree.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Cc: Keir Fraser <keir@xen.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/xen/prefetch.h |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/xen/include/xen/prefetch.h b/xen/include/xen/prefetch.h
index 8d7d3ff..ba73998 100644
--- a/xen/include/xen/prefetch.h
+++ b/xen/include/xen/prefetch.h
@@ -28,24 +28,17 @@
 	prefetchw(x)	- prefetches the cacheline at "x" for write
 	spin_lock_prefetch(x) - prefectches the spinlock *x for taking
 	
-	there is also PREFETCH_STRIDE which is the architecure-prefered 
+	there is also PREFETCH_STRIDE which is the architecture-preferred
 	"lookahead" size for prefetching streamed operations.
 	
 */
 
-/*
- *	These cannot be do{}while(0) macros. See the mental gymnastics in
- *	the loop macro.
- */
- 
 #ifndef ARCH_HAS_PREFETCH
-#define ARCH_HAS_PREFETCH
-static inline void prefetch(const void *x) {;}
+#define prefetch(x) __builtin_prefetch(x)
 #endif
 
 #ifndef ARCH_HAS_PREFETCHW
-#define ARCH_HAS_PREFETCHW
-static inline void prefetchw(const void *x) {;}
+#define prefetchw(x) __builtin_prefetch(x,1)
 #endif
 
 #ifndef ARCH_HAS_SPINLOCK_PREFETCH
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:03 +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 1WWDdX-0005LT-Ax; Fri, 04 Apr 2014 23:35:03 +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 1WWDdU-0005KJ-U8
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:01 +0000
Received: from [85.158.143.35:23342] by server-2.bemta-4.messagelabs.com id
	70/F7-06539-4A14F335; Fri, 04 Apr 2014 23:35:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1396654498!3291695!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14865 invoked from network); 4 Apr 2014 23:34:59 -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;
	4 Apr 2014 23:34:59 -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 1WWDdR-0002tZ-Ux
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdR-000858-TX
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:57 +0000
Date: Fri, 04 Apr 2014 23:34:57 +0000
Message-Id: <E1WWDdR-000858-TX@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: replace hard tabs in
	atomics.h
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 7b92e1becbba9425f3ef0dcb1a32f210f8e57fb7
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:39 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: replace hard tabs in atomics.h
    
    This file is from Linux and the intention was to keep the formatting the same
    to make resyncing easier. Put the hardtabs back and adjust the emacs magic to
    reflect the desired use of whitespace.
    
    Adjust the 64-bit emacs magic too.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm32/atomic.h |  166 ++++++++++++++++++------------------
 xen/include/asm-arm/arm64/atomic.h |    4 +-
 2 files changed, 85 insertions(+), 85 deletions(-)

diff --git a/xen/include/asm-arm/arm32/atomic.h b/xen/include/asm-arm/arm32/atomic.h
index 523c745..3f024d4 100644
--- a/xen/include/asm-arm/arm32/atomic.h
+++ b/xen/include/asm-arm/arm32/atomic.h
@@ -18,122 +18,122 @@
  */
 static inline void atomic_add(int i, atomic_t *v)
 {
-        unsigned long tmp;
-        int result;
-
-        __asm__ __volatile__("@ atomic_add\n"
-"1:     ldrex   %0, [%3]\n"
-"       add     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
-        : "r" (&v->counter), "Ir" (i)
-        : "cc");
+	unsigned long tmp;
+	int result;
+
+	__asm__ __volatile__("@ atomic_add\n"
+"1:	ldrex	%0, [%3]\n"
+"	add	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+	: "r" (&v->counter), "Ir" (i)
+	: "cc");
 }
 
 static inline int atomic_add_return(int i, atomic_t *v)
 {
-        unsigned long tmp;
-        int result;
+	unsigned long tmp;
+	int result;
 
-        smp_mb();
+	smp_mb();
 
-        __asm__ __volatile__("@ atomic_add_return\n"
-"1:     ldrex   %0, [%3]\n"
-"       add     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
-        : "r" (&v->counter), "Ir" (i)
-        : "cc");
+	__asm__ __volatile__("@ atomic_add_return\n"
+"1:	ldrex	%0, [%3]\n"
+"	add	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+	: "r" (&v->counter), "Ir" (i)
+	: "cc");
 
-        smp_mb();
+	smp_mb();
 
-        return result;
+	return result;
 }
 
 static inline void atomic_sub(int i, atomic_t *v)
 {
-        unsigned long tmp;
-        int result;
-
-        __asm__ __volatile__("@ atomic_sub\n"
-"1:     ldrex   %0, [%3]\n"
-"       sub     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
-        : "r" (&v->counter), "Ir" (i)
-        : "cc");
+	unsigned long tmp;
+	int result;
+
+	__asm__ __volatile__("@ atomic_sub\n"
+"1:	ldrex	%0, [%3]\n"
+"	sub	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+	: "r" (&v->counter), "Ir" (i)
+	: "cc");
 }
 
 static inline int atomic_sub_return(int i, atomic_t *v)
 {
-        unsigned long tmp;
-        int result;
+	unsigned long tmp;
+	int result;
 
-        smp_mb();
+	smp_mb();
 
-        __asm__ __volatile__("@ atomic_sub_return\n"
-"1:     ldrex   %0, [%3]\n"
-"       sub     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
-        : "r" (&v->counter), "Ir" (i)
-        : "cc");
+	__asm__ __volatile__("@ atomic_sub_return\n"
+"1:	ldrex	%0, [%3]\n"
+"	sub	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+	: "r" (&v->counter), "Ir" (i)
+	: "cc");
 
-        smp_mb();
+	smp_mb();
 
-        return result;
+	return result;
 }
 
 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 {
-        unsigned long oldval, res;
+	unsigned long oldval, res;
 
-        smp_mb();
+	smp_mb();
 
-        do {
-                __asm__ __volatile__("@ atomic_cmpxchg\n"
-                "ldrex  %1, [%3]\n"
-                "mov    %0, #0\n"
-                "teq    %1, %4\n"
-                "strexeq %0, %5, [%3]\n"
-                    : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
-                    : "r" (&ptr->counter), "Ir" (old), "r" (new)
-                    : "cc");
-        } while (res);
+	do {
+		__asm__ __volatile__("@ atomic_cmpxchg\n"
+		"ldrex	%1, [%3]\n"
+		"mov	%0, #0\n"
+		"teq	%1, %4\n"
+		"strexeq %0, %5, [%3]\n"
+		    : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
+		    : "r" (&ptr->counter), "Ir" (old), "r" (new)
+		    : "cc");
+	} while (res);
 
-        smp_mb();
+	smp_mb();
 
-        return oldval;
+	return oldval;
 }
 
 static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
 {
-        unsigned long tmp, tmp2;
-
-        __asm__ __volatile__("@ atomic_clear_mask\n"
-"1:     ldrex   %0, [%3]\n"
-"       bic     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
-        : "r" (addr), "Ir" (mask)
-        : "cc");
+	unsigned long tmp, tmp2;
+
+	__asm__ __volatile__("@ atomic_clear_mask\n"
+"1:	ldrex	%0, [%3]\n"
+"	bic	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
+	: "r" (addr), "Ir" (mask)
+	: "cc");
 }
 
-#define atomic_inc(v)           atomic_add(1, v)
-#define atomic_dec(v)           atomic_sub(1, v)
+#define atomic_inc(v)		atomic_add(1, v)
+#define atomic_dec(v)		atomic_sub(1, v)
 
-#define atomic_inc_and_test(v)  (atomic_add_return(1, v) == 0)
-#define atomic_dec_and_test(v)  (atomic_sub_return(1, v) == 0)
+#define atomic_inc_and_test(v)	(atomic_add_return(1, v) == 0)
+#define atomic_dec_and_test(v)	(atomic_sub_return(1, v) == 0)
 #define atomic_inc_return(v)    (atomic_add_return(1, v))
 #define atomic_dec_return(v)    (atomic_sub_return(1, v))
 #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
@@ -145,7 +145,7 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
  * Local variables:
  * mode: C
  * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
  * End:
  */
diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/include/asm-arm/arm64/atomic.h
index a279755..b04e6d5 100644
--- a/xen/include/asm-arm/arm64/atomic.h
+++ b/xen/include/asm-arm/arm64/atomic.h
@@ -157,7 +157,7 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
  * Local variables:
  * mode: C
  * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
  * End:
  */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:03 +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 1WWDdX-0005LT-Ax; Fri, 04 Apr 2014 23:35:03 +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 1WWDdU-0005KJ-U8
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:01 +0000
Received: from [85.158.143.35:23342] by server-2.bemta-4.messagelabs.com id
	70/F7-06539-4A14F335; Fri, 04 Apr 2014 23:35:00 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1396654498!3291695!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14865 invoked from network); 4 Apr 2014 23:34:59 -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;
	4 Apr 2014 23:34:59 -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 1WWDdR-0002tZ-Ux
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdR-000858-TX
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:34:57 +0000
Date: Fri, 04 Apr 2014 23:34:57 +0000
Message-Id: <E1WWDdR-000858-TX@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: replace hard tabs in
	atomics.h
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 7b92e1becbba9425f3ef0dcb1a32f210f8e57fb7
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:39 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: replace hard tabs in atomics.h
    
    This file is from Linux and the intention was to keep the formatting the same
    to make resyncing easier. Put the hardtabs back and adjust the emacs magic to
    reflect the desired use of whitespace.
    
    Adjust the 64-bit emacs magic too.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm32/atomic.h |  166 ++++++++++++++++++------------------
 xen/include/asm-arm/arm64/atomic.h |    4 +-
 2 files changed, 85 insertions(+), 85 deletions(-)

diff --git a/xen/include/asm-arm/arm32/atomic.h b/xen/include/asm-arm/arm32/atomic.h
index 523c745..3f024d4 100644
--- a/xen/include/asm-arm/arm32/atomic.h
+++ b/xen/include/asm-arm/arm32/atomic.h
@@ -18,122 +18,122 @@
  */
 static inline void atomic_add(int i, atomic_t *v)
 {
-        unsigned long tmp;
-        int result;
-
-        __asm__ __volatile__("@ atomic_add\n"
-"1:     ldrex   %0, [%3]\n"
-"       add     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
-        : "r" (&v->counter), "Ir" (i)
-        : "cc");
+	unsigned long tmp;
+	int result;
+
+	__asm__ __volatile__("@ atomic_add\n"
+"1:	ldrex	%0, [%3]\n"
+"	add	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+	: "r" (&v->counter), "Ir" (i)
+	: "cc");
 }
 
 static inline int atomic_add_return(int i, atomic_t *v)
 {
-        unsigned long tmp;
-        int result;
+	unsigned long tmp;
+	int result;
 
-        smp_mb();
+	smp_mb();
 
-        __asm__ __volatile__("@ atomic_add_return\n"
-"1:     ldrex   %0, [%3]\n"
-"       add     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
-        : "r" (&v->counter), "Ir" (i)
-        : "cc");
+	__asm__ __volatile__("@ atomic_add_return\n"
+"1:	ldrex	%0, [%3]\n"
+"	add	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+	: "r" (&v->counter), "Ir" (i)
+	: "cc");
 
-        smp_mb();
+	smp_mb();
 
-        return result;
+	return result;
 }
 
 static inline void atomic_sub(int i, atomic_t *v)
 {
-        unsigned long tmp;
-        int result;
-
-        __asm__ __volatile__("@ atomic_sub\n"
-"1:     ldrex   %0, [%3]\n"
-"       sub     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
-        : "r" (&v->counter), "Ir" (i)
-        : "cc");
+	unsigned long tmp;
+	int result;
+
+	__asm__ __volatile__("@ atomic_sub\n"
+"1:	ldrex	%0, [%3]\n"
+"	sub	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+	: "r" (&v->counter), "Ir" (i)
+	: "cc");
 }
 
 static inline int atomic_sub_return(int i, atomic_t *v)
 {
-        unsigned long tmp;
-        int result;
+	unsigned long tmp;
+	int result;
 
-        smp_mb();
+	smp_mb();
 
-        __asm__ __volatile__("@ atomic_sub_return\n"
-"1:     ldrex   %0, [%3]\n"
-"       sub     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
-        : "r" (&v->counter), "Ir" (i)
-        : "cc");
+	__asm__ __volatile__("@ atomic_sub_return\n"
+"1:	ldrex	%0, [%3]\n"
+"	sub	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (result), "=&r" (tmp), "+Qo" (v->counter)
+	: "r" (&v->counter), "Ir" (i)
+	: "cc");
 
-        smp_mb();
+	smp_mb();
 
-        return result;
+	return result;
 }
 
 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 {
-        unsigned long oldval, res;
+	unsigned long oldval, res;
 
-        smp_mb();
+	smp_mb();
 
-        do {
-                __asm__ __volatile__("@ atomic_cmpxchg\n"
-                "ldrex  %1, [%3]\n"
-                "mov    %0, #0\n"
-                "teq    %1, %4\n"
-                "strexeq %0, %5, [%3]\n"
-                    : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
-                    : "r" (&ptr->counter), "Ir" (old), "r" (new)
-                    : "cc");
-        } while (res);
+	do {
+		__asm__ __volatile__("@ atomic_cmpxchg\n"
+		"ldrex	%1, [%3]\n"
+		"mov	%0, #0\n"
+		"teq	%1, %4\n"
+		"strexeq %0, %5, [%3]\n"
+		    : "=&r" (res), "=&r" (oldval), "+Qo" (ptr->counter)
+		    : "r" (&ptr->counter), "Ir" (old), "r" (new)
+		    : "cc");
+	} while (res);
 
-        smp_mb();
+	smp_mb();
 
-        return oldval;
+	return oldval;
 }
 
 static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
 {
-        unsigned long tmp, tmp2;
-
-        __asm__ __volatile__("@ atomic_clear_mask\n"
-"1:     ldrex   %0, [%3]\n"
-"       bic     %0, %0, %4\n"
-"       strex   %1, %0, [%3]\n"
-"       teq     %1, #0\n"
-"       bne     1b"
-        : "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
-        : "r" (addr), "Ir" (mask)
-        : "cc");
+	unsigned long tmp, tmp2;
+
+	__asm__ __volatile__("@ atomic_clear_mask\n"
+"1:	ldrex	%0, [%3]\n"
+"	bic	%0, %0, %4\n"
+"	strex	%1, %0, [%3]\n"
+"	teq	%1, #0\n"
+"	bne	1b"
+	: "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
+	: "r" (addr), "Ir" (mask)
+	: "cc");
 }
 
-#define atomic_inc(v)           atomic_add(1, v)
-#define atomic_dec(v)           atomic_sub(1, v)
+#define atomic_inc(v)		atomic_add(1, v)
+#define atomic_dec(v)		atomic_sub(1, v)
 
-#define atomic_inc_and_test(v)  (atomic_add_return(1, v) == 0)
-#define atomic_dec_and_test(v)  (atomic_sub_return(1, v) == 0)
+#define atomic_inc_and_test(v)	(atomic_add_return(1, v) == 0)
+#define atomic_dec_and_test(v)	(atomic_sub_return(1, v) == 0)
 #define atomic_inc_return(v)    (atomic_add_return(1, v))
 #define atomic_dec_return(v)    (atomic_sub_return(1, v))
 #define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
@@ -145,7 +145,7 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
  * Local variables:
  * mode: C
  * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
  * End:
  */
diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/include/asm-arm/arm64/atomic.h
index a279755..b04e6d5 100644
--- a/xen/include/asm-arm/arm64/atomic.h
+++ b/xen/include/asm-arm/arm64/atomic.h
@@ -157,7 +157,7 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
  * Local variables:
  * mode: C
  * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
  * End:
  */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35: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 1WWDdl-0005Nw-Du; Fri, 04 Apr 2014 23:35:17 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdj-0005Np-Ua
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:16 +0000
Received: from [193.109.254.147:46151] by server-5.bemta-14.messagelabs.com id
	24/9E-26413-3B14F335; Fri, 04 Apr 2014 23:35:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-27.messagelabs.com!1396654513!6391947!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4777 invoked from network); 4 Apr 2014 23:35:14 -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;
	4 Apr 2014 23:35:14 -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 1WWDdh-0002uJ-5G
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdc-00085n-3C
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:08 +0000
Date: Fri, 04 Apr 2014 23:35:08 +0000
Message-Id: <E1WWDdc-00085n-3C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: resync atomics with
	(almost) v3.14-rc7
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 7486348460b58dfff2540506ee1a8df83fc9a2ef
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:40 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: resync atomics with (almost) v3.14-rc7
    
    Almost because I omitting aed3a4e "ARM: 7868/1: arm/arm64: remove
    atomic_clear_mask() ..." which I will apply to both arm32 and arm64
    simultaneously in a later patch.
    
    This pulls in the following Linux patches:
    
    commit f38d999c4d16fc0fce4270374f15fbb2d8713c09
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Thu Jul 4 11:43:18 2013 +0100
    
        ARM: atomics: prefetch the destination word for write prior to strex
    
        The cost of changing a cacheline from shared to exclusive state can be
        significant, especially when this is triggered by an exclusive store,
        since it may result in having to retry the transaction.
    
        This patch prefixes our atomic access implementations with pldw
        instructions (on CPUs which support them) to try and grab the line in
        exclusive state from the start. Only the barrier-less functions are
        updated, since memory barriers can limit the usefulness of prefetching
        data.
    
        Acked-by: Nicolas Pitre <nico@linaro.org>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
    
    commit 4dcc1cf7316a26e112f5c9fcca531ff98ef44700
    Author: Chen Gang <gang.chen@asianux.com>
    Date:   Sat Oct 26 15:07:25 2013 +0100
    
        ARM: 7867/1: include: asm: use 'int' instead of 'unsigned long' for 'oldval
    
        For atomic_cmpxchg(), the type of 'oldval' need be 'int' to match the
        type of "*ptr" (used by 'ldrex' instruction) and 'old' (used by 'teq'
        instruction).
    
        Reviewed-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Chen Gang <gang.chen@asianux.com>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/include/asm-arm/arm32/atomic.h |    6 +++++-
 xen/include/asm-arm/atomic.h       |    1 +
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/xen/include/asm-arm/arm32/atomic.h b/xen/include/asm-arm/arm32/atomic.h
index 3f024d4..d309f66 100644
--- a/xen/include/asm-arm/arm32/atomic.h
+++ b/xen/include/asm-arm/arm32/atomic.h
@@ -21,6 +21,7 @@ static inline void atomic_add(int i, atomic_t *v)
 	unsigned long tmp;
 	int result;
 
+	prefetchw(&v->counter);
 	__asm__ __volatile__("@ atomic_add\n"
 "1:	ldrex	%0, [%3]\n"
 "	add	%0, %0, %4\n"
@@ -59,6 +60,7 @@ static inline void atomic_sub(int i, atomic_t *v)
 	unsigned long tmp;
 	int result;
 
+	prefetchw(&v->counter);
 	__asm__ __volatile__("@ atomic_sub\n"
 "1:	ldrex	%0, [%3]\n"
 "	sub	%0, %0, %4\n"
@@ -94,7 +96,8 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 
 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 {
-	unsigned long oldval, res;
+	int oldval;
+	unsigned long res;
 
 	smp_mb();
 
@@ -118,6 +121,7 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
 {
 	unsigned long tmp, tmp2;
 
+	prefetchw(addr);
 	__asm__ __volatile__("@ atomic_clear_mask\n"
 "1:	ldrex	%0, [%3]\n"
 "	bic	%0, %0, %4\n"
diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
index 69c8f3f..2c92de9 100644
--- a/xen/include/asm-arm/atomic.h
+++ b/xen/include/asm-arm/atomic.h
@@ -2,6 +2,7 @@
 #define __ARCH_ARM_ATOMIC__
 
 #include <xen/config.h>
+#include <xen/prefetch.h>
 #include <asm/system.h>
 
 #define build_atomic_read(name, size, width, type, reg)\
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:17 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35: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 1WWDdl-0005Nw-Du; Fri, 04 Apr 2014 23:35:17 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdj-0005Np-Ua
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:16 +0000
Received: from [193.109.254.147:46151] by server-5.bemta-14.messagelabs.com id
	24/9E-26413-3B14F335; Fri, 04 Apr 2014 23:35:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-27.messagelabs.com!1396654513!6391947!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4777 invoked from network); 4 Apr 2014 23:35:14 -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;
	4 Apr 2014 23:35:14 -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 1WWDdh-0002uJ-5G
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdc-00085n-3C
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:08 +0000
Date: Fri, 04 Apr 2014 23:35:08 +0000
Message-Id: <E1WWDdc-00085n-3C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: resync atomics with
	(almost) v3.14-rc7
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 7486348460b58dfff2540506ee1a8df83fc9a2ef
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:40 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: resync atomics with (almost) v3.14-rc7
    
    Almost because I omitting aed3a4e "ARM: 7868/1: arm/arm64: remove
    atomic_clear_mask() ..." which I will apply to both arm32 and arm64
    simultaneously in a later patch.
    
    This pulls in the following Linux patches:
    
    commit f38d999c4d16fc0fce4270374f15fbb2d8713c09
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Thu Jul 4 11:43:18 2013 +0100
    
        ARM: atomics: prefetch the destination word for write prior to strex
    
        The cost of changing a cacheline from shared to exclusive state can be
        significant, especially when this is triggered by an exclusive store,
        since it may result in having to retry the transaction.
    
        This patch prefixes our atomic access implementations with pldw
        instructions (on CPUs which support them) to try and grab the line in
        exclusive state from the start. Only the barrier-less functions are
        updated, since memory barriers can limit the usefulness of prefetching
        data.
    
        Acked-by: Nicolas Pitre <nico@linaro.org>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
    
    commit 4dcc1cf7316a26e112f5c9fcca531ff98ef44700
    Author: Chen Gang <gang.chen@asianux.com>
    Date:   Sat Oct 26 15:07:25 2013 +0100
    
        ARM: 7867/1: include: asm: use 'int' instead of 'unsigned long' for 'oldval
    
        For atomic_cmpxchg(), the type of 'oldval' need be 'int' to match the
        type of "*ptr" (used by 'ldrex' instruction) and 'old' (used by 'teq'
        instruction).
    
        Reviewed-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Chen Gang <gang.chen@asianux.com>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/include/asm-arm/arm32/atomic.h |    6 +++++-
 xen/include/asm-arm/atomic.h       |    1 +
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/xen/include/asm-arm/arm32/atomic.h b/xen/include/asm-arm/arm32/atomic.h
index 3f024d4..d309f66 100644
--- a/xen/include/asm-arm/arm32/atomic.h
+++ b/xen/include/asm-arm/arm32/atomic.h
@@ -21,6 +21,7 @@ static inline void atomic_add(int i, atomic_t *v)
 	unsigned long tmp;
 	int result;
 
+	prefetchw(&v->counter);
 	__asm__ __volatile__("@ atomic_add\n"
 "1:	ldrex	%0, [%3]\n"
 "	add	%0, %0, %4\n"
@@ -59,6 +60,7 @@ static inline void atomic_sub(int i, atomic_t *v)
 	unsigned long tmp;
 	int result;
 
+	prefetchw(&v->counter);
 	__asm__ __volatile__("@ atomic_sub\n"
 "1:	ldrex	%0, [%3]\n"
 "	sub	%0, %0, %4\n"
@@ -94,7 +96,8 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 
 static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 {
-	unsigned long oldval, res;
+	int oldval;
+	unsigned long res;
 
 	smp_mb();
 
@@ -118,6 +121,7 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
 {
 	unsigned long tmp, tmp2;
 
+	prefetchw(addr);
 	__asm__ __volatile__("@ atomic_clear_mask\n"
 "1:	ldrex	%0, [%3]\n"
 "	bic	%0, %0, %4\n"
diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
index 69c8f3f..2c92de9 100644
--- a/xen/include/asm-arm/atomic.h
+++ b/xen/include/asm-arm/atomic.h
@@ -2,6 +2,7 @@
 #define __ARCH_ARM_ATOMIC__
 
 #include <xen/config.h>
+#include <xen/prefetch.h>
 #include <asm/system.h>
 
 #define build_atomic_read(name, size, width, type, reg)\
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35: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 1WWDdw-0005PD-Gj; Fri, 04 Apr 2014 23:35:28 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdv-0005Oz-1L
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:27 +0000
Received: from [85.158.137.68:11069] by server-3.bemta-3.messagelabs.com id
	50/C4-05289-EB14F335; Fri, 04 Apr 2014 23:35:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1396654523!5155883!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29129 invoked from network); 4 Apr 2014 23:35:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:35:24 -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 1WWDdr-0002uS-F7
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdr-00086Y-D6
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:23 +0000
Date: Fri, 04 Apr 2014 23:35:23 +0000
Message-Id: <E1WWDdr-00086Y-D6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: resync mem* with Linux
	v3.14-rc7
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 2722a4583faa54091031472917e7f14d5e3553da
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:41 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: resync mem* with Linux v3.14-rc7
    
    This pulls in the following Linux commits:
    commit 455bd4c430b0c0a361f38e8658a0d6cb469942b5
    Author: Ivan Djelic <ivan.djelic@parrot.com>
    Date:   Wed Mar 6 20:09:27 2013 +0100
    
        ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimi
    
        Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on
        assumptions about the implementation of memset and similar functions.
        The current ARM optimized memset code does not return the value of
        its first argument, as is usually expected from standard implementations.
    
        For instance in the following function:
    
        void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waite
        {
            memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
            waiter->magic = waiter;
            INIT_LIST_HEAD(&waiter->list);
        }
    
        compiled as:
    
        800554d0 <debug_mutex_lock_common>:
        800554d0:       e92d4008        push    {r3, lr}
        800554d4:       e1a00001        mov     r0, r1
        800554d8:       e3a02010        mov     r2, #16 ; 0x10
        800554dc:       e3a01011        mov     r1, #17 ; 0x11
        800554e0:       eb04426e        bl      80165ea0 <memset>
        800554e4:       e1a03000        mov     r3, r0
        800554e8:       e583000c        str     r0, [r3, #12]
        800554ec:       e5830000        str     r0, [r3]
        800554f0:       e5830004        str     r0, [r3, #4]
        800554f4:       e8bd8008        pop     {r3, pc}
    
        GCC assumes memset returns the value of pointer 'waiter' in register r0; ca
        register/memory corruptions.
    
        This patch fixes the return value of the assembly version of memset.
        It adds a 'mov' instruction and merges an additional load+store into
        existing load/store instructions.
        For ease of review, here is a breakdown of the patch into 4 simple steps:
    
        Step 1
        ======
        Perform the following substitutions:
        ip -> r8, then
        r0 -> ip,
        and insert 'mov ip, r0' as the first statement of the function.
        At this point, we have a memset() implementation returning the proper resul
        but corrupting r8 on some paths (the ones that were using ip).
    
        Step 2
        ======
        Make sure r8 is saved and restored when (! CALGN(1)+0) == 1:
    
        save r8:
        -       str     lr, [sp, #-4]!
        +       stmfd   sp!, {r8, lr}
    
        and restore r8 on both exit paths:
        -       ldmeqfd sp!, {pc}               @ Now <64 bytes to go.
        +       ldmeqfd sp!, {r8, pc}           @ Now <64 bytes to go.
        (...)
                tst     r2, #16
                stmneia ip!, {r1, r3, r8, lr}
        -       ldr     lr, [sp], #4
        +       ldmfd   sp!, {r8, lr}
    
        Step 3
        ======
        Make sure r8 is saved and restored when (! CALGN(1)+0) == 0:
    
        save r8:
        -       stmfd   sp!, {r4-r7, lr}
        +       stmfd   sp!, {r4-r8, lr}
    
        and restore r8 on both exit paths:
                bgt     3b
        -       ldmeqfd sp!, {r4-r7, pc}
        +       ldmeqfd sp!, {r4-r8, pc}
        (...)
                tst     r2, #16
                stmneia ip!, {r4-r7}
        -       ldmfd   sp!, {r4-r7, lr}
        +       ldmfd   sp!, {r4-r8, lr}
    
        Step 4
        ======
        Rewrite register list "r4-r7, r8" as "r4-r8".
    
        Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
        Reviewed-by: Nicolas Pitre <nico@linaro.org>
        Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    commit 418df63adac56841ef6b0f1fcf435bc64d4ed177
    Author: Nicolas Pitre <nicolas.pitre@linaro.org>
    Date:   Tue Mar 12 13:00:42 2013 +0100
    
        ARM: 7670/1: fix the memset fix
    
        Commit 455bd4c430b0 ("ARM: 7668/1: fix memset-related crashes caused by
        recent GCC (4.7.2) optimizations") attempted to fix a compliance issue
        with the memset return value.  However the memset itself became broken
        by that patch for misaligned pointers.
    
        This fixes the above by branching over the entry code from the
        misaligned fixup code to avoid reloading the original pointer.
    
        Also, because the function entry alignment is wrong in the Thumb mode
        compilation, that fixup code is moved to the end.
    
        While at it, the entry instructions are slightly reworked to help dual
        issue pipelines.
    
        Signed-off-by: Nicolas Pitre <nico@linaro.org>
        Tested-by: Alexander Holler <holler@ahsoftware.de>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm32/lib/memset.S |  100 +++++++++++++++++++--------------------
 1 files changed, 48 insertions(+), 52 deletions(-)

diff --git a/xen/arch/arm/arm32/lib/memset.S b/xen/arch/arm/arm32/lib/memset.S
index d2937a3..c8ab257 100644
--- a/xen/arch/arm/arm32/lib/memset.S
+++ b/xen/arch/arm/arm32/lib/memset.S
@@ -16,27 +16,15 @@
 
 	.text
 	.align	5
-	.word	0
-
-1:	subs	r2, r2, #4		@ 1 do we have enough
-	blt	5f			@ 1 bytes to align with?
-	cmp	r3, #2			@ 1
-	strltb	r1, [r0], #1		@ 1
-	strleb	r1, [r0], #1		@ 1
-	strb	r1, [r0], #1		@ 1
-	add	r2, r2, r3		@ 1 (r2 = r2 - (4 - r3))
-/*
- * The pointer is now aligned and the length is adjusted.  Try doing the
- * memset again.
- */
 
 ENTRY(memset)
 	ands	r3, r0, #3		@ 1 unaligned?
-	bne	1b			@ 1
+	mov	ip, r0			@ preserve r0 as return value
+	bne	6f			@ 1
 /*
- * we know that the pointer in r0 is aligned to a word boundary.
+ * we know that the pointer in ip is aligned to a word boundary.
  */
-	orr	r1, r1, r1, lsl #8
+1:	orr	r1, r1, r1, lsl #8
 	orr	r1, r1, r1, lsl #16
 	mov	r3, r1
 	cmp	r2, #16
@@ -45,29 +33,28 @@ ENTRY(memset)
 #if ! CALGN(1)+0
 
 /*
- * We need an extra register for this loop - save the return address and
- * use the LR
+ * We need 2 extra registers for this loop - use r8 and the LR
  */
-	str	lr, [sp, #-4]!
-	mov	ip, r1
+	stmfd	sp!, {r8, lr}
+	mov	r8, r1
 	mov	lr, r1
 
 2:	subs	r2, r2, #64
-	stmgeia	r0!, {r1, r3, ip, lr}	@ 64 bytes at a time.
-	stmgeia	r0!, {r1, r3, ip, lr}
-	stmgeia	r0!, {r1, r3, ip, lr}
-	stmgeia	r0!, {r1, r3, ip, lr}
+	stmgeia	ip!, {r1, r3, r8, lr}	@ 64 bytes at a time.
+	stmgeia	ip!, {r1, r3, r8, lr}
+	stmgeia	ip!, {r1, r3, r8, lr}
+	stmgeia	ip!, {r1, r3, r8, lr}
 	bgt	2b
-	ldmeqfd	sp!, {pc}		@ Now <64 bytes to go.
+	ldmeqfd	sp!, {r8, pc}		@ Now <64 bytes to go.
 /*
  * No need to correct the count; we're only testing bits from now on
  */
 	tst	r2, #32
-	stmneia	r0!, {r1, r3, ip, lr}
-	stmneia	r0!, {r1, r3, ip, lr}
+	stmneia	ip!, {r1, r3, r8, lr}
+	stmneia	ip!, {r1, r3, r8, lr}
 	tst	r2, #16
-	stmneia	r0!, {r1, r3, ip, lr}
-	ldr	lr, [sp], #4
+	stmneia	ip!, {r1, r3, r8, lr}
+	ldmfd	sp!, {r8, lr}
 
 #else
 
@@ -76,54 +63,63 @@ ENTRY(memset)
  * whole cache lines at once.
  */
 
-	stmfd	sp!, {r4-r7, lr}
+	stmfd	sp!, {r4-r8, lr}
 	mov	r4, r1
 	mov	r5, r1
 	mov	r6, r1
 	mov	r7, r1
-	mov	ip, r1
+	mov	r8, r1
 	mov	lr, r1
 
 	cmp	r2, #96
-	tstgt	r0, #31
+	tstgt	ip, #31
 	ble	3f
 
-	and	ip, r0, #31
-	rsb	ip, ip, #32
-	sub	r2, r2, ip
-	movs	ip, ip, lsl #(32 - 4)
-	stmcsia	r0!, {r4, r5, r6, r7}
-	stmmiia	r0!, {r4, r5}
-	tst	ip, #(1 << 30)
-	mov	ip, r1
-	strne	r1, [r0], #4
+	and	r8, ip, #31
+	rsb	r8, r8, #32
+	sub	r2, r2, r8
+	movs	r8, r8, lsl #(32 - 4)
+	stmcsia	ip!, {r4, r5, r6, r7}
+	stmmiia	ip!, {r4, r5}
+	tst	r8, #(1 << 30)
+	mov	r8, r1
+	strne	r1, [ip], #4
 
 3:	subs	r2, r2, #64
-	stmgeia	r0!, {r1, r3-r7, ip, lr}
-	stmgeia	r0!, {r1, r3-r7, ip, lr}
+	stmgeia	ip!, {r1, r3-r8, lr}
+	stmgeia	ip!, {r1, r3-r8, lr}
 	bgt	3b
-	ldmeqfd	sp!, {r4-r7, pc}
+	ldmeqfd	sp!, {r4-r8, pc}
 
 	tst	r2, #32
-	stmneia	r0!, {r1, r3-r7, ip, lr}
+	stmneia	ip!, {r1, r3-r8, lr}
 	tst	r2, #16
-	stmneia	r0!, {r4-r7}
-	ldmfd	sp!, {r4-r7, lr}
+	stmneia	ip!, {r4-r7}
+	ldmfd	sp!, {r4-r8, lr}
 
 #endif
 
 4:	tst	r2, #8
-	stmneia	r0!, {r1, r3}
+	stmneia	ip!, {r1, r3}
 	tst	r2, #4
-	strne	r1, [r0], #4
+	strne	r1, [ip], #4
 /*
  * When we get here, we've got less than 4 bytes to zero.  We
  * may have an unaligned pointer as well.
  */
 5:	tst	r2, #2
-	strneb	r1, [r0], #1
-	strneb	r1, [r0], #1
+	strneb	r1, [ip], #1
+	strneb	r1, [ip], #1
 	tst	r2, #1
-	strneb	r1, [r0], #1
+	strneb	r1, [ip], #1
 	mov	pc, lr
+
+6:	subs	r2, r2, #4		@ 1 do we have enough
+	blt	5b			@ 1 bytes to align with?
+	cmp	r3, #2			@ 1
+	strltb	r1, [ip], #1		@ 1
+	strleb	r1, [ip], #1		@ 1
+	strb	r1, [ip], #1		@ 1
+	add	r2, r2, r3		@ 1 (r2 = r2 - (4 - r3))
+	b	1b
 ENDPROC(memset)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35: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 1WWDdw-0005PD-Gj; Fri, 04 Apr 2014 23:35:28 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdv-0005Oz-1L
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:27 +0000
Received: from [85.158.137.68:11069] by server-3.bemta-3.messagelabs.com id
	50/C4-05289-EB14F335; Fri, 04 Apr 2014 23:35:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1396654523!5155883!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29129 invoked from network); 4 Apr 2014 23:35:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:35:24 -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 1WWDdr-0002uS-F7
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDdr-00086Y-D6
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:23 +0000
Date: Fri, 04 Apr 2014 23:35:23 +0000
Message-Id: <E1WWDdr-00086Y-D6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: resync mem* with Linux
	v3.14-rc7
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 2722a4583faa54091031472917e7f14d5e3553da
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:41 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: resync mem* with Linux v3.14-rc7
    
    This pulls in the following Linux commits:
    commit 455bd4c430b0c0a361f38e8658a0d6cb469942b5
    Author: Ivan Djelic <ivan.djelic@parrot.com>
    Date:   Wed Mar 6 20:09:27 2013 +0100
    
        ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimi
    
        Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on
        assumptions about the implementation of memset and similar functions.
        The current ARM optimized memset code does not return the value of
        its first argument, as is usually expected from standard implementations.
    
        For instance in the following function:
    
        void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waite
        {
            memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
            waiter->magic = waiter;
            INIT_LIST_HEAD(&waiter->list);
        }
    
        compiled as:
    
        800554d0 <debug_mutex_lock_common>:
        800554d0:       e92d4008        push    {r3, lr}
        800554d4:       e1a00001        mov     r0, r1
        800554d8:       e3a02010        mov     r2, #16 ; 0x10
        800554dc:       e3a01011        mov     r1, #17 ; 0x11
        800554e0:       eb04426e        bl      80165ea0 <memset>
        800554e4:       e1a03000        mov     r3, r0
        800554e8:       e583000c        str     r0, [r3, #12]
        800554ec:       e5830000        str     r0, [r3]
        800554f0:       e5830004        str     r0, [r3, #4]
        800554f4:       e8bd8008        pop     {r3, pc}
    
        GCC assumes memset returns the value of pointer 'waiter' in register r0; ca
        register/memory corruptions.
    
        This patch fixes the return value of the assembly version of memset.
        It adds a 'mov' instruction and merges an additional load+store into
        existing load/store instructions.
        For ease of review, here is a breakdown of the patch into 4 simple steps:
    
        Step 1
        ======
        Perform the following substitutions:
        ip -> r8, then
        r0 -> ip,
        and insert 'mov ip, r0' as the first statement of the function.
        At this point, we have a memset() implementation returning the proper resul
        but corrupting r8 on some paths (the ones that were using ip).
    
        Step 2
        ======
        Make sure r8 is saved and restored when (! CALGN(1)+0) == 1:
    
        save r8:
        -       str     lr, [sp, #-4]!
        +       stmfd   sp!, {r8, lr}
    
        and restore r8 on both exit paths:
        -       ldmeqfd sp!, {pc}               @ Now <64 bytes to go.
        +       ldmeqfd sp!, {r8, pc}           @ Now <64 bytes to go.
        (...)
                tst     r2, #16
                stmneia ip!, {r1, r3, r8, lr}
        -       ldr     lr, [sp], #4
        +       ldmfd   sp!, {r8, lr}
    
        Step 3
        ======
        Make sure r8 is saved and restored when (! CALGN(1)+0) == 0:
    
        save r8:
        -       stmfd   sp!, {r4-r7, lr}
        +       stmfd   sp!, {r4-r8, lr}
    
        and restore r8 on both exit paths:
                bgt     3b
        -       ldmeqfd sp!, {r4-r7, pc}
        +       ldmeqfd sp!, {r4-r8, pc}
        (...)
                tst     r2, #16
                stmneia ip!, {r4-r7}
        -       ldmfd   sp!, {r4-r7, lr}
        +       ldmfd   sp!, {r4-r8, lr}
    
        Step 4
        ======
        Rewrite register list "r4-r7, r8" as "r4-r8".
    
        Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
        Reviewed-by: Nicolas Pitre <nico@linaro.org>
        Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    commit 418df63adac56841ef6b0f1fcf435bc64d4ed177
    Author: Nicolas Pitre <nicolas.pitre@linaro.org>
    Date:   Tue Mar 12 13:00:42 2013 +0100
    
        ARM: 7670/1: fix the memset fix
    
        Commit 455bd4c430b0 ("ARM: 7668/1: fix memset-related crashes caused by
        recent GCC (4.7.2) optimizations") attempted to fix a compliance issue
        with the memset return value.  However the memset itself became broken
        by that patch for misaligned pointers.
    
        This fixes the above by branching over the entry code from the
        misaligned fixup code to avoid reloading the original pointer.
    
        Also, because the function entry alignment is wrong in the Thumb mode
        compilation, that fixup code is moved to the end.
    
        While at it, the entry instructions are slightly reworked to help dual
        issue pipelines.
    
        Signed-off-by: Nicolas Pitre <nico@linaro.org>
        Tested-by: Alexander Holler <holler@ahsoftware.de>
        Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm32/lib/memset.S |  100 +++++++++++++++++++--------------------
 1 files changed, 48 insertions(+), 52 deletions(-)

diff --git a/xen/arch/arm/arm32/lib/memset.S b/xen/arch/arm/arm32/lib/memset.S
index d2937a3..c8ab257 100644
--- a/xen/arch/arm/arm32/lib/memset.S
+++ b/xen/arch/arm/arm32/lib/memset.S
@@ -16,27 +16,15 @@
 
 	.text
 	.align	5
-	.word	0
-
-1:	subs	r2, r2, #4		@ 1 do we have enough
-	blt	5f			@ 1 bytes to align with?
-	cmp	r3, #2			@ 1
-	strltb	r1, [r0], #1		@ 1
-	strleb	r1, [r0], #1		@ 1
-	strb	r1, [r0], #1		@ 1
-	add	r2, r2, r3		@ 1 (r2 = r2 - (4 - r3))
-/*
- * The pointer is now aligned and the length is adjusted.  Try doing the
- * memset again.
- */
 
 ENTRY(memset)
 	ands	r3, r0, #3		@ 1 unaligned?
-	bne	1b			@ 1
+	mov	ip, r0			@ preserve r0 as return value
+	bne	6f			@ 1
 /*
- * we know that the pointer in r0 is aligned to a word boundary.
+ * we know that the pointer in ip is aligned to a word boundary.
  */
-	orr	r1, r1, r1, lsl #8
+1:	orr	r1, r1, r1, lsl #8
 	orr	r1, r1, r1, lsl #16
 	mov	r3, r1
 	cmp	r2, #16
@@ -45,29 +33,28 @@ ENTRY(memset)
 #if ! CALGN(1)+0
 
 /*
- * We need an extra register for this loop - save the return address and
- * use the LR
+ * We need 2 extra registers for this loop - use r8 and the LR
  */
-	str	lr, [sp, #-4]!
-	mov	ip, r1
+	stmfd	sp!, {r8, lr}
+	mov	r8, r1
 	mov	lr, r1
 
 2:	subs	r2, r2, #64
-	stmgeia	r0!, {r1, r3, ip, lr}	@ 64 bytes at a time.
-	stmgeia	r0!, {r1, r3, ip, lr}
-	stmgeia	r0!, {r1, r3, ip, lr}
-	stmgeia	r0!, {r1, r3, ip, lr}
+	stmgeia	ip!, {r1, r3, r8, lr}	@ 64 bytes at a time.
+	stmgeia	ip!, {r1, r3, r8, lr}
+	stmgeia	ip!, {r1, r3, r8, lr}
+	stmgeia	ip!, {r1, r3, r8, lr}
 	bgt	2b
-	ldmeqfd	sp!, {pc}		@ Now <64 bytes to go.
+	ldmeqfd	sp!, {r8, pc}		@ Now <64 bytes to go.
 /*
  * No need to correct the count; we're only testing bits from now on
  */
 	tst	r2, #32
-	stmneia	r0!, {r1, r3, ip, lr}
-	stmneia	r0!, {r1, r3, ip, lr}
+	stmneia	ip!, {r1, r3, r8, lr}
+	stmneia	ip!, {r1, r3, r8, lr}
 	tst	r2, #16
-	stmneia	r0!, {r1, r3, ip, lr}
-	ldr	lr, [sp], #4
+	stmneia	ip!, {r1, r3, r8, lr}
+	ldmfd	sp!, {r8, lr}
 
 #else
 
@@ -76,54 +63,63 @@ ENTRY(memset)
  * whole cache lines at once.
  */
 
-	stmfd	sp!, {r4-r7, lr}
+	stmfd	sp!, {r4-r8, lr}
 	mov	r4, r1
 	mov	r5, r1
 	mov	r6, r1
 	mov	r7, r1
-	mov	ip, r1
+	mov	r8, r1
 	mov	lr, r1
 
 	cmp	r2, #96
-	tstgt	r0, #31
+	tstgt	ip, #31
 	ble	3f
 
-	and	ip, r0, #31
-	rsb	ip, ip, #32
-	sub	r2, r2, ip
-	movs	ip, ip, lsl #(32 - 4)
-	stmcsia	r0!, {r4, r5, r6, r7}
-	stmmiia	r0!, {r4, r5}
-	tst	ip, #(1 << 30)
-	mov	ip, r1
-	strne	r1, [r0], #4
+	and	r8, ip, #31
+	rsb	r8, r8, #32
+	sub	r2, r2, r8
+	movs	r8, r8, lsl #(32 - 4)
+	stmcsia	ip!, {r4, r5, r6, r7}
+	stmmiia	ip!, {r4, r5}
+	tst	r8, #(1 << 30)
+	mov	r8, r1
+	strne	r1, [ip], #4
 
 3:	subs	r2, r2, #64
-	stmgeia	r0!, {r1, r3-r7, ip, lr}
-	stmgeia	r0!, {r1, r3-r7, ip, lr}
+	stmgeia	ip!, {r1, r3-r8, lr}
+	stmgeia	ip!, {r1, r3-r8, lr}
 	bgt	3b
-	ldmeqfd	sp!, {r4-r7, pc}
+	ldmeqfd	sp!, {r4-r8, pc}
 
 	tst	r2, #32
-	stmneia	r0!, {r1, r3-r7, ip, lr}
+	stmneia	ip!, {r1, r3-r8, lr}
 	tst	r2, #16
-	stmneia	r0!, {r4-r7}
-	ldmfd	sp!, {r4-r7, lr}
+	stmneia	ip!, {r4-r7}
+	ldmfd	sp!, {r4-r8, lr}
 
 #endif
 
 4:	tst	r2, #8
-	stmneia	r0!, {r1, r3}
+	stmneia	ip!, {r1, r3}
 	tst	r2, #4
-	strne	r1, [r0], #4
+	strne	r1, [ip], #4
 /*
  * When we get here, we've got less than 4 bytes to zero.  We
  * may have an unaligned pointer as well.
  */
 5:	tst	r2, #2
-	strneb	r1, [r0], #1
-	strneb	r1, [r0], #1
+	strneb	r1, [ip], #1
+	strneb	r1, [ip], #1
 	tst	r2, #1
-	strneb	r1, [r0], #1
+	strneb	r1, [ip], #1
 	mov	pc, lr
+
+6:	subs	r2, r2, #4		@ 1 do we have enough
+	blt	5b			@ 1 bytes to align with?
+	cmp	r3, #2			@ 1
+	strltb	r1, [ip], #1		@ 1
+	strleb	r1, [ip], #1		@ 1
+	strb	r1, [ip], #1		@ 1
+	add	r2, r2, r3		@ 1 (r2 = r2 - (4 - r3))
+	b	1b
 ENDPROC(memset)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35: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 1WWDe6-0005Qw-Lr; Fri, 04 Apr 2014 23:35:38 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDe4-0005Qe-Ic
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:37 +0000
Received: from [85.158.139.211:51333] by server-9.bemta-5.messagelabs.com id
	44/61-04350-7C14F335; Fri, 04 Apr 2014 23:35:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1396654533!5581337!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1807 invoked from network); 4 Apr 2014 23:35:34 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:35:34 -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 1WWDe1-0002ua-LH
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDe1-00087J-Jo
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:33 +0000
Date: Fri, 04 Apr 2014 23:35:33 +0000
Message-Id: <E1WWDe1-00087J-Jo@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: add optimised memchr
	routine
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 ef359ad3d079a694668f210dfdc9007146ad522e
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:42 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: add optimised memchr routine
    
    This isn't used enough to be critical, but it completes the set of mem*.
    
    Taken from Linux v3.14-rc7.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm32/lib/Makefile |    2 +-
 xen/arch/arm/arm32/lib/memchr.S |   28 ++++++++++++++++++++++++++++
 xen/include/asm-arm/string.h    |    3 +++
 3 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/arm32/lib/Makefile b/xen/arch/arm/arm32/lib/Makefile
index 4cf41f4..fa4e241 100644
--- a/xen/arch/arm/arm32/lib/Makefile
+++ b/xen/arch/arm/arm32/lib/Makefile
@@ -1,4 +1,4 @@
-obj-y += memcpy.o memmove.o memset.o memzero.o
+obj-y += memcpy.o memmove.o memset.o memchr.o memzero.o
 obj-y += findbit.o setbit.o
 obj-y += setbit.o clearbit.o changebit.o
 obj-y += testsetbit.o testclearbit.o testchangebit.o
diff --git a/xen/arch/arm/arm32/lib/memchr.S b/xen/arch/arm/arm32/lib/memchr.S
new file mode 100644
index 0000000..fd64ed8
--- /dev/null
+++ b/xen/arch/arm/arm32/lib/memchr.S
@@ -0,0 +1,28 @@
+/*
+ *  linux/arch/arm/lib/memchr.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  ASM optimised string functions
+ */
+
+#include <xen/config.h>
+
+#include "assembler.h"
+
+	.text
+	.align	5
+ENTRY(memchr)
+1:	subs	r2, r2, #1
+	bmi	2f
+	ldrb	r3, [r0], #1
+	teq	r3, r1
+	bne	1b
+	sub	r0, r0, #1
+2:	movne	r0, #0
+	mov	pc, lr
+ENDPROC(memchr)
diff --git a/xen/include/asm-arm/string.h b/xen/include/asm-arm/string.h
index abfa9d2..2c9f4f7 100644
--- a/xen/include/asm-arm/string.h
+++ b/xen/include/asm-arm/string.h
@@ -14,6 +14,9 @@ extern void *memmove(void *dest, const void *src, size_t n);
 #define __HAVE_ARCH_MEMSET
 extern void * memset(void *, int, __kernel_size_t);
 
+#define __HAVE_ARCH_MEMCHR
+extern void * memchr(const void *, int, __kernel_size_t);
+
 extern void __memzero(void *ptr, __kernel_size_t n);
 
 #define memset(p,v,n)                                                   \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35: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 1WWDe6-0005Qw-Lr; Fri, 04 Apr 2014 23:35:38 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDe4-0005Qe-Ic
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:37 +0000
Received: from [85.158.139.211:51333] by server-9.bemta-5.messagelabs.com id
	44/61-04350-7C14F335; Fri, 04 Apr 2014 23:35:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1396654533!5581337!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1807 invoked from network); 4 Apr 2014 23:35:34 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:35:34 -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 1WWDe1-0002ua-LH
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDe1-00087J-Jo
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:33 +0000
Date: Fri, 04 Apr 2014 23:35:33 +0000
Message-Id: <E1WWDe1-00087J-Jo@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: add optimised memchr
	routine
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 ef359ad3d079a694668f210dfdc9007146ad522e
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:42 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: add optimised memchr routine
    
    This isn't used enough to be critical, but it completes the set of mem*.
    
    Taken from Linux v3.14-rc7.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm32/lib/Makefile |    2 +-
 xen/arch/arm/arm32/lib/memchr.S |   28 ++++++++++++++++++++++++++++
 xen/include/asm-arm/string.h    |    3 +++
 3 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/arm32/lib/Makefile b/xen/arch/arm/arm32/lib/Makefile
index 4cf41f4..fa4e241 100644
--- a/xen/arch/arm/arm32/lib/Makefile
+++ b/xen/arch/arm/arm32/lib/Makefile
@@ -1,4 +1,4 @@
-obj-y += memcpy.o memmove.o memset.o memzero.o
+obj-y += memcpy.o memmove.o memset.o memchr.o memzero.o
 obj-y += findbit.o setbit.o
 obj-y += setbit.o clearbit.o changebit.o
 obj-y += testsetbit.o testclearbit.o testchangebit.o
diff --git a/xen/arch/arm/arm32/lib/memchr.S b/xen/arch/arm/arm32/lib/memchr.S
new file mode 100644
index 0000000..fd64ed8
--- /dev/null
+++ b/xen/arch/arm/arm32/lib/memchr.S
@@ -0,0 +1,28 @@
+/*
+ *  linux/arch/arm/lib/memchr.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  ASM optimised string functions
+ */
+
+#include <xen/config.h>
+
+#include "assembler.h"
+
+	.text
+	.align	5
+ENTRY(memchr)
+1:	subs	r2, r2, #1
+	bmi	2f
+	ldrb	r3, [r0], #1
+	teq	r3, r1
+	bne	1b
+	sub	r0, r0, #1
+2:	movne	r0, #0
+	mov	pc, lr
+ENDPROC(memchr)
diff --git a/xen/include/asm-arm/string.h b/xen/include/asm-arm/string.h
index abfa9d2..2c9f4f7 100644
--- a/xen/include/asm-arm/string.h
+++ b/xen/include/asm-arm/string.h
@@ -14,6 +14,9 @@ extern void *memmove(void *dest, const void *src, size_t n);
 #define __HAVE_ARCH_MEMSET
 extern void * memset(void *, int, __kernel_size_t);
 
+#define __HAVE_ARCH_MEMCHR
+extern void * memchr(const void *, int, __kernel_size_t);
+
 extern void __memzero(void *ptr, __kernel_size_t n);
 
 #define memset(p,v,n)                                                   \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35: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 1WWDeF-0005Sn-Oq; Fri, 04 Apr 2014 23:35:47 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeE-0005ST-P6
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:47 +0000
Received: from [85.158.137.68:55650] by server-2.bemta-3.messagelabs.com id
	BA/8F-23530-1D14F335; Fri, 04 Apr 2014 23:35:45 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1396654544!5144188!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17134 invoked from network); 4 Apr 2014 23:35:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:35:45 -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 1WWDeB-0002ug-Qr
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeB-00087f-Or
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:43 +0000
Date: Fri, 04 Apr 2014 23:35:43 +0000
Message-Id: <E1WWDeB-00087f-Or@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: add optimised strchr and
	strrchr routines
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 3cdbc31bd77fa9e6a41eb8d285b903aa976ce96c
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:43 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: add optimised strchr and strrchr routines
    
    Taken from Linux v3.14-rc7.
    
    These aren't widely used enough to be critical, but we may as well have them.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm32/lib/Makefile  |    1 +
 xen/arch/arm/arm32/lib/strchr.S  |   29 +++++++++++++++++++++++++++++
 xen/arch/arm/arm32/lib/strrchr.S |   28 ++++++++++++++++++++++++++++
 xen/include/asm-arm/string.h     |   12 ++++++++++++
 4 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/arm32/lib/Makefile b/xen/arch/arm/arm32/lib/Makefile
index fa4e241..e9fbc59 100644
--- a/xen/arch/arm/arm32/lib/Makefile
+++ b/xen/arch/arm/arm32/lib/Makefile
@@ -2,4 +2,5 @@ obj-y += memcpy.o memmove.o memset.o memchr.o memzero.o
 obj-y += findbit.o setbit.o
 obj-y += setbit.o clearbit.o changebit.o
 obj-y += testsetbit.o testclearbit.o testchangebit.o
+obj-y += strchr.o strrchr.o
 obj-y += lib1funcs.o lshrdi3.o div64.o
diff --git a/xen/arch/arm/arm32/lib/strchr.S b/xen/arch/arm/arm32/lib/strchr.S
new file mode 100644
index 0000000..2f89c01
--- /dev/null
+++ b/xen/arch/arm/arm32/lib/strchr.S
@@ -0,0 +1,29 @@
+/*
+ *  linux/arch/arm/lib/strchr.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  ASM optimised string functions
+ */
+
+#include <xen/config.h>
+
+#include "assembler.h"
+
+		.text
+		.align	5
+ENTRY(strchr)
+		and	r1, r1, #0xff
+1:		ldrb	r2, [r0], #1
+		teq	r2, r1
+		teqne	r2, #0
+		bne	1b
+		teq	r2, r1
+		movne	r0, #0
+		subeq	r0, r0, #1
+		mov	pc, lr
+ENDPROC(strchr)
diff --git a/xen/arch/arm/arm32/lib/strrchr.S b/xen/arch/arm/arm32/lib/strrchr.S
new file mode 100644
index 0000000..7d534b1
--- /dev/null
+++ b/xen/arch/arm/arm32/lib/strrchr.S
@@ -0,0 +1,28 @@
+/*
+ *  linux/arch/arm/lib/strrchr.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  ASM optimised string functions
+ */
+
+#include <xen/config.h>
+
+#include "assembler.h"
+
+		.text
+		.align	5
+ENTRY(strrchr)
+		mov	r3, #0
+1:		ldrb	r2, [r0], #1
+		teq	r2, r1
+		subeq	r3, r0, #1
+		teq	r2, #0
+		bne	1b
+		mov	r0, r3
+		mov	pc, lr
+ENDPROC(strrchr)
diff --git a/xen/include/asm-arm/string.h b/xen/include/asm-arm/string.h
index 2c9f4f7..7d8b35a 100644
--- a/xen/include/asm-arm/string.h
+++ b/xen/include/asm-arm/string.h
@@ -4,6 +4,18 @@
 #include <xen/config.h>
 
 #if defined(CONFIG_ARM_32)
+
+/*
+ * We don't do inline string functions, since the
+ * optimised inline asm versions are not small.
+ */
+
+#define __HAVE_ARCH_STRRCHR
+extern char * strrchr(const char * s, int c);
+
+#define __HAVE_ARCH_STRCHR
+extern char * strchr(const char * s, int c);
+
 #define __HAVE_ARCH_MEMCPY
 extern void * memcpy(void *, const void *, __kernel_size_t);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35: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 1WWDeF-0005Sn-Oq; Fri, 04 Apr 2014 23:35:47 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeE-0005ST-P6
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:47 +0000
Received: from [85.158.137.68:55650] by server-2.bemta-3.messagelabs.com id
	BA/8F-23530-1D14F335; Fri, 04 Apr 2014 23:35:45 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1396654544!5144188!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17134 invoked from network); 4 Apr 2014 23:35:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:35:45 -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 1WWDeB-0002ug-Qr
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeB-00087f-Or
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:43 +0000
Date: Fri, 04 Apr 2014 23:35:43 +0000
Message-Id: <E1WWDeB-00087f-Or@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm32: add optimised strchr and
	strrchr routines
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 3cdbc31bd77fa9e6a41eb8d285b903aa976ce96c
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:43 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:42 2014 +0100

    xen: arm32: add optimised strchr and strrchr routines
    
    Taken from Linux v3.14-rc7.
    
    These aren't widely used enough to be critical, but we may as well have them.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm32/lib/Makefile  |    1 +
 xen/arch/arm/arm32/lib/strchr.S  |   29 +++++++++++++++++++++++++++++
 xen/arch/arm/arm32/lib/strrchr.S |   28 ++++++++++++++++++++++++++++
 xen/include/asm-arm/string.h     |   12 ++++++++++++
 4 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/arm32/lib/Makefile b/xen/arch/arm/arm32/lib/Makefile
index fa4e241..e9fbc59 100644
--- a/xen/arch/arm/arm32/lib/Makefile
+++ b/xen/arch/arm/arm32/lib/Makefile
@@ -2,4 +2,5 @@ obj-y += memcpy.o memmove.o memset.o memchr.o memzero.o
 obj-y += findbit.o setbit.o
 obj-y += setbit.o clearbit.o changebit.o
 obj-y += testsetbit.o testclearbit.o testchangebit.o
+obj-y += strchr.o strrchr.o
 obj-y += lib1funcs.o lshrdi3.o div64.o
diff --git a/xen/arch/arm/arm32/lib/strchr.S b/xen/arch/arm/arm32/lib/strchr.S
new file mode 100644
index 0000000..2f89c01
--- /dev/null
+++ b/xen/arch/arm/arm32/lib/strchr.S
@@ -0,0 +1,29 @@
+/*
+ *  linux/arch/arm/lib/strchr.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  ASM optimised string functions
+ */
+
+#include <xen/config.h>
+
+#include "assembler.h"
+
+		.text
+		.align	5
+ENTRY(strchr)
+		and	r1, r1, #0xff
+1:		ldrb	r2, [r0], #1
+		teq	r2, r1
+		teqne	r2, #0
+		bne	1b
+		teq	r2, r1
+		movne	r0, #0
+		subeq	r0, r0, #1
+		mov	pc, lr
+ENDPROC(strchr)
diff --git a/xen/arch/arm/arm32/lib/strrchr.S b/xen/arch/arm/arm32/lib/strrchr.S
new file mode 100644
index 0000000..7d534b1
--- /dev/null
+++ b/xen/arch/arm/arm32/lib/strrchr.S
@@ -0,0 +1,28 @@
+/*
+ *  linux/arch/arm/lib/strrchr.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  ASM optimised string functions
+ */
+
+#include <xen/config.h>
+
+#include "assembler.h"
+
+		.text
+		.align	5
+ENTRY(strrchr)
+		mov	r3, #0
+1:		ldrb	r2, [r0], #1
+		teq	r2, r1
+		subeq	r3, r0, #1
+		teq	r2, #0
+		bne	1b
+		mov	r0, r3
+		mov	pc, lr
+ENDPROC(strrchr)
diff --git a/xen/include/asm-arm/string.h b/xen/include/asm-arm/string.h
index 2c9f4f7..7d8b35a 100644
--- a/xen/include/asm-arm/string.h
+++ b/xen/include/asm-arm/string.h
@@ -4,6 +4,18 @@
 #include <xen/config.h>
 
 #if defined(CONFIG_ARM_32)
+
+/*
+ * We don't do inline string functions, since the
+ * optimised inline asm versions are not small.
+ */
+
+#define __HAVE_ARCH_STRRCHR
+extern char * strrchr(const char * s, int c);
+
+#define __HAVE_ARCH_STRCHR
+extern char * strchr(const char * s, int c);
+
 #define __HAVE_ARCH_MEMCPY
 extern void * memcpy(void *, const void *, __kernel_size_t);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:57 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:57 +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 1WWDeP-0005UR-Ra; Fri, 04 Apr 2014 23:35:57 +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 1WWDeO-0005UC-Px
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:56 +0000
Received: from [85.158.143.35:24392] by server-2.bemta-4.messagelabs.com id
	89/28-06539-CD14F335; Fri, 04 Apr 2014 23:35:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1396654554!7105208!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30046 invoked from network); 4 Apr 2014 23:35:55 -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;
	4 Apr 2014 23:35:55 -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 1WWDeM-0002up-0a
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeL-00088d-VH
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:53 +0000
Date: Fri, 04 Apr 2014 23:35:53 +0000
Message-Id: <E1WWDeL-00088d-VH@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: remove atomic_clear_mask()
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 076aaac65052d54a129beb3e0a8bb28b6505bdda
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:44 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm: remove atomic_clear_mask()
    
    This has no users.
    
    This brings arm32 atomic.h into sync with Linux v3.14-rc7.
    
    arm64/atomic.h requires other patches for this to be the case.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm32/atomic.h |   16 ----------------
 xen/include/asm-arm/arm64/atomic.h |   14 --------------
 2 files changed, 0 insertions(+), 30 deletions(-)

diff --git a/xen/include/asm-arm/arm32/atomic.h b/xen/include/asm-arm/arm32/atomic.h
index d309f66..3d601d1 100644
--- a/xen/include/asm-arm/arm32/atomic.h
+++ b/xen/include/asm-arm/arm32/atomic.h
@@ -117,22 +117,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 	return oldval;
 }
 
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
-	unsigned long tmp, tmp2;
-
-	prefetchw(addr);
-	__asm__ __volatile__("@ atomic_clear_mask\n"
-"1:	ldrex	%0, [%3]\n"
-"	bic	%0, %0, %4\n"
-"	strex	%1, %0, [%3]\n"
-"	teq	%1, #0\n"
-"	bne	1b"
-	: "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
-	: "r" (addr), "Ir" (mask)
-	: "cc");
-}
-
 #define atomic_inc(v)		atomic_add(1, v)
 #define atomic_dec(v)		atomic_sub(1, v)
 
diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/include/asm-arm/arm64/atomic.h
index b04e6d5..6b37945 100644
--- a/xen/include/asm-arm/arm64/atomic.h
+++ b/xen/include/asm-arm/arm64/atomic.h
@@ -110,20 +110,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 	return oldval;
 }
 
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
-	unsigned long tmp, tmp2;
-
-	asm volatile("// atomic_clear_mask\n"
-"1:	ldxr	%0, %2\n"
-"	bic	%0, %0, %3\n"
-"	stxr	%w1, %0, %2\n"
-"	cbnz	%w1, 1b"
-	: "=&r" (tmp), "=&r" (tmp2), "+Q" (*addr)
-	: "Ir" (mask)
-	: "cc");
-}
-
 #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
 
 static inline int __atomic_add_unless(atomic_t *v, int a, int u)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:35:57 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:35:57 +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 1WWDeP-0005UR-Ra; Fri, 04 Apr 2014 23:35:57 +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 1WWDeO-0005UC-Px
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:56 +0000
Received: from [85.158.143.35:24392] by server-2.bemta-4.messagelabs.com id
	89/28-06539-CD14F335; Fri, 04 Apr 2014 23:35:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1396654554!7105208!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30046 invoked from network); 4 Apr 2014 23:35:55 -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;
	4 Apr 2014 23:35:55 -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 1WWDeM-0002up-0a
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeL-00088d-VH
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:35:53 +0000
Date: Fri, 04 Apr 2014 23:35:53 +0000
Message-Id: <E1WWDeL-00088d-VH@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: remove atomic_clear_mask()
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 076aaac65052d54a129beb3e0a8bb28b6505bdda
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:44 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm: remove atomic_clear_mask()
    
    This has no users.
    
    This brings arm32 atomic.h into sync with Linux v3.14-rc7.
    
    arm64/atomic.h requires other patches for this to be the case.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm32/atomic.h |   16 ----------------
 xen/include/asm-arm/arm64/atomic.h |   14 --------------
 2 files changed, 0 insertions(+), 30 deletions(-)

diff --git a/xen/include/asm-arm/arm32/atomic.h b/xen/include/asm-arm/arm32/atomic.h
index d309f66..3d601d1 100644
--- a/xen/include/asm-arm/arm32/atomic.h
+++ b/xen/include/asm-arm/arm32/atomic.h
@@ -117,22 +117,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 	return oldval;
 }
 
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
-	unsigned long tmp, tmp2;
-
-	prefetchw(addr);
-	__asm__ __volatile__("@ atomic_clear_mask\n"
-"1:	ldrex	%0, [%3]\n"
-"	bic	%0, %0, %4\n"
-"	strex	%1, %0, [%3]\n"
-"	teq	%1, #0\n"
-"	bne	1b"
-	: "=&r" (tmp), "=&r" (tmp2), "+Qo" (*addr)
-	: "r" (addr), "Ir" (mask)
-	: "cc");
-}
-
 #define atomic_inc(v)		atomic_add(1, v)
 #define atomic_dec(v)		atomic_sub(1, v)
 
diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/include/asm-arm/arm64/atomic.h
index b04e6d5..6b37945 100644
--- a/xen/include/asm-arm/arm64/atomic.h
+++ b/xen/include/asm-arm/arm64/atomic.h
@@ -110,20 +110,6 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 	return oldval;
 }
 
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
-	unsigned long tmp, tmp2;
-
-	asm volatile("// atomic_clear_mask\n"
-"1:	ldxr	%0, %2\n"
-"	bic	%0, %0, %3\n"
-"	stxr	%w1, %0, %2\n"
-"	cbnz	%w1, 1b"
-	: "=&r" (tmp), "=&r" (tmp2), "+Q" (*addr)
-	: "Ir" (mask)
-	: "cc");
-}
-
 #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
 
 static inline int __atomic_add_unless(atomic_t *v, int a, int u)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:07 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36:07 +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 1WWDeZ-0005W4-UD; Fri, 04 Apr 2014 23:36:07 +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 1WWDeY-0005Vn-HR
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:06 +0000
Received: from [85.158.143.35:32981] by server-2.bemta-4.messagelabs.com id
	73/38-06539-5E14F335; Fri, 04 Apr 2014 23:36:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1396654564!7105220!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30324 invoked from network); 4 Apr 2014 23:36:05 -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;
	4 Apr 2014 23:36:05 -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 1WWDeW-0002vO-5h
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeW-00089O-42
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:04 +0000
Date: Fri, 04 Apr 2014 23:36:04 +0000
Message-Id: <E1WWDeW-00089O-42@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: disable alignment traps
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 58bbe7d71239db508c30099bf7b6db7c458f3336
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:45 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: disable alignment traps
    
    The mem* primitives which I am about to import from Linux in a subsequent
    patch rely on the hardware handling misalignment.
    
    The benefits of an optimised memcpy etc outweigh the downsides.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm64/head.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 3077f1b..2a13527 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -239,9 +239,9 @@ skip_bss:
          * Write-implies-XN disabled (for now),
          * D-cache disabled (for now),
          * I-cache enabled,
-         * Alignment checking enabled,
+         * Alignment checking disabled,
          * MMU translation disabled (for now). */
-        ldr   x0, =(HSCTLR_BASE|SCTLR_A)
+        ldr   x0, =(HSCTLR_BASE)
         msr   SCTLR_EL2, x0
 
         /* Rebuild the boot pagetable's first-level entries. The structure
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:07 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36:07 +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 1WWDeZ-0005W4-UD; Fri, 04 Apr 2014 23:36:07 +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 1WWDeY-0005Vn-HR
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:06 +0000
Received: from [85.158.143.35:32981] by server-2.bemta-4.messagelabs.com id
	73/38-06539-5E14F335; Fri, 04 Apr 2014 23:36:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1396654564!7105220!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30324 invoked from network); 4 Apr 2014 23:36:05 -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;
	4 Apr 2014 23:36:05 -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 1WWDeW-0002vO-5h
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeW-00089O-42
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:04 +0000
Date: Fri, 04 Apr 2014 23:36:04 +0000
Message-Id: <E1WWDeW-00089O-42@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: disable alignment traps
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 58bbe7d71239db508c30099bf7b6db7c458f3336
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:45 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: disable alignment traps
    
    The mem* primitives which I am about to import from Linux in a subsequent
    patch rely on the hardware handling misalignment.
    
    The benefits of an optimised memcpy etc outweigh the downsides.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm64/head.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 3077f1b..2a13527 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -239,9 +239,9 @@ skip_bss:
          * Write-implies-XN disabled (for now),
          * D-cache disabled (for now),
          * I-cache enabled,
-         * Alignment checking enabled,
+         * Alignment checking disabled,
          * MMU translation disabled (for now). */
-        ldr   x0, =(HSCTLR_BASE|SCTLR_A)
+        ldr   x0, =(HSCTLR_BASE)
         msr   SCTLR_EL2, x0
 
         /* Rebuild the boot pagetable's first-level entries. The structure
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36: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 1WWDel-0005Xe-0z; Fri, 04 Apr 2014 23:36:19 +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 1WWDej-0005XL-Fy
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:17 +0000
Received: from [85.158.143.35:24776] by server-3.bemta-4.messagelabs.com id
	76/45-13602-0F14F335; Fri, 04 Apr 2014 23:36:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1396654574!7117731!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10431 invoked from network); 4 Apr 2014 23:36:15 -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;
	4 Apr 2014 23:36:15 -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 1WWDeg-0002vU-CP
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeg-0008A8-9l
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:14 +0000
Date: Fri, 04 Apr 2014 23:36:14 +0000
Message-Id: <E1WWDeg-0008A8-9l@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: atomics: fix use of
	acquire + release for full barrier semantics
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 57a343c3b833a3bc1632051435b1cff0feb51d7f
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:46 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: atomics: fix use of acquire + release for full barrier semantics
    
    Xen, like Linux, expects full barrier semantics for bitops, atomics and
    cmpxchgs. This issue was discovered on Linux and we get our implementation of
    these from Linux so quoting Will Deacon in Linux commit 8e86f0b409a4 for the
    gory details:
        Linux requires a number of atomic operations to provide full barrier
        semantics, that is no memory accesses after the operation can be
        observed before any accesses up to and including the operation in
        program order.
    
        On arm64, these operations have been incorrectly implemented as follows:
    
            // A, B, C are independent memory locations
    
            <Access [A]>
    
            // atomic_op (B)
        1:  ldaxr   x0, [B]         // Exclusive load with acquire
            <op(B)>
            stlxr   w1, x0, [B]     // Exclusive store with release
            cbnz    w1, 1b
    
            <Access [C]>
    
        The assumption here being that two half barriers are equivalent to a
        full barrier, so the only permitted ordering would be A -> B -> C
        (where B is the atomic operation involving both a load and a store).
    
        Unfortunately, this is not the case by the letter of the architecture
        and, in fact, the accesses to A and C are permitted to pass their
        nearest half barrier resulting in orderings such as Bl -> A -> C -> Bs
        or Bl -> C -> A -> Bs (where Bl is the load-acquire on B and Bs is the
        store-release on B). This is a clear violation of the full barrier
        requirement.
    
        The simple way to fix this is to implement the same algorithm as ARMv7
        using explicit barriers:
    
            <Access [A]>
    
            // atomic_op (B)
            dmb     ish             // Full barrier
        1:  ldxr    x0, [B]         // Exclusive load
            <op(B)>
            stxr    w1, x0, [B]     // Exclusive store
            cbnz    w1, 1b
            dmb     ish             // Full barrier
    
            <Access [C]>
    
        but this has the undesirable effect of introducing *two* full barrier
        instructions. A better approach is actually the following, non-intuitive
        sequence:
    
            <Access [A]>
    
            // atomic_op (B)
        1:  ldxr    x0, [B]         // Exclusive load
            <op(B)>
            stlxr   w1, x0, [B]     // Exclusive store with release
            cbnz    w1, 1b
            dmb     ish             // Full barrier
    
            <Access [C]>
    
        The simple observations here are:
    
          - The dmb ensures that no subsequent accesses (e.g. the access to C)
            can enter or pass the atomic sequence.
    
          - The dmb also ensures that no prior accesses (e.g. the access to A)
            can pass the atomic sequence.
    
          - Therefore, no prior access can pass a subsequent access, or
            vice-versa (i.e. A is strictly ordered before C).
    
          - The stlxr ensures that no prior access can pass the store component
            of the atomic operation.
    
        The only tricky part remaining is the ordering between the ldxr and the
        access to A, since the absence of the first dmb means that we're now
        permitting re-ordering between the ldxr and any prior accesses.
    
        From an (arbitrary) observer's point of view, there are two scenarios:
    
          1. We have observed the ldxr. This means that if we perform a store to
             [B], the ldxr will still return older data. If we can observe the
             ldxr, then we can potentially observe the permitted re-ordering
             with the access to A, which is clearly an issue when compared to
             the dmb variant of the code. Thankfully, the exclusive monitor will
             save us here since it will be cleared as a result of the store and
             the ldxr will retry. Notice that any use of a later memory
             observation to imply observation of the ldxr will also imply
             observation of the access to A, since the stlxr/dmb ensure strict
             ordering.
    
          2. We have not observed the ldxr. This means we can perform a store
             and influence the later ldxr. However, that doesn't actually tell
             us anything about the access to [A], so we've not lost anything
             here either when compared to the dmb variant.
    
        This patch implements this solution for our barriered atomic operations,
        ensuring that we satisfy the full barrier requirements where they are
        needed.
    
        Cc: <stable@vger.kernel.org>
        Cc: Peter Zijlstra <peterz@infradead.org>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm64/lib/bitops.S    |    3 +-
 xen/include/asm-arm/arm64/atomic.h |   13 +++++--
 xen/include/asm-arm/arm64/system.h |   61 ++++++++++++++++++-----------------
 3 files changed, 42 insertions(+), 35 deletions(-)

diff --git a/xen/arch/arm/arm64/lib/bitops.S b/xen/arch/arm/arm64/lib/bitops.S
index 80cc903..e1ad239 100644
--- a/xen/arch/arm/arm64/lib/bitops.S
+++ b/xen/arch/arm/arm64/lib/bitops.S
@@ -46,11 +46,12 @@ ENTRY(	\name	)
 	mov	x2, #1
 	add	x1, x1, x0, lsr #3	// Get word offset
 	lsl	x4, x2, x3		// Create mask
-1:	ldaxr	w2, [x1]
+1:	ldxr	w2, [x1]
 	lsr	w0, w2, w3		// Save old value of bit
 	\instr	w2, w2, w4		// toggle bit
 	stlxr	w5, w2, [x1]
 	cbnz	w5, 1b
+	dmb	ish
 	and	w0, w0, #1
 3:	ret
 ENDPROC(\name	)
diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/include/asm-arm/arm64/atomic.h
index 6b37945..3f37ed5 100644
--- a/xen/include/asm-arm/arm64/atomic.h
+++ b/xen/include/asm-arm/arm64/atomic.h
@@ -48,7 +48,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
 	int result;
 
 	asm volatile("// atomic_add_return\n"
-"1:	ldaxr	%w0, %2\n"
+"1:	ldxr	%w0, %2\n"
 "	add	%w0, %w0, %w3\n"
 "	stlxr	%w1, %w0, %2\n"
 "	cbnz	%w1, 1b"
@@ -56,6 +56,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
 	: "Ir" (i)
 	: "cc", "memory");
 
+	smp_mb();
 	return result;
 }
 
@@ -80,7 +81,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 	int result;
 
 	asm volatile("// atomic_sub_return\n"
-"1:	ldaxr	%w0, %2\n"
+"1:	ldxr	%w0, %2\n"
 "	sub	%w0, %w0, %w3\n"
 "	stlxr	%w1, %w0, %2\n"
 "	cbnz	%w1, 1b"
@@ -88,6 +89,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 	: "Ir" (i)
 	: "cc", "memory");
 
+	smp_mb();
 	return result;
 }
 
@@ -96,17 +98,20 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 	unsigned long tmp;
 	int oldval;
 
+	smp_mb();
+
 	asm volatile("// atomic_cmpxchg\n"
-"1:	ldaxr	%w1, %2\n"
+"1:	ldxr	%w1, %2\n"
 "	cmp	%w1, %w3\n"
 "	b.ne	2f\n"
-"	stlxr	%w0, %w4, %2\n"
+"	stxr	%w0, %w4, %2\n"
 "	cbnz	%w0, 1b\n"
 "2:"
 	: "=&r" (tmp), "=&r" (oldval), "+Q" (ptr->counter)
 	: "Ir" (old), "r" (new)
 	: "cc", "memory");
 
+	smp_mb();
 	return oldval;
 }
 
diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/asm-arm/arm64/system.h
index 570af5c..0db96e0 100644
--- a/xen/include/asm-arm/arm64/system.h
+++ b/xen/include/asm-arm/arm64/system.h
@@ -8,49 +8,50 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 {
         unsigned long ret, tmp;
 
-        switch (size) {
-        case 1:
-                asm volatile("//        __xchg1\n"
-                "1:     ldaxrb  %w0, %2\n"
-                "       stlxrb  %w1, %w3, %2\n"
-                "       cbnz    %w1, 1b\n"
-                        : "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
+	switch (size) {
+	case 1:
+		asm volatile("//	__xchg1\n"
+		"1:	ldxrb	%w0, %2\n"
+		"	stlxrb	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
                         : "r" (x)
                         : "cc", "memory");
-                break;
-        case 2:
-                asm volatile("//        __xchg2\n"
-                "1:     ldaxrh  %w0, %2\n"
-                "       stlxrh  %w1, %w3, %2\n"
-                "       cbnz    %w1, 1b\n"
-                        : "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
+		break;
+	case 2:
+		asm volatile("//	__xchg2\n"
+		"1:	ldxrh	%w0, %2\n"
+		"	stlxrh	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
                         : "r" (x)
                         : "cc", "memory");
-                break;
-        case 4:
-                asm volatile("//        __xchg4\n"
-                "1:     ldaxr   %w0, %2\n"
-                "       stlxr   %w1, %w3, %2\n"
-                "       cbnz    %w1, 1b\n"
-                        : "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
+		break;
+	case 4:
+		asm volatile("//	__xchg4\n"
+		"1:	ldxr	%w0, %2\n"
+		"	stlxr	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
                         : "r" (x)
                         : "cc", "memory");
-                break;
-        case 8:
-                asm volatile("//        __xchg8\n"
-                "1:     ldaxr   %0, %2\n"
-                "       stlxr   %w1, %3, %2\n"
-                "       cbnz    %w1, 1b\n"
-                        : "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
+		break;
+	case 8:
+		asm volatile("//	__xchg8\n"
+		"1:	ldxr	%0, %2\n"
+		"	stlxr	%w1, %3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
                         : "r" (x)
                         : "cc", "memory");
                 break;
         default:
                 __bad_xchg(ptr, size), ret = 0;
                 break;
-        }
+	}
 
-        return ret;
+	smp_mb();
+	return ret;
 }
 
 #define xchg(ptr,x) \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36: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 1WWDel-0005Xe-0z; Fri, 04 Apr 2014 23:36:19 +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 1WWDej-0005XL-Fy
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:17 +0000
Received: from [85.158.143.35:24776] by server-3.bemta-4.messagelabs.com id
	76/45-13602-0F14F335; Fri, 04 Apr 2014 23:36:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1396654574!7117731!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10431 invoked from network); 4 Apr 2014 23:36:15 -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;
	4 Apr 2014 23:36:15 -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 1WWDeg-0002vU-CP
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeg-0008A8-9l
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:14 +0000
Date: Fri, 04 Apr 2014 23:36:14 +0000
Message-Id: <E1WWDeg-0008A8-9l@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: atomics: fix use of
	acquire + release for full barrier semantics
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 57a343c3b833a3bc1632051435b1cff0feb51d7f
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:46 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: atomics: fix use of acquire + release for full barrier semantics
    
    Xen, like Linux, expects full barrier semantics for bitops, atomics and
    cmpxchgs. This issue was discovered on Linux and we get our implementation of
    these from Linux so quoting Will Deacon in Linux commit 8e86f0b409a4 for the
    gory details:
        Linux requires a number of atomic operations to provide full barrier
        semantics, that is no memory accesses after the operation can be
        observed before any accesses up to and including the operation in
        program order.
    
        On arm64, these operations have been incorrectly implemented as follows:
    
            // A, B, C are independent memory locations
    
            <Access [A]>
    
            // atomic_op (B)
        1:  ldaxr   x0, [B]         // Exclusive load with acquire
            <op(B)>
            stlxr   w1, x0, [B]     // Exclusive store with release
            cbnz    w1, 1b
    
            <Access [C]>
    
        The assumption here being that two half barriers are equivalent to a
        full barrier, so the only permitted ordering would be A -> B -> C
        (where B is the atomic operation involving both a load and a store).
    
        Unfortunately, this is not the case by the letter of the architecture
        and, in fact, the accesses to A and C are permitted to pass their
        nearest half barrier resulting in orderings such as Bl -> A -> C -> Bs
        or Bl -> C -> A -> Bs (where Bl is the load-acquire on B and Bs is the
        store-release on B). This is a clear violation of the full barrier
        requirement.
    
        The simple way to fix this is to implement the same algorithm as ARMv7
        using explicit barriers:
    
            <Access [A]>
    
            // atomic_op (B)
            dmb     ish             // Full barrier
        1:  ldxr    x0, [B]         // Exclusive load
            <op(B)>
            stxr    w1, x0, [B]     // Exclusive store
            cbnz    w1, 1b
            dmb     ish             // Full barrier
    
            <Access [C]>
    
        but this has the undesirable effect of introducing *two* full barrier
        instructions. A better approach is actually the following, non-intuitive
        sequence:
    
            <Access [A]>
    
            // atomic_op (B)
        1:  ldxr    x0, [B]         // Exclusive load
            <op(B)>
            stlxr   w1, x0, [B]     // Exclusive store with release
            cbnz    w1, 1b
            dmb     ish             // Full barrier
    
            <Access [C]>
    
        The simple observations here are:
    
          - The dmb ensures that no subsequent accesses (e.g. the access to C)
            can enter or pass the atomic sequence.
    
          - The dmb also ensures that no prior accesses (e.g. the access to A)
            can pass the atomic sequence.
    
          - Therefore, no prior access can pass a subsequent access, or
            vice-versa (i.e. A is strictly ordered before C).
    
          - The stlxr ensures that no prior access can pass the store component
            of the atomic operation.
    
        The only tricky part remaining is the ordering between the ldxr and the
        access to A, since the absence of the first dmb means that we're now
        permitting re-ordering between the ldxr and any prior accesses.
    
        From an (arbitrary) observer's point of view, there are two scenarios:
    
          1. We have observed the ldxr. This means that if we perform a store to
             [B], the ldxr will still return older data. If we can observe the
             ldxr, then we can potentially observe the permitted re-ordering
             with the access to A, which is clearly an issue when compared to
             the dmb variant of the code. Thankfully, the exclusive monitor will
             save us here since it will be cleared as a result of the store and
             the ldxr will retry. Notice that any use of a later memory
             observation to imply observation of the ldxr will also imply
             observation of the access to A, since the stlxr/dmb ensure strict
             ordering.
    
          2. We have not observed the ldxr. This means we can perform a store
             and influence the later ldxr. However, that doesn't actually tell
             us anything about the access to [A], so we've not lost anything
             here either when compared to the dmb variant.
    
        This patch implements this solution for our barriered atomic operations,
        ensuring that we satisfy the full barrier requirements where they are
        needed.
    
        Cc: <stable@vger.kernel.org>
        Cc: Peter Zijlstra <peterz@infradead.org>
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm64/lib/bitops.S    |    3 +-
 xen/include/asm-arm/arm64/atomic.h |   13 +++++--
 xen/include/asm-arm/arm64/system.h |   61 ++++++++++++++++++-----------------
 3 files changed, 42 insertions(+), 35 deletions(-)

diff --git a/xen/arch/arm/arm64/lib/bitops.S b/xen/arch/arm/arm64/lib/bitops.S
index 80cc903..e1ad239 100644
--- a/xen/arch/arm/arm64/lib/bitops.S
+++ b/xen/arch/arm/arm64/lib/bitops.S
@@ -46,11 +46,12 @@ ENTRY(	\name	)
 	mov	x2, #1
 	add	x1, x1, x0, lsr #3	// Get word offset
 	lsl	x4, x2, x3		// Create mask
-1:	ldaxr	w2, [x1]
+1:	ldxr	w2, [x1]
 	lsr	w0, w2, w3		// Save old value of bit
 	\instr	w2, w2, w4		// toggle bit
 	stlxr	w5, w2, [x1]
 	cbnz	w5, 1b
+	dmb	ish
 	and	w0, w0, #1
 3:	ret
 ENDPROC(\name	)
diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/include/asm-arm/arm64/atomic.h
index 6b37945..3f37ed5 100644
--- a/xen/include/asm-arm/arm64/atomic.h
+++ b/xen/include/asm-arm/arm64/atomic.h
@@ -48,7 +48,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
 	int result;
 
 	asm volatile("// atomic_add_return\n"
-"1:	ldaxr	%w0, %2\n"
+"1:	ldxr	%w0, %2\n"
 "	add	%w0, %w0, %w3\n"
 "	stlxr	%w1, %w0, %2\n"
 "	cbnz	%w1, 1b"
@@ -56,6 +56,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
 	: "Ir" (i)
 	: "cc", "memory");
 
+	smp_mb();
 	return result;
 }
 
@@ -80,7 +81,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 	int result;
 
 	asm volatile("// atomic_sub_return\n"
-"1:	ldaxr	%w0, %2\n"
+"1:	ldxr	%w0, %2\n"
 "	sub	%w0, %w0, %w3\n"
 "	stlxr	%w1, %w0, %2\n"
 "	cbnz	%w1, 1b"
@@ -88,6 +89,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 	: "Ir" (i)
 	: "cc", "memory");
 
+	smp_mb();
 	return result;
 }
 
@@ -96,17 +98,20 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 	unsigned long tmp;
 	int oldval;
 
+	smp_mb();
+
 	asm volatile("// atomic_cmpxchg\n"
-"1:	ldaxr	%w1, %2\n"
+"1:	ldxr	%w1, %2\n"
 "	cmp	%w1, %w3\n"
 "	b.ne	2f\n"
-"	stlxr	%w0, %w4, %2\n"
+"	stxr	%w0, %w4, %2\n"
 "	cbnz	%w0, 1b\n"
 "2:"
 	: "=&r" (tmp), "=&r" (oldval), "+Q" (ptr->counter)
 	: "Ir" (old), "r" (new)
 	: "cc", "memory");
 
+	smp_mb();
 	return oldval;
 }
 
diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/asm-arm/arm64/system.h
index 570af5c..0db96e0 100644
--- a/xen/include/asm-arm/arm64/system.h
+++ b/xen/include/asm-arm/arm64/system.h
@@ -8,49 +8,50 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 {
         unsigned long ret, tmp;
 
-        switch (size) {
-        case 1:
-                asm volatile("//        __xchg1\n"
-                "1:     ldaxrb  %w0, %2\n"
-                "       stlxrb  %w1, %w3, %2\n"
-                "       cbnz    %w1, 1b\n"
-                        : "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
+	switch (size) {
+	case 1:
+		asm volatile("//	__xchg1\n"
+		"1:	ldxrb	%w0, %2\n"
+		"	stlxrb	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
                         : "r" (x)
                         : "cc", "memory");
-                break;
-        case 2:
-                asm volatile("//        __xchg2\n"
-                "1:     ldaxrh  %w0, %2\n"
-                "       stlxrh  %w1, %w3, %2\n"
-                "       cbnz    %w1, 1b\n"
-                        : "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
+		break;
+	case 2:
+		asm volatile("//	__xchg2\n"
+		"1:	ldxrh	%w0, %2\n"
+		"	stlxrh	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
                         : "r" (x)
                         : "cc", "memory");
-                break;
-        case 4:
-                asm volatile("//        __xchg4\n"
-                "1:     ldaxr   %w0, %2\n"
-                "       stlxr   %w1, %w3, %2\n"
-                "       cbnz    %w1, 1b\n"
-                        : "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
+		break;
+	case 4:
+		asm volatile("//	__xchg4\n"
+		"1:	ldxr	%w0, %2\n"
+		"	stlxr	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
                         : "r" (x)
                         : "cc", "memory");
-                break;
-        case 8:
-                asm volatile("//        __xchg8\n"
-                "1:     ldaxr   %0, %2\n"
-                "       stlxr   %w1, %3, %2\n"
-                "       cbnz    %w1, 1b\n"
-                        : "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
+		break;
+	case 8:
+		asm volatile("//	__xchg8\n"
+		"1:	ldxr	%0, %2\n"
+		"	stlxr	%w1, %3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
                         : "r" (x)
                         : "cc", "memory");
                 break;
         default:
                 __bad_xchg(ptr, size), ret = 0;
                 break;
-        }
+	}
 
-        return ret;
+	smp_mb();
+	return ret;
 }
 
 #define xchg(ptr,x) \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36: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 1WWDev-0005ZP-8G; Fri, 04 Apr 2014 23:36:29 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDet-0005ZC-R0
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:28 +0000
Received: from [85.158.139.211:46590] by server-6.bemta-5.messagelabs.com id
	22/53-19576-BF14F335; Fri, 04 Apr 2014 23:36:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1396654584!5601422!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2410 invoked from network); 4 Apr 2014 23:36:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:36:25 -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 1WWDeq-0002va-In
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeq-0008Ap-H5
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:24 +0000
Date: Fri, 04 Apr 2014 23:36:24 +0000
Message-Id: <E1WWDeq-0008Ap-H5@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: reinstate hard tabs in
	system.h cmpxchg
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 7ccbe11dddb0174db3b2191603b43a2e284f8fe7
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:47 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: reinstate hard tabs in system.h cmpxchg
    
    These functions are from Linux and the intention was to keep the formatting
    the same to make resyncing easier.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm64/system.h |  196 ++++++++++++++++++------------------
 1 files changed, 98 insertions(+), 98 deletions(-)

diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/asm-arm/arm64/system.h
index 0db96e0..9fa698b 100644
--- a/xen/include/asm-arm/arm64/system.h
+++ b/xen/include/asm-arm/arm64/system.h
@@ -6,7 +6,7 @@ extern void __bad_xchg(volatile void *, int);
 
 static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
 {
-        unsigned long ret, tmp;
+	unsigned long ret, tmp;
 
 	switch (size) {
 	case 1:
@@ -15,8 +15,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	stlxrb	%w1, %w3, %2\n"
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
-                        : "r" (x)
-                        : "cc", "memory");
+			: "r" (x)
+			: "cc", "memory");
 		break;
 	case 2:
 		asm volatile("//	__xchg2\n"
@@ -24,8 +24,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	stlxrh	%w1, %w3, %2\n"
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
-                        : "r" (x)
-                        : "cc", "memory");
+			: "r" (x)
+			: "cc", "memory");
 		break;
 	case 4:
 		asm volatile("//	__xchg4\n"
@@ -33,8 +33,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	stlxr	%w1, %w3, %2\n"
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
-                        : "r" (x)
-                        : "cc", "memory");
+			: "r" (x)
+			: "cc", "memory");
 		break;
 	case 8:
 		asm volatile("//	__xchg8\n"
@@ -42,12 +42,12 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	stlxr	%w1, %3, %2\n"
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
-                        : "r" (x)
-                        : "cc", "memory");
-                break;
-        default:
-                __bad_xchg(ptr, size), ret = 0;
-                break;
+			: "r" (x)
+			: "cc", "memory");
+		break;
+	default:
+		__bad_xchg(ptr, size), ret = 0;
+		break;
 	}
 
 	smp_mb();
@@ -55,107 +55,107 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 }
 
 #define xchg(ptr,x) \
-        ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
 
 extern void __bad_cmpxchg(volatile void *ptr, int size);
 
 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
-                                      unsigned long new, int size)
+				      unsigned long new, int size)
 {
-        unsigned long oldval = 0, res;
-
-        switch (size) {
-        case 1:
-                do {
-                        asm volatile("// __cmpxchg1\n"
-                        "       ldxrb   %w1, %2\n"
-                        "       mov     %w0, #0\n"
-                        "       cmp     %w1, %w3\n"
-                        "       b.ne    1f\n"
-                        "       stxrb   %w0, %w4, %2\n"
-                        "1:\n"
-                                : "=&r" (res), "=&r" (oldval), "+Q" (*(u8 *)ptr)
-                                : "Ir" (old), "r" (new)
-                                : "cc");
-                } while (res);
-                break;
-
-        case 2:
-                do {
-                        asm volatile("// __cmpxchg2\n"
-                        "       ldxrh   %w1, %2\n"
-                        "       mov     %w0, #0\n"
-                        "       cmp     %w1, %w3\n"
-                        "       b.ne    1f\n"
-                        "       stxrh   %w0, %w4, %2\n"
-                        "1:\n"
-                                : "=&r" (res), "=&r" (oldval), "+Q" (*(u16 *)ptr)
-                                : "Ir" (old), "r" (new)
-                                : "cc");
-                } while (res);
-                break;
-
-        case 4:
-                do {
-                        asm volatile("// __cmpxchg4\n"
-                        "       ldxr    %w1, %2\n"
-                        "       mov     %w0, #0\n"
-                        "       cmp     %w1, %w3\n"
-                        "       b.ne    1f\n"
-                        "       stxr    %w0, %w4, %2\n"
-                        "1:\n"
-                                : "=&r" (res), "=&r" (oldval), "+Q" (*(u32 *)ptr)
-                                : "Ir" (old), "r" (new)
-                                : "cc");
-                } while (res);
-                break;
-
-        case 8:
-                do {
-                        asm volatile("// __cmpxchg8\n"
-                        "       ldxr    %1, %2\n"
-                        "       mov     %w0, #0\n"
-                        "       cmp     %1, %3\n"
-                        "       b.ne    1f\n"
-                        "       stxr    %w0, %4, %2\n"
-                        "1:\n"
-                                : "=&r" (res), "=&r" (oldval), "+Q" (*(u64 *)ptr)
-                                : "Ir" (old), "r" (new)
-                                : "cc");
-                } while (res);
-                break;
-
-        default:
+	unsigned long oldval = 0, res;
+
+	switch (size) {
+	case 1:
+		do {
+			asm volatile("// __cmpxchg1\n"
+			"	ldxrb	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxrb	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u8 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 2:
+		do {
+			asm volatile("// __cmpxchg2\n"
+			"	ldxrh	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxrh	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u16 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 4:
+		do {
+			asm volatile("// __cmpxchg4\n"
+			"	ldxr	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxr	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u32 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 8:
+		do {
+			asm volatile("// __cmpxchg8\n"
+			"	ldxr	%1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%1, %3\n"
+			"	b.ne	1f\n"
+			"	stxr	%w0, %4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u64 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	default:
 		__bad_cmpxchg(ptr, size);
 		oldval = 0;
-        }
+	}
 
-        return oldval;
+	return oldval;
 }
 
 static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
-                                         unsigned long new, int size)
+					 unsigned long new, int size)
 {
-        unsigned long ret;
+	unsigned long ret;
 
-        smp_mb();
-        ret = __cmpxchg(ptr, old, new, size);
-        smp_mb();
+	smp_mb();
+	ret = __cmpxchg(ptr, old, new, size);
+	smp_mb();
 
-        return ret;
+	return ret;
 }
 
-#define cmpxchg(ptr,o,n)                                                \
-        ((__typeof__(*(ptr)))__cmpxchg_mb((ptr),                        \
-                                          (unsigned long)(o),           \
-                                          (unsigned long)(n),           \
-                                          sizeof(*(ptr))))
-
-#define cmpxchg_local(ptr,o,n)                                          \
-        ((__typeof__(*(ptr)))__cmpxchg((ptr),                           \
-                                       (unsigned long)(o),              \
-                                       (unsigned long)(n),              \
-                                       sizeof(*(ptr))))
+#define cmpxchg(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
+					  (unsigned long)(o),		\
+					  (unsigned long)(n),		\
+					  sizeof(*(ptr))))
+
+#define cmpxchg_local(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
+				       (unsigned long)(o),		\
+				       (unsigned long)(n),		\
+				       sizeof(*(ptr))))
 
 /* Uses uimm4 as a bitmask to select the clearing of one or more of
  * the DAIF exception mask bits:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36: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 1WWDev-0005ZP-8G; Fri, 04 Apr 2014 23:36:29 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDet-0005ZC-R0
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:28 +0000
Received: from [85.158.139.211:46590] by server-6.bemta-5.messagelabs.com id
	22/53-19576-BF14F335; Fri, 04 Apr 2014 23:36:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1396654584!5601422!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2410 invoked from network); 4 Apr 2014 23:36:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:36:25 -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 1WWDeq-0002va-In
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDeq-0008Ap-H5
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:24 +0000
Date: Fri, 04 Apr 2014 23:36:24 +0000
Message-Id: <E1WWDeq-0008Ap-H5@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: reinstate hard tabs in
	system.h cmpxchg
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 7ccbe11dddb0174db3b2191603b43a2e284f8fe7
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:47 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: reinstate hard tabs in system.h cmpxchg
    
    These functions are from Linux and the intention was to keep the formatting
    the same to make resyncing easier.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm64/system.h |  196 ++++++++++++++++++------------------
 1 files changed, 98 insertions(+), 98 deletions(-)

diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/asm-arm/arm64/system.h
index 0db96e0..9fa698b 100644
--- a/xen/include/asm-arm/arm64/system.h
+++ b/xen/include/asm-arm/arm64/system.h
@@ -6,7 +6,7 @@ extern void __bad_xchg(volatile void *, int);
 
 static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
 {
-        unsigned long ret, tmp;
+	unsigned long ret, tmp;
 
 	switch (size) {
 	case 1:
@@ -15,8 +15,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	stlxrb	%w1, %w3, %2\n"
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
-                        : "r" (x)
-                        : "cc", "memory");
+			: "r" (x)
+			: "cc", "memory");
 		break;
 	case 2:
 		asm volatile("//	__xchg2\n"
@@ -24,8 +24,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	stlxrh	%w1, %w3, %2\n"
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
-                        : "r" (x)
-                        : "cc", "memory");
+			: "r" (x)
+			: "cc", "memory");
 		break;
 	case 4:
 		asm volatile("//	__xchg4\n"
@@ -33,8 +33,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	stlxr	%w1, %w3, %2\n"
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
-                        : "r" (x)
-                        : "cc", "memory");
+			: "r" (x)
+			: "cc", "memory");
 		break;
 	case 8:
 		asm volatile("//	__xchg8\n"
@@ -42,12 +42,12 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	stlxr	%w1, %3, %2\n"
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
-                        : "r" (x)
-                        : "cc", "memory");
-                break;
-        default:
-                __bad_xchg(ptr, size), ret = 0;
-                break;
+			: "r" (x)
+			: "cc", "memory");
+		break;
+	default:
+		__bad_xchg(ptr, size), ret = 0;
+		break;
 	}
 
 	smp_mb();
@@ -55,107 +55,107 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 }
 
 #define xchg(ptr,x) \
-        ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
 
 extern void __bad_cmpxchg(volatile void *ptr, int size);
 
 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
-                                      unsigned long new, int size)
+				      unsigned long new, int size)
 {
-        unsigned long oldval = 0, res;
-
-        switch (size) {
-        case 1:
-                do {
-                        asm volatile("// __cmpxchg1\n"
-                        "       ldxrb   %w1, %2\n"
-                        "       mov     %w0, #0\n"
-                        "       cmp     %w1, %w3\n"
-                        "       b.ne    1f\n"
-                        "       stxrb   %w0, %w4, %2\n"
-                        "1:\n"
-                                : "=&r" (res), "=&r" (oldval), "+Q" (*(u8 *)ptr)
-                                : "Ir" (old), "r" (new)
-                                : "cc");
-                } while (res);
-                break;
-
-        case 2:
-                do {
-                        asm volatile("// __cmpxchg2\n"
-                        "       ldxrh   %w1, %2\n"
-                        "       mov     %w0, #0\n"
-                        "       cmp     %w1, %w3\n"
-                        "       b.ne    1f\n"
-                        "       stxrh   %w0, %w4, %2\n"
-                        "1:\n"
-                                : "=&r" (res), "=&r" (oldval), "+Q" (*(u16 *)ptr)
-                                : "Ir" (old), "r" (new)
-                                : "cc");
-                } while (res);
-                break;
-
-        case 4:
-                do {
-                        asm volatile("// __cmpxchg4\n"
-                        "       ldxr    %w1, %2\n"
-                        "       mov     %w0, #0\n"
-                        "       cmp     %w1, %w3\n"
-                        "       b.ne    1f\n"
-                        "       stxr    %w0, %w4, %2\n"
-                        "1:\n"
-                                : "=&r" (res), "=&r" (oldval), "+Q" (*(u32 *)ptr)
-                                : "Ir" (old), "r" (new)
-                                : "cc");
-                } while (res);
-                break;
-
-        case 8:
-                do {
-                        asm volatile("// __cmpxchg8\n"
-                        "       ldxr    %1, %2\n"
-                        "       mov     %w0, #0\n"
-                        "       cmp     %1, %3\n"
-                        "       b.ne    1f\n"
-                        "       stxr    %w0, %4, %2\n"
-                        "1:\n"
-                                : "=&r" (res), "=&r" (oldval), "+Q" (*(u64 *)ptr)
-                                : "Ir" (old), "r" (new)
-                                : "cc");
-                } while (res);
-                break;
-
-        default:
+	unsigned long oldval = 0, res;
+
+	switch (size) {
+	case 1:
+		do {
+			asm volatile("// __cmpxchg1\n"
+			"	ldxrb	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxrb	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u8 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 2:
+		do {
+			asm volatile("// __cmpxchg2\n"
+			"	ldxrh	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxrh	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u16 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 4:
+		do {
+			asm volatile("// __cmpxchg4\n"
+			"	ldxr	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxr	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u32 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 8:
+		do {
+			asm volatile("// __cmpxchg8\n"
+			"	ldxr	%1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%1, %3\n"
+			"	b.ne	1f\n"
+			"	stxr	%w0, %4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u64 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	default:
 		__bad_cmpxchg(ptr, size);
 		oldval = 0;
-        }
+	}
 
-        return oldval;
+	return oldval;
 }
 
 static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
-                                         unsigned long new, int size)
+					 unsigned long new, int size)
 {
-        unsigned long ret;
+	unsigned long ret;
 
-        smp_mb();
-        ret = __cmpxchg(ptr, old, new, size);
-        smp_mb();
+	smp_mb();
+	ret = __cmpxchg(ptr, old, new, size);
+	smp_mb();
 
-        return ret;
+	return ret;
 }
 
-#define cmpxchg(ptr,o,n)                                                \
-        ((__typeof__(*(ptr)))__cmpxchg_mb((ptr),                        \
-                                          (unsigned long)(o),           \
-                                          (unsigned long)(n),           \
-                                          sizeof(*(ptr))))
-
-#define cmpxchg_local(ptr,o,n)                                          \
-        ((__typeof__(*(ptr)))__cmpxchg((ptr),                           \
-                                       (unsigned long)(o),              \
-                                       (unsigned long)(n),              \
-                                       sizeof(*(ptr))))
+#define cmpxchg(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
+					  (unsigned long)(o),		\
+					  (unsigned long)(n),		\
+					  sizeof(*(ptr))))
+
+#define cmpxchg_local(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
+				       (unsigned long)(o),		\
+				       (unsigned long)(n),		\
+				       sizeof(*(ptr))))
 
 /* Uses uimm4 as a bitmask to select the clearing of one or more of
  * the DAIF exception mask bits:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36:39 +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 1WWDf5-0005at-Ay; Fri, 04 Apr 2014 23:36:39 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDf4-0005af-0M
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:38 +0000
Received: from [85.158.139.211:52912] by server-17.bemta-5.messagelabs.com id
	A2/B1-09046-5024F335; Fri, 04 Apr 2014 23:36:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1396654594!5578230!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20081 invoked from network); 4 Apr 2014 23:36:36 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:36:36 -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 1WWDf0-0002vi-PH
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDf0-0008BO-Mm
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:34 +0000
Date: Fri, 04 Apr 2014 23:36:34 +0000
Message-Id: <E1WWDf0-0008BO-Mm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: asm: remove redundant "cc"
	clobbers
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 ec593a43159167d61911e0b74db29f018b69642e
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:48 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: asm: remove redundant "cc" clobbers
    
    This resyncs atomics and cmpxchgs with Linux v3.14-rc7 by importing:
    commit 95c4189689f92fba7ecf9097173404d4928c6e9b
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Tue Feb 4 12:29:13 2014 +0000
    
        arm64: asm: remove redundant "cc" clobbers
    
        cbnz/tbnz don't update the condition flags, so remove the "cc" clobbers
        from inline asm blocks that only use these instructions to implement
        conditional branches.
    
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm64/atomic.h   |   12 +++++-------
 xen/include/asm-arm/arm64/spinlock.h |    6 +++---
 xen/include/asm-arm/arm64/system.h   |    8 ++++----
 3 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/include/asm-arm/arm64/atomic.h
index 3f37ed5..b5d50f2 100644
--- a/xen/include/asm-arm/arm64/atomic.h
+++ b/xen/include/asm-arm/arm64/atomic.h
@@ -38,8 +38,7 @@ static inline void atomic_add(int i, atomic_t *v)
 "	stxr	%w1, %w0, %2\n"
 "	cbnz	%w1, 1b"
 	: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
-	: "Ir" (i)
-	: "cc");
+	: "Ir" (i));
 }
 
 static inline int atomic_add_return(int i, atomic_t *v)
@@ -54,7 +53,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
 "	cbnz	%w1, 1b"
 	: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
 	: "Ir" (i)
-	: "cc", "memory");
+	: "memory");
 
 	smp_mb();
 	return result;
@@ -71,8 +70,7 @@ static inline void atomic_sub(int i, atomic_t *v)
 "	stxr	%w1, %w0, %2\n"
 "	cbnz	%w1, 1b"
 	: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
-	: "Ir" (i)
-	: "cc");
+	: "Ir" (i));
 }
 
 static inline int atomic_sub_return(int i, atomic_t *v)
@@ -87,7 +85,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 "	cbnz	%w1, 1b"
 	: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
 	: "Ir" (i)
-	: "cc", "memory");
+	: "memory");
 
 	smp_mb();
 	return result;
@@ -109,7 +107,7 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 "2:"
 	: "=&r" (tmp), "=&r" (oldval), "+Q" (ptr->counter)
 	: "Ir" (old), "r" (new)
-	: "cc", "memory");
+	: "cc");
 
 	smp_mb();
 	return oldval;
diff --git a/xen/include/asm-arm/arm64/spinlock.h b/xen/include/asm-arm/arm64/spinlock.h
index 3a36cfd..04300bc 100644
--- a/xen/include/asm-arm/arm64/spinlock.h
+++ b/xen/include/asm-arm/arm64/spinlock.h
@@ -70,7 +70,7 @@ static always_inline int _raw_read_trylock(raw_rwlock_t *rw)
         "1:\n"
         : "=&r" (tmp), "+r" (tmp2), "+Q" (rw->lock)
         :
-        : "cc", "memory");
+        : "memory");
 
     return !tmp2;
 }
@@ -86,7 +86,7 @@ static always_inline int _raw_write_trylock(raw_rwlock_t *rw)
         "1:\n"
         : "=&r" (tmp), "+Q" (rw->lock)
         : "r" (0x80000000)
-        : "cc", "memory");
+        : "memory");
 
     return !tmp;
 }
@@ -102,7 +102,7 @@ static inline void _raw_read_unlock(raw_rwlock_t *rw)
         "       cbnz    %w1, 1b\n"
         : "=&r" (tmp), "=&r" (tmp2), "+Q" (rw->lock)
         :
-        : "cc", "memory");
+        : "memory");
 }
 
 static inline void _raw_write_unlock(raw_rwlock_t *rw)
diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/asm-arm/arm64/system.h
index 9fa698b..fa50ead 100644
--- a/xen/include/asm-arm/arm64/system.h
+++ b/xen/include/asm-arm/arm64/system.h
@@ -16,7 +16,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
 			: "r" (x)
-			: "cc", "memory");
+			: "memory");
 		break;
 	case 2:
 		asm volatile("//	__xchg2\n"
@@ -25,7 +25,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
 			: "r" (x)
-			: "cc", "memory");
+			: "memory");
 		break;
 	case 4:
 		asm volatile("//	__xchg4\n"
@@ -34,7 +34,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
 			: "r" (x)
-			: "cc", "memory");
+			: "memory");
 		break;
 	case 8:
 		asm volatile("//	__xchg8\n"
@@ -43,7 +43,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
 			: "r" (x)
-			: "cc", "memory");
+			: "memory");
 		break;
 	default:
 		__bad_xchg(ptr, size), ret = 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36:39 +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 1WWDf5-0005at-Ay; Fri, 04 Apr 2014 23:36:39 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDf4-0005af-0M
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:38 +0000
Received: from [85.158.139.211:52912] by server-17.bemta-5.messagelabs.com id
	A2/B1-09046-5024F335; Fri, 04 Apr 2014 23:36:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1396654594!5578230!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20081 invoked from network); 4 Apr 2014 23:36:36 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:36:36 -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 1WWDf0-0002vi-PH
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDf0-0008BO-Mm
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:34 +0000
Date: Fri, 04 Apr 2014 23:36:34 +0000
Message-Id: <E1WWDf0-0008BO-Mm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: asm: remove redundant "cc"
	clobbers
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 ec593a43159167d61911e0b74db29f018b69642e
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:48 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: asm: remove redundant "cc" clobbers
    
    This resyncs atomics and cmpxchgs with Linux v3.14-rc7 by importing:
    commit 95c4189689f92fba7ecf9097173404d4928c6e9b
    Author: Will Deacon <will.deacon@arm.com>
    Date:   Tue Feb 4 12:29:13 2014 +0000
    
        arm64: asm: remove redundant "cc" clobbers
    
        cbnz/tbnz don't update the condition flags, so remove the "cc" clobbers
        from inline asm blocks that only use these instructions to implement
        conditional branches.
    
        Signed-off-by: Will Deacon <will.deacon@arm.com>
        Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-arm/arm64/atomic.h   |   12 +++++-------
 xen/include/asm-arm/arm64/spinlock.h |    6 +++---
 xen/include/asm-arm/arm64/system.h   |    8 ++++----
 3 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/include/asm-arm/arm64/atomic.h
index 3f37ed5..b5d50f2 100644
--- a/xen/include/asm-arm/arm64/atomic.h
+++ b/xen/include/asm-arm/arm64/atomic.h
@@ -38,8 +38,7 @@ static inline void atomic_add(int i, atomic_t *v)
 "	stxr	%w1, %w0, %2\n"
 "	cbnz	%w1, 1b"
 	: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
-	: "Ir" (i)
-	: "cc");
+	: "Ir" (i));
 }
 
 static inline int atomic_add_return(int i, atomic_t *v)
@@ -54,7 +53,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
 "	cbnz	%w1, 1b"
 	: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
 	: "Ir" (i)
-	: "cc", "memory");
+	: "memory");
 
 	smp_mb();
 	return result;
@@ -71,8 +70,7 @@ static inline void atomic_sub(int i, atomic_t *v)
 "	stxr	%w1, %w0, %2\n"
 "	cbnz	%w1, 1b"
 	: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
-	: "Ir" (i)
-	: "cc");
+	: "Ir" (i));
 }
 
 static inline int atomic_sub_return(int i, atomic_t *v)
@@ -87,7 +85,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)
 "	cbnz	%w1, 1b"
 	: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
 	: "Ir" (i)
-	: "cc", "memory");
+	: "memory");
 
 	smp_mb();
 	return result;
@@ -109,7 +107,7 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
 "2:"
 	: "=&r" (tmp), "=&r" (oldval), "+Q" (ptr->counter)
 	: "Ir" (old), "r" (new)
-	: "cc", "memory");
+	: "cc");
 
 	smp_mb();
 	return oldval;
diff --git a/xen/include/asm-arm/arm64/spinlock.h b/xen/include/asm-arm/arm64/spinlock.h
index 3a36cfd..04300bc 100644
--- a/xen/include/asm-arm/arm64/spinlock.h
+++ b/xen/include/asm-arm/arm64/spinlock.h
@@ -70,7 +70,7 @@ static always_inline int _raw_read_trylock(raw_rwlock_t *rw)
         "1:\n"
         : "=&r" (tmp), "+r" (tmp2), "+Q" (rw->lock)
         :
-        : "cc", "memory");
+        : "memory");
 
     return !tmp2;
 }
@@ -86,7 +86,7 @@ static always_inline int _raw_write_trylock(raw_rwlock_t *rw)
         "1:\n"
         : "=&r" (tmp), "+Q" (rw->lock)
         : "r" (0x80000000)
-        : "cc", "memory");
+        : "memory");
 
     return !tmp;
 }
@@ -102,7 +102,7 @@ static inline void _raw_read_unlock(raw_rwlock_t *rw)
         "       cbnz    %w1, 1b\n"
         : "=&r" (tmp), "=&r" (tmp2), "+Q" (rw->lock)
         :
-        : "cc", "memory");
+        : "memory");
 }
 
 static inline void _raw_write_unlock(raw_rwlock_t *rw)
diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/asm-arm/arm64/system.h
index 9fa698b..fa50ead 100644
--- a/xen/include/asm-arm/arm64/system.h
+++ b/xen/include/asm-arm/arm64/system.h
@@ -16,7 +16,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
 			: "r" (x)
-			: "cc", "memory");
+			: "memory");
 		break;
 	case 2:
 		asm volatile("//	__xchg2\n"
@@ -25,7 +25,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
 			: "r" (x)
-			: "cc", "memory");
+			: "memory");
 		break;
 	case 4:
 		asm volatile("//	__xchg4\n"
@@ -34,7 +34,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
 			: "r" (x)
-			: "cc", "memory");
+			: "memory");
 		break;
 	case 8:
 		asm volatile("//	__xchg8\n"
@@ -43,7 +43,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
 		"	cbnz	%w1, 1b\n"
 			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
 			: "r" (x)
-			: "cc", "memory");
+			: "memory");
 		break;
 	default:
 		__bad_xchg(ptr, size), ret = 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36:49 +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 1WWDfF-0005cX-Dl; Fri, 04 Apr 2014 23:36:49 +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 1WWDfD-0005cD-Ul
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:48 +0000
Received: from [85.158.143.35:25322] by server-1.bemta-4.messagelabs.com id
	C7/AB-09853-F024F335; Fri, 04 Apr 2014 23:36:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-21.messagelabs.com!1396654605!7150906!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8723 invoked from network); 4 Apr 2014 23:36:46 -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;
	4 Apr 2014 23:36:46 -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 1WWDfA-0002vo-V7
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfA-0008Bn-Tj
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:44 +0000
Date: Fri, 04 Apr 2014 23:36:44 +0000
Message-Id: <E1WWDfA-0008Bn-Tj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: assembly optimised mem*
	and str*
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 42c4eb6a83b1d1353ff0bf33faefa6848e0bb2b1
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:49 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: assembly optimised mem* and str*
    
    Taken from Linux v3.14-rc7.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm64/lib/Makefile  |    2 +
 xen/arch/arm/arm64/lib/memchr.S  |   43 +++++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/memcpy.S  |   52 +++++++++++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/memmove.S |   56 ++++++++++++++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/memset.S  |   52 +++++++++++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/strchr.S  |   41 +++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/strrchr.S |   42 ++++++++++++++++++++++++++++
 xen/include/asm-arm/string.h     |    4 +-
 8 files changed, 290 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/arm64/lib/Makefile b/xen/arch/arm/arm64/lib/Makefile
index 32c02c4..9f3b236 100644
--- a/xen/arch/arm/arm64/lib/Makefile
+++ b/xen/arch/arm/arm64/lib/Makefile
@@ -1 +1,3 @@
+obj-y += memcpy.o memmove.o memset.o memchr.o
 obj-y += bitops.o find_next_bit.o
+obj-y += strchr.o strrchr.o
diff --git a/xen/arch/arm/arm64/lib/memchr.S b/xen/arch/arm/arm64/lib/memchr.S
new file mode 100644
index 0000000..3cc1b01
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/memchr.S
@@ -0,0 +1,43 @@
+/*
+ * Based on arch/arm/lib/memchr.S
+ *
+ * Copyright (C) 1995-2000 Russell King
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Find a character in an area of memory.
+ *
+ * Parameters:
+ *	x0 - buf
+ *	x1 - c
+ *	x2 - n
+ * Returns:
+ *	x0 - address of first occurrence of 'c' or 0
+ */
+ENTRY(memchr)
+	and	w1, w1, #0xff
+1:	subs	x2, x2, #1
+	b.mi	2f
+	ldrb	w3, [x0], #1
+	cmp	w3, w1
+	b.ne	1b
+	sub	x0, x0, #1
+	ret
+2:	mov	x0, #0
+	ret
+ENDPROC(memchr)
diff --git a/xen/arch/arm/arm64/lib/memcpy.S b/xen/arch/arm/arm64/lib/memcpy.S
new file mode 100644
index 0000000..c8197c6
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/memcpy.S
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Copy a buffer from src to dest (alignment handled by the hardware)
+ *
+ * Parameters:
+ *	x0 - dest
+ *	x1 - src
+ *	x2 - n
+ * Returns:
+ *	x0 - dest
+ */
+ENTRY(memcpy)
+	mov	x4, x0
+	subs	x2, x2, #8
+	b.mi	2f
+1:	ldr	x3, [x1], #8
+	subs	x2, x2, #8
+	str	x3, [x4], #8
+	b.pl	1b
+2:	adds	x2, x2, #4
+	b.mi	3f
+	ldr	w3, [x1], #4
+	sub	x2, x2, #4
+	str	w3, [x4], #4
+3:	adds	x2, x2, #2
+	b.mi	4f
+	ldrh	w3, [x1], #2
+	sub	x2, x2, #2
+	strh	w3, [x4], #2
+4:	adds	x2, x2, #1
+	b.mi	5f
+	ldrb	w3, [x1]
+	strb	w3, [x4]
+5:	ret
+ENDPROC(memcpy)
diff --git a/xen/arch/arm/arm64/lib/memmove.S b/xen/arch/arm/arm64/lib/memmove.S
new file mode 100644
index 0000000..1bf0936
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/memmove.S
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Move a buffer from src to test (alignment handled by the hardware).
+ * If dest <= src, call memcpy, otherwise copy in reverse order.
+ *
+ * Parameters:
+ *	x0 - dest
+ *	x1 - src
+ *	x2 - n
+ * Returns:
+ *	x0 - dest
+ */
+ENTRY(memmove)
+	cmp	x0, x1
+	b.ls	memcpy
+	add	x4, x0, x2
+	add	x1, x1, x2
+	subs	x2, x2, #8
+	b.mi	2f
+1:	ldr	x3, [x1, #-8]!
+	subs	x2, x2, #8
+	str	x3, [x4, #-8]!
+	b.pl	1b
+2:	adds	x2, x2, #4
+	b.mi	3f
+	ldr	w3, [x1, #-4]!
+	sub	x2, x2, #4
+	str	w3, [x4, #-4]!
+3:	adds	x2, x2, #2
+	b.mi	4f
+	ldrh	w3, [x1, #-2]!
+	sub	x2, x2, #2
+	strh	w3, [x4, #-2]!
+4:	adds	x2, x2, #1
+	b.mi	5f
+	ldrb	w3, [x1, #-1]
+	strb	w3, [x4, #-1]
+5:	ret
+ENDPROC(memmove)
diff --git a/xen/arch/arm/arm64/lib/memset.S b/xen/arch/arm/arm64/lib/memset.S
new file mode 100644
index 0000000..25a4fb6
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/memset.S
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Fill in the buffer with character c (alignment handled by the hardware)
+ *
+ * Parameters:
+ *	x0 - buf
+ *	x1 - c
+ *	x2 - n
+ * Returns:
+ *	x0 - buf
+ */
+ENTRY(memset)
+	mov	x4, x0
+	and	w1, w1, #0xff
+	orr	w1, w1, w1, lsl #8
+	orr	w1, w1, w1, lsl #16
+	orr	x1, x1, x1, lsl #32
+	subs	x2, x2, #8
+	b.mi	2f
+1:	str	x1, [x4], #8
+	subs	x2, x2, #8
+	b.pl	1b
+2:	adds	x2, x2, #4
+	b.mi	3f
+	sub	x2, x2, #4
+	str	w1, [x4], #4
+3:	adds	x2, x2, #2
+	b.mi	4f
+	sub	x2, x2, #2
+	strh	w1, [x4], #2
+4:	adds	x2, x2, #1
+	b.mi	5f
+	strb	w1, [x4]
+5:	ret
+ENDPROC(memset)
diff --git a/xen/arch/arm/arm64/lib/strchr.S b/xen/arch/arm/arm64/lib/strchr.S
new file mode 100644
index 0000000..9e265e4
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/strchr.S
@@ -0,0 +1,41 @@
+/*
+ * Based on arch/arm/lib/strchr.S
+ *
+ * Copyright (C) 1995-2000 Russell King
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Find the first occurrence of a character in a string.
+ *
+ * Parameters:
+ *	x0 - str
+ *	x1 - c
+ * Returns:
+ *	x0 - address of first occurrence of 'c' or 0
+ */
+ENTRY(strchr)
+	and	w1, w1, #0xff
+1:	ldrb	w2, [x0], #1
+	cmp	w2, w1
+	ccmp	w2, wzr, #4, ne
+	b.ne	1b
+	sub	x0, x0, #1
+	cmp	w2, w1
+	csel	x0, x0, xzr, eq
+	ret
+ENDPROC(strchr)
diff --git a/xen/arch/arm/arm64/lib/strrchr.S b/xen/arch/arm/arm64/lib/strrchr.S
new file mode 100644
index 0000000..3791754
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/strrchr.S
@@ -0,0 +1,42 @@
+/*
+ * Based on arch/arm/lib/strrchr.S
+ *
+ * Copyright (C) 1995-2000 Russell King
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Find the last occurrence of a character in a string.
+ *
+ * Parameters:
+ *	x0 - str
+ *	x1 - c
+ * Returns:
+ *	x0 - address of last occurrence of 'c' or 0
+ */
+ENTRY(strrchr)
+	mov	x3, #0
+	and	w1, w1, #0xff
+1:	ldrb	w2, [x0], #1
+	cbz	w2, 2f
+	cmp	w2, w1
+	b.ne	1b
+	sub	x3, x0, #1
+	b	1b
+2:	mov	x0, x3
+	ret
+ENDPROC(strrchr)
diff --git a/xen/include/asm-arm/string.h b/xen/include/asm-arm/string.h
index 7d8b35a..3242762 100644
--- a/xen/include/asm-arm/string.h
+++ b/xen/include/asm-arm/string.h
@@ -3,8 +3,6 @@
 
 #include <xen/config.h>
 
-#if defined(CONFIG_ARM_32)
-
 /*
  * We don't do inline string functions, since the
  * optimised inline asm versions are not small.
@@ -29,6 +27,8 @@ extern void * memset(void *, int, __kernel_size_t);
 #define __HAVE_ARCH_MEMCHR
 extern void * memchr(const void *, int, __kernel_size_t);
 
+#if defined(CONFIG_ARM_32)
+
 extern void __memzero(void *ptr, __kernel_size_t n);
 
 #define memset(p,v,n)                                                   \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36:49 +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 1WWDfF-0005cX-Dl; Fri, 04 Apr 2014 23:36:49 +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 1WWDfD-0005cD-Ul
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:48 +0000
Received: from [85.158.143.35:25322] by server-1.bemta-4.messagelabs.com id
	C7/AB-09853-F024F335; Fri, 04 Apr 2014 23:36:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-21.messagelabs.com!1396654605!7150906!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8723 invoked from network); 4 Apr 2014 23:36:46 -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;
	4 Apr 2014 23:36:46 -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 1WWDfA-0002vo-V7
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfA-0008Bn-Tj
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:44 +0000
Date: Fri, 04 Apr 2014 23:36:44 +0000
Message-Id: <E1WWDfA-0008Bn-Tj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: assembly optimised mem*
	and str*
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 42c4eb6a83b1d1353ff0bf33faefa6848e0bb2b1
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:49 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:43 2014 +0100

    xen: arm64: assembly optimised mem* and str*
    
    Taken from Linux v3.14-rc7.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/arm/arm64/lib/Makefile  |    2 +
 xen/arch/arm/arm64/lib/memchr.S  |   43 +++++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/memcpy.S  |   52 +++++++++++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/memmove.S |   56 ++++++++++++++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/memset.S  |   52 +++++++++++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/strchr.S  |   41 +++++++++++++++++++++++++++
 xen/arch/arm/arm64/lib/strrchr.S |   42 ++++++++++++++++++++++++++++
 xen/include/asm-arm/string.h     |    4 +-
 8 files changed, 290 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/arm64/lib/Makefile b/xen/arch/arm/arm64/lib/Makefile
index 32c02c4..9f3b236 100644
--- a/xen/arch/arm/arm64/lib/Makefile
+++ b/xen/arch/arm/arm64/lib/Makefile
@@ -1 +1,3 @@
+obj-y += memcpy.o memmove.o memset.o memchr.o
 obj-y += bitops.o find_next_bit.o
+obj-y += strchr.o strrchr.o
diff --git a/xen/arch/arm/arm64/lib/memchr.S b/xen/arch/arm/arm64/lib/memchr.S
new file mode 100644
index 0000000..3cc1b01
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/memchr.S
@@ -0,0 +1,43 @@
+/*
+ * Based on arch/arm/lib/memchr.S
+ *
+ * Copyright (C) 1995-2000 Russell King
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Find a character in an area of memory.
+ *
+ * Parameters:
+ *	x0 - buf
+ *	x1 - c
+ *	x2 - n
+ * Returns:
+ *	x0 - address of first occurrence of 'c' or 0
+ */
+ENTRY(memchr)
+	and	w1, w1, #0xff
+1:	subs	x2, x2, #1
+	b.mi	2f
+	ldrb	w3, [x0], #1
+	cmp	w3, w1
+	b.ne	1b
+	sub	x0, x0, #1
+	ret
+2:	mov	x0, #0
+	ret
+ENDPROC(memchr)
diff --git a/xen/arch/arm/arm64/lib/memcpy.S b/xen/arch/arm/arm64/lib/memcpy.S
new file mode 100644
index 0000000..c8197c6
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/memcpy.S
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Copy a buffer from src to dest (alignment handled by the hardware)
+ *
+ * Parameters:
+ *	x0 - dest
+ *	x1 - src
+ *	x2 - n
+ * Returns:
+ *	x0 - dest
+ */
+ENTRY(memcpy)
+	mov	x4, x0
+	subs	x2, x2, #8
+	b.mi	2f
+1:	ldr	x3, [x1], #8
+	subs	x2, x2, #8
+	str	x3, [x4], #8
+	b.pl	1b
+2:	adds	x2, x2, #4
+	b.mi	3f
+	ldr	w3, [x1], #4
+	sub	x2, x2, #4
+	str	w3, [x4], #4
+3:	adds	x2, x2, #2
+	b.mi	4f
+	ldrh	w3, [x1], #2
+	sub	x2, x2, #2
+	strh	w3, [x4], #2
+4:	adds	x2, x2, #1
+	b.mi	5f
+	ldrb	w3, [x1]
+	strb	w3, [x4]
+5:	ret
+ENDPROC(memcpy)
diff --git a/xen/arch/arm/arm64/lib/memmove.S b/xen/arch/arm/arm64/lib/memmove.S
new file mode 100644
index 0000000..1bf0936
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/memmove.S
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Move a buffer from src to test (alignment handled by the hardware).
+ * If dest <= src, call memcpy, otherwise copy in reverse order.
+ *
+ * Parameters:
+ *	x0 - dest
+ *	x1 - src
+ *	x2 - n
+ * Returns:
+ *	x0 - dest
+ */
+ENTRY(memmove)
+	cmp	x0, x1
+	b.ls	memcpy
+	add	x4, x0, x2
+	add	x1, x1, x2
+	subs	x2, x2, #8
+	b.mi	2f
+1:	ldr	x3, [x1, #-8]!
+	subs	x2, x2, #8
+	str	x3, [x4, #-8]!
+	b.pl	1b
+2:	adds	x2, x2, #4
+	b.mi	3f
+	ldr	w3, [x1, #-4]!
+	sub	x2, x2, #4
+	str	w3, [x4, #-4]!
+3:	adds	x2, x2, #2
+	b.mi	4f
+	ldrh	w3, [x1, #-2]!
+	sub	x2, x2, #2
+	strh	w3, [x4, #-2]!
+4:	adds	x2, x2, #1
+	b.mi	5f
+	ldrb	w3, [x1, #-1]
+	strb	w3, [x4, #-1]
+5:	ret
+ENDPROC(memmove)
diff --git a/xen/arch/arm/arm64/lib/memset.S b/xen/arch/arm/arm64/lib/memset.S
new file mode 100644
index 0000000..25a4fb6
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/memset.S
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Fill in the buffer with character c (alignment handled by the hardware)
+ *
+ * Parameters:
+ *	x0 - buf
+ *	x1 - c
+ *	x2 - n
+ * Returns:
+ *	x0 - buf
+ */
+ENTRY(memset)
+	mov	x4, x0
+	and	w1, w1, #0xff
+	orr	w1, w1, w1, lsl #8
+	orr	w1, w1, w1, lsl #16
+	orr	x1, x1, x1, lsl #32
+	subs	x2, x2, #8
+	b.mi	2f
+1:	str	x1, [x4], #8
+	subs	x2, x2, #8
+	b.pl	1b
+2:	adds	x2, x2, #4
+	b.mi	3f
+	sub	x2, x2, #4
+	str	w1, [x4], #4
+3:	adds	x2, x2, #2
+	b.mi	4f
+	sub	x2, x2, #2
+	strh	w1, [x4], #2
+4:	adds	x2, x2, #1
+	b.mi	5f
+	strb	w1, [x4]
+5:	ret
+ENDPROC(memset)
diff --git a/xen/arch/arm/arm64/lib/strchr.S b/xen/arch/arm/arm64/lib/strchr.S
new file mode 100644
index 0000000..9e265e4
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/strchr.S
@@ -0,0 +1,41 @@
+/*
+ * Based on arch/arm/lib/strchr.S
+ *
+ * Copyright (C) 1995-2000 Russell King
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Find the first occurrence of a character in a string.
+ *
+ * Parameters:
+ *	x0 - str
+ *	x1 - c
+ * Returns:
+ *	x0 - address of first occurrence of 'c' or 0
+ */
+ENTRY(strchr)
+	and	w1, w1, #0xff
+1:	ldrb	w2, [x0], #1
+	cmp	w2, w1
+	ccmp	w2, wzr, #4, ne
+	b.ne	1b
+	sub	x0, x0, #1
+	cmp	w2, w1
+	csel	x0, x0, xzr, eq
+	ret
+ENDPROC(strchr)
diff --git a/xen/arch/arm/arm64/lib/strrchr.S b/xen/arch/arm/arm64/lib/strrchr.S
new file mode 100644
index 0000000..3791754
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/strrchr.S
@@ -0,0 +1,42 @@
+/*
+ * Based on arch/arm/lib/strrchr.S
+ *
+ * Copyright (C) 1995-2000 Russell King
+ * Copyright (C) 2013 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Find the last occurrence of a character in a string.
+ *
+ * Parameters:
+ *	x0 - str
+ *	x1 - c
+ * Returns:
+ *	x0 - address of last occurrence of 'c' or 0
+ */
+ENTRY(strrchr)
+	mov	x3, #0
+	and	w1, w1, #0xff
+1:	ldrb	w2, [x0], #1
+	cbz	w2, 2f
+	cmp	w2, w1
+	b.ne	1b
+	sub	x3, x0, #1
+	b	1b
+2:	mov	x0, x3
+	ret
+ENDPROC(strrchr)
diff --git a/xen/include/asm-arm/string.h b/xen/include/asm-arm/string.h
index 7d8b35a..3242762 100644
--- a/xen/include/asm-arm/string.h
+++ b/xen/include/asm-arm/string.h
@@ -3,8 +3,6 @@
 
 #include <xen/config.h>
 
-#if defined(CONFIG_ARM_32)
-
 /*
  * We don't do inline string functions, since the
  * optimised inline asm versions are not small.
@@ -29,6 +27,8 @@ extern void * memset(void *, int, __kernel_size_t);
 #define __HAVE_ARCH_MEMCHR
 extern void * memchr(const void *, int, __kernel_size_t);
 
+#if defined(CONFIG_ARM_32)
+
 extern void __memzero(void *ptr, __kernel_size_t n);
 
 #define memset(p,v,n)                                                   \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36:59 +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 1WWDfP-0005eK-IJ; Fri, 04 Apr 2014 23:36:59 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfN-0005e4-Tv
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:58 +0000
Received: from [85.158.137.68:18701] by server-16.bemta-3.messagelabs.com id
	BF/B8-13481-9124F335; Fri, 04 Apr 2014 23:36:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1396654615!67826!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6012 invoked from network); 4 Apr 2014 23:36:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:36:56 -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 1WWDfL-0002vx-7Q
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfL-0008Cs-2a
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:55 +0000
Date: Fri, 04 Apr 2014 23:36:55 +0000
Message-Id: <E1WWDfL-0008Cs-2a@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: optimised clear_page
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 856468788a62a37060d9b9d67c24de8fd1a4c24d
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 19 17:19:56 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:44 2014 +0100

    xen: arm64: optimised clear_page
    
    Taken from Linux v3.14-rc7.
    
    The clear_page header now needs to be within the !__ASSEMBLY__
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/arm64/lib/Makefile     |    1 +
 xen/arch/arm/arm64/lib/clear_page.S |   36 +++++++++++++++++++++++++++++++++++
 xen/include/asm-arm/arm32/page.h    |    2 +
 xen/include/asm-arm/arm64/page.h    |    2 +
 xen/include/asm-arm/page.h          |    2 -
 5 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/arm64/lib/Makefile b/xen/arch/arm/arm64/lib/Makefile
index 9f3b236..b895afa 100644
--- a/xen/arch/arm/arm64/lib/Makefile
+++ b/xen/arch/arm/arm64/lib/Makefile
@@ -1,3 +1,4 @@
 obj-y += memcpy.o memmove.o memset.o memchr.o
+obj-y += clear_page.o
 obj-y += bitops.o find_next_bit.o
 obj-y += strchr.o strrchr.o
diff --git a/xen/arch/arm/arm64/lib/clear_page.S b/xen/arch/arm/arm64/lib/clear_page.S
new file mode 100644
index 0000000..8d5cadb
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/clear_page.S
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2012 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Clear page @dest
+ *
+ * Parameters:
+ *	x0 - dest
+ */
+ENTRY(clear_page)
+	mrs	x1, dczid_el0
+	and	w1, w1, #0xf
+	mov	x2, #4
+	lsl	x1, x2, x1
+
+1:	dc	zva, x0
+	add	x0, x0, x1
+	tst	x0, #(PAGE_SIZE - 1)
+	b.ne	1b
+	ret
+ENDPROC(clear_page)
diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index 3f2bdc9..4abb281 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -108,6 +108,8 @@ static inline uint64_t gva_to_ipa_par(vaddr_t va)
     return par;
 }
 
+#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __ARM_ARM32_PAGE_H__ */
diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index d7ee2fc..713baf6 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -103,6 +103,8 @@ static inline uint64_t gva_to_ipa_par(vaddr_t va)
     return par;
 }
 
+extern void clear_page(void *to);
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __ARM_ARM64_PAGE_H__ */
diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
index 877aa2a..0c0fd37 100644
--- a/xen/include/asm-arm/page.h
+++ b/xen/include/asm-arm/page.h
@@ -420,8 +420,6 @@ static inline int gva_to_ipa(vaddr_t va, paddr_t *paddr)
 #define third_table_offset(va)  TABLE_OFFSET(third_linear_offset(va))
 #define zeroeth_table_offset(va)  TABLE_OFFSET(zeroeth_linear_offset(va))
 
-#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
-
 #define PAGE_ALIGN(x) (((x) + PAGE_SIZE - 1) & PAGE_MASK)
 
 #endif /* __ARM_PAGE_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:36:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:36:59 +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 1WWDfP-0005eK-IJ; Fri, 04 Apr 2014 23:36:59 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfN-0005e4-Tv
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:58 +0000
Received: from [85.158.137.68:18701] by server-16.bemta-3.messagelabs.com id
	BF/B8-13481-9124F335; Fri, 04 Apr 2014 23:36:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1396654615!67826!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6012 invoked from network); 4 Apr 2014 23:36:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:36:56 -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 1WWDfL-0002vx-7Q
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfL-0008Cs-2a
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:36:55 +0000
Date: Fri, 04 Apr 2014 23:36:55 +0000
Message-Id: <E1WWDfL-0008Cs-2a@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm64: optimised clear_page
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 856468788a62a37060d9b9d67c24de8fd1a4c24d
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 19 17:19:56 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:44 2014 +0100

    xen: arm64: optimised clear_page
    
    Taken from Linux v3.14-rc7.
    
    The clear_page header now needs to be within the !__ASSEMBLY__
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/arm64/lib/Makefile     |    1 +
 xen/arch/arm/arm64/lib/clear_page.S |   36 +++++++++++++++++++++++++++++++++++
 xen/include/asm-arm/arm32/page.h    |    2 +
 xen/include/asm-arm/arm64/page.h    |    2 +
 xen/include/asm-arm/page.h          |    2 -
 5 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/arm64/lib/Makefile b/xen/arch/arm/arm64/lib/Makefile
index 9f3b236..b895afa 100644
--- a/xen/arch/arm/arm64/lib/Makefile
+++ b/xen/arch/arm/arm64/lib/Makefile
@@ -1,3 +1,4 @@
 obj-y += memcpy.o memmove.o memset.o memchr.o
+obj-y += clear_page.o
 obj-y += bitops.o find_next_bit.o
 obj-y += strchr.o strrchr.o
diff --git a/xen/arch/arm/arm64/lib/clear_page.S b/xen/arch/arm/arm64/lib/clear_page.S
new file mode 100644
index 0000000..8d5cadb
--- /dev/null
+++ b/xen/arch/arm/arm64/lib/clear_page.S
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2012 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <xen/config.h>
+
+/*
+ * Clear page @dest
+ *
+ * Parameters:
+ *	x0 - dest
+ */
+ENTRY(clear_page)
+	mrs	x1, dczid_el0
+	and	w1, w1, #0xf
+	mov	x2, #4
+	lsl	x1, x2, x1
+
+1:	dc	zva, x0
+	add	x0, x0, x1
+	tst	x0, #(PAGE_SIZE - 1)
+	b.ne	1b
+	ret
+ENDPROC(clear_page)
diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/asm-arm/arm32/page.h
index 3f2bdc9..4abb281 100644
--- a/xen/include/asm-arm/arm32/page.h
+++ b/xen/include/asm-arm/arm32/page.h
@@ -108,6 +108,8 @@ static inline uint64_t gva_to_ipa_par(vaddr_t va)
     return par;
 }
 
+#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __ARM_ARM32_PAGE_H__ */
diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/asm-arm/arm64/page.h
index d7ee2fc..713baf6 100644
--- a/xen/include/asm-arm/arm64/page.h
+++ b/xen/include/asm-arm/arm64/page.h
@@ -103,6 +103,8 @@ static inline uint64_t gva_to_ipa_par(vaddr_t va)
     return par;
 }
 
+extern void clear_page(void *to);
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* __ARM_ARM64_PAGE_H__ */
diff --git a/xen/include/asm-arm/page.h b/xen/include/asm-arm/page.h
index 877aa2a..0c0fd37 100644
--- a/xen/include/asm-arm/page.h
+++ b/xen/include/asm-arm/page.h
@@ -420,8 +420,6 @@ static inline int gva_to_ipa(vaddr_t va, paddr_t *paddr)
 #define third_table_offset(va)  TABLE_OFFSET(third_linear_offset(va))
 #define zeroeth_table_offset(va)  TABLE_OFFSET(zeroeth_linear_offset(va))
 
-#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
-
 #define PAGE_ALIGN(x) (((x) + PAGE_SIZE - 1) & PAGE_MASK)
 
 #endif /* __ARM_PAGE_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37:10 +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 1WWDfa-0005g5-LC; Fri, 04 Apr 2014 23:37:10 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfZ-0005fo-98
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:09 +0000
Received: from [85.158.137.68:20956] by server-15.bemta-3.messagelabs.com id
	C8/B6-13757-4224F335; Fri, 04 Apr 2014 23:37:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1396654625!5167271!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22721 invoked from network); 4 Apr 2014 23:37:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37: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 1WWDfV-0002wW-E9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfV-0008DO-CU
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:05 +0000
Date: Fri, 04 Apr 2014 23:37:05 +0000
Message-Id: <E1WWDfV-0008DO-CU@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: refactor xchg and cmpxchg
	into their own headers
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 5259aa4eb54c76c76a1650a28756a2af9bc3dcb4
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:51 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:44 2014 +0100

    xen: arm: refactor xchg and cmpxchg into their own headers
    
    Since these functions are taken from Linux this makes it easier to compare
    against the Lihnux cmpxchg.h headers (which were split out from Linux's
    system.h a while back).
    
    Since these functions are from Linux the intention is to use Linux coding
    style, therefore include a suitable emacs magic block.
    
    For this reason also fix up the indentation in the 32-bit version to use hard
    tabs while moving it. The 64-bit version was already correct.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/include/asm-arm/arm32/cmpxchg.h |  146 ++++++++++++++++++++++++++++++
 xen/include/asm-arm/arm32/system.h  |  135 +----------------------------
 xen/include/asm-arm/arm64/cmpxchg.h |  167 +++++++++++++++++++++++++++++++++++
 xen/include/asm-arm/arm64/system.h  |  155 +--------------------------------
 4 files changed, 315 insertions(+), 288 deletions(-)

diff --git a/xen/include/asm-arm/arm32/cmpxchg.h b/xen/include/asm-arm/arm32/cmpxchg.h
new file mode 100644
index 0000000..70c6090
--- /dev/null
+++ b/xen/include/asm-arm/arm32/cmpxchg.h
@@ -0,0 +1,146 @@
+#ifndef __ASM_ARM32_CMPXCHG_H
+#define __ASM_ARM32_CMPXCHG_H
+
+extern void __bad_xchg(volatile void *, int);
+
+static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
+{
+	unsigned long ret;
+	unsigned int tmp;
+
+	smp_mb();
+
+	switch (size) {
+	case 1:
+		asm volatile("@	__xchg1\n"
+		"1:	ldrexb	%0, [%3]\n"
+		"	strexb	%1, %2, [%3]\n"
+		"	teq	%1, #0\n"
+		"	bne	1b"
+			: "=&r" (ret), "=&r" (tmp)
+			: "r" (x), "r" (ptr)
+			: "memory", "cc");
+		break;
+	case 4:
+		asm volatile("@	__xchg4\n"
+		"1:	ldrex	%0, [%3]\n"
+		"	strex	%1, %2, [%3]\n"
+		"	teq	%1, #0\n"
+		"	bne	1b"
+			: "=&r" (ret), "=&r" (tmp)
+			: "r" (x), "r" (ptr)
+			: "memory", "cc");
+		break;
+	default:
+		__bad_xchg(ptr, size), ret = 0;
+		break;
+	}
+	smp_mb();
+
+	return ret;
+}
+
+/*
+ * Atomic compare and exchange.  Compare OLD with MEM, if identical,
+ * store NEW in MEM.  Return the initial value in MEM.  Success is
+ * indicated by comparing RETURN with OLD.
+ */
+
+extern void __bad_cmpxchg(volatile void *ptr, int size);
+
+static always_inline unsigned long __cmpxchg(
+    volatile void *ptr, unsigned long old, unsigned long new, int size)
+{
+	unsigned long oldval, res;
+
+	switch (size) {
+	case 1:
+		do {
+			asm volatile("@ __cmpxchg1\n"
+			"	ldrexb	%1, [%2]\n"
+			"	mov	%0, #0\n"
+			"	teq	%1, %3\n"
+			"	strexbeq %0, %4, [%2]\n"
+				: "=&r" (res), "=&r" (oldval)
+				: "r" (ptr), "Ir" (old), "r" (new)
+				: "memory", "cc");
+		} while (res);
+		break;
+	case 2:
+		do {
+			asm volatile("@ __cmpxchg2\n"
+			"	ldrexh	%1, [%2]\n"
+			"	mov	%0, #0\n"
+			"	teq	%1, %3\n"
+			"	strexheq %0, %4, [%2]\n"
+				: "=&r" (res), "=&r" (oldval)
+				: "r" (ptr), "Ir" (old), "r" (new)
+				: "memory", "cc");
+		} while (res);
+		break;
+	case 4:
+		do {
+			asm volatile("@ __cmpxchg4\n"
+			"	ldrex	%1, [%2]\n"
+			"	mov	%0, #0\n"
+			"	teq	%1, %3\n"
+			"	strexeq	%0, %4, [%2]\n"
+				: "=&r" (res), "=&r" (oldval)
+				: "r" (ptr), "Ir" (old), "r" (new)
+				: "memory", "cc");
+	    } while (res);
+	    break;
+#if 0
+	case 8:
+		do {
+			asm volatile("@ __cmpxchg8\n"
+			"	ldrexd	%1, [%2]\n"
+			"	mov	%0, #0\n"
+			"	teq	%1, %3\n"
+			"	strexdeq %0, %4, [%2]\n"
+				: "=&r" (res), "=&r" (oldval)
+				: "r" (ptr), "Ir" (old), "r" (new)
+				: "memory", "cc");
+		} while (res);
+		break;
+#endif
+	default:
+		__bad_cmpxchg(ptr, size);
+		oldval = 0;
+	}
+
+	return oldval;
+}
+
+static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
+					 unsigned long new, int size)
+{
+	unsigned long ret;
+
+	smp_mb();
+	ret = __cmpxchg(ptr, old, new, size);
+	smp_mb();
+
+	return ret;
+}
+
+#define cmpxchg(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
+					  (unsigned long)(o),		\
+					  (unsigned long)(n),		\
+					  sizeof(*(ptr))))
+
+#define cmpxchg_local(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
+				       (unsigned long)(o),		\
+				       (unsigned long)(n),		\
+				       sizeof(*(ptr))))
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/xen/include/asm-arm/arm32/system.h b/xen/include/asm-arm/arm32/system.h
index dfaa3b6..b47b942 100644
--- a/xen/include/asm-arm/arm32/system.h
+++ b/xen/include/asm-arm/arm32/system.h
@@ -2,140 +2,7 @@
 #ifndef __ASM_ARM32_SYSTEM_H
 #define __ASM_ARM32_SYSTEM_H
 
-extern void __bad_xchg(volatile void *, int);
-
-static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
-{
-        unsigned long ret;
-        unsigned int tmp;
-
-        smp_mb();
-
-        switch (size) {
-        case 1:
-                asm volatile("@ __xchg1\n"
-                "1:     ldrexb  %0, [%3]\n"
-                "       strexb  %1, %2, [%3]\n"
-                "       teq     %1, #0\n"
-                "       bne     1b"
-                        : "=&r" (ret), "=&r" (tmp)
-                        : "r" (x), "r" (ptr)
-                        : "memory", "cc");
-                break;
-        case 4:
-                asm volatile("@ __xchg4\n"
-                "1:     ldrex   %0, [%3]\n"
-                "       strex   %1, %2, [%3]\n"
-                "       teq     %1, #0\n"
-                "       bne     1b"
-                        : "=&r" (ret), "=&r" (tmp)
-                        : "r" (x), "r" (ptr)
-                        : "memory", "cc");
-                break;
-        default:
-                __bad_xchg(ptr, size), ret = 0;
-                break;
-        }
-        smp_mb();
-
-        return ret;
-}
-
-/*
- * Atomic compare and exchange.  Compare OLD with MEM, if identical,
- * store NEW in MEM.  Return the initial value in MEM.  Success is
- * indicated by comparing RETURN with OLD.
- */
-
-extern void __bad_cmpxchg(volatile void *ptr, int size);
-
-static always_inline unsigned long __cmpxchg(
-    volatile void *ptr, unsigned long old, unsigned long new, int size)
-{
-    unsigned long /*long*/ oldval, res;
-
-    switch (size) {
-    case 1:
-        do {
-            asm volatile("@ __cmpxchg1\n"
-                         "       ldrexb  %1, [%2]\n"
-                         "       mov     %0, #0\n"
-                         "       teq     %1, %3\n"
-                         "       strexbeq %0, %4, [%2]\n"
-                         : "=&r" (res), "=&r" (oldval)
-                         : "r" (ptr), "Ir" (old), "r" (new)
-                         : "memory", "cc");
-        } while (res);
-        break;
-    case 2:
-        do {
-            asm volatile("@ __cmpxchg2\n"
-                         "       ldrexh  %1, [%2]\n"
-                         "       mov     %0, #0\n"
-                         "       teq     %1, %3\n"
-                         "       strexheq %0, %4, [%2]\n"
-                         : "=&r" (res), "=&r" (oldval)
-                         : "r" (ptr), "Ir" (old), "r" (new)
-                         : "memory", "cc");
-        } while (res);
-        break;
-    case 4:
-        do {
-            asm volatile("@ __cmpxchg4\n"
-                         "       ldrex   %1, [%2]\n"
-                         "       mov     %0, #0\n"
-                         "       teq     %1, %3\n"
-                         "       strexeq %0, %4, [%2]\n"
-                         : "=&r" (res), "=&r" (oldval)
-                         : "r" (ptr), "Ir" (old), "r" (new)
-                         : "memory", "cc");
-        } while (res);
-        break;
-#if 0
-    case 8:
-        do {
-            asm volatile("@ __cmpxchg8\n"
-                         "       ldrexd   %1, [%2]\n"
-                         "       mov      %0, #0\n"
-                         "       teq      %1, %3\n"
-                         "       strexdeq %0, %4, [%2]\n"
-                         : "=&r" (res), "=&r" (oldval)
-                         : "r" (ptr), "Ir" (old), "r" (new)
-                         : "memory", "cc");
-        } while (res);
-        break;
-#endif
-    default:
-        __bad_cmpxchg(ptr, size);
-        oldval = 0;
-    }
-
-    return oldval;
-}
-
-static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
-					 unsigned long new, int size)
-{
-	unsigned long ret;
-
-	smp_mb();
-	ret = __cmpxchg(ptr, old, new, size);
-	smp_mb();
-
-	return ret;
-}
-
-#define cmpxchg(ptr,o,n)						\
-	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
-					  (unsigned long)(o),		\
-					  (unsigned long)(n),		\
-					  sizeof(*(ptr))))
-
-#define cmpxchg_local(ptr,o,n)						\
-	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
-				       (unsigned long)(o),		\
-				       (unsigned long)(n),		\
-				       sizeof(*(ptr))))
+#include <asm/arm32/cmpxchg.h>
 
 #define local_irq_disable() asm volatile ( "cpsid i @ local_irq_disable\n" : : : "cc" )
 #define local_irq_enable()  asm volatile ( "cpsie i @ local_irq_enable\n" : : : "cc" )
diff --git a/xen/include/asm-arm/arm64/cmpxchg.h b/xen/include/asm-arm/arm64/cmpxchg.h
new file mode 100644
index 0000000..4e930ce
--- /dev/null
+++ b/xen/include/asm-arm/arm64/cmpxchg.h
@@ -0,0 +1,167 @@
+#ifndef __ASM_ARM64_CMPXCHG_H
+#define __ASM_ARM64_CMPXCHG_H
+
+extern void __bad_xchg(volatile void *, int);
+
+static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
+{
+	unsigned long ret, tmp;
+
+	switch (size) {
+	case 1:
+		asm volatile("//	__xchg1\n"
+		"1:	ldxrb	%w0, %2\n"
+		"	stlxrb	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
+			: "r" (x)
+			: "memory");
+		break;
+	case 2:
+		asm volatile("//	__xchg2\n"
+		"1:	ldxrh	%w0, %2\n"
+		"	stlxrh	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
+			: "r" (x)
+			: "memory");
+		break;
+	case 4:
+		asm volatile("//	__xchg4\n"
+		"1:	ldxr	%w0, %2\n"
+		"	stlxr	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
+			: "r" (x)
+			: "memory");
+		break;
+	case 8:
+		asm volatile("//	__xchg8\n"
+		"1:	ldxr	%0, %2\n"
+		"	stlxr	%w1, %3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
+			: "r" (x)
+			: "memory");
+		break;
+	default:
+		__bad_xchg(ptr, size), ret = 0;
+		break;
+	}
+
+	smp_mb();
+	return ret;
+}
+
+#define xchg(ptr,x) \
+	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+
+extern void __bad_cmpxchg(volatile void *ptr, int size);
+
+static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
+				      unsigned long new, int size)
+{
+	unsigned long oldval = 0, res;
+
+	switch (size) {
+	case 1:
+		do {
+			asm volatile("// __cmpxchg1\n"
+			"	ldxrb	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxrb	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u8 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 2:
+		do {
+			asm volatile("// __cmpxchg2\n"
+			"	ldxrh	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxrh	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u16 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 4:
+		do {
+			asm volatile("// __cmpxchg4\n"
+			"	ldxr	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxr	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u32 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 8:
+		do {
+			asm volatile("// __cmpxchg8\n"
+			"	ldxr	%1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%1, %3\n"
+			"	b.ne	1f\n"
+			"	stxr	%w0, %4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u64 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	default:
+		__bad_cmpxchg(ptr, size);
+		oldval = 0;
+	}
+
+	return oldval;
+}
+
+static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
+					 unsigned long new, int size)
+{
+	unsigned long ret;
+
+	smp_mb();
+	ret = __cmpxchg(ptr, old, new, size);
+	smp_mb();
+
+	return ret;
+}
+
+#define cmpxchg(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
+					  (unsigned long)(o),		\
+					  (unsigned long)(n),		\
+					  sizeof(*(ptr))))
+
+#define cmpxchg_local(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
+				       (unsigned long)(o),		\
+				       (unsigned long)(n),		\
+				       sizeof(*(ptr))))
+
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/asm-arm/arm64/system.h
index fa50ead..6efced3 100644
--- a/xen/include/asm-arm/arm64/system.h
+++ b/xen/include/asm-arm/arm64/system.h
@@ -2,160 +2,7 @@
 #ifndef __ASM_ARM64_SYSTEM_H
 #define __ASM_ARM64_SYSTEM_H
 
-extern void __bad_xchg(volatile void *, int);
-
-static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
-{
-	unsigned long ret, tmp;
-
-	switch (size) {
-	case 1:
-		asm volatile("//	__xchg1\n"
-		"1:	ldxrb	%w0, %2\n"
-		"	stlxrb	%w1, %w3, %2\n"
-		"	cbnz	%w1, 1b\n"
-			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
-			: "r" (x)
-			: "memory");
-		break;
-	case 2:
-		asm volatile("//	__xchg2\n"
-		"1:	ldxrh	%w0, %2\n"
-		"	stlxrh	%w1, %w3, %2\n"
-		"	cbnz	%w1, 1b\n"
-			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
-			: "r" (x)
-			: "memory");
-		break;
-	case 4:
-		asm volatile("//	__xchg4\n"
-		"1:	ldxr	%w0, %2\n"
-		"	stlxr	%w1, %w3, %2\n"
-		"	cbnz	%w1, 1b\n"
-			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
-			: "r" (x)
-			: "memory");
-		break;
-	case 8:
-		asm volatile("//	__xchg8\n"
-		"1:	ldxr	%0, %2\n"
-		"	stlxr	%w1, %3, %2\n"
-		"	cbnz	%w1, 1b\n"
-			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
-			: "r" (x)
-			: "memory");
-		break;
-	default:
-		__bad_xchg(ptr, size), ret = 0;
-		break;
-	}
-
-	smp_mb();
-	return ret;
-}
-
-#define xchg(ptr,x) \
-	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
-
-extern void __bad_cmpxchg(volatile void *ptr, int size);
-
-static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
-				      unsigned long new, int size)
-{
-	unsigned long oldval = 0, res;
-
-	switch (size) {
-	case 1:
-		do {
-			asm volatile("// __cmpxchg1\n"
-			"	ldxrb	%w1, %2\n"
-			"	mov	%w0, #0\n"
-			"	cmp	%w1, %w3\n"
-			"	b.ne	1f\n"
-			"	stxrb	%w0, %w4, %2\n"
-			"1:\n"
-				: "=&r" (res), "=&r" (oldval), "+Q" (*(u8 *)ptr)
-				: "Ir" (old), "r" (new)
-				: "cc");
-		} while (res);
-		break;
-
-	case 2:
-		do {
-			asm volatile("// __cmpxchg2\n"
-			"	ldxrh	%w1, %2\n"
-			"	mov	%w0, #0\n"
-			"	cmp	%w1, %w3\n"
-			"	b.ne	1f\n"
-			"	stxrh	%w0, %w4, %2\n"
-			"1:\n"
-				: "=&r" (res), "=&r" (oldval), "+Q" (*(u16 *)ptr)
-				: "Ir" (old), "r" (new)
-				: "cc");
-		} while (res);
-		break;
-
-	case 4:
-		do {
-			asm volatile("// __cmpxchg4\n"
-			"	ldxr	%w1, %2\n"
-			"	mov	%w0, #0\n"
-			"	cmp	%w1, %w3\n"
-			"	b.ne	1f\n"
-			"	stxr	%w0, %w4, %2\n"
-			"1:\n"
-				: "=&r" (res), "=&r" (oldval), "+Q" (*(u32 *)ptr)
-				: "Ir" (old), "r" (new)
-				: "cc");
-		} while (res);
-		break;
-
-	case 8:
-		do {
-			asm volatile("// __cmpxchg8\n"
-			"	ldxr	%1, %2\n"
-			"	mov	%w0, #0\n"
-			"	cmp	%1, %3\n"
-			"	b.ne	1f\n"
-			"	stxr	%w0, %4, %2\n"
-			"1:\n"
-				: "=&r" (res), "=&r" (oldval), "+Q" (*(u64 *)ptr)
-				: "Ir" (old), "r" (new)
-				: "cc");
-		} while (res);
-		break;
-
-	default:
-		__bad_cmpxchg(ptr, size);
-		oldval = 0;
-	}
-
-	return oldval;
-}
-
-static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
-					 unsigned long new, int size)
-{
-	unsigned long ret;
-
-	smp_mb();
-	ret = __cmpxchg(ptr, old, new, size);
-	smp_mb();
-
-	return ret;
-}
-
-#define cmpxchg(ptr,o,n)						\
-	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
-					  (unsigned long)(o),		\
-					  (unsigned long)(n),		\
-					  sizeof(*(ptr))))
-
-#define cmpxchg_local(ptr,o,n)						\
-	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
-				       (unsigned long)(o),		\
-				       (unsigned long)(n),		\
-				       sizeof(*(ptr))))
+#include <asm/arm64/cmpxchg.h>
 
 /* Uses uimm4 as a bitmask to select the clearing of one or more of
  * the DAIF exception mask bits:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37:10 +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 1WWDfa-0005g5-LC; Fri, 04 Apr 2014 23:37:10 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfZ-0005fo-98
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:09 +0000
Received: from [85.158.137.68:20956] by server-15.bemta-3.messagelabs.com id
	C8/B6-13757-4224F335; Fri, 04 Apr 2014 23:37:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1396654625!5167271!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22721 invoked from network); 4 Apr 2014 23:37:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37: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 1WWDfV-0002wW-E9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfV-0008DO-CU
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:05 +0000
Date: Fri, 04 Apr 2014 23:37:05 +0000
Message-Id: <E1WWDfV-0008DO-CU@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: refactor xchg and cmpxchg
	into their own headers
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 5259aa4eb54c76c76a1650a28756a2af9bc3dcb4
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:51 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:44 2014 +0100

    xen: arm: refactor xchg and cmpxchg into their own headers
    
    Since these functions are taken from Linux this makes it easier to compare
    against the Lihnux cmpxchg.h headers (which were split out from Linux's
    system.h a while back).
    
    Since these functions are from Linux the intention is to use Linux coding
    style, therefore include a suitable emacs magic block.
    
    For this reason also fix up the indentation in the 32-bit version to use hard
    tabs while moving it. The 64-bit version was already correct.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/include/asm-arm/arm32/cmpxchg.h |  146 ++++++++++++++++++++++++++++++
 xen/include/asm-arm/arm32/system.h  |  135 +----------------------------
 xen/include/asm-arm/arm64/cmpxchg.h |  167 +++++++++++++++++++++++++++++++++++
 xen/include/asm-arm/arm64/system.h  |  155 +--------------------------------
 4 files changed, 315 insertions(+), 288 deletions(-)

diff --git a/xen/include/asm-arm/arm32/cmpxchg.h b/xen/include/asm-arm/arm32/cmpxchg.h
new file mode 100644
index 0000000..70c6090
--- /dev/null
+++ b/xen/include/asm-arm/arm32/cmpxchg.h
@@ -0,0 +1,146 @@
+#ifndef __ASM_ARM32_CMPXCHG_H
+#define __ASM_ARM32_CMPXCHG_H
+
+extern void __bad_xchg(volatile void *, int);
+
+static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
+{
+	unsigned long ret;
+	unsigned int tmp;
+
+	smp_mb();
+
+	switch (size) {
+	case 1:
+		asm volatile("@	__xchg1\n"
+		"1:	ldrexb	%0, [%3]\n"
+		"	strexb	%1, %2, [%3]\n"
+		"	teq	%1, #0\n"
+		"	bne	1b"
+			: "=&r" (ret), "=&r" (tmp)
+			: "r" (x), "r" (ptr)
+			: "memory", "cc");
+		break;
+	case 4:
+		asm volatile("@	__xchg4\n"
+		"1:	ldrex	%0, [%3]\n"
+		"	strex	%1, %2, [%3]\n"
+		"	teq	%1, #0\n"
+		"	bne	1b"
+			: "=&r" (ret), "=&r" (tmp)
+			: "r" (x), "r" (ptr)
+			: "memory", "cc");
+		break;
+	default:
+		__bad_xchg(ptr, size), ret = 0;
+		break;
+	}
+	smp_mb();
+
+	return ret;
+}
+
+/*
+ * Atomic compare and exchange.  Compare OLD with MEM, if identical,
+ * store NEW in MEM.  Return the initial value in MEM.  Success is
+ * indicated by comparing RETURN with OLD.
+ */
+
+extern void __bad_cmpxchg(volatile void *ptr, int size);
+
+static always_inline unsigned long __cmpxchg(
+    volatile void *ptr, unsigned long old, unsigned long new, int size)
+{
+	unsigned long oldval, res;
+
+	switch (size) {
+	case 1:
+		do {
+			asm volatile("@ __cmpxchg1\n"
+			"	ldrexb	%1, [%2]\n"
+			"	mov	%0, #0\n"
+			"	teq	%1, %3\n"
+			"	strexbeq %0, %4, [%2]\n"
+				: "=&r" (res), "=&r" (oldval)
+				: "r" (ptr), "Ir" (old), "r" (new)
+				: "memory", "cc");
+		} while (res);
+		break;
+	case 2:
+		do {
+			asm volatile("@ __cmpxchg2\n"
+			"	ldrexh	%1, [%2]\n"
+			"	mov	%0, #0\n"
+			"	teq	%1, %3\n"
+			"	strexheq %0, %4, [%2]\n"
+				: "=&r" (res), "=&r" (oldval)
+				: "r" (ptr), "Ir" (old), "r" (new)
+				: "memory", "cc");
+		} while (res);
+		break;
+	case 4:
+		do {
+			asm volatile("@ __cmpxchg4\n"
+			"	ldrex	%1, [%2]\n"
+			"	mov	%0, #0\n"
+			"	teq	%1, %3\n"
+			"	strexeq	%0, %4, [%2]\n"
+				: "=&r" (res), "=&r" (oldval)
+				: "r" (ptr), "Ir" (old), "r" (new)
+				: "memory", "cc");
+	    } while (res);
+	    break;
+#if 0
+	case 8:
+		do {
+			asm volatile("@ __cmpxchg8\n"
+			"	ldrexd	%1, [%2]\n"
+			"	mov	%0, #0\n"
+			"	teq	%1, %3\n"
+			"	strexdeq %0, %4, [%2]\n"
+				: "=&r" (res), "=&r" (oldval)
+				: "r" (ptr), "Ir" (old), "r" (new)
+				: "memory", "cc");
+		} while (res);
+		break;
+#endif
+	default:
+		__bad_cmpxchg(ptr, size);
+		oldval = 0;
+	}
+
+	return oldval;
+}
+
+static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
+					 unsigned long new, int size)
+{
+	unsigned long ret;
+
+	smp_mb();
+	ret = __cmpxchg(ptr, old, new, size);
+	smp_mb();
+
+	return ret;
+}
+
+#define cmpxchg(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
+					  (unsigned long)(o),		\
+					  (unsigned long)(n),		\
+					  sizeof(*(ptr))))
+
+#define cmpxchg_local(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
+				       (unsigned long)(o),		\
+				       (unsigned long)(n),		\
+				       sizeof(*(ptr))))
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/xen/include/asm-arm/arm32/system.h b/xen/include/asm-arm/arm32/system.h
index dfaa3b6..b47b942 100644
--- a/xen/include/asm-arm/arm32/system.h
+++ b/xen/include/asm-arm/arm32/system.h
@@ -2,140 +2,7 @@
 #ifndef __ASM_ARM32_SYSTEM_H
 #define __ASM_ARM32_SYSTEM_H
 
-extern void __bad_xchg(volatile void *, int);
-
-static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
-{
-        unsigned long ret;
-        unsigned int tmp;
-
-        smp_mb();
-
-        switch (size) {
-        case 1:
-                asm volatile("@ __xchg1\n"
-                "1:     ldrexb  %0, [%3]\n"
-                "       strexb  %1, %2, [%3]\n"
-                "       teq     %1, #0\n"
-                "       bne     1b"
-                        : "=&r" (ret), "=&r" (tmp)
-                        : "r" (x), "r" (ptr)
-                        : "memory", "cc");
-                break;
-        case 4:
-                asm volatile("@ __xchg4\n"
-                "1:     ldrex   %0, [%3]\n"
-                "       strex   %1, %2, [%3]\n"
-                "       teq     %1, #0\n"
-                "       bne     1b"
-                        : "=&r" (ret), "=&r" (tmp)
-                        : "r" (x), "r" (ptr)
-                        : "memory", "cc");
-                break;
-        default:
-                __bad_xchg(ptr, size), ret = 0;
-                break;
-        }
-        smp_mb();
-
-        return ret;
-}
-
-/*
- * Atomic compare and exchange.  Compare OLD with MEM, if identical,
- * store NEW in MEM.  Return the initial value in MEM.  Success is
- * indicated by comparing RETURN with OLD.
- */
-
-extern void __bad_cmpxchg(volatile void *ptr, int size);
-
-static always_inline unsigned long __cmpxchg(
-    volatile void *ptr, unsigned long old, unsigned long new, int size)
-{
-    unsigned long /*long*/ oldval, res;
-
-    switch (size) {
-    case 1:
-        do {
-            asm volatile("@ __cmpxchg1\n"
-                         "       ldrexb  %1, [%2]\n"
-                         "       mov     %0, #0\n"
-                         "       teq     %1, %3\n"
-                         "       strexbeq %0, %4, [%2]\n"
-                         : "=&r" (res), "=&r" (oldval)
-                         : "r" (ptr), "Ir" (old), "r" (new)
-                         : "memory", "cc");
-        } while (res);
-        break;
-    case 2:
-        do {
-            asm volatile("@ __cmpxchg2\n"
-                         "       ldrexh  %1, [%2]\n"
-                         "       mov     %0, #0\n"
-                         "       teq     %1, %3\n"
-                         "       strexheq %0, %4, [%2]\n"
-                         : "=&r" (res), "=&r" (oldval)
-                         : "r" (ptr), "Ir" (old), "r" (new)
-                         : "memory", "cc");
-        } while (res);
-        break;
-    case 4:
-        do {
-            asm volatile("@ __cmpxchg4\n"
-                         "       ldrex   %1, [%2]\n"
-                         "       mov     %0, #0\n"
-                         "       teq     %1, %3\n"
-                         "       strexeq %0, %4, [%2]\n"
-                         : "=&r" (res), "=&r" (oldval)
-                         : "r" (ptr), "Ir" (old), "r" (new)
-                         : "memory", "cc");
-        } while (res);
-        break;
-#if 0
-    case 8:
-        do {
-            asm volatile("@ __cmpxchg8\n"
-                         "       ldrexd   %1, [%2]\n"
-                         "       mov      %0, #0\n"
-                         "       teq      %1, %3\n"
-                         "       strexdeq %0, %4, [%2]\n"
-                         : "=&r" (res), "=&r" (oldval)
-                         : "r" (ptr), "Ir" (old), "r" (new)
-                         : "memory", "cc");
-        } while (res);
-        break;
-#endif
-    default:
-        __bad_cmpxchg(ptr, size);
-        oldval = 0;
-    }
-
-    return oldval;
-}
-
-static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
-					 unsigned long new, int size)
-{
-	unsigned long ret;
-
-	smp_mb();
-	ret = __cmpxchg(ptr, old, new, size);
-	smp_mb();
-
-	return ret;
-}
-
-#define cmpxchg(ptr,o,n)						\
-	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
-					  (unsigned long)(o),		\
-					  (unsigned long)(n),		\
-					  sizeof(*(ptr))))
-
-#define cmpxchg_local(ptr,o,n)						\
-	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
-				       (unsigned long)(o),		\
-				       (unsigned long)(n),		\
-				       sizeof(*(ptr))))
+#include <asm/arm32/cmpxchg.h>
 
 #define local_irq_disable() asm volatile ( "cpsid i @ local_irq_disable\n" : : : "cc" )
 #define local_irq_enable()  asm volatile ( "cpsie i @ local_irq_enable\n" : : : "cc" )
diff --git a/xen/include/asm-arm/arm64/cmpxchg.h b/xen/include/asm-arm/arm64/cmpxchg.h
new file mode 100644
index 0000000..4e930ce
--- /dev/null
+++ b/xen/include/asm-arm/arm64/cmpxchg.h
@@ -0,0 +1,167 @@
+#ifndef __ASM_ARM64_CMPXCHG_H
+#define __ASM_ARM64_CMPXCHG_H
+
+extern void __bad_xchg(volatile void *, int);
+
+static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
+{
+	unsigned long ret, tmp;
+
+	switch (size) {
+	case 1:
+		asm volatile("//	__xchg1\n"
+		"1:	ldxrb	%w0, %2\n"
+		"	stlxrb	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
+			: "r" (x)
+			: "memory");
+		break;
+	case 2:
+		asm volatile("//	__xchg2\n"
+		"1:	ldxrh	%w0, %2\n"
+		"	stlxrh	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
+			: "r" (x)
+			: "memory");
+		break;
+	case 4:
+		asm volatile("//	__xchg4\n"
+		"1:	ldxr	%w0, %2\n"
+		"	stlxr	%w1, %w3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
+			: "r" (x)
+			: "memory");
+		break;
+	case 8:
+		asm volatile("//	__xchg8\n"
+		"1:	ldxr	%0, %2\n"
+		"	stlxr	%w1, %3, %2\n"
+		"	cbnz	%w1, 1b\n"
+			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
+			: "r" (x)
+			: "memory");
+		break;
+	default:
+		__bad_xchg(ptr, size), ret = 0;
+		break;
+	}
+
+	smp_mb();
+	return ret;
+}
+
+#define xchg(ptr,x) \
+	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+
+extern void __bad_cmpxchg(volatile void *ptr, int size);
+
+static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
+				      unsigned long new, int size)
+{
+	unsigned long oldval = 0, res;
+
+	switch (size) {
+	case 1:
+		do {
+			asm volatile("// __cmpxchg1\n"
+			"	ldxrb	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxrb	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u8 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 2:
+		do {
+			asm volatile("// __cmpxchg2\n"
+			"	ldxrh	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxrh	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u16 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 4:
+		do {
+			asm volatile("// __cmpxchg4\n"
+			"	ldxr	%w1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%w1, %w3\n"
+			"	b.ne	1f\n"
+			"	stxr	%w0, %w4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u32 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	case 8:
+		do {
+			asm volatile("// __cmpxchg8\n"
+			"	ldxr	%1, %2\n"
+			"	mov	%w0, #0\n"
+			"	cmp	%1, %3\n"
+			"	b.ne	1f\n"
+			"	stxr	%w0, %4, %2\n"
+			"1:\n"
+				: "=&r" (res), "=&r" (oldval), "+Q" (*(u64 *)ptr)
+				: "Ir" (old), "r" (new)
+				: "cc");
+		} while (res);
+		break;
+
+	default:
+		__bad_cmpxchg(ptr, size);
+		oldval = 0;
+	}
+
+	return oldval;
+}
+
+static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
+					 unsigned long new, int size)
+{
+	unsigned long ret;
+
+	smp_mb();
+	ret = __cmpxchg(ptr, old, new, size);
+	smp_mb();
+
+	return ret;
+}
+
+#define cmpxchg(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
+					  (unsigned long)(o),		\
+					  (unsigned long)(n),		\
+					  sizeof(*(ptr))))
+
+#define cmpxchg_local(ptr,o,n)						\
+	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
+				       (unsigned long)(o),		\
+				       (unsigned long)(n),		\
+				       sizeof(*(ptr))))
+
+#endif
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/asm-arm/arm64/system.h
index fa50ead..6efced3 100644
--- a/xen/include/asm-arm/arm64/system.h
+++ b/xen/include/asm-arm/arm64/system.h
@@ -2,160 +2,7 @@
 #ifndef __ASM_ARM64_SYSTEM_H
 #define __ASM_ARM64_SYSTEM_H
 
-extern void __bad_xchg(volatile void *, int);
-
-static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
-{
-	unsigned long ret, tmp;
-
-	switch (size) {
-	case 1:
-		asm volatile("//	__xchg1\n"
-		"1:	ldxrb	%w0, %2\n"
-		"	stlxrb	%w1, %w3, %2\n"
-		"	cbnz	%w1, 1b\n"
-			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)
-			: "r" (x)
-			: "memory");
-		break;
-	case 2:
-		asm volatile("//	__xchg2\n"
-		"1:	ldxrh	%w0, %2\n"
-		"	stlxrh	%w1, %w3, %2\n"
-		"	cbnz	%w1, 1b\n"
-			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u16 *)ptr)
-			: "r" (x)
-			: "memory");
-		break;
-	case 4:
-		asm volatile("//	__xchg4\n"
-		"1:	ldxr	%w0, %2\n"
-		"	stlxr	%w1, %w3, %2\n"
-		"	cbnz	%w1, 1b\n"
-			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u32 *)ptr)
-			: "r" (x)
-			: "memory");
-		break;
-	case 8:
-		asm volatile("//	__xchg8\n"
-		"1:	ldxr	%0, %2\n"
-		"	stlxr	%w1, %3, %2\n"
-		"	cbnz	%w1, 1b\n"
-			: "=&r" (ret), "=&r" (tmp), "+Q" (*(u64 *)ptr)
-			: "r" (x)
-			: "memory");
-		break;
-	default:
-		__bad_xchg(ptr, size), ret = 0;
-		break;
-	}
-
-	smp_mb();
-	return ret;
-}
-
-#define xchg(ptr,x) \
-	((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
-
-extern void __bad_cmpxchg(volatile void *ptr, int size);
-
-static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
-				      unsigned long new, int size)
-{
-	unsigned long oldval = 0, res;
-
-	switch (size) {
-	case 1:
-		do {
-			asm volatile("// __cmpxchg1\n"
-			"	ldxrb	%w1, %2\n"
-			"	mov	%w0, #0\n"
-			"	cmp	%w1, %w3\n"
-			"	b.ne	1f\n"
-			"	stxrb	%w0, %w4, %2\n"
-			"1:\n"
-				: "=&r" (res), "=&r" (oldval), "+Q" (*(u8 *)ptr)
-				: "Ir" (old), "r" (new)
-				: "cc");
-		} while (res);
-		break;
-
-	case 2:
-		do {
-			asm volatile("// __cmpxchg2\n"
-			"	ldxrh	%w1, %2\n"
-			"	mov	%w0, #0\n"
-			"	cmp	%w1, %w3\n"
-			"	b.ne	1f\n"
-			"	stxrh	%w0, %w4, %2\n"
-			"1:\n"
-				: "=&r" (res), "=&r" (oldval), "+Q" (*(u16 *)ptr)
-				: "Ir" (old), "r" (new)
-				: "cc");
-		} while (res);
-		break;
-
-	case 4:
-		do {
-			asm volatile("// __cmpxchg4\n"
-			"	ldxr	%w1, %2\n"
-			"	mov	%w0, #0\n"
-			"	cmp	%w1, %w3\n"
-			"	b.ne	1f\n"
-			"	stxr	%w0, %w4, %2\n"
-			"1:\n"
-				: "=&r" (res), "=&r" (oldval), "+Q" (*(u32 *)ptr)
-				: "Ir" (old), "r" (new)
-				: "cc");
-		} while (res);
-		break;
-
-	case 8:
-		do {
-			asm volatile("// __cmpxchg8\n"
-			"	ldxr	%1, %2\n"
-			"	mov	%w0, #0\n"
-			"	cmp	%1, %3\n"
-			"	b.ne	1f\n"
-			"	stxr	%w0, %4, %2\n"
-			"1:\n"
-				: "=&r" (res), "=&r" (oldval), "+Q" (*(u64 *)ptr)
-				: "Ir" (old), "r" (new)
-				: "cc");
-		} while (res);
-		break;
-
-	default:
-		__bad_cmpxchg(ptr, size);
-		oldval = 0;
-	}
-
-	return oldval;
-}
-
-static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
-					 unsigned long new, int size)
-{
-	unsigned long ret;
-
-	smp_mb();
-	ret = __cmpxchg(ptr, old, new, size);
-	smp_mb();
-
-	return ret;
-}
-
-#define cmpxchg(ptr,o,n)						\
-	((__typeof__(*(ptr)))__cmpxchg_mb((ptr),			\
-					  (unsigned long)(o),		\
-					  (unsigned long)(n),		\
-					  sizeof(*(ptr))))
-
-#define cmpxchg_local(ptr,o,n)						\
-	((__typeof__(*(ptr)))__cmpxchg((ptr),				\
-				       (unsigned long)(o),		\
-				       (unsigned long)(n),		\
-				       sizeof(*(ptr))))
+#include <asm/arm64/cmpxchg.h>
 
 /* Uses uimm4 as a bitmask to select the clearing of one or more of
  * the DAIF exception mask bits:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37: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 1WWDfj-0005hM-Nv; Fri, 04 Apr 2014 23:37:19 +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 1WWDfi-0005h7-F3
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:18 +0000
Received: from [85.158.143.35:27818] by server-2.bemta-4.messagelabs.com id
	94/88-06539-D224F335; Fri, 04 Apr 2014 23:37:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1396654635!79434!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13098 invoked from network); 4 Apr 2014 23:37:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37:16 -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 1WWDff-0002wc-Kv
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDff-0008Dm-IZ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:15 +0000
Date: Fri, 04 Apr 2014 23:37:15 +0000
Message-Id: <E1WWDff-0008Dm-IZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: document what low level
	primitives we have imported from Linux
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 e04254f7bc86f7f3916522986dd1036a65507057
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:52 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:44 2014 +0100

    xen: arm: document what low level primitives we have imported from Linux
    
    As part of the recent update I had to reverse engineer what we had, which was
    very tedious. Check in my notes so that I have a reference for next time.
    
    Now the secret is to remember to update this file every time!
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/README.LinuxPrimitives |  158 +++++++++++++++++++++++++++++++++++
 1 files changed, 158 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/README.LinuxPrimitives b/xen/arch/arm/README.LinuxPrimitives
new file mode 100644
index 0000000..6cd03ca
--- /dev/null
+++ b/xen/arch/arm/README.LinuxPrimitives
@@ -0,0 +1,158 @@
+Xen on ARM uses various low level assembly primitives from the Linux
+kernel. This file tracks what files have been imported and when they
+were last updated.
+
+=====================================================================
+arm64:
+=====================================================================
+
+bitops: last sync @ v3.14-rc7 (last commit: 8e86f0b)
+
+linux/arch/arm64/lib/bitops.S           xen/arch/arm/arm64/lib/bitops.S
+linux/arch/arm64/include/asm/bitops.h   xen/include/asm-arm/arm64/bitops.h
+
+---------------------------------------------------------------------
+
+cmpxchg: last sync @ v3.14-rc7 (last commit: 95c4189)
+
+linux/arch/arm64/include/asm/cmpxchg.h  xen/include/asm-arm/arm64/cmpxchg.h
+
+Skipped:
+  60010e5 arm64: cmpxchg: update macros to prevent warnings
+
+---------------------------------------------------------------------
+
+atomics: last sync @ v3.14-rc7 (last commit: 95c4189)
+
+linux/arch/arm64/include/asm/atomic.h   xen/include/asm-arm/arm64/atomic.h
+
+---------------------------------------------------------------------
+
+spinlocks: last sync @ v3.14-rc7 (last commit: 95c4189)
+
+linux/arch/arm64/include/asm/spinlock.h xen/include/asm-arm/arm64/spinlock.h
+
+Skipped:
+  5686b06 arm64: lockref: add support for lockless lockrefs using cmpxchg
+  52ea2a5 arm64: locks: introduce ticket-based spinlock implementation
+
+---------------------------------------------------------------------
+
+mem*: last sync @ v3.14-rc7 (last commit: 4a89922)
+
+linux/arch/arm64/lib/memchr.S             xen/arch/arm/arm64/lib/memchr.S
+linux/arch/arm64/lib/memcpy.S             xen/arch/arm/arm64/lib/memcpy.S
+linux/arch/arm64/lib/memmove.S            xen/arch/arm/arm64/lib/memmove.S
+linux/arch/arm64/lib/memset.S             xen/arch/arm/arm64/lib/memset.S
+
+for i in memchr.S memcpy.S memmove.S memset.S ; do
+    diff -u linux/arch/arm64/lib/$i xen/arch/arm/arm64/lib/$i
+done
+
+---------------------------------------------------------------------
+
+str*: last sync @ v3.14-rc7 (last commit: 2b8cac8)
+
+linux/arch/arm/lib/strchr.S             xen/arch/arm/arm64/lib/strchr.S
+linux/arch/arm/lib/strrchr.S            xen/arch/arm/arm64/lib/strrchr.S
+
+---------------------------------------------------------------------
+
+{clear,copy}_page: last sync @ v3.14-rc7 (last commit: f27bb13)
+
+linux/arch/arm64/lib/clear_page.S       unused in Xen
+linux/arch/arm64/lib/copy_page.S        xen/arch/arm/arm64/lib/copy_page.S
+
+=====================================================================
+arm32
+=====================================================================
+
+bitops: last sync @ v3.14-rc7 (last commit: b7ec699)
+
+linux/arch/arm/lib/bitops.h             xen/arch/arm/arm32/lib/bitops.h
+linux/arch/arm/lib/changebit.S          xen/arch/arm/arm32/lib/changebit.S
+linux/arch/arm/lib/clearbit.S           xen/arch/arm/arm32/lib/clearbit.S
+linux/arch/arm/lib/findbit.S            xen/arch/arm/arm32/lib/findbit.S
+linux/arch/arm/lib/setbit.S             xen/arch/arm/arm32/lib/setbit.S
+linux/arch/arm/lib/testchangebit.S      xen/arch/arm/arm32/lib/testchangebit.S
+linux/arch/arm/lib/testclearbit.S       xen/arch/arm/arm32/lib/testclearbit.S
+linux/arch/arm/lib/testsetbit.S         xen/arch/arm/arm32/lib/testsetbit.S
+
+for i in bitops.h changebit.S clearbit.S findbit.S setbit.S testchangebit.S \
+         testclearbit.S testsetbit.S; do
+    diff -u ../linux/arch/arm/lib/$i xen/arch/arm/arm32/lib/$i;
+done
+
+---------------------------------------------------------------------
+
+cmpxchg: last sync @ v3.14-rc7 (last commit: 775ebcc)
+
+linux/arch/arm/include/asm/cmpxchg.h    xen/include/asm-arm/arm32/cmpxchg.h
+
+---------------------------------------------------------------------
+
+atomics: last sync @ v3.14-rc7 (last commit: aed3a4e)
+
+linux/arch/arm/include/asm/atomic.h     xen/include/asm-arm/arm32/atomic.h
+
+---------------------------------------------------------------------
+
+spinlocks: last sync: 15e7e5c1ebf5
+
+linux/arch/arm/include/asm/spinlock.h   xen/include/asm-arm/arm32/spinlock.h
+
+resync to v3.14-rc7:
+
+  7c8746a ARM: 7955/1: spinlock: ensure we have a compiler barrier before sev
+  0cbad9c ARM: 7854/1: lockref: add support for lockless lockrefs using cmpxchg64
+  9bb17be ARM: locks: prefetch the destination word for write prior to strex
+  27a8479 ARM: smp_on_up: move inline asm ALT_SMP patching macro out of spinlock.
+  00efaa0 ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lo
+  afa31d8 ARM: 7811/1: locks: use early clobber in arch_spin_trylock
+  73a6fdc ARM: spinlock: use inner-shareable dsb variant prior to sev instruction
+
+---------------------------------------------------------------------
+
+mem*: last sync @ v3.14-rc7 (last commit: 418df63a)
+
+linux/arch/arm/lib/copy_template.S      xen/arch/arm/arm32/lib/copy_template.S
+linux/arch/arm/lib/memchr.S             xen/arch/arm/arm32/lib/memchr.S
+linux/arch/arm/lib/memcpy.S             xen/arch/arm/arm32/lib/memcpy.S
+linux/arch/arm/lib/memmove.S            xen/arch/arm/arm32/lib/memmove.S
+linux/arch/arm/lib/memset.S             xen/arch/arm/arm32/lib/memset.S
+linux/arch/arm/lib/memzero.S            xen/arch/arm/arm32/lib/memzero.S
+
+linux/arch/arm/lib/strchr.S             xen/arch/arm/arm32/lib/strchr.S
+linux/arch/arm/lib/strrchr.S            xen/arch/arm/arm32/lib/strrchr.S
+
+for i in copy_template.S memchr.S memcpy.S memmove.S memset.S \
+         memzero.S ; do
+    diff -u linux/arch/arm/lib/$i xen/arch/arm/arm32/lib/$i
+done
+
+---------------------------------------------------------------------
+
+str*: last sync @ v3.13-rc7 (last commit: 93ed397)
+
+linux/arch/arm/lib/strchr.S             xen/arch/arm/arm32/lib/strchr.S
+linux/arch/arm/lib/strrchr.S            xen/arch/arm/arm32/lib/strrchr.S
+
+---------------------------------------------------------------------
+
+{clear,copy}_page: last sync: Never
+
+linux/arch/arm/lib/copy_page.S          unused in Xen
+
+clear_page == memset
+
+---------------------------------------------------------------------
+
+libgcc: last sync @ v3.14-rc7 (last commit: 01885bc)
+
+linux/arch/arm/lib/lib1funcs.S          xen/arch/arm/arm32/lib/lib1funcs.S
+linux/arch/arm/lib/lshrdi3.S            xen/arch/arm/arm32/lib/lshrdi3.S
+linux/arch/arm/lib/div64.S              xen/arch/arm/arm32/lib/div64.S
+
+for i in lib1funcs.S lshrdi3.S div64.S ; do
+    diff -u linux/arch/arm/lib/$i xen/arch/arm/arm32/lib/$i
+done
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37: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 1WWDfj-0005hM-Nv; Fri, 04 Apr 2014 23:37:19 +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 1WWDfi-0005h7-F3
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:18 +0000
Received: from [85.158.143.35:27818] by server-2.bemta-4.messagelabs.com id
	94/88-06539-D224F335; Fri, 04 Apr 2014 23:37:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1396654635!79434!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13098 invoked from network); 4 Apr 2014 23:37:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37:16 -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 1WWDff-0002wc-Kv
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDff-0008Dm-IZ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:15 +0000
Date: Fri, 04 Apr 2014 23:37:15 +0000
Message-Id: <E1WWDff-0008Dm-IZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: document what low level
	primitives we have imported from Linux
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 e04254f7bc86f7f3916522986dd1036a65507057
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Mar 26 13:38:52 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:15:44 2014 +0100

    xen: arm: document what low level primitives we have imported from Linux
    
    As part of the recent update I had to reverse engineer what we had, which was
    very tedious. Check in my notes so that I have a reference for next time.
    
    Now the secret is to remember to update this file every time!
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/README.LinuxPrimitives |  158 +++++++++++++++++++++++++++++++++++
 1 files changed, 158 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/README.LinuxPrimitives b/xen/arch/arm/README.LinuxPrimitives
new file mode 100644
index 0000000..6cd03ca
--- /dev/null
+++ b/xen/arch/arm/README.LinuxPrimitives
@@ -0,0 +1,158 @@
+Xen on ARM uses various low level assembly primitives from the Linux
+kernel. This file tracks what files have been imported and when they
+were last updated.
+
+=====================================================================
+arm64:
+=====================================================================
+
+bitops: last sync @ v3.14-rc7 (last commit: 8e86f0b)
+
+linux/arch/arm64/lib/bitops.S           xen/arch/arm/arm64/lib/bitops.S
+linux/arch/arm64/include/asm/bitops.h   xen/include/asm-arm/arm64/bitops.h
+
+---------------------------------------------------------------------
+
+cmpxchg: last sync @ v3.14-rc7 (last commit: 95c4189)
+
+linux/arch/arm64/include/asm/cmpxchg.h  xen/include/asm-arm/arm64/cmpxchg.h
+
+Skipped:
+  60010e5 arm64: cmpxchg: update macros to prevent warnings
+
+---------------------------------------------------------------------
+
+atomics: last sync @ v3.14-rc7 (last commit: 95c4189)
+
+linux/arch/arm64/include/asm/atomic.h   xen/include/asm-arm/arm64/atomic.h
+
+---------------------------------------------------------------------
+
+spinlocks: last sync @ v3.14-rc7 (last commit: 95c4189)
+
+linux/arch/arm64/include/asm/spinlock.h xen/include/asm-arm/arm64/spinlock.h
+
+Skipped:
+  5686b06 arm64: lockref: add support for lockless lockrefs using cmpxchg
+  52ea2a5 arm64: locks: introduce ticket-based spinlock implementation
+
+---------------------------------------------------------------------
+
+mem*: last sync @ v3.14-rc7 (last commit: 4a89922)
+
+linux/arch/arm64/lib/memchr.S             xen/arch/arm/arm64/lib/memchr.S
+linux/arch/arm64/lib/memcpy.S             xen/arch/arm/arm64/lib/memcpy.S
+linux/arch/arm64/lib/memmove.S            xen/arch/arm/arm64/lib/memmove.S
+linux/arch/arm64/lib/memset.S             xen/arch/arm/arm64/lib/memset.S
+
+for i in memchr.S memcpy.S memmove.S memset.S ; do
+    diff -u linux/arch/arm64/lib/$i xen/arch/arm/arm64/lib/$i
+done
+
+---------------------------------------------------------------------
+
+str*: last sync @ v3.14-rc7 (last commit: 2b8cac8)
+
+linux/arch/arm/lib/strchr.S             xen/arch/arm/arm64/lib/strchr.S
+linux/arch/arm/lib/strrchr.S            xen/arch/arm/arm64/lib/strrchr.S
+
+---------------------------------------------------------------------
+
+{clear,copy}_page: last sync @ v3.14-rc7 (last commit: f27bb13)
+
+linux/arch/arm64/lib/clear_page.S       unused in Xen
+linux/arch/arm64/lib/copy_page.S        xen/arch/arm/arm64/lib/copy_page.S
+
+=====================================================================
+arm32
+=====================================================================
+
+bitops: last sync @ v3.14-rc7 (last commit: b7ec699)
+
+linux/arch/arm/lib/bitops.h             xen/arch/arm/arm32/lib/bitops.h
+linux/arch/arm/lib/changebit.S          xen/arch/arm/arm32/lib/changebit.S
+linux/arch/arm/lib/clearbit.S           xen/arch/arm/arm32/lib/clearbit.S
+linux/arch/arm/lib/findbit.S            xen/arch/arm/arm32/lib/findbit.S
+linux/arch/arm/lib/setbit.S             xen/arch/arm/arm32/lib/setbit.S
+linux/arch/arm/lib/testchangebit.S      xen/arch/arm/arm32/lib/testchangebit.S
+linux/arch/arm/lib/testclearbit.S       xen/arch/arm/arm32/lib/testclearbit.S
+linux/arch/arm/lib/testsetbit.S         xen/arch/arm/arm32/lib/testsetbit.S
+
+for i in bitops.h changebit.S clearbit.S findbit.S setbit.S testchangebit.S \
+         testclearbit.S testsetbit.S; do
+    diff -u ../linux/arch/arm/lib/$i xen/arch/arm/arm32/lib/$i;
+done
+
+---------------------------------------------------------------------
+
+cmpxchg: last sync @ v3.14-rc7 (last commit: 775ebcc)
+
+linux/arch/arm/include/asm/cmpxchg.h    xen/include/asm-arm/arm32/cmpxchg.h
+
+---------------------------------------------------------------------
+
+atomics: last sync @ v3.14-rc7 (last commit: aed3a4e)
+
+linux/arch/arm/include/asm/atomic.h     xen/include/asm-arm/arm32/atomic.h
+
+---------------------------------------------------------------------
+
+spinlocks: last sync: 15e7e5c1ebf5
+
+linux/arch/arm/include/asm/spinlock.h   xen/include/asm-arm/arm32/spinlock.h
+
+resync to v3.14-rc7:
+
+  7c8746a ARM: 7955/1: spinlock: ensure we have a compiler barrier before sev
+  0cbad9c ARM: 7854/1: lockref: add support for lockless lockrefs using cmpxchg64
+  9bb17be ARM: locks: prefetch the destination word for write prior to strex
+  27a8479 ARM: smp_on_up: move inline asm ALT_SMP patching macro out of spinlock.
+  00efaa0 ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lo
+  afa31d8 ARM: 7811/1: locks: use early clobber in arch_spin_trylock
+  73a6fdc ARM: spinlock: use inner-shareable dsb variant prior to sev instruction
+
+---------------------------------------------------------------------
+
+mem*: last sync @ v3.14-rc7 (last commit: 418df63a)
+
+linux/arch/arm/lib/copy_template.S      xen/arch/arm/arm32/lib/copy_template.S
+linux/arch/arm/lib/memchr.S             xen/arch/arm/arm32/lib/memchr.S
+linux/arch/arm/lib/memcpy.S             xen/arch/arm/arm32/lib/memcpy.S
+linux/arch/arm/lib/memmove.S            xen/arch/arm/arm32/lib/memmove.S
+linux/arch/arm/lib/memset.S             xen/arch/arm/arm32/lib/memset.S
+linux/arch/arm/lib/memzero.S            xen/arch/arm/arm32/lib/memzero.S
+
+linux/arch/arm/lib/strchr.S             xen/arch/arm/arm32/lib/strchr.S
+linux/arch/arm/lib/strrchr.S            xen/arch/arm/arm32/lib/strrchr.S
+
+for i in copy_template.S memchr.S memcpy.S memmove.S memset.S \
+         memzero.S ; do
+    diff -u linux/arch/arm/lib/$i xen/arch/arm/arm32/lib/$i
+done
+
+---------------------------------------------------------------------
+
+str*: last sync @ v3.13-rc7 (last commit: 93ed397)
+
+linux/arch/arm/lib/strchr.S             xen/arch/arm/arm32/lib/strchr.S
+linux/arch/arm/lib/strrchr.S            xen/arch/arm/arm32/lib/strrchr.S
+
+---------------------------------------------------------------------
+
+{clear,copy}_page: last sync: Never
+
+linux/arch/arm/lib/copy_page.S          unused in Xen
+
+clear_page == memset
+
+---------------------------------------------------------------------
+
+libgcc: last sync @ v3.14-rc7 (last commit: 01885bc)
+
+linux/arch/arm/lib/lib1funcs.S          xen/arch/arm/arm32/lib/lib1funcs.S
+linux/arch/arm/lib/lshrdi3.S            xen/arch/arm/arm32/lib/lshrdi3.S
+linux/arch/arm/lib/div64.S              xen/arch/arm/arm32/lib/div64.S
+
+for i in lib1funcs.S lshrdi3.S div64.S ; do
+    diff -u linux/arch/arm/lib/$i xen/arch/arm/arm32/lib/$i
+done
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37: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 1WWDft-0005jG-T1; Fri, 04 Apr 2014 23:37:29 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfs-0005iz-Gy
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:28 +0000
Received: from [85.158.139.211:59181] by server-13.bemta-5.messagelabs.com id
	DC/8D-16341-7324F335; Fri, 04 Apr 2014 23:37:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1396654646!5601835!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27832 invoked from network); 4 Apr 2014 23:37:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37:27 -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 1WWDfp-0002wi-QW
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfp-0008E9-OV
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:25 +0000
Date: Fri, 04 Apr 2014 23:37:25 +0000
Message-Id: <E1WWDfp-0008E9-OV@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "Revert "xen/arm: Allocate
	memory for dom0 from the bottom with the 1:1 Workaround""
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 d6ca80e03cc062c984401aefba5e277a9d9139a0
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 17:54:34 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:55:35 2014 +0100

    Revert "Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround""
    
    This reverts commit 1be5c1947fd52f5faaf6b678a829d47b0ec88bfd, effectively
    reinstating 6c21cb36e263de2db8716b477157a5b6cd531e1e.
    
    Without this booting dom0 on systems with >4GB of RAM is broken because the
    guest gets allocated a memory range which it cannot access.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain_build.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index a0b73d2..502db84 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -69,12 +69,19 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo)
 {
     paddr_t start;
     paddr_t size;
-    struct page_info *pg;
+    struct page_info *pg = NULL;
     unsigned int order = get_order_from_bytes(dom0_mem);
     int res;
     paddr_t spfn;
+    unsigned int bits;
+
+    for ( bits = PAGE_SHIFT + 1; bits < PADDR_BITS; bits++ )
+    {
+        pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
+        if ( pg != NULL )
+            break;
+    }
 
-    pg = alloc_domheap_pages(d, order, 0);
     if ( !pg )
         panic("Failed to allocate contiguous memory for dom0");
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37: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 1WWDft-0005jG-T1; Fri, 04 Apr 2014 23:37:29 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfs-0005iz-Gy
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:28 +0000
Received: from [85.158.139.211:59181] by server-13.bemta-5.messagelabs.com id
	DC/8D-16341-7324F335; Fri, 04 Apr 2014 23:37:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1396654646!5601835!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27832 invoked from network); 4 Apr 2014 23:37:27 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37:27 -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 1WWDfp-0002wi-QW
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfp-0008E9-OV
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:25 +0000
Date: Fri, 04 Apr 2014 23:37:25 +0000
Message-Id: <E1WWDfp-0008E9-OV@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "Revert "xen/arm: Allocate
	memory for dom0 from the bottom with the 1:1 Workaround""
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 d6ca80e03cc062c984401aefba5e277a9d9139a0
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 17:54:34 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:55:35 2014 +0100

    Revert "Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround""
    
    This reverts commit 1be5c1947fd52f5faaf6b678a829d47b0ec88bfd, effectively
    reinstating 6c21cb36e263de2db8716b477157a5b6cd531e1e.
    
    Without this booting dom0 on systems with >4GB of RAM is broken because the
    guest gets allocated a memory range which it cannot access.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain_build.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index a0b73d2..502db84 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -69,12 +69,19 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo)
 {
     paddr_t start;
     paddr_t size;
-    struct page_info *pg;
+    struct page_info *pg = NULL;
     unsigned int order = get_order_from_bytes(dom0_mem);
     int res;
     paddr_t spfn;
+    unsigned int bits;
+
+    for ( bits = PAGE_SHIFT + 1; bits < PADDR_BITS; bits++ )
+    {
+        pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
+        if ( pg != NULL )
+            break;
+    }
 
-    pg = alloc_domheap_pages(d, order, 0);
     if ( !pg )
         panic("Failed to allocate contiguous memory for dom0");
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37:40 +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 1WWDg3-0005kl-Vn; Fri, 04 Apr 2014 23:37:39 +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 1WWDg2-0005kV-Hb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:38 +0000
Received: from [85.158.143.35:38325] by server-3.bemta-4.messagelabs.com id
	12/95-13602-1424F335; Fri, 04 Apr 2014 23:37:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1396654656!7100369!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22703 invoked from network); 4 Apr 2014 23:37:37 -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;
	4 Apr 2014 23:37:37 -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 1WWDg0-0002wq-42
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfz-0008EZ-VL
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:35 +0000
Date: Fri, 04 Apr 2014 23:37:35 +0000
Message-Id: <E1WWDfz-0008EZ-VL@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Correct FMT_??B_WORD for arm64.
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 28c8460abd6c453d46516c6396d42d667dc339b9
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 15:06:51 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:27:50 2014 +0100

    xenctx: Correct FMT_??B_WORD for arm64.
    
    These should all be unsigned long long to match various variables used
    in the code, same as x86_64.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Don Slutz <dslutz@verizon.com>
---
 tools/xentrace/xenctx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 7275a00..47712ab 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -57,8 +57,8 @@ typedef uint64_t guest_word_t;
 #elif defined(__aarch64__)
 #define NO_TRANSLATION
 typedef uint64_t guest_word_t;
-#define FMT_32B_WORD "%08lx"
-#define FMT_64B_WORD "%016lx"
+#define FMT_32B_WORD "%08llx"
+#define FMT_64B_WORD "%016llx"
 #endif
 
 struct symbol {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37:40 +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 1WWDg3-0005kl-Vn; Fri, 04 Apr 2014 23:37:39 +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 1WWDg2-0005kV-Hb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:38 +0000
Received: from [85.158.143.35:38325] by server-3.bemta-4.messagelabs.com id
	12/95-13602-1424F335; Fri, 04 Apr 2014 23:37:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1396654656!7100369!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22703 invoked from network); 4 Apr 2014 23:37:37 -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;
	4 Apr 2014 23:37:37 -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 1WWDg0-0002wq-42
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDfz-0008EZ-VL
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:35 +0000
Date: Fri, 04 Apr 2014 23:37:35 +0000
Message-Id: <E1WWDfz-0008EZ-VL@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Correct FMT_??B_WORD for arm64.
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 28c8460abd6c453d46516c6396d42d667dc339b9
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Apr 3 15:06:51 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:27:50 2014 +0100

    xenctx: Correct FMT_??B_WORD for arm64.
    
    These should all be unsigned long long to match various variables used
    in the code, same as x86_64.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: Don Slutz <dslutz@verizon.com>
---
 tools/xentrace/xenctx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 7275a00..47712ab 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -57,8 +57,8 @@ typedef uint64_t guest_word_t;
 #elif defined(__aarch64__)
 #define NO_TRANSLATION
 typedef uint64_t guest_word_t;
-#define FMT_32B_WORD "%08lx"
-#define FMT_64B_WORD "%016lx"
+#define FMT_32B_WORD "%08llx"
+#define FMT_64B_WORD "%016llx"
 #endif
 
 struct symbol {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37:51 +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 1WWDgF-0005mK-2B; Fri, 04 Apr 2014 23:37:51 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgD-0005m5-09
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:49 +0000
Received: from [193.109.254.147:48722] by server-13.bemta-14.messagelabs.com
	id 4F/C2-23211-C424F335; Fri, 04 Apr 2014 23:37:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1396654666!5655029!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30608 invoked from network); 4 Apr 2014 23:37:47 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37:47 -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 1WWDgA-0002ww-A5
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgA-0008FR-7k
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:46 +0000
Date: Fri, 04 Apr 2014 23:37:46 +0000
Message-Id: <E1WWDgA-0008FR-7k@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: clean up usage output
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 52bfb010811c04155a35e0613dd9902c38fb96a5
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:52 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: clean up usage output
    
    Fix usage formatting to be all the same.
    
    Fix usage display of default --kernel-start for 64 bit.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 47712ab..889f788 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -823,15 +823,16 @@ static void usage(void)
 
     printf("options:\n");
     printf("  -f, --frame-pointers\n");
-    printf("                    assume the kernel was compiled with\n");
-    printf("                    frame pointers.\n");
+    printf("                     assume the kernel was compiled with\n");
+    printf("                     frame pointers.\n");
     printf("  -s SYMTAB, --symbol-table=SYMTAB\n");
-    printf("                    read symbol table from SYMTAB.\n");
-    printf("  -S --stack-trace  print a complete stack trace.\n");
-    printf("  -k, --kernel-start\n");
-    printf("                    set user/kernel split. (default 0xc0000000)\n");
-    printf("  -a --all          display more registers\n");
-    printf("  -C --all-vcpus    print info for all vcpus\n");
+    printf("                     read symbol table from SYMTAB.\n");
+    printf("  -S, --stack-trace  print a complete stack trace.\n");
+    printf("  -k KADDR, --kernel-start=KADDR\n");
+    printf("                     set user/kernel split. (default 0x"FMT_32B_WORD")\n",
+        kernel_start);
+    printf("  -a, --all          display more registers\n");
+    printf("  -C, --all-vcpus    print info for all vcpus\n");
 }
 
 int main(int argc, char **argv)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:37:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:37:51 +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 1WWDgF-0005mK-2B; Fri, 04 Apr 2014 23:37:51 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgD-0005m5-09
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:49 +0000
Received: from [193.109.254.147:48722] by server-13.bemta-14.messagelabs.com
	id 4F/C2-23211-C424F335; Fri, 04 Apr 2014 23:37:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1396654666!5655029!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30608 invoked from network); 4 Apr 2014 23:37:47 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37:47 -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 1WWDgA-0002ww-A5
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgA-0008FR-7k
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:46 +0000
Date: Fri, 04 Apr 2014 23:37:46 +0000
Message-Id: <E1WWDgA-0008FR-7k@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: clean up usage output
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 52bfb010811c04155a35e0613dd9902c38fb96a5
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:52 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: clean up usage output
    
    Fix usage formatting to be all the same.
    
    Fix usage display of default --kernel-start for 64 bit.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 47712ab..889f788 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -823,15 +823,16 @@ static void usage(void)
 
     printf("options:\n");
     printf("  -f, --frame-pointers\n");
-    printf("                    assume the kernel was compiled with\n");
-    printf("                    frame pointers.\n");
+    printf("                     assume the kernel was compiled with\n");
+    printf("                     frame pointers.\n");
     printf("  -s SYMTAB, --symbol-table=SYMTAB\n");
-    printf("                    read symbol table from SYMTAB.\n");
-    printf("  -S --stack-trace  print a complete stack trace.\n");
-    printf("  -k, --kernel-start\n");
-    printf("                    set user/kernel split. (default 0xc0000000)\n");
-    printf("  -a --all          display more registers\n");
-    printf("  -C --all-vcpus    print info for all vcpus\n");
+    printf("                     read symbol table from SYMTAB.\n");
+    printf("  -S, --stack-trace  print a complete stack trace.\n");
+    printf("  -k KADDR, --kernel-start=KADDR\n");
+    printf("                     set user/kernel split. (default 0x"FMT_32B_WORD")\n",
+        kernel_start);
+    printf("  -a, --all          display more registers\n");
+    printf("  -C, --all-vcpus    print info for all vcpus\n");
 }
 
 int main(int argc, char **argv)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38:00 +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 1WWDgO-0005ne-4p; Fri, 04 Apr 2014 23:38:00 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgN-0005nU-B1
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:59 +0000
Received: from [85.158.137.68:21659] by server-7.bemta-3.messagelabs.com id
	ED/A3-04151-6524F335; Fri, 04 Apr 2014 23:37:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1396654676!5167323!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23327 invoked from network); 4 Apr 2014 23:37:57 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37:57 -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 1WWDgK-0002x5-Fp
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgK-0008Fp-Eq
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:56 +0000
Date: Fri, 04 Apr 2014 23:37:56 +0000
Message-Id: <E1WWDgK-0008Fp-Eq@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Clean up stack trace when
	hypercall_page not in symbol 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

commit 26df1850758cdf8b160df31011331a97aa3e5b09
Author:     Don Slutz <Don@CloudSwitch.com>
AuthorDate: Thu Apr 3 15:06:53 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: Clean up stack trace when hypercall_page not in symbol table
    
    Before:
    
    Call Trace:
      [<ffffffff8006b2b0>] default_idle+0x29  <--
      [<ffffffff80048d19>] cpu_idle+0x95
      [<ffffffff803e7801>] start_kernel+0x220
      [<0000000000000000>] startup_64+0x80000000
      [<ffffffff803e722f>] x86_64_start_kernel+0x22f
      [<0000000000000000>] startup_64+0x80000000
      [<0000000000000000>] startup_64+0x80000000
      [<0000000000000000>] startup_64+0x80000000
      [<0000000000000000>] startup_64+0x80000000
    
    After:
    
    Call Trace:
      [<ffffffff8006b2b0>] default_idle+0x29  <--
      [<ffffffff80048d19>] cpu_idle+0x95
      [<ffffffff803e7801>] start_kernel+0x220
      [<ffffffff803e722f>] x86_64_start_kernel+0x22f
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 tools/xentrace/xenctx.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 889f788..134cf55 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -85,8 +85,9 @@ static int is_kernel_text(guest_word_t addr)
     if (addr >= kernel_stext &&
         addr <= kernel_etext)
         return 1;
-    if (addr >= kernel_hypercallpage &&
-        addr <= kernel_hypercallpage + 4096)
+    if ( kernel_hypercallpage &&
+         (addr >= kernel_hypercallpage &&
+          addr <= kernel_hypercallpage + 4096) )
         return 1;
     if (addr >= kernel_sinittext &&
         addr <= kernel_einittext)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38:00 +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 1WWDgO-0005ne-4p; Fri, 04 Apr 2014 23:38:00 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgN-0005nU-B1
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:59 +0000
Received: from [85.158.137.68:21659] by server-7.bemta-3.messagelabs.com id
	ED/A3-04151-6524F335; Fri, 04 Apr 2014 23:37:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1396654676!5167323!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23327 invoked from network); 4 Apr 2014 23:37:57 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:37:57 -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 1WWDgK-0002x5-Fp
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgK-0008Fp-Eq
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:37:56 +0000
Date: Fri, 04 Apr 2014 23:37:56 +0000
Message-Id: <E1WWDgK-0008Fp-Eq@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Clean up stack trace when
	hypercall_page not in symbol 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

commit 26df1850758cdf8b160df31011331a97aa3e5b09
Author:     Don Slutz <Don@CloudSwitch.com>
AuthorDate: Thu Apr 3 15:06:53 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: Clean up stack trace when hypercall_page not in symbol table
    
    Before:
    
    Call Trace:
      [<ffffffff8006b2b0>] default_idle+0x29  <--
      [<ffffffff80048d19>] cpu_idle+0x95
      [<ffffffff803e7801>] start_kernel+0x220
      [<0000000000000000>] startup_64+0x80000000
      [<ffffffff803e722f>] x86_64_start_kernel+0x22f
      [<0000000000000000>] startup_64+0x80000000
      [<0000000000000000>] startup_64+0x80000000
      [<0000000000000000>] startup_64+0x80000000
      [<0000000000000000>] startup_64+0x80000000
    
    After:
    
    Call Trace:
      [<ffffffff8006b2b0>] default_idle+0x29  <--
      [<ffffffff80048d19>] cpu_idle+0x95
      [<ffffffff803e7801>] start_kernel+0x220
      [<ffffffff803e722f>] x86_64_start_kernel+0x22f
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 tools/xentrace/xenctx.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 889f788..134cf55 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -85,8 +85,9 @@ static int is_kernel_text(guest_word_t addr)
     if (addr >= kernel_stext &&
         addr <= kernel_etext)
         return 1;
-    if (addr >= kernel_hypercallpage &&
-        addr <= kernel_hypercallpage + 4096)
+    if ( kernel_hypercallpage &&
+         (addr >= kernel_hypercallpage &&
+          addr <= kernel_hypercallpage + 4096) )
         return 1;
     if (addr >= kernel_sinittext &&
         addr <= kernel_einittext)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38:10 +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 1WWDgY-0005p8-7j; Fri, 04 Apr 2014 23:38:10 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgX-0005oy-AZ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:09 +0000
Received: from [193.109.254.147:21631] by server-13.bemta-14.messagelabs.com
	id 70/E2-23211-0624F335; Fri, 04 Apr 2014 23:38:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1396654686!6405440!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21810 invoked from network); 4 Apr 2014 23:38:07 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:38:07 -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 1WWDgU-0002xe-LA
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgU-0008GL-K5
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:06 +0000
Date: Fri, 04 Apr 2014 23:38:06 +0000
Message-Id: <E1WWDgU-0008GL-K5@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add -n (--display-stack-pages)
	option to output larger stack
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 91450fc02bbdb7ffce3d2d578af37c274cd2b049
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:54 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: Add -n (--display-stack-pages) option to output larger stack
    
    Important: This is the stack size (also known as stack limit) to
    display, not the configured stack size.
    
    Note: use with caution (easy to get garbage).
    
    Below is a pictures of a downwards growing configured 3 page stack,
    and where the SP currently is.  Each box is a page.
    
    + pages                     -n 1    -n 2    -n 3
    
    End of Memory
           +------------------+
           |                  |
           |                  |
           |                  |
           |                  |
           |                  |
           +------------------+
    ...
           +------------------+
           |                  |
           |                  |
           |                  |
           |                  |
    MAX+3  |                  |
           +------------------+                   *
           |                  |                   |
           |                  |                   |
           |                  |                   |
           |                  |                   |
    MAX+2  |                  |                   |
           +------------------+           *       |
           |                  |           |       |
           |                  |           |       |
           |                  |           |       |
           |                  |           |       |
    MAX+1  |                  |           |       |
           +------------------+   *       |       |
           |                  |   |       |       |
    SP --> |                  |   *       *       *
           |                  |
           |                  |
    MAX    |                  |
           +------------------+
    ...
           +------------------+
           |                  |
           |                  |
           |                  |
           |                  |
    0      |                  |
           +------------------+
    
    Display using "-n 3" since the used stack pages is 3.
    
    At a different time, the SP may be in the 1st page and so "-n 3"
    will display garbage.
    
    For example:
    
    $ xenctx -s /boot/System.map-2.6.32-279.2.1.el6.x86_64 3 1 -n 1
    ...
    Call Trace:
                        [<ffffffff81346898>] io_serial_out+0x18 <--
    ffff880032bb1310:   [<ffffffff81346f51>] serial8250_console_putchar+0x31
    ffff880032bb1330:   [<ffffffff813428de>] uart_console_write+0x3e
    ffff880032bb1338:   [<ffffffff8100bc0e>] apic_timer_interrupt+0xe
    ffff880032bb1370:   [<ffffffff813472ad>] serial8250_console_write+0xbd
    ffff880032bb13c0:   [<ffffffff8106b8f5>] __call_console_drivers+0x75
    ffff880032bb13f0:   [<ffffffff8106b95a>] _call_console_drivers+0x4a
    ffff880032bb1410:   [<ffffffff8106be6e>] release_console_sem+0x4e
    ffff880032bb1450:   [<ffffffff8106c628>] vprintk+0x248
    ffff880032bb14f0:   [<ffffffff814fd363>] printk+0x41
    
    $ xenctx -s /boot/System.map-2.6.32-279.2.1.el6.x86_64 3 1 -n 2
    ...
    Call Trace:
                        [<ffffffff81346898>] io_serial_out+0x18 <--
    ffff880032bb1310:   [<ffffffff81346f51>] serial8250_console_putchar+0x31
    ffff880032bb1330:   [<ffffffff813428de>] uart_console_write+0x3e
    ffff880032bb1338:   [<ffffffff8100bc0e>] apic_timer_interrupt+0xe
    ffff880032bb1370:   [<ffffffff813472ad>] serial8250_console_write+0xbd
    ffff880032bb13c0:   [<ffffffff8106b8f5>] __call_console_drivers+0x75
    ffff880032bb13f0:   [<ffffffff8106b95a>] _call_console_drivers+0x4a
    ffff880032bb1410:   [<ffffffff8106be6e>] release_console_sem+0x4e
    ffff880032bb1450:   [<ffffffff8106c628>] vprintk+0x248
    ffff880032bb14f0:   [<ffffffff814fd363>] printk+0x41
    
    $ xenctx -s /boot/System.map-2.6.32-279.2.1.el6.x86_64 3 1 -n 3
    ...
    Call Trace:
                        [<ffffffff81346898>] io_serial_out+0x18 <--
    ffff880032bb1310:   [<ffffffff81346f51>] serial8250_console_putchar+0x31
    ffff880032bb1330:   [<ffffffff813428de>] uart_console_write+0x3e
    ffff880032bb1338:   [<ffffffff8100bc0e>] apic_timer_interrupt+0xe
    ffff880032bb1370:   [<ffffffff813472ad>] serial8250_console_write+0xbd
    ffff880032bb13c0:   [<ffffffff8106b8f5>] __call_console_drivers+0x75
    ffff880032bb13f0:   [<ffffffff8106b95a>] _call_console_drivers+0x4a
    ffff880032bb1410:   [<ffffffff8106be6e>] release_console_sem+0x4e
    ffff880032bb1450:   [<ffffffff8106c628>] vprintk+0x248
    ffff880032bb14f0:   [<ffffffff814fd363>] printk+0x41
    ffff880032bb3f20:   [<ffffffff8100204c>] do_one_initcall+0x3c
    ffff880032bb3f50:   [<ffffffff810b0eb1>] sys_init_module+0xe1
    ffff880032bb3f80:   [<ffffffff8100b0f2>] system_call_fastpath+0x16
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 134cf55..b740f1e 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -35,11 +35,14 @@ static struct xenctx {
     int frame_ptrs;
     int stack_trace;
     int disp_all;
+    int nr_stack_pages;
     int all_vcpus;
     int self_paused;
     xc_dominfo_t dominfo;
 } xenctx;
 
+#define DEFAULT_NR_STACK_PAGES 1
+
 #if defined (__i386__) || defined (__x86_64__)
 typedef unsigned long long guest_word_t;
 #define FMT_32B_WORD "%08llx"
@@ -663,7 +666,8 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     int i;
 
     stack_limit = ((stack_pointer(ctx) + XC_PAGE_SIZE)
-                   & ~((guest_word_t) XC_PAGE_SIZE - 1));
+                   & ~((guest_word_t) XC_PAGE_SIZE - 1))
+                   + (xenctx.nr_stack_pages - 1) * XC_PAGE_SIZE;
     printf("\n");
     printf("Stack:\n");
     for (i=1; i<5 && stack < stack_limit; i++) {
@@ -834,18 +838,24 @@ static void usage(void)
         kernel_start);
     printf("  -a, --all          display more registers\n");
     printf("  -C, --all-vcpus    print info for all vcpus\n");
+    printf("  -n PAGES, --display-stack-pages=PAGES\n");
+    printf("                     Display N pages from the stack pointer. (default %d)\n",
+           DEFAULT_NR_STACK_PAGES);
+    printf("                     Changes stack limit.  Note: use with caution (easy\n");
+    printf("                     to get garbage).\n");
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SC";
+    static const char *sopts = "fs:hak:SCn:";
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
         {"frame-pointers", 0, NULL, 'f'},
         {"kernel-start", 1, NULL, 'k'},
+        {"display-stack-pages", 0, NULL, 'n'},
         {"all", 0, NULL, 'a'},
         {"all-vcpus", 0, NULL, 'C'},
         {"help", 0, NULL, 'h'},
@@ -855,6 +865,8 @@ int main(int argc, char **argv)
 
     int vcpu = 0;
 
+    xenctx.nr_stack_pages = DEFAULT_NR_STACK_PAGES;
+
     while ((ch = getopt_long(argc, argv, sopts, lopts, NULL)) != -1) {
         switch(ch) {
         case 'f':
@@ -869,6 +881,16 @@ int main(int argc, char **argv)
         case 'a':
             xenctx.disp_all = 1;
             break;
+        case 'n':
+            xenctx.nr_stack_pages = strtol(optarg, NULL, 0);
+            if ( xenctx.nr_stack_pages < 1)
+            {
+                fprintf(stderr,
+                        "%s: Unsupported value(%d) for --display-stack-pages '%s'. Needs to be >= 1\n",
+                        argv[0], xenctx.nr_stack_pages, optarg);
+                exit(-1);
+            }
+            break;
         case 'C':
             xenctx.all_vcpus = 1;
             break;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38:10 +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 1WWDgY-0005p8-7j; Fri, 04 Apr 2014 23:38:10 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgX-0005oy-AZ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:09 +0000
Received: from [193.109.254.147:21631] by server-13.bemta-14.messagelabs.com
	id 70/E2-23211-0624F335; Fri, 04 Apr 2014 23:38:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-27.messagelabs.com!1396654686!6405440!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21810 invoked from network); 4 Apr 2014 23:38:07 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:38:07 -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 1WWDgU-0002xe-LA
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgU-0008GL-K5
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:06 +0000
Date: Fri, 04 Apr 2014 23:38:06 +0000
Message-Id: <E1WWDgU-0008GL-K5@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add -n (--display-stack-pages)
	option to output larger stack
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 91450fc02bbdb7ffce3d2d578af37c274cd2b049
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:54 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: Add -n (--display-stack-pages) option to output larger stack
    
    Important: This is the stack size (also known as stack limit) to
    display, not the configured stack size.
    
    Note: use with caution (easy to get garbage).
    
    Below is a pictures of a downwards growing configured 3 page stack,
    and where the SP currently is.  Each box is a page.
    
    + pages                     -n 1    -n 2    -n 3
    
    End of Memory
           +------------------+
           |                  |
           |                  |
           |                  |
           |                  |
           |                  |
           +------------------+
    ...
           +------------------+
           |                  |
           |                  |
           |                  |
           |                  |
    MAX+3  |                  |
           +------------------+                   *
           |                  |                   |
           |                  |                   |
           |                  |                   |
           |                  |                   |
    MAX+2  |                  |                   |
           +------------------+           *       |
           |                  |           |       |
           |                  |           |       |
           |                  |           |       |
           |                  |           |       |
    MAX+1  |                  |           |       |
           +------------------+   *       |       |
           |                  |   |       |       |
    SP --> |                  |   *       *       *
           |                  |
           |                  |
    MAX    |                  |
           +------------------+
    ...
           +------------------+
           |                  |
           |                  |
           |                  |
           |                  |
    0      |                  |
           +------------------+
    
    Display using "-n 3" since the used stack pages is 3.
    
    At a different time, the SP may be in the 1st page and so "-n 3"
    will display garbage.
    
    For example:
    
    $ xenctx -s /boot/System.map-2.6.32-279.2.1.el6.x86_64 3 1 -n 1
    ...
    Call Trace:
                        [<ffffffff81346898>] io_serial_out+0x18 <--
    ffff880032bb1310:   [<ffffffff81346f51>] serial8250_console_putchar+0x31
    ffff880032bb1330:   [<ffffffff813428de>] uart_console_write+0x3e
    ffff880032bb1338:   [<ffffffff8100bc0e>] apic_timer_interrupt+0xe
    ffff880032bb1370:   [<ffffffff813472ad>] serial8250_console_write+0xbd
    ffff880032bb13c0:   [<ffffffff8106b8f5>] __call_console_drivers+0x75
    ffff880032bb13f0:   [<ffffffff8106b95a>] _call_console_drivers+0x4a
    ffff880032bb1410:   [<ffffffff8106be6e>] release_console_sem+0x4e
    ffff880032bb1450:   [<ffffffff8106c628>] vprintk+0x248
    ffff880032bb14f0:   [<ffffffff814fd363>] printk+0x41
    
    $ xenctx -s /boot/System.map-2.6.32-279.2.1.el6.x86_64 3 1 -n 2
    ...
    Call Trace:
                        [<ffffffff81346898>] io_serial_out+0x18 <--
    ffff880032bb1310:   [<ffffffff81346f51>] serial8250_console_putchar+0x31
    ffff880032bb1330:   [<ffffffff813428de>] uart_console_write+0x3e
    ffff880032bb1338:   [<ffffffff8100bc0e>] apic_timer_interrupt+0xe
    ffff880032bb1370:   [<ffffffff813472ad>] serial8250_console_write+0xbd
    ffff880032bb13c0:   [<ffffffff8106b8f5>] __call_console_drivers+0x75
    ffff880032bb13f0:   [<ffffffff8106b95a>] _call_console_drivers+0x4a
    ffff880032bb1410:   [<ffffffff8106be6e>] release_console_sem+0x4e
    ffff880032bb1450:   [<ffffffff8106c628>] vprintk+0x248
    ffff880032bb14f0:   [<ffffffff814fd363>] printk+0x41
    
    $ xenctx -s /boot/System.map-2.6.32-279.2.1.el6.x86_64 3 1 -n 3
    ...
    Call Trace:
                        [<ffffffff81346898>] io_serial_out+0x18 <--
    ffff880032bb1310:   [<ffffffff81346f51>] serial8250_console_putchar+0x31
    ffff880032bb1330:   [<ffffffff813428de>] uart_console_write+0x3e
    ffff880032bb1338:   [<ffffffff8100bc0e>] apic_timer_interrupt+0xe
    ffff880032bb1370:   [<ffffffff813472ad>] serial8250_console_write+0xbd
    ffff880032bb13c0:   [<ffffffff8106b8f5>] __call_console_drivers+0x75
    ffff880032bb13f0:   [<ffffffff8106b95a>] _call_console_drivers+0x4a
    ffff880032bb1410:   [<ffffffff8106be6e>] release_console_sem+0x4e
    ffff880032bb1450:   [<ffffffff8106c628>] vprintk+0x248
    ffff880032bb14f0:   [<ffffffff814fd363>] printk+0x41
    ffff880032bb3f20:   [<ffffffff8100204c>] do_one_initcall+0x3c
    ffff880032bb3f50:   [<ffffffff810b0eb1>] sys_init_module+0xe1
    ffff880032bb3f80:   [<ffffffff8100b0f2>] system_call_fastpath+0x16
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 134cf55..b740f1e 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -35,11 +35,14 @@ static struct xenctx {
     int frame_ptrs;
     int stack_trace;
     int disp_all;
+    int nr_stack_pages;
     int all_vcpus;
     int self_paused;
     xc_dominfo_t dominfo;
 } xenctx;
 
+#define DEFAULT_NR_STACK_PAGES 1
+
 #if defined (__i386__) || defined (__x86_64__)
 typedef unsigned long long guest_word_t;
 #define FMT_32B_WORD "%08llx"
@@ -663,7 +666,8 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     int i;
 
     stack_limit = ((stack_pointer(ctx) + XC_PAGE_SIZE)
-                   & ~((guest_word_t) XC_PAGE_SIZE - 1));
+                   & ~((guest_word_t) XC_PAGE_SIZE - 1))
+                   + (xenctx.nr_stack_pages - 1) * XC_PAGE_SIZE;
     printf("\n");
     printf("Stack:\n");
     for (i=1; i<5 && stack < stack_limit; i++) {
@@ -834,18 +838,24 @@ static void usage(void)
         kernel_start);
     printf("  -a, --all          display more registers\n");
     printf("  -C, --all-vcpus    print info for all vcpus\n");
+    printf("  -n PAGES, --display-stack-pages=PAGES\n");
+    printf("                     Display N pages from the stack pointer. (default %d)\n",
+           DEFAULT_NR_STACK_PAGES);
+    printf("                     Changes stack limit.  Note: use with caution (easy\n");
+    printf("                     to get garbage).\n");
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SC";
+    static const char *sopts = "fs:hak:SCn:";
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
         {"frame-pointers", 0, NULL, 'f'},
         {"kernel-start", 1, NULL, 'k'},
+        {"display-stack-pages", 0, NULL, 'n'},
         {"all", 0, NULL, 'a'},
         {"all-vcpus", 0, NULL, 'C'},
         {"help", 0, NULL, 'h'},
@@ -855,6 +865,8 @@ int main(int argc, char **argv)
 
     int vcpu = 0;
 
+    xenctx.nr_stack_pages = DEFAULT_NR_STACK_PAGES;
+
     while ((ch = getopt_long(argc, argv, sopts, lopts, NULL)) != -1) {
         switch(ch) {
         case 'f':
@@ -869,6 +881,16 @@ int main(int argc, char **argv)
         case 'a':
             xenctx.disp_all = 1;
             break;
+        case 'n':
+            xenctx.nr_stack_pages = strtol(optarg, NULL, 0);
+            if ( xenctx.nr_stack_pages < 1)
+            {
+                fprintf(stderr,
+                        "%s: Unsupported value(%d) for --display-stack-pages '%s'. Needs to be >= 1\n",
+                        argv[0], xenctx.nr_stack_pages, optarg);
+                exit(-1);
+            }
+            break;
         case 'C':
             xenctx.all_vcpus = 1;
             break;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38: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 1WWDgi-0005r5-AS; Fri, 04 Apr 2014 23:38:20 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgh-0005qs-Hl
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:19 +0000
Received: from [193.109.254.147:49206] by server-15.bemta-14.messagelabs.com
	id 6B/B5-15813-A624F335; Fri, 04 Apr 2014 23:38:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1396654697!6383368!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17455 invoked from network); 4 Apr 2014 23:38:17 -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;
	4 Apr 2014 23:38:17 -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 1WWDge-0002xk-Rb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDge-0008Gj-P9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:16 +0000
Date: Fri, 04 Apr 2014 23:38:16 +0000
Message-Id: <E1WWDge-0008Gj-P9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add command line options -b
	(--bytes-per-line) and -l (--lines)
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 5013d8c5ec9e04449c6864857a820bcb7eb56cb8
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:55 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: Add command line options -b (--bytes-per-line) and -l (--lines)
    
      -b <bytes>, --bytes-per-line <bytes>
                         change the number of bytes per line output for Stack.
                         (default 32) Note: rounded to native size (4 or 8 bytes).
    
    This option allows you to change the width of the output line.  When
    used with the -D option and/or -t, the output can be adjusted with
    this to less then 80 columns.
    
      -l <lines>, --lines <lines>
                         change the number of lines output for Stack. (default 5)
                         Can be specified as MAX.  Note: Fewer lines will be output
                         if stack limit reached.
    
    The default value show a reasonable amount of the raw stack.  The -S
    option will output all of it one line at a time.  This can be used
    to select something in the middle.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   79 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 67 insertions(+), 12 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index b740f1e..1433056 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <inttypes.h>
 #include <getopt.h>
+#include <limits.h>
 
 #include "xenctrl.h"
 #include <xen/foreign/x86_32.h>
@@ -36,12 +37,16 @@ static struct xenctx {
     int stack_trace;
     int disp_all;
     int nr_stack_pages;
+    int bytes_per_line;
+    int lines;
     int all_vcpus;
     int self_paused;
     xc_dominfo_t dominfo;
 } xenctx;
 
 #define DEFAULT_NR_STACK_PAGES 1
+#define DEFAULT_BYTES_PER_LINE 32
+#define DEFAULT_LINES 5
 
 #if defined (__i386__) || defined (__x86_64__)
 typedef unsigned long long guest_word_t;
@@ -64,6 +69,8 @@ typedef uint64_t guest_word_t;
 #define FMT_64B_WORD "%016llx"
 #endif
 
+#define MAX_BYTES_PER_LINE 128
+
 struct symbol {
     guest_word_t address;
     char *name;
@@ -665,24 +672,33 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     guest_word_t *p;
     int i;
 
+    if ( width )
+        xenctx.bytes_per_line =
+            ((xenctx.bytes_per_line + width - 1) / width) * width;
     stack_limit = ((stack_pointer(ctx) + XC_PAGE_SIZE)
                    & ~((guest_word_t) XC_PAGE_SIZE - 1))
                    + (xenctx.nr_stack_pages - 1) * XC_PAGE_SIZE;
     printf("\n");
-    printf("Stack:\n");
-    for (i=1; i<5 && stack < stack_limit; i++) {
-        while(stack < stack_limit && stack < stack_pointer(ctx) + i*32) {
-            p = map_page(ctx, vcpu, stack);
-            if (!p)
-                return -1;
-            word = read_stack_word(p, width);
-            printf(" ");
-            print_stack_word(word, width);
-            stack += width;
+    if ( xenctx.lines )
+    {
+        printf("Stack:\n");
+        for (i = 1; i < xenctx.lines + 1 && stack < stack_limit; i++)
+        {
+            while ( stack < stack_limit &&
+                    stack < stack_pointer(ctx) + i * xenctx.bytes_per_line )
+            {
+                p = map_page(ctx, vcpu, stack);
+                if ( !p )
+                    return -1;
+                word = read_stack_word(p, width);
+                printf(" ");
+                print_stack_word(word, width);
+                stack += width;
+            }
+            printf("\n");
         }
         printf("\n");
     }
-    printf("\n");
 
     if(xenctx.stack_trace)
         printf("Stack Trace:\n");
@@ -843,19 +859,30 @@ static void usage(void)
            DEFAULT_NR_STACK_PAGES);
     printf("                     Changes stack limit.  Note: use with caution (easy\n");
     printf("                     to get garbage).\n");
+    printf("  -b <bytes>, --bytes-per-line <bytes>\n");
+    printf("                     change the number of bytes per line output for Stack.\n");
+    printf("                     (default %d) Note: rounded to native size (4 or 8 bytes).\n",
+           DEFAULT_BYTES_PER_LINE);
+    printf("  -l <lines>, --lines <lines>\n");
+    printf("                     change the number of lines output for Stack. (default %d)\n",
+           DEFAULT_LINES);
+    printf("                     Can be specified as MAX.  Note: Fewer lines will be output\n");
+    printf("                     if stack limit reached.\n");
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SCn:";
+    static const char *sopts = "fs:hak:SCn:b:l:";
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
         {"frame-pointers", 0, NULL, 'f'},
         {"kernel-start", 1, NULL, 'k'},
         {"display-stack-pages", 0, NULL, 'n'},
+        {"bytes-per-line", 1, NULL, 'b'},
+        {"lines", 1, NULL, 'l'},
         {"all", 0, NULL, 'a'},
         {"all-vcpus", 0, NULL, 'C'},
         {"help", 0, NULL, 'h'},
@@ -865,6 +892,8 @@ int main(int argc, char **argv)
 
     int vcpu = 0;
 
+    xenctx.bytes_per_line = DEFAULT_BYTES_PER_LINE;
+    xenctx.lines = DEFAULT_LINES;
     xenctx.nr_stack_pages = DEFAULT_NR_STACK_PAGES;
 
     while ((ch = getopt_long(argc, argv, sopts, lopts, NULL)) != -1) {
@@ -891,6 +920,32 @@ int main(int argc, char **argv)
                 exit(-1);
             }
             break;
+        case 'b':
+            xenctx.bytes_per_line = strtol(optarg, NULL, 0);
+            if ( xenctx.bytes_per_line < 4 ||
+                 xenctx.bytes_per_line > MAX_BYTES_PER_LINE )
+            {
+                fprintf(stderr,
+                        "%s: Unsupported value for --bytes-per-line '%s'. Needs to be 4 <= %d <= %d\n",
+                        argv[0], optarg, xenctx.bytes_per_line,
+                        MAX_BYTES_PER_LINE);
+                exit(-1);
+            }
+            break;
+        case 'l':
+            if ( !strcmp(optarg, "all") || !strcmp(optarg, "ALL") ||
+                 !strcmp(optarg, "max") || !strcmp(optarg, "MAX") )
+                xenctx.lines = INT_MAX - 1;
+            else
+                xenctx.lines = strtol(optarg, NULL, 0);
+            if ( xenctx.lines < 0 || xenctx.lines == INT_MAX)
+            {
+                fprintf(stderr,
+                        "%s: Unsupported value(%d) for --lines '%s'. Needs to be >= 0, < %d\n",
+                        argv[0], xenctx.lines, optarg, INT_MAX);
+                exit(-1);
+            }
+            break;
         case 'C':
             xenctx.all_vcpus = 1;
             break;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38: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 1WWDgi-0005r5-AS; Fri, 04 Apr 2014 23:38:20 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgh-0005qs-Hl
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:19 +0000
Received: from [193.109.254.147:49206] by server-15.bemta-14.messagelabs.com
	id 6B/B5-15813-A624F335; Fri, 04 Apr 2014 23:38:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1396654697!6383368!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17455 invoked from network); 4 Apr 2014 23:38:17 -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;
	4 Apr 2014 23:38:17 -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 1WWDge-0002xk-Rb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDge-0008Gj-P9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:16 +0000
Date: Fri, 04 Apr 2014 23:38:16 +0000
Message-Id: <E1WWDge-0008Gj-P9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add command line options -b
	(--bytes-per-line) and -l (--lines)
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 5013d8c5ec9e04449c6864857a820bcb7eb56cb8
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:55 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: Add command line options -b (--bytes-per-line) and -l (--lines)
    
      -b <bytes>, --bytes-per-line <bytes>
                         change the number of bytes per line output for Stack.
                         (default 32) Note: rounded to native size (4 or 8 bytes).
    
    This option allows you to change the width of the output line.  When
    used with the -D option and/or -t, the output can be adjusted with
    this to less then 80 columns.
    
      -l <lines>, --lines <lines>
                         change the number of lines output for Stack. (default 5)
                         Can be specified as MAX.  Note: Fewer lines will be output
                         if stack limit reached.
    
    The default value show a reasonable amount of the raw stack.  The -S
    option will output all of it one line at a time.  This can be used
    to select something in the middle.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   79 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 67 insertions(+), 12 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index b740f1e..1433056 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -23,6 +23,7 @@
 #include <string.h>
 #include <inttypes.h>
 #include <getopt.h>
+#include <limits.h>
 
 #include "xenctrl.h"
 #include <xen/foreign/x86_32.h>
@@ -36,12 +37,16 @@ static struct xenctx {
     int stack_trace;
     int disp_all;
     int nr_stack_pages;
+    int bytes_per_line;
+    int lines;
     int all_vcpus;
     int self_paused;
     xc_dominfo_t dominfo;
 } xenctx;
 
 #define DEFAULT_NR_STACK_PAGES 1
+#define DEFAULT_BYTES_PER_LINE 32
+#define DEFAULT_LINES 5
 
 #if defined (__i386__) || defined (__x86_64__)
 typedef unsigned long long guest_word_t;
@@ -64,6 +69,8 @@ typedef uint64_t guest_word_t;
 #define FMT_64B_WORD "%016llx"
 #endif
 
+#define MAX_BYTES_PER_LINE 128
+
 struct symbol {
     guest_word_t address;
     char *name;
@@ -665,24 +672,33 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     guest_word_t *p;
     int i;
 
+    if ( width )
+        xenctx.bytes_per_line =
+            ((xenctx.bytes_per_line + width - 1) / width) * width;
     stack_limit = ((stack_pointer(ctx) + XC_PAGE_SIZE)
                    & ~((guest_word_t) XC_PAGE_SIZE - 1))
                    + (xenctx.nr_stack_pages - 1) * XC_PAGE_SIZE;
     printf("\n");
-    printf("Stack:\n");
-    for (i=1; i<5 && stack < stack_limit; i++) {
-        while(stack < stack_limit && stack < stack_pointer(ctx) + i*32) {
-            p = map_page(ctx, vcpu, stack);
-            if (!p)
-                return -1;
-            word = read_stack_word(p, width);
-            printf(" ");
-            print_stack_word(word, width);
-            stack += width;
+    if ( xenctx.lines )
+    {
+        printf("Stack:\n");
+        for (i = 1; i < xenctx.lines + 1 && stack < stack_limit; i++)
+        {
+            while ( stack < stack_limit &&
+                    stack < stack_pointer(ctx) + i * xenctx.bytes_per_line )
+            {
+                p = map_page(ctx, vcpu, stack);
+                if ( !p )
+                    return -1;
+                word = read_stack_word(p, width);
+                printf(" ");
+                print_stack_word(word, width);
+                stack += width;
+            }
+            printf("\n");
         }
         printf("\n");
     }
-    printf("\n");
 
     if(xenctx.stack_trace)
         printf("Stack Trace:\n");
@@ -843,19 +859,30 @@ static void usage(void)
            DEFAULT_NR_STACK_PAGES);
     printf("                     Changes stack limit.  Note: use with caution (easy\n");
     printf("                     to get garbage).\n");
+    printf("  -b <bytes>, --bytes-per-line <bytes>\n");
+    printf("                     change the number of bytes per line output for Stack.\n");
+    printf("                     (default %d) Note: rounded to native size (4 or 8 bytes).\n",
+           DEFAULT_BYTES_PER_LINE);
+    printf("  -l <lines>, --lines <lines>\n");
+    printf("                     change the number of lines output for Stack. (default %d)\n",
+           DEFAULT_LINES);
+    printf("                     Can be specified as MAX.  Note: Fewer lines will be output\n");
+    printf("                     if stack limit reached.\n");
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SCn:";
+    static const char *sopts = "fs:hak:SCn:b:l:";
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
         {"frame-pointers", 0, NULL, 'f'},
         {"kernel-start", 1, NULL, 'k'},
         {"display-stack-pages", 0, NULL, 'n'},
+        {"bytes-per-line", 1, NULL, 'b'},
+        {"lines", 1, NULL, 'l'},
         {"all", 0, NULL, 'a'},
         {"all-vcpus", 0, NULL, 'C'},
         {"help", 0, NULL, 'h'},
@@ -865,6 +892,8 @@ int main(int argc, char **argv)
 
     int vcpu = 0;
 
+    xenctx.bytes_per_line = DEFAULT_BYTES_PER_LINE;
+    xenctx.lines = DEFAULT_LINES;
     xenctx.nr_stack_pages = DEFAULT_NR_STACK_PAGES;
 
     while ((ch = getopt_long(argc, argv, sopts, lopts, NULL)) != -1) {
@@ -891,6 +920,32 @@ int main(int argc, char **argv)
                 exit(-1);
             }
             break;
+        case 'b':
+            xenctx.bytes_per_line = strtol(optarg, NULL, 0);
+            if ( xenctx.bytes_per_line < 4 ||
+                 xenctx.bytes_per_line > MAX_BYTES_PER_LINE )
+            {
+                fprintf(stderr,
+                        "%s: Unsupported value for --bytes-per-line '%s'. Needs to be 4 <= %d <= %d\n",
+                        argv[0], optarg, xenctx.bytes_per_line,
+                        MAX_BYTES_PER_LINE);
+                exit(-1);
+            }
+            break;
+        case 'l':
+            if ( !strcmp(optarg, "all") || !strcmp(optarg, "ALL") ||
+                 !strcmp(optarg, "max") || !strcmp(optarg, "MAX") )
+                xenctx.lines = INT_MAX - 1;
+            else
+                xenctx.lines = strtol(optarg, NULL, 0);
+            if ( xenctx.lines < 0 || xenctx.lines == INT_MAX)
+            {
+                fprintf(stderr,
+                        "%s: Unsupported value(%d) for --lines '%s'. Needs to be >= 0, < %d\n",
+                        argv[0], xenctx.lines, optarg, INT_MAX);
+                exit(-1);
+            }
+            break;
         case 'C':
             xenctx.all_vcpus = 1;
             break;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38:40 +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 1WWDh2-0005yt-FF; Fri, 04 Apr 2014 23:38:40 +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 1WWDh1-0005xf-TY
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:40 +0000
Received: from [85.158.143.35:29066] by server-1.bemta-4.messagelabs.com id
	B6/0C-09853-F724F335; Fri, 04 Apr 2014 23:38:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-21.messagelabs.com!1396654717!7126412!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15354 invoked from network); 4 Apr 2014 23:38:38 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:38:38 -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 1WWDgz-0002xv-FF
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgz-0008HV-9s
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:37 +0000
Date: Fri, 04 Apr 2014 23:38:37 +0000
Message-Id: <E1WWDgz-0008HV-9s@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add command line option -t
	(--tag-stack-dump)
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 8ccc27fea4a7feb90289ada8f04d47d70985e419
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:57 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: Add command line option -t (--tag-stack-dump)
    
    If specified, add stack address to dump.
    
    This is not the default because the result exceeds 80 characters per line.
    
    Here is an example:
    
    Stack:
    ffffffff803ddf90: ffffffff80048d19 0000000000200800 ffffffff803e7801 0000000000086800
    ffffffff803ddfb0: 0000000000000000 ffffffff80430720 ffffffff803e722f 80008e000010019c
    ffffffff803ddfd0: 00000000ffffffff 0000000000000000 0000000000000000 0000000000200000
    ffffffff803ddff0: 0000000000000000 0000000000000000
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 82cf6b0..145c990 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -40,6 +40,7 @@ static struct xenctx {
     int bytes_per_line;
     int lines;
     int decode_as_ascii;
+    int tag_stack_dump;
     int all_vcpus;
     int self_paused;
     xc_dominfo_t dominfo;
@@ -689,6 +690,11 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
             int j = 0;
             int k;
 
+            if ( xenctx.tag_stack_dump )
+            {
+                print_stack_word(stack, width);
+                printf(":");
+            }
             while ( stack < stack_limit &&
                     stack < stack_pointer(ctx) + i * xenctx.bytes_per_line )
             {
@@ -901,13 +907,15 @@ static void usage(void)
     printf("                     if stack limit reached.\n");
     printf("  -D, --decode-as-ascii\n");
     printf("                     add a decode of Stack dump as ascii.\n");
+    printf("  -t, --tag-stack-dump\n");
+    printf("                     add address on each line of Stack dump.\n");
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SCn:b:l:D";
+    static const char *sopts = "fs:hak:SCn:b:l:Dt";
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
@@ -915,6 +923,7 @@ int main(int argc, char **argv)
         {"kernel-start", 1, NULL, 'k'},
         {"display-stack-pages", 0, NULL, 'n'},
         {"decode-as-ascii", 0, NULL, 'D'},
+        {"tag-stack-dump", 0, NULL, 't'},
         {"bytes-per-line", 1, NULL, 'b'},
         {"lines", 1, NULL, 'l'},
         {"all", 0, NULL, 'a'},
@@ -957,6 +966,9 @@ int main(int argc, char **argv)
         case 'D':
             xenctx.decode_as_ascii = 1;
             break;
+        case 't':
+            xenctx.tag_stack_dump = 1;
+            break;
         case 'b':
             xenctx.bytes_per_line = strtol(optarg, NULL, 0);
             if ( xenctx.bytes_per_line < 4 ||
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38:40 +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 1WWDh2-0005yt-FF; Fri, 04 Apr 2014 23:38:40 +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 1WWDh1-0005xf-TY
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:40 +0000
Received: from [85.158.143.35:29066] by server-1.bemta-4.messagelabs.com id
	B6/0C-09853-F724F335; Fri, 04 Apr 2014 23:38:39 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-21.messagelabs.com!1396654717!7126412!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15354 invoked from network); 4 Apr 2014 23:38:38 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:38:38 -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 1WWDgz-0002xv-FF
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:37 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgz-0008HV-9s
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:37 +0000
Date: Fri, 04 Apr 2014 23:38:37 +0000
Message-Id: <E1WWDgz-0008HV-9s@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add command line option -t
	(--tag-stack-dump)
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 8ccc27fea4a7feb90289ada8f04d47d70985e419
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:57 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: Add command line option -t (--tag-stack-dump)
    
    If specified, add stack address to dump.
    
    This is not the default because the result exceeds 80 characters per line.
    
    Here is an example:
    
    Stack:
    ffffffff803ddf90: ffffffff80048d19 0000000000200800 ffffffff803e7801 0000000000086800
    ffffffff803ddfb0: 0000000000000000 ffffffff80430720 ffffffff803e722f 80008e000010019c
    ffffffff803ddfd0: 00000000ffffffff 0000000000000000 0000000000000000 0000000000200000
    ffffffff803ddff0: 0000000000000000 0000000000000000
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 82cf6b0..145c990 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -40,6 +40,7 @@ static struct xenctx {
     int bytes_per_line;
     int lines;
     int decode_as_ascii;
+    int tag_stack_dump;
     int all_vcpus;
     int self_paused;
     xc_dominfo_t dominfo;
@@ -689,6 +690,11 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
             int j = 0;
             int k;
 
+            if ( xenctx.tag_stack_dump )
+            {
+                print_stack_word(stack, width);
+                printf(":");
+            }
             while ( stack < stack_limit &&
                     stack < stack_pointer(ctx) + i * xenctx.bytes_per_line )
             {
@@ -901,13 +907,15 @@ static void usage(void)
     printf("                     if stack limit reached.\n");
     printf("  -D, --decode-as-ascii\n");
     printf("                     add a decode of Stack dump as ascii.\n");
+    printf("  -t, --tag-stack-dump\n");
+    printf("                     add address on each line of Stack dump.\n");
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SCn:b:l:D";
+    static const char *sopts = "fs:hak:SCn:b:l:Dt";
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
@@ -915,6 +923,7 @@ int main(int argc, char **argv)
         {"kernel-start", 1, NULL, 'k'},
         {"display-stack-pages", 0, NULL, 'n'},
         {"decode-as-ascii", 0, NULL, 'D'},
+        {"tag-stack-dump", 0, NULL, 't'},
         {"bytes-per-line", 1, NULL, 'b'},
         {"lines", 1, NULL, 'l'},
         {"all", 0, NULL, 'a'},
@@ -957,6 +966,9 @@ int main(int argc, char **argv)
         case 'D':
             xenctx.decode_as_ascii = 1;
             break;
+        case 't':
+            xenctx.tag_stack_dump = 1;
+            break;
         case 'b':
             xenctx.bytes_per_line = strtol(optarg, NULL, 0);
             if ( xenctx.bytes_per_line < 4 ||
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38:51 +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 1WWDhD-00068j-IP; Fri, 04 Apr 2014 23:38:51 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhC-00067f-Hn
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:50 +0000
Received: from [85.158.139.211:60795] by server-6.bemta-5.messagelabs.com id
	E4/04-19576-9824F335; Fri, 04 Apr 2014 23:38:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1396654727!5610294!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32050 invoked from network); 4 Apr 2014 23:38:48 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:38:48 -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 1WWDh9-0002y1-MR
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDh9-0008Id-JV
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:47 +0000
Date: Fri, 04 Apr 2014 23:38:47 +0000
Message-Id: <E1WWDh9-0008Id-JV@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Change print_symbol to do the
	space before.
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 ea580b737facef8602b8394988a580c3d3c311cf
Author:     Don Slutz <Don@CloudSwitch.com>
AuthorDate: Thu Apr 3 15:06:58 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: Change print_symbol to do the space before.
    
    This stops the output of an extra space at the end of the line.
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 tools/xentrace/xenctx.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 145c990..eb30577 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -171,9 +171,9 @@ static void print_symbol(guest_word_t addr)
         return;
 
     if (addr==s->address)
-        printf("%s ", s->name);
+        printf(" %s", s->name);
     else
-        printf("%s+%#x ", s->name, (unsigned int)(addr - s->address));
+        printf(" %s+%#x", s->name, (unsigned int)(addr - s->address));
 }
 
 static void read_symbol_table(const char *symtab)
@@ -312,7 +312,7 @@ static void print_ctx_32(vcpu_guest_context_x86_32_t *ctx)
 {
     struct cpu_user_regs_x86_32 *regs = &ctx->user_regs;
 
-    printf("cs:eip: %04x:%08x ", regs->cs, regs->eip);
+    printf("cs:eip: %04x:%08x", regs->cs, regs->eip);
     print_symbol(regs->eip);
     print_flags(regs->eflags);
     printf("ss:esp: %04x:%08x\n", regs->ss, regs->esp);
@@ -341,7 +341,7 @@ static void print_ctx_32on64(vcpu_guest_context_x86_64_t *ctx)
 {
     struct cpu_user_regs_x86_64 *regs = &ctx->user_regs;
 
-    printf("cs:eip: %04x:%08x ", regs->cs, (uint32_t)regs->eip);
+    printf("cs:eip: %04x:%08x", regs->cs, (uint32_t)regs->eip);
     print_symbol((uint32_t)regs->eip);
     print_flags((uint32_t)regs->eflags);
     printf("ss:esp: %04x:%08x\n", regs->ss, (uint32_t)regs->esp);
@@ -370,7 +370,7 @@ static void print_ctx_64(vcpu_guest_context_x86_64_t *ctx)
 {
     struct cpu_user_regs_x86_64 *regs = &ctx->user_regs;
 
-    printf("rip: %016"PRIx64" ", regs->rip);
+    printf("rip: %016"PRIx64, regs->rip);
     print_symbol(regs->rip);
     print_flags(regs->rflags);
     printf("rsp: %016"PRIx64"\n", regs->rsp);
@@ -468,7 +468,7 @@ static void print_ctx_32(vcpu_guest_context_t *ctx)
 {
     vcpu_guest_core_regs_t *regs = &ctx->user_regs;
 
-    printf("PC:       %08"PRIx32" ", regs->pc32);
+    printf("PC:       %08"PRIx32, regs->pc32);
     print_symbol(regs->pc32);
     printf("\n");
     printf("CPSR:     %08"PRIx32"\n", regs->cpsr);
@@ -520,7 +520,7 @@ static void print_ctx_64(vcpu_guest_context_t *ctx)
 {
     vcpu_guest_core_regs_t *regs = &ctx->user_regs;
 
-    printf("PC:       %016"PRIx64" ", regs->pc64);
+    printf("PC:       %016"PRIx64, regs->pc64);
     print_symbol(regs->pc64);
     printf("\n");
 
@@ -743,7 +743,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
         printf("Call Trace:\n");
     printf("%c [<", xenctx.stack_trace ? '*' : ' ');
     print_stack_word(instr_pointer(ctx), width);
-    printf(">] ");
+    printf(">]");
 
     print_symbol(instr_pointer(ctx));
     printf(" <--\n");
@@ -783,7 +783,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 word = read_stack_word(p, width);
                 printf("%c [<", xenctx.stack_trace ? '|' : ' ');
                 print_stack_word(word, width);
-                printf(">] ");
+                printf(">]");
                 print_symbol(word);
                 printf("\n");
                 stack += width;
@@ -799,7 +799,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
             if (is_kernel_text(word)) {
                 printf("  [<");
                 print_stack_word(word, width);
-                printf(">] ");
+                printf(">]");
                 print_symbol(word);
                 printf("\n");
             } else if (xenctx.stack_trace) {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:38:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:38:51 +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 1WWDhD-00068j-IP; Fri, 04 Apr 2014 23:38:51 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhC-00067f-Hn
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:50 +0000
Received: from [85.158.139.211:60795] by server-6.bemta-5.messagelabs.com id
	E4/04-19576-9824F335; Fri, 04 Apr 2014 23:38:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1396654727!5610294!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32050 invoked from network); 4 Apr 2014 23:38:48 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:38:48 -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 1WWDh9-0002y1-MR
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDh9-0008Id-JV
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:47 +0000
Date: Fri, 04 Apr 2014 23:38:47 +0000
Message-Id: <E1WWDh9-0008Id-JV@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Change print_symbol to do the
	space before.
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 ea580b737facef8602b8394988a580c3d3c311cf
Author:     Don Slutz <Don@CloudSwitch.com>
AuthorDate: Thu Apr 3 15:06:58 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: Change print_symbol to do the space before.
    
    This stops the output of an extra space at the end of the line.
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 tools/xentrace/xenctx.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 145c990..eb30577 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -171,9 +171,9 @@ static void print_symbol(guest_word_t addr)
         return;
 
     if (addr==s->address)
-        printf("%s ", s->name);
+        printf(" %s", s->name);
     else
-        printf("%s+%#x ", s->name, (unsigned int)(addr - s->address));
+        printf(" %s+%#x", s->name, (unsigned int)(addr - s->address));
 }
 
 static void read_symbol_table(const char *symtab)
@@ -312,7 +312,7 @@ static void print_ctx_32(vcpu_guest_context_x86_32_t *ctx)
 {
     struct cpu_user_regs_x86_32 *regs = &ctx->user_regs;
 
-    printf("cs:eip: %04x:%08x ", regs->cs, regs->eip);
+    printf("cs:eip: %04x:%08x", regs->cs, regs->eip);
     print_symbol(regs->eip);
     print_flags(regs->eflags);
     printf("ss:esp: %04x:%08x\n", regs->ss, regs->esp);
@@ -341,7 +341,7 @@ static void print_ctx_32on64(vcpu_guest_context_x86_64_t *ctx)
 {
     struct cpu_user_regs_x86_64 *regs = &ctx->user_regs;
 
-    printf("cs:eip: %04x:%08x ", regs->cs, (uint32_t)regs->eip);
+    printf("cs:eip: %04x:%08x", regs->cs, (uint32_t)regs->eip);
     print_symbol((uint32_t)regs->eip);
     print_flags((uint32_t)regs->eflags);
     printf("ss:esp: %04x:%08x\n", regs->ss, (uint32_t)regs->esp);
@@ -370,7 +370,7 @@ static void print_ctx_64(vcpu_guest_context_x86_64_t *ctx)
 {
     struct cpu_user_regs_x86_64 *regs = &ctx->user_regs;
 
-    printf("rip: %016"PRIx64" ", regs->rip);
+    printf("rip: %016"PRIx64, regs->rip);
     print_symbol(regs->rip);
     print_flags(regs->rflags);
     printf("rsp: %016"PRIx64"\n", regs->rsp);
@@ -468,7 +468,7 @@ static void print_ctx_32(vcpu_guest_context_t *ctx)
 {
     vcpu_guest_core_regs_t *regs = &ctx->user_regs;
 
-    printf("PC:       %08"PRIx32" ", regs->pc32);
+    printf("PC:       %08"PRIx32, regs->pc32);
     print_symbol(regs->pc32);
     printf("\n");
     printf("CPSR:     %08"PRIx32"\n", regs->cpsr);
@@ -520,7 +520,7 @@ static void print_ctx_64(vcpu_guest_context_t *ctx)
 {
     vcpu_guest_core_regs_t *regs = &ctx->user_regs;
 
-    printf("PC:       %016"PRIx64" ", regs->pc64);
+    printf("PC:       %016"PRIx64, regs->pc64);
     print_symbol(regs->pc64);
     printf("\n");
 
@@ -743,7 +743,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
         printf("Call Trace:\n");
     printf("%c [<", xenctx.stack_trace ? '*' : ' ');
     print_stack_word(instr_pointer(ctx), width);
-    printf(">] ");
+    printf(">]");
 
     print_symbol(instr_pointer(ctx));
     printf(" <--\n");
@@ -783,7 +783,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 word = read_stack_word(p, width);
                 printf("%c [<", xenctx.stack_trace ? '|' : ' ');
                 print_stack_word(word, width);
-                printf(">] ");
+                printf(">]");
                 print_symbol(word);
                 printf("\n");
                 stack += width;
@@ -799,7 +799,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
             if (is_kernel_text(word)) {
                 printf("  [<");
                 print_stack_word(word, width);
-                printf(">] ");
+                printf(">]");
                 print_symbol(word);
                 printf("\n");
             } else if (xenctx.stack_trace) {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:39:15 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:39:15 +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 1WWDhb-0006Ut-Lr; Fri, 04 Apr 2014 23:39:15 +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 1WWDha-0006Sc-0n
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:14 +0000
Received: from [85.158.143.35:29489] by server-3.bemta-4.messagelabs.com id
	16/06-13602-1A24F335; Fri, 04 Apr 2014 23:39:13 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1396654748!7100490!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26829 invoked from network); 4 Apr 2014 23:39:09 -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;
	4 Apr 2014 23:39:09 -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 1WWDhU-0002yj-5W
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhU-0008JV-4H
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:08 +0000
Date: Fri, 04 Apr 2014 23:39:08 +0000
Message-Id: <E1WWDhU-0008JV-4H@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add output of stack address to
	Call and Stack Trace.
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 627cdf161dea637cdf7581eb908298f9c0cd7a77
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:00 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: Add output of stack address to Call and Stack Trace.
    
    Here is an example:
    
    Call Trace:
                       [<ffffffff8006b2b0>] default_idle+0x29 <--
    ffffffff803ddf90:  [<ffffffff80048d19>] cpu_idle+0x95
    ffffffff803ddfa0:  [<ffffffff803e7801>] start_kernel+0x220
    ffffffff803ddfc0:  [<ffffffff803e722f>] x86_64_start_kernel+0x22f
    
    and
    
    Stack Trace:
                     * [<ffffffff8006b2b0>] default_idle+0x29 <--
    ffffffff803ddf90:  [<ffffffff80048d19>] cpu_idle+0x95
    ffffffff803ddf98:    0000000000200800
    ffffffff803ddfa0:  [<ffffffff803e7801>] start_kernel+0x220
    ffffffff803ddfa8:    0000000000086800
    ffffffff803ddfb0:    0000000000000000
    ffffffff803ddfb8:    ffffffff80430720
    ffffffff803ddfc0:  [<ffffffff803e722f>] x86_64_start_kernel+0x22f
    ffffffff803ddfc8:    80008e000010019c
    ffffffff803ddfd0:    00000000ffffffff
    ffffffff803ddfd8:    0000000000000000
    ffffffff803ddfe0:    0000000000000000
    ffffffff803ddfe8:    0000000000200000
    ffffffff803ddff0:    0000000000000000
    ffffffff803ddff8:    0000000000000000
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 4bb5507..cefbb8b 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -665,6 +665,12 @@ static int print_code(vcpu_guest_context_any_t *ctx, int vcpu)
     return 0;
 }
 
+static void print_stack_addr(guest_word_t addr, int width)
+{
+    print_stack_word(addr, width);
+    printf(": ");
+}
+
 static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
 {
     guest_word_t stack = stack_pointer(ctx);
@@ -741,7 +747,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
         printf("Stack Trace:\n");
     else
         printf("Call Trace:\n");
-    printf("%c [<", xenctx.stack_trace ? '*' : ' ');
+    printf("%*s  %c [<", width*2, "", xenctx.stack_trace ? '*' : ' ');
     print_stack_word(instr_pointer(ctx), width);
     printf(">]");
 
@@ -756,9 +762,10 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                     p = map_page(ctx, vcpu, stack);
                     if (!p)
                         return -1;
+                    print_stack_addr(stack, width);
                     printf("|   ");
                     print_stack_word(read_stack_word(p, width), width);
-                    printf("   \n");
+                    printf("\n");
                     stack += width;
                 }
             } else {
@@ -770,6 +777,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 return -1;
             frame = read_stack_word(p, width);
             if (xenctx.stack_trace) {
+                print_stack_addr(stack, width);
                 printf("|-- ");
                 print_stack_word(read_stack_word(p, width), width);
                 printf("\n");
@@ -781,6 +789,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 if (!p)
                     return -1;
                 word = read_stack_word(p, width);
+                print_stack_addr(stack, width);
                 printf("%c [<", xenctx.stack_trace ? '|' : ' ');
                 print_stack_word(word, width);
                 printf(">]");
@@ -797,12 +806,14 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 return -1;
             word = read_stack_word(p, width);
             if (is_kernel_text(word)) {
+                print_stack_addr(stack, width);
                 printf("  [<");
                 print_stack_word(word, width);
                 printf(">]");
                 print_symbol(word);
                 printf("\n");
             } else if (xenctx.stack_trace) {
+                print_stack_addr(stack, width);
                 printf("    ");
                 print_stack_word(word, width);
                 printf("\n");
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:39:15 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:39:15 +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 1WWDhb-0006Ut-Lr; Fri, 04 Apr 2014 23:39:15 +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 1WWDha-0006Sc-0n
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:14 +0000
Received: from [85.158.143.35:29489] by server-3.bemta-4.messagelabs.com id
	16/06-13602-1A24F335; Fri, 04 Apr 2014 23:39:13 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1396654748!7100490!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26829 invoked from network); 4 Apr 2014 23:39:09 -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;
	4 Apr 2014 23:39:09 -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 1WWDhU-0002yj-5W
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:08 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhU-0008JV-4H
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:08 +0000
Date: Fri, 04 Apr 2014 23:39:08 +0000
Message-Id: <E1WWDhU-0008JV-4H@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add output of stack address to
	Call and Stack Trace.
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 627cdf161dea637cdf7581eb908298f9c0cd7a77
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:00 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: Add output of stack address to Call and Stack Trace.
    
    Here is an example:
    
    Call Trace:
                       [<ffffffff8006b2b0>] default_idle+0x29 <--
    ffffffff803ddf90:  [<ffffffff80048d19>] cpu_idle+0x95
    ffffffff803ddfa0:  [<ffffffff803e7801>] start_kernel+0x220
    ffffffff803ddfc0:  [<ffffffff803e722f>] x86_64_start_kernel+0x22f
    
    and
    
    Stack Trace:
                     * [<ffffffff8006b2b0>] default_idle+0x29 <--
    ffffffff803ddf90:  [<ffffffff80048d19>] cpu_idle+0x95
    ffffffff803ddf98:    0000000000200800
    ffffffff803ddfa0:  [<ffffffff803e7801>] start_kernel+0x220
    ffffffff803ddfa8:    0000000000086800
    ffffffff803ddfb0:    0000000000000000
    ffffffff803ddfb8:    ffffffff80430720
    ffffffff803ddfc0:  [<ffffffff803e722f>] x86_64_start_kernel+0x22f
    ffffffff803ddfc8:    80008e000010019c
    ffffffff803ddfd0:    00000000ffffffff
    ffffffff803ddfd8:    0000000000000000
    ffffffff803ddfe0:    0000000000000000
    ffffffff803ddfe8:    0000000000200000
    ffffffff803ddff0:    0000000000000000
    ffffffff803ddff8:    0000000000000000
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 4bb5507..cefbb8b 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -665,6 +665,12 @@ static int print_code(vcpu_guest_context_any_t *ctx, int vcpu)
     return 0;
 }
 
+static void print_stack_addr(guest_word_t addr, int width)
+{
+    print_stack_word(addr, width);
+    printf(": ");
+}
+
 static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
 {
     guest_word_t stack = stack_pointer(ctx);
@@ -741,7 +747,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
         printf("Stack Trace:\n");
     else
         printf("Call Trace:\n");
-    printf("%c [<", xenctx.stack_trace ? '*' : ' ');
+    printf("%*s  %c [<", width*2, "", xenctx.stack_trace ? '*' : ' ');
     print_stack_word(instr_pointer(ctx), width);
     printf(">]");
 
@@ -756,9 +762,10 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                     p = map_page(ctx, vcpu, stack);
                     if (!p)
                         return -1;
+                    print_stack_addr(stack, width);
                     printf("|   ");
                     print_stack_word(read_stack_word(p, width), width);
-                    printf("   \n");
+                    printf("\n");
                     stack += width;
                 }
             } else {
@@ -770,6 +777,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 return -1;
             frame = read_stack_word(p, width);
             if (xenctx.stack_trace) {
+                print_stack_addr(stack, width);
                 printf("|-- ");
                 print_stack_word(read_stack_word(p, width), width);
                 printf("\n");
@@ -781,6 +789,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 if (!p)
                     return -1;
                 word = read_stack_word(p, width);
+                print_stack_addr(stack, width);
                 printf("%c [<", xenctx.stack_trace ? '|' : ' ');
                 print_stack_word(word, width);
                 printf(">]");
@@ -797,12 +806,14 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 return -1;
             word = read_stack_word(p, width);
             if (is_kernel_text(word)) {
+                print_stack_addr(stack, width);
                 printf("  [<");
                 print_stack_word(word, width);
                 printf(">]");
                 print_symbol(word);
                 printf("\n");
             } else if (xenctx.stack_trace) {
+                print_stack_addr(stack, width);
                 printf("    ");
                 print_stack_word(word, width);
                 printf("\n");
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:39:25 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:39: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 1WWDhl-0006bk-Of; Fri, 04 Apr 2014 23:39:25 +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 1WWDhk-0006bZ-Im
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:24 +0000
Received: from [85.158.143.35:43802] by server-3.bemta-4.messagelabs.com id
	4C/06-13602-CA24F335; Fri, 04 Apr 2014 23:39:24 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1396654758!6412261!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22693 invoked from network); 4 Apr 2014 23:39:19 -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;
	4 Apr 2014 23:39:19 -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 1WWDhe-0002ym-E6
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhe-0008Jt-AE
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:18 +0000
Date: Fri, 04 Apr 2014 23:39:18 +0000
Message-Id: <E1WWDhe-0008Jt-AE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add -m (--memory) <maddr>
	option to dump memory at maddr.
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 4cc08263af38492680cd828abd62fc65cc79bd1f
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:01 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: Add -m (--memory) <maddr> option to dump memory at maddr.
    
    Currently not supported on ARM.
    
    New routine read_mem_word() will correctly read a word that crosses
    a page boundary.  It will not fault if the 2nd page can not be
    mapped.
    
    Moved xenctx because guest_word_t is not defined where it was.
    
    Here is an example:
    
    Memory (address ffffffff803ddf90):
     ffffffff80048d19 0000000000200800 ffffffff803e7801 0000000000086800
     0000000000000000 ffffffff80430720 ffffffff803e722f 80008e000010019c
     00000000ffffffff 0000000000000000 0000000000000000 0000000000200000
     0000000000000000 0000000000000000 0000000000000000 00cf9b000000ffff
     00af9b000000ffff 00cf93000000ffff 00cffb000000ffff 00cff3000000ffff
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |  240 +++++++++++++++++++++++++++++++++--------------
 1 files changed, 170 insertions(+), 70 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index cefbb8b..9aa55e2 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -30,22 +30,6 @@
 #include <xen/foreign/x86_64.h>
 #include <xen/hvm/save.h>
 
-static struct xenctx {
-    xc_interface *xc_handle;
-    int domid;
-    int frame_ptrs;
-    int stack_trace;
-    int disp_all;
-    int nr_stack_pages;
-    int bytes_per_line;
-    int lines;
-    int decode_as_ascii;
-    int tag_stack_dump;
-    int all_vcpus;
-    int self_paused;
-    xc_dominfo_t dominfo;
-} xenctx;
-
 #define DEFAULT_NR_STACK_PAGES 1
 #define DEFAULT_BYTES_PER_LINE 32
 #define DEFAULT_LINES 5
@@ -73,6 +57,27 @@ typedef uint64_t guest_word_t;
 
 #define MAX_BYTES_PER_LINE 128
 
+static struct xenctx {
+    xc_interface *xc_handle;
+    int domid;
+    int frame_ptrs;
+    int stack_trace;
+    int disp_all;
+    int nr_stack_pages;
+    int bytes_per_line;
+    int lines;
+    int decode_as_ascii;
+    int tag_stack_dump;
+    int tag_call_trace;
+    int all_vcpus;
+#ifndef NO_TRANSLATION
+    guest_word_t mem_addr;
+    int do_memory;
+#endif
+    int self_paused;
+    xc_dominfo_t dominfo;
+} xenctx;
+
 struct symbol {
     guest_word_t address;
     char *name;
@@ -634,6 +639,44 @@ static guest_word_t read_stack_word(guest_word_t *src, int width)
     return word;
 }
 
+static guest_word_t read_mem_word(vcpu_guest_context_any_t *ctx, int vcpu,
+                                  guest_word_t virt, int width)
+{
+    if ( (virt & 7) == 0 )
+    {
+        guest_word_t *p = map_page(ctx, vcpu, virt);
+
+        if ( p )
+            return read_stack_word(p, width);
+        else
+            return -1;
+    }
+    else
+    {
+        guest_word_t word = 0;
+        char *src, *dst;
+        int i;
+
+        /* Little-endian only */
+        dst = (char *)&word;
+        for (i = 0; i < width; i++)
+        {
+            src = map_page(ctx, vcpu, virt + i);
+            if ( src )
+                *dst++ = *src;
+            else
+            {
+                guest_word_t missing = -1LL;
+
+                /* Return all ones for missing memory */
+                memcpy(dst, &missing, width - i);
+                return word;
+            }
+        }
+        return word;
+    }
+}
+
 static void print_stack_word(guest_word_t word, int width)
 {
     if (width == 4)
@@ -642,6 +685,77 @@ static void print_stack_word(guest_word_t word, int width)
         printf(FMT_64B_WORD, word);
 }
 
+static int print_lines(vcpu_guest_context_any_t *ctx, int vcpu, int width,
+                       guest_word_t mem_addr, guest_word_t mem_limit)
+{
+    guest_word_t mem_start = mem_addr;
+    guest_word_t word;
+    guest_word_t ascii[MAX_BYTES_PER_LINE/4];
+    int i;
+
+    for (i = 1; i < xenctx.lines + 1 && mem_addr < mem_limit; i++)
+    {
+        int j = 0;
+        int k;
+
+        if ( xenctx.tag_stack_dump )
+        {
+            print_stack_word(mem_addr, width);
+            printf(":");
+        }
+        while ( mem_addr < mem_limit &&
+                mem_addr < mem_start + i * xenctx.bytes_per_line )
+        {
+            void *p = map_page(ctx, vcpu, mem_addr);
+            if ( !p )
+                return -1;
+            word = read_mem_word(ctx, vcpu, mem_addr, width);
+            if ( xenctx.decode_as_ascii )
+                ascii[j++] = word;
+            printf(" ");
+            print_stack_word(word, width);
+            mem_addr += width;
+        }
+        if ( xenctx.decode_as_ascii )
+        {
+            /*
+             * Line up ascii output if less than bytes_per_line
+             * were printed.
+             */
+            for (k = j; k < xenctx.bytes_per_line / width; k++)
+                printf(" %*s", width * 2, "");
+            printf("  ");
+            for (k = 0; k < j; k++)
+            {
+                int l;
+                unsigned char *bytep = (unsigned char *)&ascii[k];
+
+                for (l = 0; l < width; l++)
+                {
+                    if (isprint(*bytep))
+                        printf("%c", *bytep);
+                    else
+                        printf(".");
+                    bytep++;
+                }
+            }
+        }
+        printf("\n");
+    }
+    printf("\n");
+    return 0;
+}
+
+static void print_mem(vcpu_guest_context_any_t *ctx, int vcpu, int width,
+                          guest_word_t mem_addr)
+{
+    printf("Memory (address ");
+    print_stack_word(mem_addr, width);
+    printf("):\n");
+    print_lines(ctx, vcpu, width, mem_addr,
+                mem_addr + xenctx.lines * xenctx.bytes_per_line);
+}
+
 static int print_code(vcpu_guest_context_any_t *ctx, int vcpu)
 {
     guest_word_t instr;
@@ -678,8 +792,6 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     guest_word_t frame;
     guest_word_t word;
     guest_word_t *p;
-    guest_word_t ascii[MAX_BYTES_PER_LINE/4];
-    int i;
 
     if ( width )
         xenctx.bytes_per_line =
@@ -691,56 +803,8 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     if ( xenctx.lines )
     {
         printf("Stack:\n");
-        for (i = 1; i < xenctx.lines + 1 && stack < stack_limit; i++)
-        {
-            int j = 0;
-            int k;
-
-            if ( xenctx.tag_stack_dump )
-            {
-                print_stack_word(stack, width);
-                printf(":");
-            }
-            while ( stack < stack_limit &&
-                    stack < stack_pointer(ctx) + i * xenctx.bytes_per_line )
-            {
-                p = map_page(ctx, vcpu, stack);
-                if ( !p )
-                    return -1;
-                word = read_stack_word(p, width);
-                if ( xenctx.decode_as_ascii )
-                    ascii[j++] = word;
-                printf(" ");
-                print_stack_word(word, width);
-                stack += width;
-            }
-            if ( xenctx.decode_as_ascii )
-            {
-                /*
-                 * Line up ascii output if less than bytes_per_line
-                 * were printed.
-                 */
-                for (k = j; k < xenctx.bytes_per_line / width; k++)
-                    printf(" %*s", width * 2, "");
-                printf("  ");
-                for (k = 0; k < j; k++)
-                {
-                    int l;
-                    unsigned char *bytep = (unsigned char *)&ascii[k];
-
-                    for (l = 0; l < width; l++)
-                    {
-                        if (isprint(*bytep))
-                            printf("%c", *bytep);
-                        else
-                            printf(".");
-                        bytep++;
-                    }
-                }
-            }
-            printf("\n");
-        }
-        printf("\n");
+        if ( print_lines(ctx, vcpu, width, stack, stack_limit) )
+            return -1;
     }
 
     if(xenctx.stack_trace)
@@ -861,6 +925,13 @@ static void dump_ctx(int vcpu)
     }
 #endif
 
+#ifndef NO_TRANSLATION
+    if ( xenctx.do_memory )
+    {
+        print_mem(&ctx, vcpu, guest_word_size, xenctx.mem_addr);
+        return;
+    }
+#endif
     print_ctx(&ctx);
 #ifndef NO_TRANSLATION
     if (print_code(&ctx, vcpu))
@@ -920,13 +991,21 @@ static void usage(void)
     printf("                     add a decode of Stack dump as ascii.\n");
     printf("  -t, --tag-stack-dump\n");
     printf("                     add address on each line of Stack dump.\n");
+#ifndef NO_TRANSLATION
+    printf("  -m maddr, --memory=maddr\n");
+    printf("                     dump memory at maddr.\n");
+#endif
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SCn:b:l:Dt";
+    static const char *sopts = "fs:hak:SCn:b:l:Dt"
+#ifndef NO_TRANSLATION
+        "m:"
+#endif
+        ;
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
@@ -935,6 +1014,9 @@ int main(int argc, char **argv)
         {"display-stack-pages", 0, NULL, 'n'},
         {"decode-as-ascii", 0, NULL, 'D'},
         {"tag-stack-dump", 0, NULL, 't'},
+#ifndef NO_TRANSLATION
+        {"memory", 1, NULL, 'm'},
+#endif
         {"bytes-per-line", 1, NULL, 'b'},
         {"lines", 1, NULL, 'l'},
         {"all", 0, NULL, 'a'},
@@ -945,6 +1027,7 @@ int main(int argc, char **argv)
     const char *symbol_table = NULL;
 
     int vcpu = 0;
+    int do_default = 1;
 
     xenctx.bytes_per_line = DEFAULT_BYTES_PER_LINE;
     xenctx.lines = DEFAULT_LINES;
@@ -1008,10 +1091,18 @@ int main(int argc, char **argv)
             break;
         case 'C':
             xenctx.all_vcpus = 1;
+            do_default = 0;
             break;
         case 'k':
             kernel_start = strtoull(optarg, NULL, 0);
             break;
+#ifndef NO_TRANSLATION
+        case 'm':
+            xenctx.mem_addr = strtoull(optarg, NULL, 0);
+            xenctx.do_memory = 1;
+            do_default = 0;
+            break;
+#endif
         case 'h':
             usage();
             exit(-1);
@@ -1061,9 +1152,18 @@ int main(int argc, char **argv)
         xenctx.self_paused = 1;
     }
 
+#ifndef NO_TRANSLATION
+    if ( xenctx.do_memory )
+    {
+        dump_ctx(vcpu);
+        if (xenctx.all_vcpus)
+            printf("\n");
+    }
+    xenctx.do_memory = 0;
+#endif
     if (xenctx.all_vcpus)
         dump_all_vcpus();
-    else
+    if ( do_default )
         dump_ctx(vcpu);
 
     if (xenctx.self_paused) {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:39:25 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:39: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 1WWDhl-0006bk-Of; Fri, 04 Apr 2014 23:39:25 +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 1WWDhk-0006bZ-Im
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:24 +0000
Received: from [85.158.143.35:43802] by server-3.bemta-4.messagelabs.com id
	4C/06-13602-CA24F335; Fri, 04 Apr 2014 23:39:24 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1396654758!6412261!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22693 invoked from network); 4 Apr 2014 23:39:19 -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;
	4 Apr 2014 23:39:19 -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 1WWDhe-0002ym-E6
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:18 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhe-0008Jt-AE
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:18 +0000
Date: Fri, 04 Apr 2014 23:39:18 +0000
Message-Id: <E1WWDhe-0008Jt-AE@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add -m (--memory) <maddr>
	option to dump memory at maddr.
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 4cc08263af38492680cd828abd62fc65cc79bd1f
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:01 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: Add -m (--memory) <maddr> option to dump memory at maddr.
    
    Currently not supported on ARM.
    
    New routine read_mem_word() will correctly read a word that crosses
    a page boundary.  It will not fault if the 2nd page can not be
    mapped.
    
    Moved xenctx because guest_word_t is not defined where it was.
    
    Here is an example:
    
    Memory (address ffffffff803ddf90):
     ffffffff80048d19 0000000000200800 ffffffff803e7801 0000000000086800
     0000000000000000 ffffffff80430720 ffffffff803e722f 80008e000010019c
     00000000ffffffff 0000000000000000 0000000000000000 0000000000200000
     0000000000000000 0000000000000000 0000000000000000 00cf9b000000ffff
     00af9b000000ffff 00cf93000000ffff 00cffb000000ffff 00cff3000000ffff
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |  240 +++++++++++++++++++++++++++++++++--------------
 1 files changed, 170 insertions(+), 70 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index cefbb8b..9aa55e2 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -30,22 +30,6 @@
 #include <xen/foreign/x86_64.h>
 #include <xen/hvm/save.h>
 
-static struct xenctx {
-    xc_interface *xc_handle;
-    int domid;
-    int frame_ptrs;
-    int stack_trace;
-    int disp_all;
-    int nr_stack_pages;
-    int bytes_per_line;
-    int lines;
-    int decode_as_ascii;
-    int tag_stack_dump;
-    int all_vcpus;
-    int self_paused;
-    xc_dominfo_t dominfo;
-} xenctx;
-
 #define DEFAULT_NR_STACK_PAGES 1
 #define DEFAULT_BYTES_PER_LINE 32
 #define DEFAULT_LINES 5
@@ -73,6 +57,27 @@ typedef uint64_t guest_word_t;
 
 #define MAX_BYTES_PER_LINE 128
 
+static struct xenctx {
+    xc_interface *xc_handle;
+    int domid;
+    int frame_ptrs;
+    int stack_trace;
+    int disp_all;
+    int nr_stack_pages;
+    int bytes_per_line;
+    int lines;
+    int decode_as_ascii;
+    int tag_stack_dump;
+    int tag_call_trace;
+    int all_vcpus;
+#ifndef NO_TRANSLATION
+    guest_word_t mem_addr;
+    int do_memory;
+#endif
+    int self_paused;
+    xc_dominfo_t dominfo;
+} xenctx;
+
 struct symbol {
     guest_word_t address;
     char *name;
@@ -634,6 +639,44 @@ static guest_word_t read_stack_word(guest_word_t *src, int width)
     return word;
 }
 
+static guest_word_t read_mem_word(vcpu_guest_context_any_t *ctx, int vcpu,
+                                  guest_word_t virt, int width)
+{
+    if ( (virt & 7) == 0 )
+    {
+        guest_word_t *p = map_page(ctx, vcpu, virt);
+
+        if ( p )
+            return read_stack_word(p, width);
+        else
+            return -1;
+    }
+    else
+    {
+        guest_word_t word = 0;
+        char *src, *dst;
+        int i;
+
+        /* Little-endian only */
+        dst = (char *)&word;
+        for (i = 0; i < width; i++)
+        {
+            src = map_page(ctx, vcpu, virt + i);
+            if ( src )
+                *dst++ = *src;
+            else
+            {
+                guest_word_t missing = -1LL;
+
+                /* Return all ones for missing memory */
+                memcpy(dst, &missing, width - i);
+                return word;
+            }
+        }
+        return word;
+    }
+}
+
 static void print_stack_word(guest_word_t word, int width)
 {
     if (width == 4)
@@ -642,6 +685,77 @@ static void print_stack_word(guest_word_t word, int width)
         printf(FMT_64B_WORD, word);
 }
 
+static int print_lines(vcpu_guest_context_any_t *ctx, int vcpu, int width,
+                       guest_word_t mem_addr, guest_word_t mem_limit)
+{
+    guest_word_t mem_start = mem_addr;
+    guest_word_t word;
+    guest_word_t ascii[MAX_BYTES_PER_LINE/4];
+    int i;
+
+    for (i = 1; i < xenctx.lines + 1 && mem_addr < mem_limit; i++)
+    {
+        int j = 0;
+        int k;
+
+        if ( xenctx.tag_stack_dump )
+        {
+            print_stack_word(mem_addr, width);
+            printf(":");
+        }
+        while ( mem_addr < mem_limit &&
+                mem_addr < mem_start + i * xenctx.bytes_per_line )
+        {
+            void *p = map_page(ctx, vcpu, mem_addr);
+            if ( !p )
+                return -1;
+            word = read_mem_word(ctx, vcpu, mem_addr, width);
+            if ( xenctx.decode_as_ascii )
+                ascii[j++] = word;
+            printf(" ");
+            print_stack_word(word, width);
+            mem_addr += width;
+        }
+        if ( xenctx.decode_as_ascii )
+        {
+            /*
+             * Line up ascii output if less than bytes_per_line
+             * were printed.
+             */
+            for (k = j; k < xenctx.bytes_per_line / width; k++)
+                printf(" %*s", width * 2, "");
+            printf("  ");
+            for (k = 0; k < j; k++)
+            {
+                int l;
+                unsigned char *bytep = (unsigned char *)&ascii[k];
+
+                for (l = 0; l < width; l++)
+                {
+                    if (isprint(*bytep))
+                        printf("%c", *bytep);
+                    else
+                        printf(".");
+                    bytep++;
+                }
+            }
+        }
+        printf("\n");
+    }
+    printf("\n");
+    return 0;
+}
+
+static void print_mem(vcpu_guest_context_any_t *ctx, int vcpu, int width,
+                          guest_word_t mem_addr)
+{
+    printf("Memory (address ");
+    print_stack_word(mem_addr, width);
+    printf("):\n");
+    print_lines(ctx, vcpu, width, mem_addr,
+                mem_addr + xenctx.lines * xenctx.bytes_per_line);
+}
+
 static int print_code(vcpu_guest_context_any_t *ctx, int vcpu)
 {
     guest_word_t instr;
@@ -678,8 +792,6 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     guest_word_t frame;
     guest_word_t word;
     guest_word_t *p;
-    guest_word_t ascii[MAX_BYTES_PER_LINE/4];
-    int i;
 
     if ( width )
         xenctx.bytes_per_line =
@@ -691,56 +803,8 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     if ( xenctx.lines )
     {
         printf("Stack:\n");
-        for (i = 1; i < xenctx.lines + 1 && stack < stack_limit; i++)
-        {
-            int j = 0;
-            int k;
-
-            if ( xenctx.tag_stack_dump )
-            {
-                print_stack_word(stack, width);
-                printf(":");
-            }
-            while ( stack < stack_limit &&
-                    stack < stack_pointer(ctx) + i * xenctx.bytes_per_line )
-            {
-                p = map_page(ctx, vcpu, stack);
-                if ( !p )
-                    return -1;
-                word = read_stack_word(p, width);
-                if ( xenctx.decode_as_ascii )
-                    ascii[j++] = word;
-                printf(" ");
-                print_stack_word(word, width);
-                stack += width;
-            }
-            if ( xenctx.decode_as_ascii )
-            {
-                /*
-                 * Line up ascii output if less than bytes_per_line
-                 * were printed.
-                 */
-                for (k = j; k < xenctx.bytes_per_line / width; k++)
-                    printf(" %*s", width * 2, "");
-                printf("  ");
-                for (k = 0; k < j; k++)
-                {
-                    int l;
-                    unsigned char *bytep = (unsigned char *)&ascii[k];
-
-                    for (l = 0; l < width; l++)
-                    {
-                        if (isprint(*bytep))
-                            printf("%c", *bytep);
-                        else
-                            printf(".");
-                        bytep++;
-                    }
-                }
-            }
-            printf("\n");
-        }
-        printf("\n");
+        if ( print_lines(ctx, vcpu, width, stack, stack_limit) )
+            return -1;
     }
 
     if(xenctx.stack_trace)
@@ -861,6 +925,13 @@ static void dump_ctx(int vcpu)
     }
 #endif
 
+#ifndef NO_TRANSLATION
+    if ( xenctx.do_memory )
+    {
+        print_mem(&ctx, vcpu, guest_word_size, xenctx.mem_addr);
+        return;
+    }
+#endif
     print_ctx(&ctx);
 #ifndef NO_TRANSLATION
     if (print_code(&ctx, vcpu))
@@ -920,13 +991,21 @@ static void usage(void)
     printf("                     add a decode of Stack dump as ascii.\n");
     printf("  -t, --tag-stack-dump\n");
     printf("                     add address on each line of Stack dump.\n");
+#ifndef NO_TRANSLATION
+    printf("  -m maddr, --memory=maddr\n");
+    printf("                     dump memory at maddr.\n");
+#endif
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SCn:b:l:Dt";
+    static const char *sopts = "fs:hak:SCn:b:l:Dt"
+#ifndef NO_TRANSLATION
+        "m:"
+#endif
+        ;
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
@@ -935,6 +1014,9 @@ int main(int argc, char **argv)
         {"display-stack-pages", 0, NULL, 'n'},
         {"decode-as-ascii", 0, NULL, 'D'},
         {"tag-stack-dump", 0, NULL, 't'},
+#ifndef NO_TRANSLATION
+        {"memory", 1, NULL, 'm'},
+#endif
         {"bytes-per-line", 1, NULL, 'b'},
         {"lines", 1, NULL, 'l'},
         {"all", 0, NULL, 'a'},
@@ -945,6 +1027,7 @@ int main(int argc, char **argv)
     const char *symbol_table = NULL;
 
     int vcpu = 0;
+    int do_default = 1;
 
     xenctx.bytes_per_line = DEFAULT_BYTES_PER_LINE;
     xenctx.lines = DEFAULT_LINES;
@@ -1008,10 +1091,18 @@ int main(int argc, char **argv)
             break;
         case 'C':
             xenctx.all_vcpus = 1;
+            do_default = 0;
             break;
         case 'k':
             kernel_start = strtoull(optarg, NULL, 0);
             break;
+#ifndef NO_TRANSLATION
+        case 'm':
+            xenctx.mem_addr = strtoull(optarg, NULL, 0);
+            xenctx.do_memory = 1;
+            do_default = 0;
+            break;
+#endif
         case 'h':
             usage();
             exit(-1);
@@ -1061,9 +1152,18 @@ int main(int argc, char **argv)
         xenctx.self_paused = 1;
     }
 
+#ifndef NO_TRANSLATION
+    if ( xenctx.do_memory )
+    {
+        dump_ctx(vcpu);
+        if (xenctx.all_vcpus)
+            printf("\n");
+    }
+    xenctx.do_memory = 0;
+#endif
     if (xenctx.all_vcpus)
         dump_all_vcpus();
-    else
+    if ( do_default )
         dump_ctx(vcpu);
 
     if (xenctx.self_paused) {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:39:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:39: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 1WWDhs-0006d9-TJ; Fri, 04 Apr 2014 23:39:32 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhr-0006cr-IQ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:31 +0000
Received: from [85.158.137.68:23123] by server-4.bemta-3.messagelabs.com id
	08/1F-17399-2B24F335; Fri, 04 Apr 2014 23:39:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1396654768!5109041!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11630 invoked from network); 4 Apr 2014 23:39:29 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:39:29 -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 1WWDho-0002yv-JZ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:28 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDho-0008KF-IY
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:28 +0000
Date: Fri, 04 Apr 2014 23:39:28 +0000
Message-Id: <E1WWDho-0008KF-IY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add error output if
	--all-vcpus (-C) and [VCPU] are both specified.
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 b4a7842aabb6aab29f4e7b3a8157589c612a01de
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:02 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: Add error output if --all-vcpus (-C) and [VCPU] are both specified.
    
    To do this correctly the program name must be remembered since argv
    is adjusted at the end of option parsing.
    
    Switch all uses of argv[0] to prog.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 9aa55e2..aa0c9d1 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -1001,6 +1001,7 @@ int main(int argc, char **argv)
 {
     int ch;
     int ret;
+    const char *prog = argv[0];
     static const char *sopts = "fs:hak:SCn:b:l:Dt"
 #ifndef NO_TRANSLATION
         "m:"
@@ -1053,7 +1054,7 @@ int main(int argc, char **argv)
             {
                 fprintf(stderr,
                         "%s: Unsupported value(%d) for --display-stack-pages '%s'. Needs to be >= 1\n",
-                        argv[0], xenctx.nr_stack_pages, optarg);
+                        prog, xenctx.nr_stack_pages, optarg);
                 exit(-1);
             }
             break;
@@ -1070,7 +1071,7 @@ int main(int argc, char **argv)
             {
                 fprintf(stderr,
                         "%s: Unsupported value for --bytes-per-line '%s'. Needs to be 4 <= %d <= %d\n",
-                        argv[0], optarg, xenctx.bytes_per_line,
+                        prog, optarg, xenctx.bytes_per_line,
                         MAX_BYTES_PER_LINE);
                 exit(-1);
             }
@@ -1085,7 +1086,7 @@ int main(int argc, char **argv)
             {
                 fprintf(stderr,
                         "%s: Unsupported value(%d) for --lines '%s'. Needs to be >= 0, < %d\n",
-                        argv[0], xenctx.lines, optarg, INT_MAX);
+                        prog, xenctx.lines, optarg, INT_MAX);
                 exit(-1);
             }
             break;
@@ -1107,7 +1108,7 @@ int main(int argc, char **argv)
             usage();
             exit(-1);
         case '?':
-            fprintf(stderr, "%s --help for more options\n", argv[0]);
+            fprintf(stderr, "%s --help for more options\n", prog);
             exit(-1);
         }
     }
@@ -1125,8 +1126,17 @@ int main(int argc, char **argv)
             exit(-1);
     }
 
-    if (argc == 2)
+    if ( argc == 2 )
+    {
+        if ( xenctx.all_vcpus )
+        {
+            fprintf(stderr,
+                    "%s: both --all-vcpus and [VCPU] is not supported\n",
+                    prog);
+            exit(-1);
+        }
         vcpu = atoi(argv[1]);
+    }
 
     if (symbol_table)
         read_symbol_table(symbol_table);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:39:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:39: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 1WWDhs-0006d9-TJ; Fri, 04 Apr 2014 23:39:32 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhr-0006cr-IQ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:31 +0000
Received: from [85.158.137.68:23123] by server-4.bemta-3.messagelabs.com id
	08/1F-17399-2B24F335; Fri, 04 Apr 2014 23:39:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1396654768!5109041!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11630 invoked from network); 4 Apr 2014 23:39:29 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:39:29 -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 1WWDho-0002yv-JZ
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:28 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDho-0008KF-IY
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:28 +0000
Date: Fri, 04 Apr 2014 23:39:28 +0000
Message-Id: <E1WWDho-0008KF-IY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add error output if
	--all-vcpus (-C) and [VCPU] are both specified.
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 b4a7842aabb6aab29f4e7b3a8157589c612a01de
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:02 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: Add error output if --all-vcpus (-C) and [VCPU] are both specified.
    
    To do this correctly the program name must be remembered since argv
    is adjusted at the end of option parsing.
    
    Switch all uses of argv[0] to prog.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 9aa55e2..aa0c9d1 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -1001,6 +1001,7 @@ int main(int argc, char **argv)
 {
     int ch;
     int ret;
+    const char *prog = argv[0];
     static const char *sopts = "fs:hak:SCn:b:l:Dt"
 #ifndef NO_TRANSLATION
         "m:"
@@ -1053,7 +1054,7 @@ int main(int argc, char **argv)
             {
                 fprintf(stderr,
                         "%s: Unsupported value(%d) for --display-stack-pages '%s'. Needs to be >= 1\n",
-                        argv[0], xenctx.nr_stack_pages, optarg);
+                        prog, xenctx.nr_stack_pages, optarg);
                 exit(-1);
             }
             break;
@@ -1070,7 +1071,7 @@ int main(int argc, char **argv)
             {
                 fprintf(stderr,
                         "%s: Unsupported value for --bytes-per-line '%s'. Needs to be 4 <= %d <= %d\n",
-                        argv[0], optarg, xenctx.bytes_per_line,
+                        prog, optarg, xenctx.bytes_per_line,
                         MAX_BYTES_PER_LINE);
                 exit(-1);
             }
@@ -1085,7 +1086,7 @@ int main(int argc, char **argv)
             {
                 fprintf(stderr,
                         "%s: Unsupported value(%d) for --lines '%s'. Needs to be >= 0, < %d\n",
-                        argv[0], xenctx.lines, optarg, INT_MAX);
+                        prog, xenctx.lines, optarg, INT_MAX);
                 exit(-1);
             }
             break;
@@ -1107,7 +1108,7 @@ int main(int argc, char **argv)
             usage();
             exit(-1);
         case '?':
-            fprintf(stderr, "%s --help for more options\n", argv[0]);
+            fprintf(stderr, "%s --help for more options\n", prog);
             exit(-1);
         }
     }
@@ -1125,8 +1126,17 @@ int main(int argc, char **argv)
             exit(-1);
     }
 
-    if (argc == 2)
+    if ( argc == 2 )
+    {
+        if ( xenctx.all_vcpus )
+        {
+            fprintf(stderr,
+                    "%s: both --all-vcpus and [VCPU] is not supported\n",
+                    prog);
+            exit(-1);
+        }
         vcpu = atoi(argv[1]);
+    }
 
     if (symbol_table)
         read_symbol_table(symbol_table);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:39:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:39: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 1WWDi2-0006ef-Vz; Fri, 04 Apr 2014 23:39:42 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDi2-0006eS-1J
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:42 +0000
Received: from [193.109.254.147:23288] by server-2.bemta-14.messagelabs.com id
	08/CF-21684-DB24F335; Fri, 04 Apr 2014 23:39:41 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1396654778!6432771!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16088 invoked from network); 4 Apr 2014 23:39:39 -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;
	4 Apr 2014 23:39:39 -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 1WWDhy-0002z0-Q3
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhy-0008Ki-Na
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:38 +0000
Date: Fri, 04 Apr 2014 23:39:38 +0000
Message-Id: <E1WWDhy-0008Ki-Na@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add -d (--dump-as-stack)
	<daddr> option to dump memory at daddr as a stack.
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 3dfff09dbe2f5e3b4e38c2ff684e0e7567247393
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:03 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: Add -d (--dump-as-stack) <daddr> option to dump memory at daddr as a stack.
    
    Also switch from read_stack_word to read_mem_word since the provided
    address may not be aligned.
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   66 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 50 insertions(+), 16 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index aa0c9d1..3773b34 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -72,7 +72,9 @@ static struct xenctx {
     int all_vcpus;
 #ifndef NO_TRANSLATION
     guest_word_t mem_addr;
+    guest_word_t stk_addr;
     int do_memory;
+    int do_stack;
 #endif
     int self_paused;
     xc_dominfo_t dominfo;
@@ -773,9 +775,7 @@ static int print_code(vcpu_guest_context_any_t *ctx, int vcpu)
         else
             printf("%02x ", *c);
     }
-    printf("\n");
-
-    printf("\n");
+    printf("\n\n\n");
     return 0;
 }
 
@@ -785,9 +785,10 @@ static void print_stack_addr(guest_word_t addr, int width)
     printf(": ");
 }
 
-static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
+static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
+                       guest_word_t stk_addr_start)
 {
-    guest_word_t stack = stack_pointer(ctx);
+    guest_word_t stack = stk_addr_start;
     guest_word_t stack_limit;
     guest_word_t frame;
     guest_word_t word;
@@ -799,7 +800,6 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     stack_limit = ((stack_pointer(ctx) + XC_PAGE_SIZE)
                    & ~((guest_word_t) XC_PAGE_SIZE - 1))
                    + (xenctx.nr_stack_pages - 1) * XC_PAGE_SIZE;
-    printf("\n");
     if ( xenctx.lines )
     {
         printf("Stack:\n");
@@ -811,12 +811,15 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
         printf("Stack Trace:\n");
     else
         printf("Call Trace:\n");
-    printf("%*s  %c [<", width*2, "", xenctx.stack_trace ? '*' : ' ');
-    print_stack_word(instr_pointer(ctx), width);
-    printf(">]");
+    if ( !xenctx.do_stack )
+    {
+        printf("%*s  %c [<", width*2, "", xenctx.stack_trace ? '*' : ' ');
+        print_stack_word(instr_pointer(ctx), width);
+        printf(">]");
 
-    print_symbol(instr_pointer(ctx));
-    printf(" <--\n");
+        print_symbol(instr_pointer(ctx));
+        printf(" <--\n");
+    }
     if (xenctx.frame_ptrs) {
         stack = stack_pointer(ctx);
         frame = frame_pointer(ctx);
@@ -863,12 +866,12 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
             }
         }
     } else {
-        stack = stack_pointer(ctx);
+        stack = stk_addr_start;
         while(stack < stack_limit) {
             p = map_page(ctx, vcpu, stack);
             if (!p)
                 return -1;
-            word = read_stack_word(p, width);
+            word = read_mem_word(ctx, vcpu, stack, width);
             if (is_kernel_text(word)) {
                 print_stack_addr(stack, width);
                 printf("  [<");
@@ -931,13 +934,19 @@ static void dump_ctx(int vcpu)
         print_mem(&ctx, vcpu, guest_word_size, xenctx.mem_addr);
         return;
     }
+    if ( xenctx.do_stack )
+    {
+        print_stack(&ctx, vcpu, guest_word_size, xenctx.stk_addr);
+        return;
+    }
 #endif
     print_ctx(&ctx);
 #ifndef NO_TRANSLATION
     if (print_code(&ctx, vcpu))
         return;
     if (is_kernel_text(instr_pointer(&ctx)))
-        if (print_stack(&ctx, vcpu, guest_word_size))
+        if ( print_stack(&ctx, vcpu, guest_word_size,
+                         stack_pointer(&ctx)) )
             return;
 #endif
 }
@@ -994,6 +1003,8 @@ static void usage(void)
 #ifndef NO_TRANSLATION
     printf("  -m maddr, --memory=maddr\n");
     printf("                     dump memory at maddr.\n");
+    printf("  -d daddr, --dump-as-stack=daddr\n");
+    printf("                     dump memory as a stack at daddr.\n");
 #endif
 }
 
@@ -1004,7 +1015,7 @@ int main(int argc, char **argv)
     const char *prog = argv[0];
     static const char *sopts = "fs:hak:SCn:b:l:Dt"
 #ifndef NO_TRANSLATION
-        "m:"
+        "m:d:"
 #endif
         ;
     static const struct option lopts[] = {
@@ -1017,6 +1028,7 @@ int main(int argc, char **argv)
         {"tag-stack-dump", 0, NULL, 't'},
 #ifndef NO_TRANSLATION
         {"memory", 1, NULL, 'm'},
+        {"dump-as-stack", 1, NULL, 'd'},
 #endif
         {"bytes-per-line", 1, NULL, 'b'},
         {"lines", 1, NULL, 'l'},
@@ -1103,6 +1115,11 @@ int main(int argc, char **argv)
             xenctx.do_memory = 1;
             do_default = 0;
             break;
+        case 'd':
+            xenctx.stk_addr = strtoull(optarg, NULL, 0);
+            xenctx.do_stack = 1;
+            do_default = 0;
+            break;
 #endif
         case 'h':
             usage();
@@ -1120,6 +1137,16 @@ int main(int argc, char **argv)
         exit(-1);
     }
 
+#ifndef NO_TRANSLATION
+    if ( xenctx.frame_ptrs && xenctx.do_stack )
+    {
+        fprintf(stderr,
+                "%s: both --frame-pointers and --dump-as-stack is not supported\n",
+                prog);
+        exit(-1);
+    }
+#endif
+
     xenctx.domid = atoi(argv[0]);
     if (xenctx.domid==0) {
             fprintf(stderr, "cannot trace dom0\n");
@@ -1166,10 +1193,17 @@ int main(int argc, char **argv)
     if ( xenctx.do_memory )
     {
         dump_ctx(vcpu);
-        if (xenctx.all_vcpus)
+        if ( xenctx.do_stack || xenctx.all_vcpus )
             printf("\n");
     }
     xenctx.do_memory = 0;
+    if ( xenctx.do_stack )
+    {
+        dump_ctx(vcpu);
+        if ( xenctx.all_vcpus )
+            printf("\n");
+    }
+    xenctx.do_stack = 0;
 #endif
     if (xenctx.all_vcpus)
         dump_all_vcpus();
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:39:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:39: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 1WWDi2-0006ef-Vz; Fri, 04 Apr 2014 23:39:42 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDi2-0006eS-1J
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:42 +0000
Received: from [193.109.254.147:23288] by server-2.bemta-14.messagelabs.com id
	08/CF-21684-DB24F335; Fri, 04 Apr 2014 23:39:41 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1396654778!6432771!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16088 invoked from network); 4 Apr 2014 23:39:39 -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;
	4 Apr 2014 23:39:39 -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 1WWDhy-0002z0-Q3
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhy-0008Ki-Na
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:38 +0000
Date: Fri, 04 Apr 2014 23:39:38 +0000
Message-Id: <E1WWDhy-0008Ki-Na@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add -d (--dump-as-stack)
	<daddr> option to dump memory at daddr as a stack.
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 3dfff09dbe2f5e3b4e38c2ff684e0e7567247393
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:03 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: Add -d (--dump-as-stack) <daddr> option to dump memory at daddr as a stack.
    
    Also switch from read_stack_word to read_mem_word since the provided
    address may not be aligned.
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   66 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 50 insertions(+), 16 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index aa0c9d1..3773b34 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -72,7 +72,9 @@ static struct xenctx {
     int all_vcpus;
 #ifndef NO_TRANSLATION
     guest_word_t mem_addr;
+    guest_word_t stk_addr;
     int do_memory;
+    int do_stack;
 #endif
     int self_paused;
     xc_dominfo_t dominfo;
@@ -773,9 +775,7 @@ static int print_code(vcpu_guest_context_any_t *ctx, int vcpu)
         else
             printf("%02x ", *c);
     }
-    printf("\n");
-
-    printf("\n");
+    printf("\n\n\n");
     return 0;
 }
 
@@ -785,9 +785,10 @@ static void print_stack_addr(guest_word_t addr, int width)
     printf(": ");
 }
 
-static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
+static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
+                       guest_word_t stk_addr_start)
 {
-    guest_word_t stack = stack_pointer(ctx);
+    guest_word_t stack = stk_addr_start;
     guest_word_t stack_limit;
     guest_word_t frame;
     guest_word_t word;
@@ -799,7 +800,6 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     stack_limit = ((stack_pointer(ctx) + XC_PAGE_SIZE)
                    & ~((guest_word_t) XC_PAGE_SIZE - 1))
                    + (xenctx.nr_stack_pages - 1) * XC_PAGE_SIZE;
-    printf("\n");
     if ( xenctx.lines )
     {
         printf("Stack:\n");
@@ -811,12 +811,15 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
         printf("Stack Trace:\n");
     else
         printf("Call Trace:\n");
-    printf("%*s  %c [<", width*2, "", xenctx.stack_trace ? '*' : ' ');
-    print_stack_word(instr_pointer(ctx), width);
-    printf(">]");
+    if ( !xenctx.do_stack )
+    {
+        printf("%*s  %c [<", width*2, "", xenctx.stack_trace ? '*' : ' ');
+        print_stack_word(instr_pointer(ctx), width);
+        printf(">]");
 
-    print_symbol(instr_pointer(ctx));
-    printf(" <--\n");
+        print_symbol(instr_pointer(ctx));
+        printf(" <--\n");
+    }
     if (xenctx.frame_ptrs) {
         stack = stack_pointer(ctx);
         frame = frame_pointer(ctx);
@@ -863,12 +866,12 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
             }
         }
     } else {
-        stack = stack_pointer(ctx);
+        stack = stk_addr_start;
         while(stack < stack_limit) {
             p = map_page(ctx, vcpu, stack);
             if (!p)
                 return -1;
-            word = read_stack_word(p, width);
+            word = read_mem_word(ctx, vcpu, stack, width);
             if (is_kernel_text(word)) {
                 print_stack_addr(stack, width);
                 printf("  [<");
@@ -931,13 +934,19 @@ static void dump_ctx(int vcpu)
         print_mem(&ctx, vcpu, guest_word_size, xenctx.mem_addr);
         return;
     }
+    if ( xenctx.do_stack )
+    {
+        print_stack(&ctx, vcpu, guest_word_size, xenctx.stk_addr);
+        return;
+    }
 #endif
     print_ctx(&ctx);
 #ifndef NO_TRANSLATION
     if (print_code(&ctx, vcpu))
         return;
     if (is_kernel_text(instr_pointer(&ctx)))
-        if (print_stack(&ctx, vcpu, guest_word_size))
+        if ( print_stack(&ctx, vcpu, guest_word_size,
+                         stack_pointer(&ctx)) )
             return;
 #endif
 }
@@ -994,6 +1003,8 @@ static void usage(void)
 #ifndef NO_TRANSLATION
     printf("  -m maddr, --memory=maddr\n");
     printf("                     dump memory at maddr.\n");
+    printf("  -d daddr, --dump-as-stack=daddr\n");
+    printf("                     dump memory as a stack at daddr.\n");
 #endif
 }
 
@@ -1004,7 +1015,7 @@ int main(int argc, char **argv)
     const char *prog = argv[0];
     static const char *sopts = "fs:hak:SCn:b:l:Dt"
 #ifndef NO_TRANSLATION
-        "m:"
+        "m:d:"
 #endif
         ;
     static const struct option lopts[] = {
@@ -1017,6 +1028,7 @@ int main(int argc, char **argv)
         {"tag-stack-dump", 0, NULL, 't'},
 #ifndef NO_TRANSLATION
         {"memory", 1, NULL, 'm'},
+        {"dump-as-stack", 1, NULL, 'd'},
 #endif
         {"bytes-per-line", 1, NULL, 'b'},
         {"lines", 1, NULL, 'l'},
@@ -1103,6 +1115,11 @@ int main(int argc, char **argv)
             xenctx.do_memory = 1;
             do_default = 0;
             break;
+        case 'd':
+            xenctx.stk_addr = strtoull(optarg, NULL, 0);
+            xenctx.do_stack = 1;
+            do_default = 0;
+            break;
 #endif
         case 'h':
             usage();
@@ -1120,6 +1137,16 @@ int main(int argc, char **argv)
         exit(-1);
     }
 
+#ifndef NO_TRANSLATION
+    if ( xenctx.frame_ptrs && xenctx.do_stack )
+    {
+        fprintf(stderr,
+                "%s: both --frame-pointers and --dump-as-stack is not supported\n",
+                prog);
+        exit(-1);
+    }
+#endif
+
     xenctx.domid = atoi(argv[0]);
     if (xenctx.domid==0) {
             fprintf(stderr, "cannot trace dom0\n");
@@ -1166,10 +1193,17 @@ int main(int argc, char **argv)
     if ( xenctx.do_memory )
     {
         dump_ctx(vcpu);
-        if (xenctx.all_vcpus)
+        if ( xenctx.do_stack || xenctx.all_vcpus )
             printf("\n");
     }
     xenctx.do_memory = 0;
+    if ( xenctx.do_stack )
+    {
+        dump_ctx(vcpu);
+        if ( xenctx.all_vcpus )
+            printf("\n");
+    }
+    xenctx.do_stack = 0;
 #endif
     if (xenctx.all_vcpus)
         dump_all_vcpus();
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40:05 +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 1WWDiF-0006gh-2Z; Fri, 04 Apr 2014 23:39:55 +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 1WWDiD-0006gR-3r
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:53 +0000
Received: from [85.158.143.35:30158] by server-1.bemta-4.messagelabs.com id
	F5/6C-09853-8C24F335; Fri, 04 Apr 2014 23:39:52 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1396654789!7117893!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13988 invoked from network); 4 Apr 2014 23:39:50 -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;
	4 Apr 2014 23:39:50 -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 1WWDi8-0002z9-Vz
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:48 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDi8-0008Lb-Tb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:48 +0000
Date: Fri, 04 Apr 2014 23:39:48 +0000
Message-Id: <E1WWDi8-0008Lb-Tb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: change is_kernel_text() into
	kernel_addr().
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 39b63b8b28f25d59db034d953aa91f98b5e94ae6
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:04 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: change is_kernel_text() into kernel_addr().
    
    A new enum has been added to allow the caller to determine if this
    kernel address is a text or data address.  This is currenlty not
    used, but will be in the next patch.
    
    Add both _end and __bss_stop as kernel_end.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   75 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 56 insertions(+), 19 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 3773b34..6f6c3a3 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -34,6 +34,15 @@
 #define DEFAULT_BYTES_PER_LINE 32
 #define DEFAULT_LINES 5
 
+/* Note: the order of these matter.
+ * NOT_KERNEL_ADDR must be < both KERNEL_DATA_ADDR and KERNEL_TEXT_ADDR.
+ * KERNEL_DATA_ADDR must be < KERNEL_TEXT_ADDR. */
+typedef enum type_of_addr_ {
+    NOT_KERNEL_ADDR,
+    KERNEL_DATA_ADDR,
+    KERNEL_TEXT_ADDR,
+} type_of_addr;
+
 #if defined (__i386__) || defined (__x86_64__)
 typedef unsigned long long guest_word_t;
 #define FMT_32B_WORD "%08llx"
@@ -76,6 +85,7 @@ static struct xenctx {
     int do_memory;
     int do_stack;
 #endif
+    int kernel_start_set;
     int self_paused;
     xc_dominfo_t dominfo;
 } xenctx;
@@ -87,31 +97,52 @@ struct symbol {
 } *symbol_table = NULL;
 
 guest_word_t kernel_stext, kernel_etext, kernel_sinittext, kernel_einittext, kernel_hypercallpage;
+guest_word_t kernel_text;
 
 #if defined (__i386__) || defined (__arm__)
 unsigned long long kernel_start = 0xc0000000;
+unsigned long long kernel_end = 0xffffffffULL;
 #elif defined (__x86_64__)
 unsigned long long kernel_start = 0xffffffff80000000UL;
+unsigned long long kernel_end = 0xffffffffffffffffUL;
 #elif defined (__aarch64__)
 unsigned long long kernel_start = 0xffffff8000000000UL;
+unsigned long long kernel_end = 0xffffffffffffffffULL;
 #endif
 
-static int is_kernel_text(guest_word_t addr)
+static type_of_addr kernel_addr(guest_word_t addr)
 {
-    if (symbol_table == NULL)
-        return (addr > kernel_start);
+    if ( symbol_table == NULL )
+    {
+        if ( addr > kernel_start )
+            return KERNEL_TEXT_ADDR;
+        else
+            return NOT_KERNEL_ADDR;
+    }
 
     if (addr >= kernel_stext &&
         addr <= kernel_etext)
-        return 1;
+        return KERNEL_TEXT_ADDR;
     if ( kernel_hypercallpage &&
          (addr >= kernel_hypercallpage &&
           addr <= kernel_hypercallpage + 4096) )
-        return 1;
+        return KERNEL_TEXT_ADDR;
     if (addr >= kernel_sinittext &&
         addr <= kernel_einittext)
-        return 1;
-    return 0;
+        return KERNEL_TEXT_ADDR;
+    if ( xenctx.kernel_start_set )
+    {
+        if ( addr > kernel_start )
+            return KERNEL_TEXT_ADDR;
+    } else {
+        if ( addr >= kernel_text &&
+             addr <= kernel_end )
+            return KERNEL_DATA_ADDR;
+        if ( addr >= kernel_start &&
+             addr <= kernel_end )
+            return KERNEL_TEXT_ADDR;
+    }
+    return NOT_KERNEL_ADDR;
 }
 
 #if 0
@@ -165,11 +196,11 @@ static struct symbol *lookup_symbol(guest_word_t address)
     return s->next && s->next->address <= address ? s->next : s;
 }
 
-static void print_symbol(guest_word_t addr)
+static void print_symbol(guest_word_t addr, type_of_addr type)
 {
     struct symbol *s;
 
-    if (!is_kernel_text(addr))
+    if ( kernel_addr(addr) < type )
         return;
 
     s = lookup_symbol(addr);
@@ -249,6 +280,10 @@ static void read_symbol_table(const char *symtab)
             kernel_stext = address;
         else if (strcmp(p, "_etext") == 0)
             kernel_etext = address;
+        else if ( strcmp(p, "_text") == 0 )
+            kernel_text = address;
+        else if ( strcmp(p, "_end") == 0 || strcmp(p, "__bss_stop") == 0 )
+            kernel_end = address;
         else if (strcmp(p, "_sinittext") == 0)
             kernel_sinittext = address;
         else if (strcmp(p, "_einittext") == 0)
@@ -320,7 +355,7 @@ static void print_ctx_32(vcpu_guest_context_x86_32_t *ctx)
     struct cpu_user_regs_x86_32 *regs = &ctx->user_regs;
 
     printf("cs:eip: %04x:%08x", regs->cs, regs->eip);
-    print_symbol(regs->eip);
+    print_symbol(regs->eip, KERNEL_TEXT_ADDR);
     print_flags(regs->eflags);
     printf("ss:esp: %04x:%08x\n", regs->ss, regs->esp);
 
@@ -349,7 +384,7 @@ static void print_ctx_32on64(vcpu_guest_context_x86_64_t *ctx)
     struct cpu_user_regs_x86_64 *regs = &ctx->user_regs;
 
     printf("cs:eip: %04x:%08x", regs->cs, (uint32_t)regs->eip);
-    print_symbol((uint32_t)regs->eip);
+    print_symbol((uint32_t)regs->eip, KERNEL_TEXT_ADDR);
     print_flags((uint32_t)regs->eflags);
     printf("ss:esp: %04x:%08x\n", regs->ss, (uint32_t)regs->esp);
 
@@ -378,7 +413,7 @@ static void print_ctx_64(vcpu_guest_context_x86_64_t *ctx)
     struct cpu_user_regs_x86_64 *regs = &ctx->user_regs;
 
     printf("rip: %016"PRIx64, regs->rip);
-    print_symbol(regs->rip);
+    print_symbol(regs->rip, KERNEL_TEXT_ADDR);
     print_flags(regs->rflags);
     printf("rsp: %016"PRIx64"\n", regs->rsp);
 
@@ -476,7 +511,7 @@ static void print_ctx_32(vcpu_guest_context_t *ctx)
     vcpu_guest_core_regs_t *regs = &ctx->user_regs;
 
     printf("PC:       %08"PRIx32, regs->pc32);
-    print_symbol(regs->pc32);
+    print_symbol(regs->pc32, KERNEL_TEXT_ADDR);
     printf("\n");
     printf("CPSR:     %08"PRIx32"\n", regs->cpsr);
     printf("USR:               SP:%08"PRIx32" LR:%08"PRIx32"\n",
@@ -528,7 +563,7 @@ static void print_ctx_64(vcpu_guest_context_t *ctx)
     vcpu_guest_core_regs_t *regs = &ctx->user_regs;
 
     printf("PC:       %016"PRIx64, regs->pc64);
-    print_symbol(regs->pc64);
+    print_symbol(regs->pc64, KERNEL_TEXT_ADDR);
     printf("\n");
 
     printf("LR:       %016"PRIx64"\n", regs->x30);
@@ -817,7 +852,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
         print_stack_word(instr_pointer(ctx), width);
         printf(">]");
 
-        print_symbol(instr_pointer(ctx));
+        print_symbol(instr_pointer(ctx), KERNEL_TEXT_ADDR);
         printf(" <--\n");
     }
     if (xenctx.frame_ptrs) {
@@ -860,7 +895,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
                 printf("%c [<", xenctx.stack_trace ? '|' : ' ');
                 print_stack_word(word, width);
                 printf(">]");
-                print_symbol(word);
+                print_symbol(word, KERNEL_TEXT_ADDR);
                 printf("\n");
                 stack += width;
             }
@@ -872,12 +907,13 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
             if (!p)
                 return -1;
             word = read_mem_word(ctx, vcpu, stack, width);
-            if (is_kernel_text(word)) {
+            if ( kernel_addr(word) >= KERNEL_TEXT_ADDR )
+            {
                 print_stack_addr(stack, width);
                 printf("  [<");
                 print_stack_word(word, width);
                 printf(">]");
-                print_symbol(word);
+                print_symbol(word, KERNEL_TEXT_ADDR);
                 printf("\n");
             } else if (xenctx.stack_trace) {
                 print_stack_addr(stack, width);
@@ -944,7 +980,7 @@ static void dump_ctx(int vcpu)
 #ifndef NO_TRANSLATION
     if (print_code(&ctx, vcpu))
         return;
-    if (is_kernel_text(instr_pointer(&ctx)))
+    if ( kernel_addr(instr_pointer(&ctx)) >= KERNEL_TEXT_ADDR )
         if ( print_stack(&ctx, vcpu, guest_word_size,
                          stack_pointer(&ctx)) )
             return;
@@ -1108,6 +1144,7 @@ int main(int argc, char **argv)
             break;
         case 'k':
             kernel_start = strtoull(optarg, NULL, 0);
+            xenctx.kernel_start_set = 1;
             break;
 #ifndef NO_TRANSLATION
         case 'm':
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40:05 +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 1WWDiF-0006gh-2Z; Fri, 04 Apr 2014 23:39:55 +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 1WWDiD-0006gR-3r
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:53 +0000
Received: from [85.158.143.35:30158] by server-1.bemta-4.messagelabs.com id
	F5/6C-09853-8C24F335; Fri, 04 Apr 2014 23:39:52 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1396654789!7117893!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13988 invoked from network); 4 Apr 2014 23:39:50 -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;
	4 Apr 2014 23:39:50 -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 1WWDi8-0002z9-Vz
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:48 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDi8-0008Lb-Tb
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:48 +0000
Date: Fri, 04 Apr 2014 23:39:48 +0000
Message-Id: <E1WWDi8-0008Lb-Tb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: change is_kernel_text() into
	kernel_addr().
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 39b63b8b28f25d59db034d953aa91f98b5e94ae6
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:04 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: change is_kernel_text() into kernel_addr().
    
    A new enum has been added to allow the caller to determine if this
    kernel address is a text or data address.  This is currenlty not
    used, but will be in the next patch.
    
    Add both _end and __bss_stop as kernel_end.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   75 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 56 insertions(+), 19 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 3773b34..6f6c3a3 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -34,6 +34,15 @@
 #define DEFAULT_BYTES_PER_LINE 32
 #define DEFAULT_LINES 5
 
+/* Note: the order of these matter.
+ * NOT_KERNEL_ADDR must be < both KERNEL_DATA_ADDR and KERNEL_TEXT_ADDR.
+ * KERNEL_DATA_ADDR must be < KERNEL_TEXT_ADDR. */
+typedef enum type_of_addr_ {
+    NOT_KERNEL_ADDR,
+    KERNEL_DATA_ADDR,
+    KERNEL_TEXT_ADDR,
+} type_of_addr;
+
 #if defined (__i386__) || defined (__x86_64__)
 typedef unsigned long long guest_word_t;
 #define FMT_32B_WORD "%08llx"
@@ -76,6 +85,7 @@ static struct xenctx {
     int do_memory;
     int do_stack;
 #endif
+    int kernel_start_set;
     int self_paused;
     xc_dominfo_t dominfo;
 } xenctx;
@@ -87,31 +97,52 @@ struct symbol {
 } *symbol_table = NULL;
 
 guest_word_t kernel_stext, kernel_etext, kernel_sinittext, kernel_einittext, kernel_hypercallpage;
+guest_word_t kernel_text;
 
 #if defined (__i386__) || defined (__arm__)
 unsigned long long kernel_start = 0xc0000000;
+unsigned long long kernel_end = 0xffffffffULL;
 #elif defined (__x86_64__)
 unsigned long long kernel_start = 0xffffffff80000000UL;
+unsigned long long kernel_end = 0xffffffffffffffffUL;
 #elif defined (__aarch64__)
 unsigned long long kernel_start = 0xffffff8000000000UL;
+unsigned long long kernel_end = 0xffffffffffffffffULL;
 #endif
 
-static int is_kernel_text(guest_word_t addr)
+static type_of_addr kernel_addr(guest_word_t addr)
 {
-    if (symbol_table == NULL)
-        return (addr > kernel_start);
+    if ( symbol_table == NULL )
+    {
+        if ( addr > kernel_start )
+            return KERNEL_TEXT_ADDR;
+        else
+            return NOT_KERNEL_ADDR;
+    }
 
     if (addr >= kernel_stext &&
         addr <= kernel_etext)
-        return 1;
+        return KERNEL_TEXT_ADDR;
     if ( kernel_hypercallpage &&
          (addr >= kernel_hypercallpage &&
           addr <= kernel_hypercallpage + 4096) )
-        return 1;
+        return KERNEL_TEXT_ADDR;
     if (addr >= kernel_sinittext &&
         addr <= kernel_einittext)
-        return 1;
-    return 0;
+        return KERNEL_TEXT_ADDR;
+    if ( xenctx.kernel_start_set )
+    {
+        if ( addr > kernel_start )
+            return KERNEL_TEXT_ADDR;
+    } else {
+        if ( addr >= kernel_text &&
+             addr <= kernel_end )
+            return KERNEL_DATA_ADDR;
+        if ( addr >= kernel_start &&
+             addr <= kernel_end )
+            return KERNEL_TEXT_ADDR;
+    }
+    return NOT_KERNEL_ADDR;
 }
 
 #if 0
@@ -165,11 +196,11 @@ static struct symbol *lookup_symbol(guest_word_t address)
     return s->next && s->next->address <= address ? s->next : s;
 }
 
-static void print_symbol(guest_word_t addr)
+static void print_symbol(guest_word_t addr, type_of_addr type)
 {
     struct symbol *s;
 
-    if (!is_kernel_text(addr))
+    if ( kernel_addr(addr) < type )
         return;
 
     s = lookup_symbol(addr);
@@ -249,6 +280,10 @@ static void read_symbol_table(const char *symtab)
             kernel_stext = address;
         else if (strcmp(p, "_etext") == 0)
             kernel_etext = address;
+        else if ( strcmp(p, "_text") == 0 )
+            kernel_text = address;
+        else if ( strcmp(p, "_end") == 0 || strcmp(p, "__bss_stop") == 0 )
+            kernel_end = address;
         else if (strcmp(p, "_sinittext") == 0)
             kernel_sinittext = address;
         else if (strcmp(p, "_einittext") == 0)
@@ -320,7 +355,7 @@ static void print_ctx_32(vcpu_guest_context_x86_32_t *ctx)
     struct cpu_user_regs_x86_32 *regs = &ctx->user_regs;
 
     printf("cs:eip: %04x:%08x", regs->cs, regs->eip);
-    print_symbol(regs->eip);
+    print_symbol(regs->eip, KERNEL_TEXT_ADDR);
     print_flags(regs->eflags);
     printf("ss:esp: %04x:%08x\n", regs->ss, regs->esp);
 
@@ -349,7 +384,7 @@ static void print_ctx_32on64(vcpu_guest_context_x86_64_t *ctx)
     struct cpu_user_regs_x86_64 *regs = &ctx->user_regs;
 
     printf("cs:eip: %04x:%08x", regs->cs, (uint32_t)regs->eip);
-    print_symbol((uint32_t)regs->eip);
+    print_symbol((uint32_t)regs->eip, KERNEL_TEXT_ADDR);
     print_flags((uint32_t)regs->eflags);
     printf("ss:esp: %04x:%08x\n", regs->ss, (uint32_t)regs->esp);
 
@@ -378,7 +413,7 @@ static void print_ctx_64(vcpu_guest_context_x86_64_t *ctx)
     struct cpu_user_regs_x86_64 *regs = &ctx->user_regs;
 
     printf("rip: %016"PRIx64, regs->rip);
-    print_symbol(regs->rip);
+    print_symbol(regs->rip, KERNEL_TEXT_ADDR);
     print_flags(regs->rflags);
     printf("rsp: %016"PRIx64"\n", regs->rsp);
 
@@ -476,7 +511,7 @@ static void print_ctx_32(vcpu_guest_context_t *ctx)
     vcpu_guest_core_regs_t *regs = &ctx->user_regs;
 
     printf("PC:       %08"PRIx32, regs->pc32);
-    print_symbol(regs->pc32);
+    print_symbol(regs->pc32, KERNEL_TEXT_ADDR);
     printf("\n");
     printf("CPSR:     %08"PRIx32"\n", regs->cpsr);
     printf("USR:               SP:%08"PRIx32" LR:%08"PRIx32"\n",
@@ -528,7 +563,7 @@ static void print_ctx_64(vcpu_guest_context_t *ctx)
     vcpu_guest_core_regs_t *regs = &ctx->user_regs;
 
     printf("PC:       %016"PRIx64, regs->pc64);
-    print_symbol(regs->pc64);
+    print_symbol(regs->pc64, KERNEL_TEXT_ADDR);
     printf("\n");
 
     printf("LR:       %016"PRIx64"\n", regs->x30);
@@ -817,7 +852,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
         print_stack_word(instr_pointer(ctx), width);
         printf(">]");
 
-        print_symbol(instr_pointer(ctx));
+        print_symbol(instr_pointer(ctx), KERNEL_TEXT_ADDR);
         printf(" <--\n");
     }
     if (xenctx.frame_ptrs) {
@@ -860,7 +895,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
                 printf("%c [<", xenctx.stack_trace ? '|' : ' ');
                 print_stack_word(word, width);
                 printf(">]");
-                print_symbol(word);
+                print_symbol(word, KERNEL_TEXT_ADDR);
                 printf("\n");
                 stack += width;
             }
@@ -872,12 +907,13 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
             if (!p)
                 return -1;
             word = read_mem_word(ctx, vcpu, stack, width);
-            if (is_kernel_text(word)) {
+            if ( kernel_addr(word) >= KERNEL_TEXT_ADDR )
+            {
                 print_stack_addr(stack, width);
                 printf("  [<");
                 print_stack_word(word, width);
                 printf(">]");
-                print_symbol(word);
+                print_symbol(word, KERNEL_TEXT_ADDR);
                 printf("\n");
             } else if (xenctx.stack_trace) {
                 print_stack_addr(stack, width);
@@ -944,7 +980,7 @@ static void dump_ctx(int vcpu)
 #ifndef NO_TRANSLATION
     if (print_code(&ctx, vcpu))
         return;
-    if (is_kernel_text(instr_pointer(&ctx)))
+    if ( kernel_addr(instr_pointer(&ctx)) >= KERNEL_TEXT_ADDR )
         if ( print_stack(&ctx, vcpu, guest_word_size,
                          stack_pointer(&ctx)) )
             return;
@@ -1108,6 +1144,7 @@ int main(int argc, char **argv)
             break;
         case 'k':
             kernel_start = strtoull(optarg, NULL, 0);
+            xenctx.kernel_start_set = 1;
             break;
 #ifndef NO_TRANSLATION
         case 'm':
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDiO-0006hg-5B; Fri, 04 Apr 2014 23:40:04 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiM-0006hS-3a
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:03 +0000
Received: from [85.158.139.211:4320] by server-6.bemta-5.messagelabs.com id
	CA/54-19576-1D24F335; Fri, 04 Apr 2014 23:40:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1396654799!3795338!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9606 invoked from network); 4 Apr 2014 23:40:00 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:00 -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 1WWDiJ-0002zF-8R
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:59 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiJ-0008Lx-7O
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:59 +0000
Date: Fri, 04 Apr 2014 23:39:59 +0000
Message-Id: <E1WWDiJ-0008Lx-7O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add conversion of more
	registers to 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

commit 069dfba0384a798c7948cc600024172ec800df09
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:05 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: Add conversion of more registers to symbols
    
    For example can change:
     gs: 0000 @ ffffffff803ac000/0000000000000000
    to
     gs: 0000 @ ffffffff803ac000/0000000000000000 boot_cpu_pda/
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   47 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 6f6c3a3..59b2f1a 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -44,6 +44,8 @@ typedef enum type_of_addr_ {
 } type_of_addr;
 
 #if defined (__i386__) || defined (__x86_64__)
+static const uint64_t cr_reg_mask[5] = { [2] = ~UINT64_C(0) };
+static const uint64_t dr_reg_mask[8] = { [0 ... 3] = ~UINT64_C(0) };
 typedef unsigned long long guest_word_t;
 #define FMT_32B_WORD "%08llx"
 #define FMT_64B_WORD "%016llx"
@@ -336,17 +338,29 @@ static void print_flags(uint64_t flags)
     printf("\n");
 }
 
-static void print_special(void *regs, const char *name, unsigned int mask, int width)
+static void print_special(void *regs, const char *name, unsigned int mask,
+                          const uint64_t reg_is_addr_mask[], int width)
 {
     unsigned int i;
 
     printf("\n");
     for (i = 0; mask; mask >>= 1, ++i)
         if (mask & 1) {
-            if (width == 4)
-                printf("%s%u: %08"PRIx32"\n", name, i, ((uint32_t *) regs)[i]);
+            if ( width == 4 )
+            {
+                printf("%s%u: %08"PRIx32, name, i, ((uint32_t *) regs)[i]);
+                if ( reg_is_addr_mask[i] )
+                    print_symbol(reg_is_addr_mask[i] & ((uint32_t *) regs)[i],
+                                 KERNEL_DATA_ADDR);
+            }
             else
-                printf("%s%u: %08"PRIx64"\n", name, i, ((uint64_t *) regs)[i]);
+            {
+                printf("%s%u: %016"PRIx64, name, i, ((uint64_t *) regs)[i]);
+                if ( reg_is_addr_mask[i] )
+                    print_symbol(reg_is_addr_mask[i] & ((uint64_t *) regs)[i],
+                                 KERNEL_DATA_ADDR);
+            }
+            printf("\n");
         }
 }
 
@@ -374,8 +388,8 @@ static void print_ctx_32(vcpu_guest_context_x86_32_t *ctx)
     printf(" gs:     %04x\n", regs->gs);
 
     if (xenctx.disp_all) {
-        print_special(ctx->ctrlreg, "cr", 0x1d, 4);
-        print_special(ctx->debugreg, "dr", 0xcf, 4);
+        print_special(ctx->ctrlreg, "cr", 0x1d, cr_reg_mask, 4);
+        print_special(ctx->debugreg, "dr", 0xcf, dr_reg_mask, 4);
     }
 }
 
@@ -403,8 +417,8 @@ static void print_ctx_32on64(vcpu_guest_context_x86_64_t *ctx)
     printf(" gs:     %04x\n", regs->gs);
 
     if (xenctx.disp_all) {
-        print_special(ctx->ctrlreg, "cr", 0x1d, 4);
-        print_special(ctx->debugreg, "dr", 0xcf, 4);
+        print_special(ctx->ctrlreg, "cr", 0x1d, cr_reg_mask, 4);
+        print_special(ctx->debugreg, "dr", 0xcf, dr_reg_mask, 4);
     }
 }
 
@@ -442,13 +456,22 @@ static void print_ctx_64(vcpu_guest_context_x86_64_t *ctx)
     printf(" ds: %04x\t", regs->ds);
     printf(" es: %04x\n", regs->es);
 
-    printf(" fs: %04x @ %016"PRIx64"\n", regs->fs, ctx->fs_base);
-    printf(" gs: %04x @ %016"PRIx64"/%016"PRIx64"\n", regs->gs,
+    printf(" fs: %04x @ %016"PRIx64, regs->fs, ctx->fs_base);
+    print_symbol(ctx->fs_base, KERNEL_DATA_ADDR);
+    printf("\n");
+    printf(" gs: %04x @ %016"PRIx64"/%016"PRIx64, regs->gs,
            ctx->gs_base_kernel, ctx->gs_base_user);
+    if ( symbol_table )
+    {
+        print_symbol(ctx->gs_base_kernel, KERNEL_DATA_ADDR);
+        printf("/");
+        print_symbol(ctx->gs_base_user, KERNEL_DATA_ADDR);
+    }
+    printf("\n");
 
     if (xenctx.disp_all) {
-        print_special(ctx->ctrlreg, "cr", 0x1d, 8);
-        print_special(ctx->debugreg, "dr", 0xcf, 8);
+        print_special(ctx->ctrlreg, "cr", 0x1d, cr_reg_mask, 8);
+        print_special(ctx->debugreg, "dr", 0xcf, dr_reg_mask, 8);
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDiP-0006iI-9o; Fri, 04 Apr 2014 23:40:05 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiN-0006hT-Bs
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:04 +0000
Received: from [193.109.254.147:54814] by server-7.bemta-14.messagelabs.com id
	6A/1E-17726-2D24F335; Fri, 04 Apr 2014 23:40:02 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1396654801!6412645!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12563 invoked from network); 4 Apr 2014 23:40:02 -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;
	4 Apr 2014 23:40:02 -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 1WWDhJ-0002yA-Vy
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhJ-0008Iz-Qr
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:57 +0000
Date: Fri, 04 Apr 2014 23:38:57 +0000
Message-Id: <E1WWDhJ-0008Iz-Qr@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: More info on failed to map
	page.
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 ef81fc0bc00e2f86c25dd01ff33f9abc964da56f
Author:     Don Slutz <Don@CloudSwitch.com>
AuthorDate: Thu Apr 3 15:06:59 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: More info on failed to map page.
    
    Also output an extra new line since we may be in the middle of output.
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 tools/xentrace/xenctx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index eb30577..4bb5507 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -618,7 +618,7 @@ static void *map_page(vcpu_guest_context_any_t *ctx, int vcpu, guest_word_t virt
     mapped = xc_map_foreign_range(xenctx.xc_handle, xenctx.domid, XC_PAGE_SIZE, PROT_READ, mfn);
 
     if (mapped == NULL) {
-        fprintf(stderr, "failed to map page.\n");
+        fprintf(stderr, "\nfailed to map page for "FMT_32B_WORD".\n", virt);
         return NULL;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDiQ-0006iw-Cw; Fri, 04 Apr 2014 23:40:06 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiO-0006he-7e
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:04 +0000
Received: from [85.158.137.68:63783] by server-12.bemta-3.messagelabs.com id
	39/9A-14831-3D24F335; Fri, 04 Apr 2014 23:40:03 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1396654801!5156196!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7618 invoked from network); 4 Apr 2014 23:40:02 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:02 -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 1WWDgp-0002xq-6E
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgo-0008H5-V8
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:26 +0000
Date: Fri, 04 Apr 2014 23:38:26 +0000
Message-Id: <E1WWDgo-0008H5-V8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add command line option -D
	(--decode-as-ascii)
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 7308e895903afdc7477c4209ba51b375e5547721
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:56 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: Add command line option -D (--decode-as-ascii)
    
    If specified, output ascii version of stack also.
    
    This is not the default because the result exceeds 80 characters per line.
    
    Here is an example:
    
    Stack:
     ffffffff80048d19 0000000000200800 ffffffff803e7801 0000000000086800  .......... ......x>......h......
     0000000000000000 ffffffff80430720 ffffffff803e722f 80008e000010019c  ........ .C...../r>.............
     00000000ffffffff 0000000000000000 0000000000000000 0000000000200000  .......................... .....
     0000000000000000 0000000000000000                                    ................
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 1433056..82cf6b0 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -39,6 +39,7 @@ static struct xenctx {
     int nr_stack_pages;
     int bytes_per_line;
     int lines;
+    int decode_as_ascii;
     int all_vcpus;
     int self_paused;
     xc_dominfo_t dominfo;
@@ -670,6 +671,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     guest_word_t frame;
     guest_word_t word;
     guest_word_t *p;
+    guest_word_t ascii[MAX_BYTES_PER_LINE/4];
     int i;
 
     if ( width )
@@ -684,6 +686,9 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
         printf("Stack:\n");
         for (i = 1; i < xenctx.lines + 1 && stack < stack_limit; i++)
         {
+            int j = 0;
+            int k;
+
             while ( stack < stack_limit &&
                     stack < stack_pointer(ctx) + i * xenctx.bytes_per_line )
             {
@@ -691,10 +696,36 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 if ( !p )
                     return -1;
                 word = read_stack_word(p, width);
+                if ( xenctx.decode_as_ascii )
+                    ascii[j++] = word;
                 printf(" ");
                 print_stack_word(word, width);
                 stack += width;
             }
+            if ( xenctx.decode_as_ascii )
+            {
+                /*
+                 * Line up ascii output if less than bytes_per_line
+                 * were printed.
+                 */
+                for (k = j; k < xenctx.bytes_per_line / width; k++)
+                    printf(" %*s", width * 2, "");
+                printf("  ");
+                for (k = 0; k < j; k++)
+                {
+                    int l;
+                    unsigned char *bytep = (unsigned char *)&ascii[k];
+
+                    for (l = 0; l < width; l++)
+                    {
+                        if (isprint(*bytep))
+                            printf("%c", *bytep);
+                        else
+                            printf(".");
+                        bytep++;
+                    }
+                }
+            }
             printf("\n");
         }
         printf("\n");
@@ -868,19 +899,22 @@ static void usage(void)
            DEFAULT_LINES);
     printf("                     Can be specified as MAX.  Note: Fewer lines will be output\n");
     printf("                     if stack limit reached.\n");
+    printf("  -D, --decode-as-ascii\n");
+    printf("                     add a decode of Stack dump as ascii.\n");
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SCn:b:l:";
+    static const char *sopts = "fs:hak:SCn:b:l:D";
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
         {"frame-pointers", 0, NULL, 'f'},
         {"kernel-start", 1, NULL, 'k'},
         {"display-stack-pages", 0, NULL, 'n'},
+        {"decode-as-ascii", 0, NULL, 'D'},
         {"bytes-per-line", 1, NULL, 'b'},
         {"lines", 1, NULL, 'l'},
         {"all", 0, NULL, 'a'},
@@ -920,6 +954,9 @@ int main(int argc, char **argv)
                 exit(-1);
             }
             break;
+        case 'D':
+            xenctx.decode_as_ascii = 1;
+            break;
         case 'b':
             xenctx.bytes_per_line = strtol(optarg, NULL, 0);
             if ( xenctx.bytes_per_line < 4 ||
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDiY-0006ko-Fr; Fri, 04 Apr 2014 23:40:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiW-0006kT-Fd
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:12 +0000
Received: from [85.158.139.211:54106] by server-5.bemta-5.messagelabs.com id
	43/50-06049-BD24F335; Fri, 04 Apr 2014 23:40:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1396654809!5584726!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28953 invoked from network); 4 Apr 2014 23:40:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:11 -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 1WWDiT-0002zm-Ge
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiT-0008Md-D9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:09 +0000
Date: Fri, 04 Apr 2014 23:40:09 +0000
Message-Id: <E1WWDiT-0008Md-D9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add output of vcpu value and
	state for --all-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

commit f1e64a60fd151e39859ee8555b03b3c67d5b3a05
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:06 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: Add output of vcpu value and state for --all-vcpus
    
    This makes it easier to know which vcpu the registers belong to and
    when not all vcpus are online, which vcpu it is.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 59b2f1a..fa300b5 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -1019,7 +1019,13 @@ static void dump_all_vcpus(void)
         if ( xc_vcpu_getinfo(xenctx.xc_handle, xenctx.domid, vcpu, &vinfo) )
             continue;
         if ( vinfo.online )
+        {
+            printf("vcpu%d:\n", vcpu);
             dump_ctx(vcpu);
+            printf("\n");
+        }
+        else
+            printf("vcpu%d offline\n\n", vcpu);
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDiP-0006iI-9o; Fri, 04 Apr 2014 23:40:05 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiN-0006hT-Bs
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:04 +0000
Received: from [193.109.254.147:54814] by server-7.bemta-14.messagelabs.com id
	6A/1E-17726-2D24F335; Fri, 04 Apr 2014 23:40:02 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1396654801!6412645!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12563 invoked from network); 4 Apr 2014 23:40:02 -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;
	4 Apr 2014 23:40:02 -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 1WWDhJ-0002yA-Vy
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDhJ-0008Iz-Qr
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:57 +0000
Date: Fri, 04 Apr 2014 23:38:57 +0000
Message-Id: <E1WWDhJ-0008Iz-Qr@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: More info on failed to map
	page.
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 ef81fc0bc00e2f86c25dd01ff33f9abc964da56f
Author:     Don Slutz <Don@CloudSwitch.com>
AuthorDate: Thu Apr 3 15:06:59 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:07 2014 +0100

    xenctx: More info on failed to map page.
    
    Also output an extra new line since we may be in the middle of output.
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 tools/xentrace/xenctx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index eb30577..4bb5507 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -618,7 +618,7 @@ static void *map_page(vcpu_guest_context_any_t *ctx, int vcpu, guest_word_t virt
     mapped = xc_map_foreign_range(xenctx.xc_handle, xenctx.domid, XC_PAGE_SIZE, PROT_READ, mfn);
 
     if (mapped == NULL) {
-        fprintf(stderr, "failed to map page.\n");
+        fprintf(stderr, "\nfailed to map page for "FMT_32B_WORD".\n", virt);
         return NULL;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDiQ-0006iw-Cw; Fri, 04 Apr 2014 23:40:06 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiO-0006he-7e
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:04 +0000
Received: from [85.158.137.68:63783] by server-12.bemta-3.messagelabs.com id
	39/9A-14831-3D24F335; Fri, 04 Apr 2014 23:40:03 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1396654801!5156196!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7618 invoked from network); 4 Apr 2014 23:40:02 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:02 -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 1WWDgp-0002xq-6E
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:27 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDgo-0008H5-V8
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:38:26 +0000
Date: Fri, 04 Apr 2014 23:38:26 +0000
Message-Id: <E1WWDgo-0008H5-V8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add command line option -D
	(--decode-as-ascii)
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 7308e895903afdc7477c4209ba51b375e5547721
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:06:56 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:06 2014 +0100

    xenctx: Add command line option -D (--decode-as-ascii)
    
    If specified, output ascii version of stack also.
    
    This is not the default because the result exceeds 80 characters per line.
    
    Here is an example:
    
    Stack:
     ffffffff80048d19 0000000000200800 ffffffff803e7801 0000000000086800  .......... ......x>......h......
     0000000000000000 ffffffff80430720 ffffffff803e722f 80008e000010019c  ........ .C...../r>.............
     00000000ffffffff 0000000000000000 0000000000000000 0000000000200000  .......................... .....
     0000000000000000 0000000000000000                                    ................
    
    Signed-off-by: Don Slutz <Don@CloudSwitch.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 1433056..82cf6b0 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -39,6 +39,7 @@ static struct xenctx {
     int nr_stack_pages;
     int bytes_per_line;
     int lines;
+    int decode_as_ascii;
     int all_vcpus;
     int self_paused;
     xc_dominfo_t dominfo;
@@ -670,6 +671,7 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
     guest_word_t frame;
     guest_word_t word;
     guest_word_t *p;
+    guest_word_t ascii[MAX_BYTES_PER_LINE/4];
     int i;
 
     if ( width )
@@ -684,6 +686,9 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
         printf("Stack:\n");
         for (i = 1; i < xenctx.lines + 1 && stack < stack_limit; i++)
         {
+            int j = 0;
+            int k;
+
             while ( stack < stack_limit &&
                     stack < stack_pointer(ctx) + i * xenctx.bytes_per_line )
             {
@@ -691,10 +696,36 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
                 if ( !p )
                     return -1;
                 word = read_stack_word(p, width);
+                if ( xenctx.decode_as_ascii )
+                    ascii[j++] = word;
                 printf(" ");
                 print_stack_word(word, width);
                 stack += width;
             }
+            if ( xenctx.decode_as_ascii )
+            {
+                /*
+                 * Line up ascii output if less than bytes_per_line
+                 * were printed.
+                 */
+                for (k = j; k < xenctx.bytes_per_line / width; k++)
+                    printf(" %*s", width * 2, "");
+                printf("  ");
+                for (k = 0; k < j; k++)
+                {
+                    int l;
+                    unsigned char *bytep = (unsigned char *)&ascii[k];
+
+                    for (l = 0; l < width; l++)
+                    {
+                        if (isprint(*bytep))
+                            printf("%c", *bytep);
+                        else
+                            printf(".");
+                        bytep++;
+                    }
+                }
+            }
             printf("\n");
         }
         printf("\n");
@@ -868,19 +899,22 @@ static void usage(void)
            DEFAULT_LINES);
     printf("                     Can be specified as MAX.  Note: Fewer lines will be output\n");
     printf("                     if stack limit reached.\n");
+    printf("  -D, --decode-as-ascii\n");
+    printf("                     add a decode of Stack dump as ascii.\n");
 }
 
 int main(int argc, char **argv)
 {
     int ch;
     int ret;
-    static const char *sopts = "fs:hak:SCn:b:l:";
+    static const char *sopts = "fs:hak:SCn:b:l:D";
     static const struct option lopts[] = {
         {"stack-trace", 0, NULL, 'S'},
         {"symbol-table", 1, NULL, 's'},
         {"frame-pointers", 0, NULL, 'f'},
         {"kernel-start", 1, NULL, 'k'},
         {"display-stack-pages", 0, NULL, 'n'},
+        {"decode-as-ascii", 0, NULL, 'D'},
         {"bytes-per-line", 1, NULL, 'b'},
         {"lines", 1, NULL, 'l'},
         {"all", 0, NULL, 'a'},
@@ -920,6 +954,9 @@ int main(int argc, char **argv)
                 exit(-1);
             }
             break;
+        case 'D':
+            xenctx.decode_as_ascii = 1;
+            break;
         case 'b':
             xenctx.bytes_per_line = strtol(optarg, NULL, 0);
             if ( xenctx.bytes_per_line < 4 ||
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDiY-0006ko-Fr; Fri, 04 Apr 2014 23:40:14 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiW-0006kT-Fd
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:12 +0000
Received: from [85.158.139.211:54106] by server-5.bemta-5.messagelabs.com id
	43/50-06049-BD24F335; Fri, 04 Apr 2014 23:40:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1396654809!5584726!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28953 invoked from network); 4 Apr 2014 23:40:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:11 -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 1WWDiT-0002zm-Ge
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiT-0008Md-D9
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:09 +0000
Date: Fri, 04 Apr 2014 23:40:09 +0000
Message-Id: <E1WWDiT-0008Md-D9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add output of vcpu value and
	state for --all-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

commit f1e64a60fd151e39859ee8555b03b3c67d5b3a05
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:06 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: Add output of vcpu value and state for --all-vcpus
    
    This makes it easier to know which vcpu the registers belong to and
    when not all vcpus are online, which vcpu it is.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 59b2f1a..fa300b5 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -1019,7 +1019,13 @@ static void dump_all_vcpus(void)
         if ( xc_vcpu_getinfo(xenctx.xc_handle, xenctx.domid, vcpu, &vinfo) )
             continue;
         if ( vinfo.online )
+        {
+            printf("vcpu%d:\n", vcpu);
             dump_ctx(vcpu);
+            printf("\n");
+        }
+        else
+            printf("vcpu%d offline\n\n", vcpu);
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDiO-0006hg-5B; Fri, 04 Apr 2014 23:40:04 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiM-0006hS-3a
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:03 +0000
Received: from [85.158.139.211:4320] by server-6.bemta-5.messagelabs.com id
	CA/54-19576-1D24F335; Fri, 04 Apr 2014 23:40:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1396654799!3795338!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9606 invoked from network); 4 Apr 2014 23:40:00 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:00 -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 1WWDiJ-0002zF-8R
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:59 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiJ-0008Lx-7O
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:39:59 +0000
Date: Fri, 04 Apr 2014 23:39:59 +0000
Message-Id: <E1WWDiJ-0008Lx-7O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add conversion of more
	registers to 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

commit 069dfba0384a798c7948cc600024172ec800df09
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:05 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:08 2014 +0100

    xenctx: Add conversion of more registers to symbols
    
    For example can change:
     gs: 0000 @ ffffffff803ac000/0000000000000000
    to
     gs: 0000 @ ffffffff803ac000/0000000000000000 boot_cpu_pda/
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   47 +++++++++++++++++++++++++++++++++++------------
 1 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 6f6c3a3..59b2f1a 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -44,6 +44,8 @@ typedef enum type_of_addr_ {
 } type_of_addr;
 
 #if defined (__i386__) || defined (__x86_64__)
+static const uint64_t cr_reg_mask[5] = { [2] = ~UINT64_C(0) };
+static const uint64_t dr_reg_mask[8] = { [0 ... 3] = ~UINT64_C(0) };
 typedef unsigned long long guest_word_t;
 #define FMT_32B_WORD "%08llx"
 #define FMT_64B_WORD "%016llx"
@@ -336,17 +338,29 @@ static void print_flags(uint64_t flags)
     printf("\n");
 }
 
-static void print_special(void *regs, const char *name, unsigned int mask, int width)
+static void print_special(void *regs, const char *name, unsigned int mask,
+                          const uint64_t reg_is_addr_mask[], int width)
 {
     unsigned int i;
 
     printf("\n");
     for (i = 0; mask; mask >>= 1, ++i)
         if (mask & 1) {
-            if (width == 4)
-                printf("%s%u: %08"PRIx32"\n", name, i, ((uint32_t *) regs)[i]);
+            if ( width == 4 )
+            {
+                printf("%s%u: %08"PRIx32, name, i, ((uint32_t *) regs)[i]);
+                if ( reg_is_addr_mask[i] )
+                    print_symbol(reg_is_addr_mask[i] & ((uint32_t *) regs)[i],
+                                 KERNEL_DATA_ADDR);
+            }
             else
-                printf("%s%u: %08"PRIx64"\n", name, i, ((uint64_t *) regs)[i]);
+            {
+                printf("%s%u: %016"PRIx64, name, i, ((uint64_t *) regs)[i]);
+                if ( reg_is_addr_mask[i] )
+                    print_symbol(reg_is_addr_mask[i] & ((uint64_t *) regs)[i],
+                                 KERNEL_DATA_ADDR);
+            }
+            printf("\n");
         }
 }
 
@@ -374,8 +388,8 @@ static void print_ctx_32(vcpu_guest_context_x86_32_t *ctx)
     printf(" gs:     %04x\n", regs->gs);
 
     if (xenctx.disp_all) {
-        print_special(ctx->ctrlreg, "cr", 0x1d, 4);
-        print_special(ctx->debugreg, "dr", 0xcf, 4);
+        print_special(ctx->ctrlreg, "cr", 0x1d, cr_reg_mask, 4);
+        print_special(ctx->debugreg, "dr", 0xcf, dr_reg_mask, 4);
     }
 }
 
@@ -403,8 +417,8 @@ static void print_ctx_32on64(vcpu_guest_context_x86_64_t *ctx)
     printf(" gs:     %04x\n", regs->gs);
 
     if (xenctx.disp_all) {
-        print_special(ctx->ctrlreg, "cr", 0x1d, 4);
-        print_special(ctx->debugreg, "dr", 0xcf, 4);
+        print_special(ctx->ctrlreg, "cr", 0x1d, cr_reg_mask, 4);
+        print_special(ctx->debugreg, "dr", 0xcf, dr_reg_mask, 4);
     }
 }
 
@@ -442,13 +456,22 @@ static void print_ctx_64(vcpu_guest_context_x86_64_t *ctx)
     printf(" ds: %04x\t", regs->ds);
     printf(" es: %04x\n", regs->es);
 
-    printf(" fs: %04x @ %016"PRIx64"\n", regs->fs, ctx->fs_base);
-    printf(" gs: %04x @ %016"PRIx64"/%016"PRIx64"\n", regs->gs,
+    printf(" fs: %04x @ %016"PRIx64, regs->fs, ctx->fs_base);
+    print_symbol(ctx->fs_base, KERNEL_DATA_ADDR);
+    printf("\n");
+    printf(" gs: %04x @ %016"PRIx64"/%016"PRIx64, regs->gs,
            ctx->gs_base_kernel, ctx->gs_base_user);
+    if ( symbol_table )
+    {
+        print_symbol(ctx->gs_base_kernel, KERNEL_DATA_ADDR);
+        printf("/");
+        print_symbol(ctx->gs_base_user, KERNEL_DATA_ADDR);
+    }
+    printf("\n");
 
     if (xenctx.disp_all) {
-        print_special(ctx->ctrlreg, "cr", 0x1d, 8);
-        print_special(ctx->debugreg, "dr", 0xcf, 8);
+        print_special(ctx->ctrlreg, "cr", 0x1d, cr_reg_mask, 8);
+        print_special(ctx->debugreg, "dr", 0xcf, dr_reg_mask, 8);
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDii-0006nO-Ij; Fri, 04 Apr 2014 23:40:24 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDig-0006ms-CW
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:22 +0000
Received: from [193.109.254.147:55346] by server-13.bemta-14.messagelabs.com
	id 2F/53-23211-5E24F335; Fri, 04 Apr 2014 23:40:21 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1396654819!6395386!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9860 invoked from network); 4 Apr 2014 23:40:20 -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;
	4 Apr 2014 23:40:20 -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 1WWDid-0002zr-MT
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDid-0008Mz-Ks
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:19 +0000
Date: Fri, 04 Apr 2014 23:40:19 +0000
Message-Id: <E1WWDid-0008Mz-Ks@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Fix handling of
	!guest_protected_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

commit 3e4b7e0c83cc984f5a02e9d8e7f7153b9be22c40
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:07 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:09 2014 +0100

    xenctx: Fix handling of !guest_protected_mode
    
    Start with adding the code to the 64 bit path that the 32 bit path
    has.
    
    Next disable the "Stack Trace" or "Call Trace".
    
    Finally allow stack dump.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index fa300b5..3804bd3 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -498,8 +498,13 @@ static guest_word_t instr_pointer(vcpu_guest_context_any_t *ctx)
             r += ctx->x32.user_regs.cs << NONPROT_MODE_SEGMENT_SHIFT;
     }
     else
+    {
         r = ctx->x64.user_regs.rip;
 
+        if ( !guest_protected_mode )
+            r += ctx->x64.user_regs.cs << NONPROT_MODE_SEGMENT_SHIFT;
+    }
+
     return r;
 }
 
@@ -514,8 +519,13 @@ static guest_word_t stack_pointer(vcpu_guest_context_any_t *ctx)
             r += ctx->x32.user_regs.ss << NONPROT_MODE_SEGMENT_SHIFT;
     }
     else
+    {
         r = ctx->x64.user_regs.rsp;
 
+        if ( !guest_protected_mode )
+            r += ctx->x64.user_regs.ss << NONPROT_MODE_SEGMENT_SHIFT;
+    }
+
     return r;
 }
 
@@ -865,6 +875,9 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
             return -1;
     }
 
+    if ( !guest_protected_mode )
+        return 0;
+
     if(xenctx.stack_trace)
         printf("Stack Trace:\n");
     else
@@ -1003,7 +1016,8 @@ static void dump_ctx(int vcpu)
 #ifndef NO_TRANSLATION
     if (print_code(&ctx, vcpu))
         return;
-    if ( kernel_addr(instr_pointer(&ctx)) >= KERNEL_TEXT_ADDR )
+    if ( !guest_protected_mode ||
+         kernel_addr(instr_pointer(&ctx)) >= KERNEL_TEXT_ADDR )
         if ( print_stack(&ctx, vcpu, guest_word_size,
                          stack_pointer(&ctx)) )
             return;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDii-0006nO-Ij; Fri, 04 Apr 2014 23:40:24 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDig-0006ms-CW
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:22 +0000
Received: from [193.109.254.147:55346] by server-13.bemta-14.messagelabs.com
	id 2F/53-23211-5E24F335; Fri, 04 Apr 2014 23:40:21 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1396654819!6395386!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9860 invoked from network); 4 Apr 2014 23:40:20 -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;
	4 Apr 2014 23:40:20 -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 1WWDid-0002zr-MT
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDid-0008Mz-Ks
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:19 +0000
Date: Fri, 04 Apr 2014 23:40:19 +0000
Message-Id: <E1WWDid-0008Mz-Ks@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Fix handling of
	!guest_protected_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

commit 3e4b7e0c83cc984f5a02e9d8e7f7153b9be22c40
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:07 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:09 2014 +0100

    xenctx: Fix handling of !guest_protected_mode
    
    Start with adding the code to the 64 bit path that the 32 bit path
    has.
    
    Next disable the "Stack Trace" or "Call Trace".
    
    Finally allow stack dump.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index fa300b5..3804bd3 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -498,8 +498,13 @@ static guest_word_t instr_pointer(vcpu_guest_context_any_t *ctx)
             r += ctx->x32.user_regs.cs << NONPROT_MODE_SEGMENT_SHIFT;
     }
     else
+    {
         r = ctx->x64.user_regs.rip;
 
+        if ( !guest_protected_mode )
+            r += ctx->x64.user_regs.cs << NONPROT_MODE_SEGMENT_SHIFT;
+    }
+
     return r;
 }
 
@@ -514,8 +519,13 @@ static guest_word_t stack_pointer(vcpu_guest_context_any_t *ctx)
             r += ctx->x32.user_regs.ss << NONPROT_MODE_SEGMENT_SHIFT;
     }
     else
+    {
         r = ctx->x64.user_regs.rsp;
 
+        if ( !guest_protected_mode )
+            r += ctx->x64.user_regs.ss << NONPROT_MODE_SEGMENT_SHIFT;
+    }
+
     return r;
 }
 
@@ -865,6 +875,9 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width,
             return -1;
     }
 
+    if ( !guest_protected_mode )
+        return 0;
+
     if(xenctx.stack_trace)
         printf("Stack Trace:\n");
     else
@@ -1003,7 +1016,8 @@ static void dump_ctx(int vcpu)
 #ifndef NO_TRANSLATION
     if (print_code(&ctx, vcpu))
         return;
-    if ( kernel_addr(instr_pointer(&ctx)) >= KERNEL_TEXT_ADDR )
+    if ( !guest_protected_mode ||
+         kernel_addr(instr_pointer(&ctx)) >= KERNEL_TEXT_ADDR )
         if ( print_stack(&ctx, vcpu, guest_word_size,
                          stack_pointer(&ctx)) )
             return;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:33 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDir-0006pT-Ln; Fri, 04 Apr 2014 23:40:33 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDir-0006pH-0E
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:33 +0000
Received: from [85.158.139.211:54474] by server-10.bemta-5.messagelabs.com id
	59/CB-27081-0F24F335; Fri, 04 Apr 2014 23:40:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1396654830!5623293!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10783 invoked from network); 4 Apr 2014 23:40:31 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:31 -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 1WWDin-00030B-VM
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:29 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDin-0008NM-ST
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:29 +0000
Date: Fri, 04 Apr 2014 23:40:29 +0000
Message-Id: <E1WWDin-0008NM-ST@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add 16 bit output
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 701ce4a698dbabb9599e66e50ae19768a8e882d3
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:08 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:09 2014 +0100

    xenctx: Add 16 bit output
    
    This output happens on !guest_protected_mode.  The cpu is in 16 bit
    mode in this case.
    
    For example:
    
    $ xenctx 4
    cs:eip: f000:0000d61b
    flags: 00000002 nz
    ss:esp: 0000:00001fee
    eax: 0000ffc2   ebx: 00000049   ecx: 00000049   edx: ffffffff
    esi: 00000000   edi: 00000010   ebp: 00001ff0
     ds:     e000    es:     0040    fs:     0000    gs:     0000
    Code (instr addr 000fd61b)
    04 67 66 8b 70 08 67 66 8b 68 0c 67 66 8b 58 10 67 66 8b 50 14 <67> 66 8b 48 18 67 8e 40 02 67 ff
    
    Stack:
     8e30 0000 0246 812f 0000 0206 80e7 0080 0080
    
    $ xenctx 4 -d 0x00001fee -m 0x00001fee -l 1
    Memory (address 1fee):
     8e30 0000 0246 812f 0000 0206 80e7 0080 0080 c2c2 c2c2 c2c2 c2c2 c2c2 c2c2 c2c2
    
    Stack:
     8e30 0000 0246 812f 0000 0206 80e7 0080 0080
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 3804bd3..6655990 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -47,6 +47,7 @@ typedef enum type_of_addr_ {
 static const uint64_t cr_reg_mask[5] = { [2] = ~UINT64_C(0) };
 static const uint64_t dr_reg_mask[8] = { [0 ... 3] = ~UINT64_C(0) };
 typedef unsigned long long guest_word_t;
+#define FMT_16B_WORD "%04llx"
 #define FMT_32B_WORD "%08llx"
 #define FMT_64B_WORD "%016llx"
 /* Word-length of the guest's own data structures */
@@ -57,11 +58,13 @@ int guest_protected_mode = 1;
 #elif defined(__arm__)
 #define NO_TRANSLATION
 typedef uint64_t guest_word_t;
+#define FMT_16B_WORD "%04llx"
 #define FMT_32B_WORD "%08llx"
 #define FMT_64B_WORD "%016llx"
 #elif defined(__aarch64__)
 #define NO_TRANSLATION
 typedef uint64_t guest_word_t;
+#define FMT_16B_WORD "%04llx"
 #define FMT_32B_WORD "%08llx"
 #define FMT_64B_WORD "%016llx"
 #endif
@@ -479,7 +482,7 @@ static void print_ctx(vcpu_guest_context_any_t *ctx)
 {
     if (ctxt_word_size == 4)
         print_ctx_32(&ctx->x32);
-    else if (guest_word_size == 4)
+    else if (guest_word_size != 8)
         print_ctx_32on64(&ctx->x64);
     else
         print_ctx_64(&ctx->x64);
@@ -749,7 +752,9 @@ static guest_word_t read_mem_word(vcpu_guest_context_any_t *ctx, int vcpu,
 
 static void print_stack_word(guest_word_t word, int width)
 {
-    if (width == 4)
+    if (width == 2)
+        printf(FMT_16B_WORD, word);
+    else if (width == 4)
         printf(FMT_32B_WORD, word);
     else
         printf(FMT_64B_WORD, word);
@@ -984,8 +989,9 @@ static void dump_ctx(int vcpu)
                 perror("xc_domain_hvm_getcontext_partial");
                 return;
             }
-            guest_word_size = (cpuctx.msr_efer & 0x400) ? 8 : 4;
             guest_protected_mode = (cpuctx.cr0 & CR0_PE);
+            guest_word_size = (cpuctx.msr_efer & 0x400) ? 8 :
+                guest_protected_mode ? 4 : 2;
             /* HVM guest context records are always host-sized */
             if (xc_version(xenctx.xc_handle, XENVER_capabilities, &xen_caps) != 0) {
                 perror("xc_version");
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:33 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDir-0006pT-Ln; Fri, 04 Apr 2014 23:40:33 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDir-0006pH-0E
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:33 +0000
Received: from [85.158.139.211:54474] by server-10.bemta-5.messagelabs.com id
	59/CB-27081-0F24F335; Fri, 04 Apr 2014 23:40:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1396654830!5623293!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10783 invoked from network); 4 Apr 2014 23:40:31 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:31 -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 1WWDin-00030B-VM
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:29 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDin-0008NM-ST
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:29 +0000
Date: Fri, 04 Apr 2014 23:40:29 +0000
Message-Id: <E1WWDin-0008NM-ST@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Add 16 bit output
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 701ce4a698dbabb9599e66e50ae19768a8e882d3
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:08 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:09 2014 +0100

    xenctx: Add 16 bit output
    
    This output happens on !guest_protected_mode.  The cpu is in 16 bit
    mode in this case.
    
    For example:
    
    $ xenctx 4
    cs:eip: f000:0000d61b
    flags: 00000002 nz
    ss:esp: 0000:00001fee
    eax: 0000ffc2   ebx: 00000049   ecx: 00000049   edx: ffffffff
    esi: 00000000   edi: 00000010   ebp: 00001ff0
     ds:     e000    es:     0040    fs:     0000    gs:     0000
    Code (instr addr 000fd61b)
    04 67 66 8b 70 08 67 66 8b 68 0c 67 66 8b 58 10 67 66 8b 50 14 <67> 66 8b 48 18 67 8e 40 02 67 ff
    
    Stack:
     8e30 0000 0246 812f 0000 0206 80e7 0080 0080
    
    $ xenctx 4 -d 0x00001fee -m 0x00001fee -l 1
    Memory (address 1fee):
     8e30 0000 0246 812f 0000 0206 80e7 0080 0080 c2c2 c2c2 c2c2 c2c2 c2c2 c2c2 c2c2
    
    Stack:
     8e30 0000 0246 812f 0000 0206 80e7 0080 0080
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 3804bd3..6655990 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -47,6 +47,7 @@ typedef enum type_of_addr_ {
 static const uint64_t cr_reg_mask[5] = { [2] = ~UINT64_C(0) };
 static const uint64_t dr_reg_mask[8] = { [0 ... 3] = ~UINT64_C(0) };
 typedef unsigned long long guest_word_t;
+#define FMT_16B_WORD "%04llx"
 #define FMT_32B_WORD "%08llx"
 #define FMT_64B_WORD "%016llx"
 /* Word-length of the guest's own data structures */
@@ -57,11 +58,13 @@ int guest_protected_mode = 1;
 #elif defined(__arm__)
 #define NO_TRANSLATION
 typedef uint64_t guest_word_t;
+#define FMT_16B_WORD "%04llx"
 #define FMT_32B_WORD "%08llx"
 #define FMT_64B_WORD "%016llx"
 #elif defined(__aarch64__)
 #define NO_TRANSLATION
 typedef uint64_t guest_word_t;
+#define FMT_16B_WORD "%04llx"
 #define FMT_32B_WORD "%08llx"
 #define FMT_64B_WORD "%016llx"
 #endif
@@ -479,7 +482,7 @@ static void print_ctx(vcpu_guest_context_any_t *ctx)
 {
     if (ctxt_word_size == 4)
         print_ctx_32(&ctx->x32);
-    else if (guest_word_size == 4)
+    else if (guest_word_size != 8)
         print_ctx_32on64(&ctx->x64);
     else
         print_ctx_64(&ctx->x64);
@@ -749,7 +752,9 @@ static guest_word_t read_mem_word(vcpu_guest_context_any_t *ctx, int vcpu,
 
 static void print_stack_word(guest_word_t word, int width)
 {
-    if (width == 4)
+    if (width == 2)
+        printf(FMT_16B_WORD, word);
+    else if (width == 4)
         printf(FMT_32B_WORD, word);
     else
         printf(FMT_64B_WORD, word);
@@ -984,8 +989,9 @@ static void dump_ctx(int vcpu)
                 perror("xc_domain_hvm_getcontext_partial");
                 return;
             }
-            guest_word_size = (cpuctx.msr_efer & 0x400) ? 8 : 4;
             guest_protected_mode = (cpuctx.cr0 & CR0_PE);
+            guest_word_size = (cpuctx.msr_efer & 0x400) ? 8 :
+                guest_protected_mode ? 4 : 2;
             /* HVM guest context records are always host-sized */
             if (xc_version(xenctx.xc_handle, XENVER_capabilities, &xen_caps) != 0) {
                 perror("xc_version");
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDj1-0006qr-OZ; Fri, 04 Apr 2014 23:40:43 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDj0-0006qi-PM
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:42 +0000
Received: from [193.109.254.147:42565] by server-13.bemta-14.messagelabs.com
	id F6/73-23211-AF24F335; Fri, 04 Apr 2014 23:40:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1396654840!5655229!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5810 invoked from network); 4 Apr 2014 23:40:41 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:41 -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 1WWDiy-00030H-4o
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiy-0008No-36
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:40 +0000
Date: Fri, 04 Apr 2014 23:40:40 +0000
Message-Id: <E1WWDiy-0008No-36@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Fix print_ctx_32on64's
	print_special call.
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 e40a01b0fb502629e345442ddb8feb07357c1de7
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:09 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:09 2014 +0100

    xenctx: Fix print_ctx_32on64's print_special call.
    
    print_special() uses the width argument to both select output format
    and array size.  So by passing 4 it expects an array of uint32_t.
    But an array of uint64_t is passed.
    
    So copy and mask the registers to 32 bits.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 6655990..82bd789 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -420,8 +420,15 @@ static void print_ctx_32on64(vcpu_guest_context_x86_64_t *ctx)
     printf(" gs:     %04x\n", regs->gs);
 
     if (xenctx.disp_all) {
-        print_special(ctx->ctrlreg, "cr", 0x1d, cr_reg_mask, 4);
-        print_special(ctx->debugreg, "dr", 0xcf, dr_reg_mask, 4);
+        uint32_t tmp_regs[8];
+        int i;
+
+        for (i = 0; i < 5; i++)
+            tmp_regs[i] = ctx->ctrlreg[i];
+        print_special(tmp_regs, "cr", 0x1d, cr_reg_mask, 4);
+        for (i = 0; i < 8; i++)
+            tmp_regs[i] = ctx->debugreg[i];
+        print_special(tmp_regs, "dr", 0xcf, dr_reg_mask, 4);
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40: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 1WWDj1-0006qr-OZ; Fri, 04 Apr 2014 23:40:43 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDj0-0006qi-PM
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:42 +0000
Received: from [193.109.254.147:42565] by server-13.bemta-14.messagelabs.com
	id F6/73-23211-AF24F335; Fri, 04 Apr 2014 23:40:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1396654840!5655229!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5810 invoked from network); 4 Apr 2014 23:40:41 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:40:41 -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 1WWDiy-00030H-4o
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDiy-0008No-36
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:40 +0000
Date: Fri, 04 Apr 2014 23:40:40 +0000
Message-Id: <E1WWDiy-0008No-36@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xenctx: Fix print_ctx_32on64's
	print_special call.
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 e40a01b0fb502629e345442ddb8feb07357c1de7
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Thu Apr 3 15:07:09 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Fri Apr 4 09:28:09 2014 +0100

    xenctx: Fix print_ctx_32on64's print_special call.
    
    print_special() uses the width argument to both select output format
    and array size.  So by passing 4 it expects an array of uint32_t.
    But an array of uint64_t is passed.
    
    So copy and mask the registers to 32 bits.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/xentrace/xenctx.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
index 6655990..82bd789 100644
--- a/tools/xentrace/xenctx.c
+++ b/tools/xentrace/xenctx.c
@@ -420,8 +420,15 @@ static void print_ctx_32on64(vcpu_guest_context_x86_64_t *ctx)
     printf(" gs:     %04x\n", regs->gs);
 
     if (xenctx.disp_all) {
-        print_special(ctx->ctrlreg, "cr", 0x1d, cr_reg_mask, 4);
-        print_special(ctx->debugreg, "dr", 0xcf, dr_reg_mask, 4);
+        uint32_t tmp_regs[8];
+        int i;
+
+        for (i = 0; i < 5; i++)
+            tmp_regs[i] = ctx->ctrlreg[i];
+        print_special(tmp_regs, "cr", 0x1d, cr_reg_mask, 4);
+        for (i = 0; i < 8; i++)
+            tmp_regs[i] = ctx->debugreg[i];
+        print_special(tmp_regs, "dr", 0xcf, dr_reg_mask, 4);
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40:53 +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 1WWDjB-0006sD-RT; Fri, 04 Apr 2014 23:40:53 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDjB-0006rx-6r
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:53 +0000
Received: from [193.109.254.147:55911] by server-8.bemta-14.messagelabs.com id
	BA/23-01877-4034F335; Fri, 04 Apr 2014 23:40:52 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1396654850!6432861!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19938 invoked from network); 4 Apr 2014 23:40:51 -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;
	4 Apr 2014 23:40:51 -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 1WWDj8-00030N-Ef
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:50 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDj8-0008P0-Dd
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:50 +0000
Date: Fri, 04 Apr 2014 23:40:50 +0000
Message-Id: <E1WWDj8-0008P0-Dd@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: Some functions are only used
	internally
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 660e1ab0a5f0a39deb50a53ec1b47e73eb2ebc5a
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Fri Apr 4 11:07:04 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 11:07:04 2014 +0200

    tmem: Some functions are only used internally
    
    The list of function above are only used internally in common/tmem:
        - oid_compare
        - oid_set_invalid
        - oid_hash
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 02e7e2e..342a6db 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -829,7 +829,7 @@ static void rtn_free(struct radix_tree_node *rtn, void *arg)
 
 /************ POOL OBJECT COLLECTION MANIPULATION ROUTINES *******************/
 
-int oid_compare(struct oid *left, struct oid *right)
+static int oid_compare(struct oid *left, struct oid *right)
 {
     if ( left->oid[2] == right->oid[2] )
     {
@@ -853,12 +853,12 @@ int oid_compare(struct oid *left, struct oid *right)
         return 1;
 }
 
-void oid_set_invalid(struct oid *oidp)
+static void oid_set_invalid(struct oid *oidp)
 {
     oidp->oid[0] = oidp->oid[1] = oidp->oid[2] = -1UL;
 }
 
-unsigned oid_hash(struct oid *oidp)
+static unsigned oid_hash(struct oid *oidp)
 {
     return (tmem_hash(oidp->oid[0] ^ oidp->oid[1] ^ oidp->oid[2],
                      BITS_PER_LONG) & OBJ_HASH_BUCKETS_MASK);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:40:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:40:53 +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 1WWDjB-0006sD-RT; Fri, 04 Apr 2014 23:40:53 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDjB-0006rx-6r
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:53 +0000
Received: from [193.109.254.147:55911] by server-8.bemta-14.messagelabs.com id
	BA/23-01877-4034F335; Fri, 04 Apr 2014 23:40:52 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1396654850!6432861!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19938 invoked from network); 4 Apr 2014 23:40:51 -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;
	4 Apr 2014 23:40:51 -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 1WWDj8-00030N-Ef
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:50 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDj8-0008P0-Dd
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:40:50 +0000
Date: Fri, 04 Apr 2014 23:40:50 +0000
Message-Id: <E1WWDj8-0008P0-Dd@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: Some functions are only used
	internally
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 660e1ab0a5f0a39deb50a53ec1b47e73eb2ebc5a
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Fri Apr 4 11:07:04 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 11:07:04 2014 +0200

    tmem: Some functions are only used internally
    
    The list of function above are only used internally in common/tmem:
        - oid_compare
        - oid_set_invalid
        - oid_hash
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 02e7e2e..342a6db 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -829,7 +829,7 @@ static void rtn_free(struct radix_tree_node *rtn, void *arg)
 
 /************ POOL OBJECT COLLECTION MANIPULATION ROUTINES *******************/
 
-int oid_compare(struct oid *left, struct oid *right)
+static int oid_compare(struct oid *left, struct oid *right)
 {
     if ( left->oid[2] == right->oid[2] )
     {
@@ -853,12 +853,12 @@ int oid_compare(struct oid *left, struct oid *right)
         return 1;
 }
 
-void oid_set_invalid(struct oid *oidp)
+static void oid_set_invalid(struct oid *oidp)
 {
     oidp->oid[0] = oidp->oid[1] = oidp->oid[2] = -1UL;
 }
 
-unsigned oid_hash(struct oid *oidp)
+static unsigned oid_hash(struct oid *oidp)
 {
     return (tmem_hash(oidp->oid[0] ^ oidp->oid[1] ^ oidp->oid[2],
                      BITS_PER_LONG) & OBJ_HASH_BUCKETS_MASK);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:41:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:41:05 +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 1WWDjM-0006ug-Vo; Fri, 04 Apr 2014 23:41:04 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDjL-0006uR-Om
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:41:03 +0000
Received: from [85.158.139.211:54915] by server-14.bemta-5.messagelabs.com id
	AA/27-15696-F034F335; Fri, 04 Apr 2014 23:41:03 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1396654860!5616500!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28396 invoked from network); 4 Apr 2014 23:41:01 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:41:01 -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 1WWDjI-00030W-Lj
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:41:00 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDjI-0008PS-J0
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:41:00 +0000
Date: Fri, 04 Apr 2014 23:41:00 +0000
Message-Id: <E1WWDjI-0008PS-J0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: propagate ENOMEM result in error
	handling
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 2cb8e71744b9c0e0663b8a0419606a73f01562e9
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Fri Apr 4 11:08:24 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 11:08:24 2014 +0200

    tmem: propagate ENOMEM result in error handling
    
    ...otherwise if pcd_associate fails due to out-of-memory, the caller of
    do_tmem_put will think the call was successful.
    
    While at it, fix up the style issue.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: Bob Liu <bob.liu@oracle.com>
    Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 342a6db..73007f7 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1646,8 +1646,11 @@ copy_uncompressed:
 
     if ( tmem_dedup_enabled() && !is_persistent(pool) )
     {
-        if ( pcd_associate(pgp,NULL,0) == -ENOMEM )
+        if ( pcd_associate(pgp, NULL, 0) == -ENOMEM )
+        {
+            ret = -ENOMEM;
             goto del_pgp_from_obj;
+        }
     }
 
 insert_page:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 04 23:41:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 04 Apr 2014 23:41:05 +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 1WWDjM-0006ug-Vo; Fri, 04 Apr 2014 23:41:04 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDjL-0006uR-Om
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:41:03 +0000
Received: from [85.158.139.211:54915] by server-14.bemta-5.messagelabs.com id
	AA/27-15696-F034F335; Fri, 04 Apr 2014 23:41:03 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-206.messagelabs.com!1396654860!5616500!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28396 invoked from network); 4 Apr 2014 23:41:01 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	4 Apr 2014 23:41:01 -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 1WWDjI-00030W-Lj
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:41:00 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWDjI-0008PS-J0
	for xen-changelog@lists.xensource.com; Fri, 04 Apr 2014 23:41:00 +0000
Date: Fri, 04 Apr 2014 23:41:00 +0000
Message-Id: <E1WWDjI-0008PS-J0@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: propagate ENOMEM result in error
	handling
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 2cb8e71744b9c0e0663b8a0419606a73f01562e9
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Fri Apr 4 11:08:24 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 11:08:24 2014 +0200

    tmem: propagate ENOMEM result in error handling
    
    ...otherwise if pcd_associate fails due to out-of-memory, the caller of
    do_tmem_put will think the call was successful.
    
    While at it, fix up the style issue.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: Bob Liu <bob.liu@oracle.com>
    Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 342a6db..73007f7 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1646,8 +1646,11 @@ copy_uncompressed:
 
     if ( tmem_dedup_enabled() && !is_persistent(pool) )
     {
-        if ( pcd_associate(pgp,NULL,0) == -ENOMEM )
+        if ( pcd_associate(pgp, NULL, 0) == -ENOMEM )
+        {
+            ret = -ENOMEM;
             goto del_pgp_from_obj;
+        }
     }
 
 insert_page:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Sat Apr 05 05:55:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 05 Apr 2014 05: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 1WWJZM-0003TQ-TL; Sat, 05 Apr 2014 05:55:08 +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 1WWJZL-0003TE-FN
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:07 +0000
Received: from [85.158.143.35:35634] by server-3.bemta-4.messagelabs.com id
	F1/C6-13602-ABA9F335; Sat, 05 Apr 2014 05:55:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1396677305!7136511!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6074 invoked from network); 5 Apr 2014 05:55:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	5 Apr 2014 05:55: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 1WWJZI-0005vb-Ki
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWJZH-0002o0-OJ
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:03 +0000
Date: Sat, 05 Apr 2014 05:55:03 +0000
Message-Id: <E1WWJZH-0002o0-OJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: Hold the atfork lock while
	closing carefd
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 56f56ff9fbb431fdfc0e0de975c1fdf77c8dcc25
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:14 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:03:16 2014 +0100

    libxl: Hold the atfork lock while closing carefd
    
    This avoids the process being forked while a carefd is recorded in the
    list but the actual fd has been closed.  If that happened, a
    subsequent libxl_postfork_child_noexec would attempt to close the fd
    again.  If we are lucky that results in a harmless warning; but if we
    are unlucky the fd number has been reused and we close an unrelated
    fd.
    
    This race has not been observed anywhere as far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 2a0c3a62ea4ad6c6bcbf80122b070f3ff3fe7dae)
    (cherry picked from commit 86c00cb6e2d78d5be861656a1e83956c9de96003)
---
 tools/libxl/libxl_fork.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_fork.c b/tools/libxl/libxl_fork.c
index b6f0b2d..1dc30e1 100644
--- a/tools/libxl/libxl_fork.c
+++ b/tools/libxl/libxl_fork.c
@@ -135,9 +135,9 @@ void libxl_postfork_child_noexec(libxl_ctx *ctx)
 int libxl__carefd_close(libxl__carefd *cf)
 {
     if (!cf) return 0;
+    atfork_lock();
     int r = cf->fd < 0 ? 0 : close(cf->fd);
     int esave = errno;
-    atfork_lock();
     LIBXL_LIST_REMOVE(cf, entry);
     atfork_unlock();
     free(cf);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 05 05:55:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 05 Apr 2014 05: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 1WWJZM-0003TQ-TL; Sat, 05 Apr 2014 05:55:08 +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 1WWJZL-0003TE-FN
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:07 +0000
Received: from [85.158.143.35:35634] by server-3.bemta-4.messagelabs.com id
	F1/C6-13602-ABA9F335; Sat, 05 Apr 2014 05:55:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1396677305!7136511!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6074 invoked from network); 5 Apr 2014 05:55:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	5 Apr 2014 05:55: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 1WWJZI-0005vb-Ki
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWJZH-0002o0-OJ
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:03 +0000
Date: Sat, 05 Apr 2014 05:55:03 +0000
Message-Id: <E1WWJZH-0002o0-OJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: Hold the atfork lock while
	closing carefd
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 56f56ff9fbb431fdfc0e0de975c1fdf77c8dcc25
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:14 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:03:16 2014 +0100

    libxl: Hold the atfork lock while closing carefd
    
    This avoids the process being forked while a carefd is recorded in the
    list but the actual fd has been closed.  If that happened, a
    subsequent libxl_postfork_child_noexec would attempt to close the fd
    again.  If we are lucky that results in a harmless warning; but if we
    are unlucky the fd number has been reused and we close an unrelated
    fd.
    
    This race has not been observed anywhere as far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 2a0c3a62ea4ad6c6bcbf80122b070f3ff3fe7dae)
    (cherry picked from commit 86c00cb6e2d78d5be861656a1e83956c9de96003)
---
 tools/libxl/libxl_fork.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_fork.c b/tools/libxl/libxl_fork.c
index b6f0b2d..1dc30e1 100644
--- a/tools/libxl/libxl_fork.c
+++ b/tools/libxl/libxl_fork.c
@@ -135,9 +135,9 @@ void libxl_postfork_child_noexec(libxl_ctx *ctx)
 int libxl__carefd_close(libxl__carefd *cf)
 {
     if (!cf) return 0;
+    atfork_lock();
     int r = cf->fd < 0 ? 0 : close(cf->fd);
     int esave = errno;
-    atfork_lock();
     LIBXL_LIST_REMOVE(cf, entry);
     atfork_unlock();
     free(cf);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 05 05:55:34 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 05 Apr 2014 05:55: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 1WWJZc-0003Us-00; Sat, 05 Apr 2014 05:55:24 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWJZa-0003UW-PW
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:22 +0000
Received: from [85.158.139.211:34297] by server-17.bemta-5.messagelabs.com id
	AC/CC-09046-ACA9F335; Sat, 05 Apr 2014 05:55:22 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1396677320!3819715!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29842 invoked from network); 5 Apr 2014 05:55:21 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	5 Apr 2014 05:55:21 -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 1WWJZT-0005ve-0h
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWJZS-0002p7-UG
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:14 +0000
Date: Sat, 05 Apr 2014 05:55:14 +0000
Message-Id: <E1WWJZS-0002p7-UG@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: Fix carefd lock leak in
	save callout
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 b1557b8cf18c0835bae4cd080a5388405122ea09
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:15 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:03:20 2014 +0100

    libxl: Fix carefd lock leak in save callout
    
    If libxl_pipe fails we leave the carefd locked, which translates to
    the atfork lock remaining held.  This would probably cause the process
    to deadlock shortly afterwards.
    
    Of course libxl_pipe is very unlikely to fail unless things are
    already going very badly.  This bug has not been observed anywhere as
    far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 7eb73add5de5839f160b902dd894d3aecc10ba0c)
    (cherry picked from commit 4bb3a17449a4472930030a627631f788bb678123)
---
 tools/libxl/libxl_save_callout.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c
index 078b7ee..2fb3d2b 100644
--- a/tools/libxl/libxl_save_callout.c
+++ b/tools/libxl/libxl_save_callout.c
@@ -185,7 +185,11 @@ static void run_helper(libxl__egc *egc, libxl__save_helper_state *shs,
     for (childfd=0; childfd<2; childfd++) {
         /* Setting up the pipe for the child's fd childfd */
         int fds[2];
-        if (libxl_pipe(CTX,fds)) { rc = ERROR_FAIL; goto out; }
+        if (libxl_pipe(CTX,fds)) {
+            rc = ERROR_FAIL;
+            libxl__carefd_unlock();
+            goto out;
+        }
         int childs_end = childfd==0 ? 0 /*read*/  : 1 /*write*/;
         int our_end    = childfd==0 ? 1 /*write*/ : 0 /*read*/;
         childs_pipes[childfd] = libxl__carefd_record(CTX, fds[childs_end]);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 05 05:55:34 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 05 Apr 2014 05:55: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 1WWJZc-0003Us-00; Sat, 05 Apr 2014 05:55:24 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWJZa-0003UW-PW
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:22 +0000
Received: from [85.158.139.211:34297] by server-17.bemta-5.messagelabs.com id
	AC/CC-09046-ACA9F335; Sat, 05 Apr 2014 05:55:22 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1396677320!3819715!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29842 invoked from network); 5 Apr 2014 05:55:21 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	5 Apr 2014 05:55:21 -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 1WWJZT-0005ve-0h
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWJZS-0002p7-UG
	for xen-changelog@lists.xensource.com; Sat, 05 Apr 2014 05:55:14 +0000
Date: Sat, 05 Apr 2014 05:55:14 +0000
Message-Id: <E1WWJZS-0002p7-UG@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] libxl: Fix carefd lock leak in
	save callout
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 b1557b8cf18c0835bae4cd080a5388405122ea09
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:15 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:03:20 2014 +0100

    libxl: Fix carefd lock leak in save callout
    
    If libxl_pipe fails we leave the carefd locked, which translates to
    the atfork lock remaining held.  This would probably cause the process
    to deadlock shortly afterwards.
    
    Of course libxl_pipe is very unlikely to fail unless things are
    already going very badly.  This bug has not been observed anywhere as
    far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 7eb73add5de5839f160b902dd894d3aecc10ba0c)
    (cherry picked from commit 4bb3a17449a4472930030a627631f788bb678123)
---
 tools/libxl/libxl_save_callout.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c
index 078b7ee..2fb3d2b 100644
--- a/tools/libxl/libxl_save_callout.c
+++ b/tools/libxl/libxl_save_callout.c
@@ -185,7 +185,11 @@ static void run_helper(libxl__egc *egc, libxl__save_helper_state *shs,
     for (childfd=0; childfd<2; childfd++) {
         /* Setting up the pipe for the child's fd childfd */
         int fds[2];
-        if (libxl_pipe(CTX,fds)) { rc = ERROR_FAIL; goto out; }
+        if (libxl_pipe(CTX,fds)) {
+            rc = ERROR_FAIL;
+            libxl__carefd_unlock();
+            goto out;
+        }
         int childs_end = childfd==0 ? 0 /*read*/  : 1 /*write*/;
         int our_end    = childfd==0 ? 1 /*write*/ : 0 /*read*/;
         childs_pipes[childfd] = libxl__carefd_record(CTX, fds[childs_end]);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sun Apr 06 04:22:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 06 Apr 2014 04: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 1WWeau-0001xy-C1; Sun, 06 Apr 2014 04:22:08 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWeat-0001xn-75
	for xen-changelog@lists.xensource.com; Sun, 06 Apr 2014 04:22:07 +0000
Received: from [85.158.139.211:22268] by server-12.bemta-5.messagelabs.com id
	5F/9F-03824-E66D0435; Sun, 06 Apr 2014 04:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1396758123!5733215!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26564 invoked from network); 6 Apr 2014 04:22:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	6 Apr 2014 04:22: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 1WWeap-0002oC-FK
	for xen-changelog@lists.xensource.com; Sun, 06 Apr 2014 04:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWeap-0007Ua-0Q
	for xen-changelog@lists.xensource.com; Sun, 06 Apr 2014 04:22:03 +0000
Date: Sun, 06 Apr 2014 04:22:03 +0000
Message-Id: <E1WWeap-0007Ua-0Q@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.1] xen/pygrub: grub2/grub.cfg from
	RHEL 7 has new commands in menuentry
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 030b47e049892437728b19cc0f0644a35d5285a6
Author:     Joby Poriyath <joby.poriyath@citrix.com>
AuthorDate: Tue Feb 4 18:10:35 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:13:50 2014 +0100

    xen/pygrub: grub2/grub.cfg from RHEL 7 has new commands in menuentry
    
    menuentry in grub2/grub.cfg uses linux16 and initrd16 commands
    instead of linux and initrd. Due to this RHEL 7 (beta) guest failed to
    boot after the installation.
    
    In addition to this, RHEL 7 menu entries have two different single-quote
    delimited strings on the same line, and the greedy grouping for menuentry
    parsing gets both strings, and the options inbetween.
    
    Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: george.dunlap@citrix.com
    (cherry picked from commit dd03048708af072374963d6d0721cc6d4c5f52cf)
    (cherry picked from commit 607d9c98e8161d93fc93dd0e2c3a5b5be57f0d2a)
    (cherry picked from commit 4481b30d5ea980fe469c8dfa1580ba2d107fa12f)
    (cherry picked from commit 8320ab88bfe2c16a94b6b6797955ac5f3f56aad3)
---
 tools/pygrub/examples/rhel-7-beta.grub2 |  118 +++++++++++++++++++++++++++++++
 tools/pygrub/src/GrubConf.py            |    4 +-
 2 files changed, 121 insertions(+), 1 deletions(-)

diff --git a/tools/pygrub/examples/rhel-7-beta.grub2 b/tools/pygrub/examples/rhel-7-beta.grub2
new file mode 100644
index 0000000..88f0f99
--- /dev/null
+++ b/tools/pygrub/examples/rhel-7-beta.grub2
@@ -0,0 +1,118 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 3.10.0-54.0.1.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-54.0.1.el7.x86_64-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-3.10.0-54.0.1.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16 LANG=en_GB.UTF-8
+	initrd16 /initramfs-3.10.0-54.0.1.el7.x86_64.img
+}
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 0-rescue-af34f0b8cf364cdbbe6d093f8228a37f' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16
+	initrd16 /initramfs-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index 237d4d7..9acafe0 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -344,7 +344,9 @@ class Grub2Image(_GrubImage):
                 
     commands = {'set:root': 'root',
                 'linux': 'kernel',
+                'linux16': 'kernel',
                 'initrd': 'initrd',
+                'initrd16': 'initrd',
                 'echo': None,
                 'insmod': None,
                 'search': None}
@@ -390,7 +392,7 @@ class Grub2ConfigFile(_GrubConfigFile):
                 continue
 
             # new image
-            title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
+            title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)
             if title_match:
                 if img is not None:
                     raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.1

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

From xen-changelog-bounces@lists.xen.org Sun Apr 06 04:22:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sun, 06 Apr 2014 04: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 1WWeau-0001xy-C1; Sun, 06 Apr 2014 04:22:08 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWeat-0001xn-75
	for xen-changelog@lists.xensource.com; Sun, 06 Apr 2014 04:22:07 +0000
Received: from [85.158.139.211:22268] by server-12.bemta-5.messagelabs.com id
	5F/9F-03824-E66D0435; Sun, 06 Apr 2014 04:22:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1396758123!5733215!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26564 invoked from network); 6 Apr 2014 04:22:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	6 Apr 2014 04:22: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 1WWeap-0002oC-FK
	for xen-changelog@lists.xensource.com; Sun, 06 Apr 2014 04:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WWeap-0007Ua-0Q
	for xen-changelog@lists.xensource.com; Sun, 06 Apr 2014 04:22:03 +0000
Date: Sun, 06 Apr 2014 04:22:03 +0000
Message-Id: <E1WWeap-0007Ua-0Q@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.1] xen/pygrub: grub2/grub.cfg from
	RHEL 7 has new commands in menuentry
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 030b47e049892437728b19cc0f0644a35d5285a6
Author:     Joby Poriyath <joby.poriyath@citrix.com>
AuthorDate: Tue Feb 4 18:10:35 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:13:50 2014 +0100

    xen/pygrub: grub2/grub.cfg from RHEL 7 has new commands in menuentry
    
    menuentry in grub2/grub.cfg uses linux16 and initrd16 commands
    instead of linux and initrd. Due to this RHEL 7 (beta) guest failed to
    boot after the installation.
    
    In addition to this, RHEL 7 menu entries have two different single-quote
    delimited strings on the same line, and the greedy grouping for menuentry
    parsing gets both strings, and the options inbetween.
    
    Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: george.dunlap@citrix.com
    (cherry picked from commit dd03048708af072374963d6d0721cc6d4c5f52cf)
    (cherry picked from commit 607d9c98e8161d93fc93dd0e2c3a5b5be57f0d2a)
    (cherry picked from commit 4481b30d5ea980fe469c8dfa1580ba2d107fa12f)
    (cherry picked from commit 8320ab88bfe2c16a94b6b6797955ac5f3f56aad3)
---
 tools/pygrub/examples/rhel-7-beta.grub2 |  118 +++++++++++++++++++++++++++++++
 tools/pygrub/src/GrubConf.py            |    4 +-
 2 files changed, 121 insertions(+), 1 deletions(-)

diff --git a/tools/pygrub/examples/rhel-7-beta.grub2 b/tools/pygrub/examples/rhel-7-beta.grub2
new file mode 100644
index 0000000..88f0f99
--- /dev/null
+++ b/tools/pygrub/examples/rhel-7-beta.grub2
@@ -0,0 +1,118 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 3.10.0-54.0.1.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-54.0.1.el7.x86_64-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-3.10.0-54.0.1.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16 LANG=en_GB.UTF-8
+	initrd16 /initramfs-3.10.0-54.0.1.el7.x86_64.img
+}
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 0-rescue-af34f0b8cf364cdbbe6d093f8228a37f' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16
+	initrd16 /initramfs-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index 237d4d7..9acafe0 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -344,7 +344,9 @@ class Grub2Image(_GrubImage):
                 
     commands = {'set:root': 'root',
                 'linux': 'kernel',
+                'linux16': 'kernel',
                 'initrd': 'initrd',
+                'initrd16': 'initrd',
                 'echo': None,
                 'insmod': None,
                 'search': None}
@@ -390,7 +392,7 @@ class Grub2ConfigFile(_GrubConfigFile):
                 continue
 
             # new image
-            title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
+            title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)
             if title_match:
                 if img is not None:
                     raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.1

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:55:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:55: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 1WXQsC-0000hY-AG; Tue, 08 Apr 2014 07:55:12 +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 1WXQsA-0000hT-C8
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:10 +0000
Received: from [85.158.143.35:61513] by server-1.bemta-4.messagelabs.com id
	CE/07-09853-D5BA3435; Tue, 08 Apr 2014 07:55:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1396943704!6949513!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25441 invoked from network); 8 Apr 2014 07:55:05 -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;
	8 Apr 2014 07:55:05 -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 1WXQs4-0002At-AR
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQs4-0005Jg-5C
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:04 +0000
Date: Tue, 08 Apr 2014 07:55:04 +0000
Message-Id: <E1WXQs4-0005Jg-5C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86: call pit_init for pvh also
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 3a148e0a7ee0ae56a498be5ba973314ec50cd999
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Fri Apr 4 10:36:29 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:36:29 2014 +0200

    x86: call pit_init for pvh also
    
    During halt of a pvh guest, the guest may do speaker shutdown. This
    results in call to handle_speaker_io in xen. It will hang on the vpit
    spin lock because it has not been initialized.
    Since, pit_init is also called for both pv and hvm, the call is
    moved to a more generic place.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: c30c544b199f70eada597c7352cdcb44648f6dcd
    master date: 2014-03-11 13:56:50 +0100
---
 xen/arch/x86/domain.c         |    9 +++++----
 xen/arch/x86/hvm/hvm.c        |    2 --
 xen/arch/x86/hvm/i8254.c      |    3 +--
 xen/include/asm-x86/hvm/vpt.h |    2 +-
 4 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 6618ae6..bc073e5 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -422,10 +422,6 @@ int vcpu_initialise(struct vcpu *v)
 
         /* PV guests by default have a 100Hz ticker. */
         v->periodic_period = MILLISECS(10);
-
-        /* PV guests get an emulated PIT too for video BIOSes to use. */
-        if ( v->vcpu_id == 0 )
-            pit_init(v, cpu_khz);
     }
 
     v->arch.schedule_tail = continue_nonidle_domain;
@@ -579,6 +575,9 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags)
     tsc_set_info(d, TSC_MODE_DEFAULT, 0UL, 0, 0);
     spin_lock_init(&d->arch.vtsc_lock);
 
+    /* PV/PVH guests get an emulated PIT too for video BIOSes to use. */
+    pit_init(d, cpu_khz);
+
     return 0;
 
  fail:
@@ -1980,6 +1979,8 @@ int domain_relinquish_resources(struct domain *d)
         BUG();
     }
 
+    pit_deinit(d);
+
     if ( has_hvm_container_domain(d) )
         hvm_domain_relinquish_resources(d);
 
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 6150899..a666471 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -643,7 +643,6 @@ void hvm_domain_relinquish_resources(struct domain *d)
     rtc_deinit(d);
     if ( d->vcpu != NULL && d->vcpu[0] != NULL )
     {
-        pit_deinit(d);
         pmtimer_deinit(d);
         hpet_deinit(d);
     }
@@ -1217,7 +1216,6 @@ int hvm_vcpu_initialise(struct vcpu *v)
     if ( v->vcpu_id == 0 )
     {
         /* NB. All these really belong in hvm_domain_initialise(). */
-        pit_init(v, cpu_khz);
         pmtimer_init(v);
         hpet_init(v);
  
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index c0d6bc2..f7493b8 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -447,9 +447,8 @@ void pit_reset(struct domain *d)
     spin_unlock(&pit->lock);
 }
 
-void pit_init(struct vcpu *v, unsigned long cpu_khz)
+void pit_init(struct domain *d, unsigned long cpu_khz)
 {
-    struct domain *d = v->domain;
     PITState *pit = domain_vpit(d);
 
     spin_lock_init(&pit->lock);
diff --git a/xen/include/asm-x86/hvm/vpt.h b/xen/include/asm-x86/hvm/vpt.h
index 87c3a66..9f3ec8d 100644
--- a/xen/include/asm-x86/hvm/vpt.h
+++ b/xen/include/asm-x86/hvm/vpt.h
@@ -175,7 +175,7 @@ void destroy_periodic_time(struct periodic_time *pt);
 int pv_pit_handler(int port, int data, int write);
 void pit_reset(struct domain *d);
 
-void pit_init(struct vcpu *v, unsigned long cpu_khz);
+void pit_init(struct domain *d, unsigned long cpu_khz);
 void pit_stop_channel0_irq(PITState * pit);
 void pit_deinit(struct domain *d);
 void rtc_init(struct domain *d);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:55:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:55: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 1WXQsC-0000hY-AG; Tue, 08 Apr 2014 07:55:12 +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 1WXQsA-0000hT-C8
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:10 +0000
Received: from [85.158.143.35:61513] by server-1.bemta-4.messagelabs.com id
	CE/07-09853-D5BA3435; Tue, 08 Apr 2014 07:55:09 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1396943704!6949513!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25441 invoked from network); 8 Apr 2014 07:55:05 -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;
	8 Apr 2014 07:55:05 -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 1WXQs4-0002At-AR
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQs4-0005Jg-5C
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:04 +0000
Date: Tue, 08 Apr 2014 07:55:04 +0000
Message-Id: <E1WXQs4-0005Jg-5C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86: call pit_init for pvh also
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 3a148e0a7ee0ae56a498be5ba973314ec50cd999
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Fri Apr 4 10:36:29 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:36:29 2014 +0200

    x86: call pit_init for pvh also
    
    During halt of a pvh guest, the guest may do speaker shutdown. This
    results in call to handle_speaker_io in xen. It will hang on the vpit
    spin lock because it has not been initialized.
    Since, pit_init is also called for both pv and hvm, the call is
    moved to a more generic place.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    master commit: c30c544b199f70eada597c7352cdcb44648f6dcd
    master date: 2014-03-11 13:56:50 +0100
---
 xen/arch/x86/domain.c         |    9 +++++----
 xen/arch/x86/hvm/hvm.c        |    2 --
 xen/arch/x86/hvm/i8254.c      |    3 +--
 xen/include/asm-x86/hvm/vpt.h |    2 +-
 4 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 6618ae6..bc073e5 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -422,10 +422,6 @@ int vcpu_initialise(struct vcpu *v)
 
         /* PV guests by default have a 100Hz ticker. */
         v->periodic_period = MILLISECS(10);
-
-        /* PV guests get an emulated PIT too for video BIOSes to use. */
-        if ( v->vcpu_id == 0 )
-            pit_init(v, cpu_khz);
     }
 
     v->arch.schedule_tail = continue_nonidle_domain;
@@ -579,6 +575,9 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags)
     tsc_set_info(d, TSC_MODE_DEFAULT, 0UL, 0, 0);
     spin_lock_init(&d->arch.vtsc_lock);
 
+    /* PV/PVH guests get an emulated PIT too for video BIOSes to use. */
+    pit_init(d, cpu_khz);
+
     return 0;
 
  fail:
@@ -1980,6 +1979,8 @@ int domain_relinquish_resources(struct domain *d)
         BUG();
     }
 
+    pit_deinit(d);
+
     if ( has_hvm_container_domain(d) )
         hvm_domain_relinquish_resources(d);
 
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 6150899..a666471 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -643,7 +643,6 @@ void hvm_domain_relinquish_resources(struct domain *d)
     rtc_deinit(d);
     if ( d->vcpu != NULL && d->vcpu[0] != NULL )
     {
-        pit_deinit(d);
         pmtimer_deinit(d);
         hpet_deinit(d);
     }
@@ -1217,7 +1216,6 @@ int hvm_vcpu_initialise(struct vcpu *v)
     if ( v->vcpu_id == 0 )
     {
         /* NB. All these really belong in hvm_domain_initialise(). */
-        pit_init(v, cpu_khz);
         pmtimer_init(v);
         hpet_init(v);
  
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index c0d6bc2..f7493b8 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -447,9 +447,8 @@ void pit_reset(struct domain *d)
     spin_unlock(&pit->lock);
 }
 
-void pit_init(struct vcpu *v, unsigned long cpu_khz)
+void pit_init(struct domain *d, unsigned long cpu_khz)
 {
-    struct domain *d = v->domain;
     PITState *pit = domain_vpit(d);
 
     spin_lock_init(&pit->lock);
diff --git a/xen/include/asm-x86/hvm/vpt.h b/xen/include/asm-x86/hvm/vpt.h
index 87c3a66..9f3ec8d 100644
--- a/xen/include/asm-x86/hvm/vpt.h
+++ b/xen/include/asm-x86/hvm/vpt.h
@@ -175,7 +175,7 @@ void destroy_periodic_time(struct periodic_time *pt);
 int pv_pit_handler(int port, int data, int write);
 void pit_reset(struct domain *d);
 
-void pit_init(struct vcpu *v, unsigned long cpu_khz);
+void pit_init(struct domain *d, unsigned long cpu_khz);
 void pit_stop_channel0_irq(PITState * pit);
 void pit_deinit(struct domain *d);
 void rtc_init(struct domain *d);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:55:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:55: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 1WXQsJ-0000hn-Cn; Tue, 08 Apr 2014 07:55:19 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsH-0000hg-GG
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:17 +0000
Received: from [85.158.137.68:31272] by server-6.bemta-3.messagelabs.com id
	B1/98-00470-46BA3435; Tue, 08 Apr 2014 07:55:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1396943715!5602180!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22242 invoked from network); 8 Apr 2014 07:55:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:16 -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 1WXQsE-0002Aw-OA
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsE-0005K5-Fy
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:14 +0000
Date: Tue, 08 Apr 2014 07:55:14 +0000
Message-Id: <E1WXQsE-0005K5-Fy@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86: fix pirq path for pvh
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 b44b5d2fe0ae1546a14d0800e094535aa3359334
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Fri Apr 4 10:37:57 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:37:57 2014 +0200

    x86: fix pirq path for pvh
    
    Just like hvm, pirq eoi shared page is not there for pvh. pvh should
    not touch any pv_domain fields.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    master commit: bea8ee1a5ff2bbe04fcc6297db45fac178a5abc9
    master date: 2014-03-13 14:24:19 +0100
---
 xen/arch/x86/irq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index db70077..88444be 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1068,13 +1068,13 @@ bool_t cpu_has_pending_apic_eoi(void)
 
 static inline void set_pirq_eoi(struct domain *d, unsigned int irq)
 {
-    if ( !is_hvm_domain(d) && d->arch.pv_domain.pirq_eoi_map )
+    if ( is_pv_domain(d) && d->arch.pv_domain.pirq_eoi_map )
         set_bit(irq, d->arch.pv_domain.pirq_eoi_map);
 }
 
 static inline void clear_pirq_eoi(struct domain *d, unsigned int irq)
 {
-    if ( !is_hvm_domain(d) && d->arch.pv_domain.pirq_eoi_map )
+    if ( is_pv_domain(d) && d->arch.pv_domain.pirq_eoi_map )
         clear_bit(irq, d->arch.pv_domain.pirq_eoi_map);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:55:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:55: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 1WXQsJ-0000hn-Cn; Tue, 08 Apr 2014 07:55:19 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsH-0000hg-GG
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:17 +0000
Received: from [85.158.137.68:31272] by server-6.bemta-3.messagelabs.com id
	B1/98-00470-46BA3435; Tue, 08 Apr 2014 07:55:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1396943715!5602180!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22242 invoked from network); 8 Apr 2014 07:55:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:16 -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 1WXQsE-0002Aw-OA
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsE-0005K5-Fy
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:14 +0000
Date: Tue, 08 Apr 2014 07:55:14 +0000
Message-Id: <E1WXQsE-0005K5-Fy@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86: fix pirq path for pvh
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 b44b5d2fe0ae1546a14d0800e094535aa3359334
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Fri Apr 4 10:37:57 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:37:57 2014 +0200

    x86: fix pirq path for pvh
    
    Just like hvm, pirq eoi shared page is not there for pvh. pvh should
    not touch any pv_domain fields.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    master commit: bea8ee1a5ff2bbe04fcc6297db45fac178a5abc9
    master date: 2014-03-13 14:24:19 +0100
---
 xen/arch/x86/irq.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index db70077..88444be 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1068,13 +1068,13 @@ bool_t cpu_has_pending_apic_eoi(void)
 
 static inline void set_pirq_eoi(struct domain *d, unsigned int irq)
 {
-    if ( !is_hvm_domain(d) && d->arch.pv_domain.pirq_eoi_map )
+    if ( is_pv_domain(d) && d->arch.pv_domain.pirq_eoi_map )
         set_bit(irq, d->arch.pv_domain.pirq_eoi_map);
 }
 
 static inline void clear_pirq_eoi(struct domain *d, unsigned int irq)
 {
-    if ( !is_hvm_domain(d) && d->arch.pv_domain.pirq_eoi_map )
+    if ( is_pv_domain(d) && d->arch.pv_domain.pirq_eoi_map )
         clear_bit(irq, d->arch.pv_domain.pirq_eoi_map);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:55:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:55:39 +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 1WXQsT-0000in-Fd; Tue, 08 Apr 2014 07:55:29 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsR-0000iH-Mx
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:27 +0000
Received: from [85.158.137.68:36208] by server-17.bemta-3.messagelabs.com id
	23/55-22741-E6BA3435; Tue, 08 Apr 2014 07:55:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1396943725!5622009!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29374 invoked from network); 8 Apr 2014 07:55:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:26 -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 1WXQsO-0002Az-TF
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsO-0005KR-RY
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:24 +0000
Date: Tue, 08 Apr 2014 07:55:24 +0000
Message-Id: <E1WXQsO-0005KR-RY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86/pvh: disallow
	PHYSDEVOP_pirq_eoi_gmfn_v2/v1
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 1e83fa5ee8064cc81e25f2a04cd47aeb5104413c
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Fri Apr 4 10:38:52 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:38:52 2014 +0200

    x86/pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1
    
    A call to do_physdev_op with PHYSDEVOP_pirq_eoi_gmfn_v2/v1 will corrupt
    struct hvm_domain when it writes to domain->arch.pv_domain.pirq_eoi_map.
    Disallow that. Currently, such a path exists for linux dom0 pvh.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    master commit: a7ca5c402e8cf61c5e8dd6e6797a627863f5a243
    master date: 2014-03-24 09:47:59 +0100
---
 xen/arch/x86/hvm/hvm.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index a666471..4228cf4 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3292,6 +3292,12 @@ static long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case PHYSDEVOP_irq_status_query:
     case PHYSDEVOP_get_free_pirq:
         return do_physdev_op(cmd, arg);
+
+    /* pvh fixme: coming soon */
+    case PHYSDEVOP_pirq_eoi_gmfn_v1:
+    case PHYSDEVOP_pirq_eoi_gmfn_v2:
+        return -ENOSYS;
+
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:55:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:55:39 +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 1WXQsT-0000in-Fd; Tue, 08 Apr 2014 07:55:29 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsR-0000iH-Mx
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:27 +0000
Received: from [85.158.137.68:36208] by server-17.bemta-3.messagelabs.com id
	23/55-22741-E6BA3435; Tue, 08 Apr 2014 07:55:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1396943725!5622009!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29374 invoked from network); 8 Apr 2014 07:55:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:26 -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 1WXQsO-0002Az-TF
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsO-0005KR-RY
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:24 +0000
Date: Tue, 08 Apr 2014 07:55:24 +0000
Message-Id: <E1WXQsO-0005KR-RY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86/pvh: disallow
	PHYSDEVOP_pirq_eoi_gmfn_v2/v1
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 1e83fa5ee8064cc81e25f2a04cd47aeb5104413c
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Fri Apr 4 10:38:52 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:38:52 2014 +0200

    x86/pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1
    
    A call to do_physdev_op with PHYSDEVOP_pirq_eoi_gmfn_v2/v1 will corrupt
    struct hvm_domain when it writes to domain->arch.pv_domain.pirq_eoi_map.
    Disallow that. Currently, such a path exists for linux dom0 pvh.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    master commit: a7ca5c402e8cf61c5e8dd6e6797a627863f5a243
    master date: 2014-03-24 09:47:59 +0100
---
 xen/arch/x86/hvm/hvm.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index a666471..4228cf4 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3292,6 +3292,12 @@ static long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case PHYSDEVOP_irq_status_query:
     case PHYSDEVOP_get_free_pirq:
         return do_physdev_op(cmd, arg);
+
+    /* pvh fixme: coming soon */
+    case PHYSDEVOP_pirq_eoi_gmfn_v1:
+    case PHYSDEVOP_pirq_eoi_gmfn_v2:
+        return -ENOSYS;
+
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:55:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:55: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 1WXQsd-0000k7-Id; Tue, 08 Apr 2014 07:55:39 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsb-0000jf-Vm
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:38 +0000
Received: from [85.158.137.68:11577] by server-6.bemta-3.messagelabs.com id
	27/19-00470-97BA3435; Tue, 08 Apr 2014 07:55:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1396943735!5570133!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10851 invoked from network); 8 Apr 2014 07:55:36 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:36 -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 1WXQsZ-0002BA-5S
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsZ-0005Ks-0h
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:35 +0000
Date: Tue, 08 Apr 2014 07:55:35 +0000
Message-Id: <E1WXQsZ-0005Ks-0h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] common: make hypercall preemption
	checks consistent
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 e83aed98cb04de03d272f4679da93d0bc73e619f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:40:05 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:40:05 2014 +0200

    common: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - do cheap checks first
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 8c0eed2cc8d8a2ccccdffe4c386b625b672dc12a
    master date: 2014-03-13 14:26:35 +0100
---
 xen/common/memory.c        |    9 +++++----
 xen/common/multicall.c     |    2 +-
 xen/drivers/char/console.c |    4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 5a0efd5..4d6ffee 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -63,7 +63,7 @@ static void increase_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -109,7 +109,7 @@ static void populate_physmap(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -268,7 +268,7 @@ static void decrease_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -398,7 +398,8 @@ static long memory_exchange(XEN_GUEST_HANDLE_PARAM(xen_memory_exchange_t) arg)
           i < (exch.in.nr_extents >> in_chunk_order);
           i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != (exch.nr_exchanged >> in_chunk_order) &&
+             hypercall_preempt_check() )
         {
             exch.nr_exchanged = i << in_chunk_order;
             rcu_unlock_domain(d);
diff --git a/xen/common/multicall.c b/xen/common/multicall.c
index 2afba98..e66c798 100644
--- a/xen/common/multicall.c
+++ b/xen/common/multicall.c
@@ -52,7 +52,7 @@ do_multicall(
 
     for ( i = 0; !rc && i < nr_calls; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i && hypercall_preempt_check() )
             goto preempted;
 
         if ( unlikely(__copy_from_guest(&mcs->call, call_list, 1)) )
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 532c426..89ffe64 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -375,12 +375,12 @@ static DECLARE_SOFTIRQ_TASKLET(notify_dom0_con_ring_tasklet,
 static long guest_console_write(XEN_GUEST_HANDLE_PARAM(char) buffer, int count)
 {
     char kbuf[128];
-    int kcount;
+    int kcount = 0;
     struct domain *cd = current->domain;
 
     while ( count > 0 )
     {
-        if ( hypercall_preempt_check() )
+        if ( kcount && hypercall_preempt_check() )
             return hypercall_create_continuation(
                 __HYPERVISOR_console_io, "iih",
                 CONSOLEIO_write, count, buffer);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:55:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:55: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 1WXQsd-0000k7-Id; Tue, 08 Apr 2014 07:55:39 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsb-0000jf-Vm
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:38 +0000
Received: from [85.158.137.68:11577] by server-6.bemta-3.messagelabs.com id
	27/19-00470-97BA3435; Tue, 08 Apr 2014 07:55:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1396943735!5570133!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10851 invoked from network); 8 Apr 2014 07:55:36 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:36 -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 1WXQsZ-0002BA-5S
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsZ-0005Ks-0h
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:35 +0000
Date: Tue, 08 Apr 2014 07:55:35 +0000
Message-Id: <E1WXQsZ-0005Ks-0h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] common: make hypercall preemption
	checks consistent
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 e83aed98cb04de03d272f4679da93d0bc73e619f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:40:05 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:40:05 2014 +0200

    common: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - do cheap checks first
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 8c0eed2cc8d8a2ccccdffe4c386b625b672dc12a
    master date: 2014-03-13 14:26:35 +0100
---
 xen/common/memory.c        |    9 +++++----
 xen/common/multicall.c     |    2 +-
 xen/drivers/char/console.c |    4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 5a0efd5..4d6ffee 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -63,7 +63,7 @@ static void increase_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -109,7 +109,7 @@ static void populate_physmap(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -268,7 +268,7 @@ static void decrease_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -398,7 +398,8 @@ static long memory_exchange(XEN_GUEST_HANDLE_PARAM(xen_memory_exchange_t) arg)
           i < (exch.in.nr_extents >> in_chunk_order);
           i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != (exch.nr_exchanged >> in_chunk_order) &&
+             hypercall_preempt_check() )
         {
             exch.nr_exchanged = i << in_chunk_order;
             rcu_unlock_domain(d);
diff --git a/xen/common/multicall.c b/xen/common/multicall.c
index 2afba98..e66c798 100644
--- a/xen/common/multicall.c
+++ b/xen/common/multicall.c
@@ -52,7 +52,7 @@ do_multicall(
 
     for ( i = 0; !rc && i < nr_calls; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i && hypercall_preempt_check() )
             goto preempted;
 
         if ( unlikely(__copy_from_guest(&mcs->call, call_list, 1)) )
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 532c426..89ffe64 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -375,12 +375,12 @@ static DECLARE_SOFTIRQ_TASKLET(notify_dom0_con_ring_tasklet,
 static long guest_console_write(XEN_GUEST_HANDLE_PARAM(char) buffer, int count)
 {
     char kbuf[128];
-    int kcount;
+    int kcount = 0;
     struct domain *cd = current->domain;
 
     while ( count > 0 )
     {
-        if ( hypercall_preempt_check() )
+        if ( kcount && hypercall_preempt_check() )
             return hypercall_create_continuation(
                 __HYPERVISOR_console_io, "iih",
                 CONSOLEIO_write, count, buffer);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:00 +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 1WXQso-0000lv-LY; Tue, 08 Apr 2014 07:55:50 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsm-0000lb-GS
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:48 +0000
Received: from [85.158.139.211:4452] by server-12.bemta-5.messagelabs.com id
	6B/89-03824-38BA3435; Tue, 08 Apr 2014 07:55:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1396943745!6086728!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13340 invoked from network); 8 Apr 2014 07:55:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:46 -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 1WXQsj-0002BG-Ch
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsj-0005LF-AX
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:45 +0000
Date: Tue, 08 Apr 2014 07:55:45 +0000
Message-Id: <E1WXQsj-0005LF-AX@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86: make hypercall preemption
	checks consistent
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 a2dba07f50af42863be0d50fc1a520950531527d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:40:37 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:40:37 2014 +0200

    x86: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - never preempt on the last iteration (pointless/wasteful)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: fd7bfce0395ace266159760e35dc49f7af3b90ce
    master date: 2014-03-13 14:27:51 +0100
---
 xen/arch/x86/mm.c                  |    4 ++--
 xen/arch/x86/mm/hap/hap.c          |    4 +++-
 xen/arch/x86/mm/p2m-pod.c          |    6 ++++--
 xen/arch/x86/mm/shadow/common.c    |    4 +++-
 xen/arch/x86/traps.c               |   14 +++++++-------
 xen/arch/x86/x86_64/compat/traps.c |   14 +++++++-------
 6 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 172c68c..fdc5ed3 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -2934,7 +2934,7 @@ long do_mmuext_op(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
@@ -3481,7 +3481,7 @@ long do_mmu_update(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index 5f75636..b8c5422 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -326,7 +326,7 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
     else
         pages -= d->arch.paging.hap.p2m_pages;
 
-    while ( d->arch.paging.hap.total_pages != pages )
+    for ( ; ; )
     {
         if ( d->arch.paging.hap.total_pages < pages )
         {
@@ -355,6 +355,8 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
             d->arch.paging.hap.total_pages--;
             free_domheap_page(pg);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 81645c4..d14565d 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -242,7 +242,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
         p2m_pod_cache_add(p2m, page, order);
 
-        if ( hypercall_preempt_check() && preemptible )
+        if ( preemptible && pod_target != p2m->pod.count &&
+             hypercall_preempt_check() )
         {
             ret = -EAGAIN;
             goto out;
@@ -286,7 +287,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
             put_page(page+i);
 
-            if ( hypercall_preempt_check() && preemptible )
+            if ( preemptible && pod_target != p2m->pod.count &&
+                 hypercall_preempt_check() )
             {
                 ret = -EAGAIN;
                 goto out;
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 11c6b62..f4d4a50 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1674,7 +1674,7 @@ static unsigned int sh_set_allocation(struct domain *d,
     SHADOW_PRINTK("current %i target %i\n", 
                    d->arch.paging.shadow.total_pages, pages);
 
-    while ( d->arch.paging.shadow.total_pages != pages ) 
+    for ( ; ; )
     {
         if ( d->arch.paging.shadow.total_pages < pages ) 
         {
@@ -1709,6 +1709,8 @@ static unsigned int sh_set_allocation(struct domain *d,
             d->arch.paging.shadow.total_pages--;
             free_domheap_page(sp);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 0bd43b9..4d27e12 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3595,13 +3595,6 @@ long do_set_trap_table(XEN_GUEST_HANDLE_PARAM(const_trap_info_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -3622,6 +3615,13 @@ long do_set_trap_table(XEN_GUEST_HANDLE_PARAM(const_trap_info_t) traps)
             init_int80_direct_trap(curr);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c
index 21a82b9..5f0ea0a 100644
--- a/xen/arch/x86/x86_64/compat/traps.c
+++ b/xen/arch/x86/x86_64/compat/traps.c
@@ -329,13 +329,6 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -353,6 +346,13 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
             init_int80_direct_trap(current);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:00 +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 1WXQso-0000lv-LY; Tue, 08 Apr 2014 07:55:50 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsm-0000lb-GS
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:48 +0000
Received: from [85.158.139.211:4452] by server-12.bemta-5.messagelabs.com id
	6B/89-03824-38BA3435; Tue, 08 Apr 2014 07:55:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-206.messagelabs.com!1396943745!6086728!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13340 invoked from network); 8 Apr 2014 07:55:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:46 -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 1WXQsj-0002BG-Ch
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsj-0005LF-AX
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:45 +0000
Date: Tue, 08 Apr 2014 07:55:45 +0000
Message-Id: <E1WXQsj-0005LF-AX@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86: make hypercall preemption
	checks consistent
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 a2dba07f50af42863be0d50fc1a520950531527d
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:40:37 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:40:37 2014 +0200

    x86: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - never preempt on the last iteration (pointless/wasteful)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: fd7bfce0395ace266159760e35dc49f7af3b90ce
    master date: 2014-03-13 14:27:51 +0100
---
 xen/arch/x86/mm.c                  |    4 ++--
 xen/arch/x86/mm/hap/hap.c          |    4 +++-
 xen/arch/x86/mm/p2m-pod.c          |    6 ++++--
 xen/arch/x86/mm/shadow/common.c    |    4 +++-
 xen/arch/x86/traps.c               |   14 +++++++-------
 xen/arch/x86/x86_64/compat/traps.c |   14 +++++++-------
 6 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 172c68c..fdc5ed3 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -2934,7 +2934,7 @@ long do_mmuext_op(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
@@ -3481,7 +3481,7 @@ long do_mmu_update(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index 5f75636..b8c5422 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -326,7 +326,7 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
     else
         pages -= d->arch.paging.hap.p2m_pages;
 
-    while ( d->arch.paging.hap.total_pages != pages )
+    for ( ; ; )
     {
         if ( d->arch.paging.hap.total_pages < pages )
         {
@@ -355,6 +355,8 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
             d->arch.paging.hap.total_pages--;
             free_domheap_page(pg);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 81645c4..d14565d 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -242,7 +242,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
         p2m_pod_cache_add(p2m, page, order);
 
-        if ( hypercall_preempt_check() && preemptible )
+        if ( preemptible && pod_target != p2m->pod.count &&
+             hypercall_preempt_check() )
         {
             ret = -EAGAIN;
             goto out;
@@ -286,7 +287,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
             put_page(page+i);
 
-            if ( hypercall_preempt_check() && preemptible )
+            if ( preemptible && pod_target != p2m->pod.count &&
+                 hypercall_preempt_check() )
             {
                 ret = -EAGAIN;
                 goto out;
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 11c6b62..f4d4a50 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1674,7 +1674,7 @@ static unsigned int sh_set_allocation(struct domain *d,
     SHADOW_PRINTK("current %i target %i\n", 
                    d->arch.paging.shadow.total_pages, pages);
 
-    while ( d->arch.paging.shadow.total_pages != pages ) 
+    for ( ; ; )
     {
         if ( d->arch.paging.shadow.total_pages < pages ) 
         {
@@ -1709,6 +1709,8 @@ static unsigned int sh_set_allocation(struct domain *d,
             d->arch.paging.shadow.total_pages--;
             free_domheap_page(sp);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 0bd43b9..4d27e12 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3595,13 +3595,6 @@ long do_set_trap_table(XEN_GUEST_HANDLE_PARAM(const_trap_info_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -3622,6 +3615,13 @@ long do_set_trap_table(XEN_GUEST_HANDLE_PARAM(const_trap_info_t) traps)
             init_int80_direct_trap(curr);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c
index 21a82b9..5f0ea0a 100644
--- a/xen/arch/x86/x86_64/compat/traps.c
+++ b/xen/arch/x86/x86_64/compat/traps.c
@@ -329,13 +329,6 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -353,6 +346,13 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
             init_int80_direct_trap(current);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:10 +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 1WXQsy-0000pR-OC; Tue, 08 Apr 2014 07:56:00 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsw-0000oF-G1
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:58 +0000
Received: from [85.158.137.68:45183] by server-17.bemta-3.messagelabs.com id
	77/06-22741-D8BA3435; Tue, 08 Apr 2014 07:55:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1396943755!4132211!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18929 invoked from network); 8 Apr 2014 07:55:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:56 -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 1WXQst-0002BP-HK
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQst-0005M7-Fo
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:55 +0000
Date: Tue, 08 Apr 2014 07:55:55 +0000
Message-Id: <E1WXQst-0005M7-Fo@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] VT-d: fix RMRR handling
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 3ef7b3a64473fae523ef84398eb00c7ab3ff1c1a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:41:23 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:41:23 2014 +0200

    VT-d: fix RMRR handling
    
    Removing mapped RMRR tracking structures in dma_pte_clear_one() is
    wrong for two reasons: First, these regions may cover more than a
    single page. And second, multiple devices (and hence multiple devices
    assigned to any particular guest) may share a single RMRR (whether
    assigning such devices to distinct guests is a safe thing to do is
    another question).
    
    Therefore move the removal of the tracking structures into the
    counterpart function to the one doing the insertion -
    intel_iommu_remove_device(), and add a reference count to the tracking
    structure.
    
    Further, for the handling of the mappings of the respective memory
    regions to be correct, RMRRs must not overlap. Add a respective check
    to acpi_parse_one_rmrr().
    
    And finally, with all of this being VT-d specific, move the cleanup
    of the list as well as the structure type definition where it belongs -
    in VT-d specific rather than IOMMU generic code.
    
    Note that this doesn't address yet another issue associated with RMRR
    handling: The purpose of the RMRRs as well as the way the respective
    IOMMU page table mappings get inserted both suggest that these regions
    would need to be marked E820_RESERVED in all (HVM?) guests' memory
    maps, yet nothing like this is being done in hvmloader. (For PV guests
    this would also seem to be necessary, but may conflict with PV guests
    possibly assuming there to be just a single E820 entry representing all
    of its RAM.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
    master commit: dd527061770789d8152b1dea68056987b202d87a
    master date: 2014-03-17 16:45:04 +0100
---
 xen/drivers/passthrough/iommu.c     |   10 +---
 xen/drivers/passthrough/vtd/dmar.c  |   10 ++++
 xen/drivers/passthrough/vtd/iommu.c |   92 ++++++++++++++++++++++++-----------
 xen/include/xen/hvm/iommu.h         |    6 --
 4 files changed, 74 insertions(+), 44 deletions(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 19b0e23..c687c53 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -412,9 +412,8 @@ static int iommu_populate_page_table(struct domain *d)
 void iommu_domain_destroy(struct domain *d)
 {
     struct hvm_iommu *hd  = domain_hvm_iommu(d);
-    struct list_head *ioport_list, *rmrr_list, *tmp;
+    struct list_head *ioport_list, *tmp;
     struct g2m_ioport *ioport;
-    struct mapped_rmrr *mrmrr;
 
     if ( !iommu_enabled || !hd->platform_ops )
         return;
@@ -428,13 +427,6 @@ void iommu_domain_destroy(struct domain *d)
         list_del(&ioport->list);
         xfree(ioport);
     }
-
-    list_for_each_safe ( rmrr_list, tmp, &hd->mapped_rmrrs )
-    {
-        mrmrr = list_entry(rmrr_list, struct mapped_rmrr, list);
-        list_del(&mrmrr->list);
-        xfree(mrmrr);
-    }
 }
 
 int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn,
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index cb998e2..1152c3a 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -580,6 +580,16 @@ acpi_parse_one_rmrr(struct acpi_dmar_header *header)
     if ( (ret = acpi_dmar_check_length(header, sizeof(*rmrr))) != 0 )
         return ret;
 
+    list_for_each_entry(rmrru, &acpi_rmrr_units, list)
+       if ( base_addr <= rmrru->end_address && rmrru->base_address <= end_addr )
+       {
+           printk(XENLOG_ERR VTDPREFIX
+                  "Overlapping RMRRs [%"PRIx64",%"PRIx64"] and [%"PRIx64",%"PRIx64"]\n",
+                  rmrru->base_address, rmrru->end_address,
+                  base_addr, end_addr);
+           return -EEXIST;
+       }
+
     /* This check is here simply to detect when RMRR values are
      * not properly represented in the system memory map and
      * inform the user
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index e2a4778..3cce78c 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -42,6 +42,12 @@
 #include "vtd.h"
 #include "../ats.h"
 
+struct mapped_rmrr {
+    struct list_head list;
+    u64 base, end;
+    unsigned int count;
+};
+
 /* Possible unfiltered LAPIC/MSI messages from untrusted sources? */
 bool_t __read_mostly untrusted_msi;
 
@@ -619,7 +625,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
     struct hvm_iommu *hd = domain_hvm_iommu(domain);
     struct dma_pte *page = NULL, *pte = NULL;
     u64 pg_maddr;
-    struct mapped_rmrr *mrmrr;
 
     spin_lock(&hd->mapping_lock);
     /* get last level pte */
@@ -648,21 +653,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
         __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K, 1, 1);
 
     unmap_vtd_domain_page(page);
-
-    /* if the cleared address is between mapped RMRR region,
-     * remove the mapped RMRR
-     */
-    spin_lock(&hd->mapping_lock);
-    list_for_each_entry ( mrmrr, &hd->mapped_rmrrs, list )
-    {
-        if ( addr >= mrmrr->base && addr <= mrmrr->end )
-        {
-            list_del(&mrmrr->list);
-            xfree(mrmrr);
-            break;
-        }
-    }
-    spin_unlock(&hd->mapping_lock);
 }
 
 static void iommu_free_pagetable(u64 pt_maddr, int level)
@@ -1700,10 +1690,17 @@ static int reassign_device_ownership(
 void iommu_domain_teardown(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
+    struct mapped_rmrr *mrmrr, *tmp;
 
     if ( list_empty(&acpi_drhd_units) )
         return;
 
+    list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
+    {
+        list_del(&mrmrr->list);
+        xfree(mrmrr);
+    }
+
     if ( iommu_use_hap_pt(d) )
         return;
 
@@ -1848,14 +1845,17 @@ static int rmrr_identity_mapping(struct domain *d,
     ASSERT(rmrr->base_address < rmrr->end_address);
 
     /*
-     * No need to acquire hd->mapping_lock, as the only theoretical race is
-     * with the insertion below (impossible due to holding pcidevs_lock).
+     * No need to acquire hd->mapping_lock: Both insertion and removal
+     * get done while holding pcidevs_lock.
      */
     list_for_each_entry( mrmrr, &hd->mapped_rmrrs, list )
     {
         if ( mrmrr->base == rmrr->base_address &&
              mrmrr->end == rmrr->end_address )
+        {
+            ++mrmrr->count;
             return 0;
+        }
     }
 
     base = rmrr->base_address & PAGE_MASK_4K;
@@ -1876,9 +1876,8 @@ static int rmrr_identity_mapping(struct domain *d,
         return -ENOMEM;
     mrmrr->base = rmrr->base_address;
     mrmrr->end = rmrr->end_address;
-    spin_lock(&hd->mapping_lock);
+    mrmrr->count = 1;
     list_add_tail(&mrmrr->list, &hd->mapped_rmrrs);
-    spin_unlock(&hd->mapping_lock);
 
     return 0;
 }
@@ -1940,17 +1939,52 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
     if ( !pdev->domain )
         return -EINVAL;
 
-    /* If the device belongs to dom0, and it has RMRR, don't remove it
-     * from dom0, because BIOS may use RMRR at booting time.
-     */
-    if ( pdev->domain->domain_id == 0 )
+    for_each_rmrr_device ( rmrr, bdf, i )
     {
-        for_each_rmrr_device ( rmrr, bdf, i )
+        struct hvm_iommu *hd;
+        struct mapped_rmrr *mrmrr, *tmp;
+
+        if ( rmrr->segment != pdev->seg ||
+             PCI_BUS(bdf) != pdev->bus ||
+             PCI_DEVFN2(bdf) != devfn )
+            continue;
+
+        /*
+         * If the device belongs to dom0, and it has RMRR, don't remove
+         * it from dom0, because BIOS may use RMRR at booting time.
+         */
+        if ( is_hardware_domain(pdev->domain) )
+            return 0;
+
+        hd = domain_hvm_iommu(pdev->domain);
+
+        /*
+         * No need to acquire hd->mapping_lock: Both insertion and removal
+         * get done while holding pcidevs_lock.
+         */
+        ASSERT(spin_is_locked(&pcidevs_lock));
+        list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
         {
-            if ( rmrr->segment == pdev->seg &&
-                 PCI_BUS(bdf) == pdev->bus &&
-                 PCI_DEVFN2(bdf) == devfn )
-                return 0;
+            unsigned long base_pfn, end_pfn;
+
+            if ( rmrr->base_address != mrmrr->base ||
+                 rmrr->end_address != mrmrr->end )
+                continue;
+
+            if ( --mrmrr->count )
+                break;
+
+            base_pfn = (mrmrr->base & PAGE_MASK_4K) >> PAGE_SHIFT_4K;
+            end_pfn = PAGE_ALIGN_4K(mrmrr->end) >> PAGE_SHIFT_4K;
+            while ( base_pfn < end_pfn )
+            {
+                if ( intel_iommu_unmap_page(pdev->domain, base_pfn) )
+                    return -ENXIO;
+                base_pfn++;
+            }
+
+            list_del(&mrmrr->list);
+            xfree(mrmrr);
         }
     }
 
diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h
index 26539e0..8c98274 100644
--- a/xen/include/xen/hvm/iommu.h
+++ b/xen/include/xen/hvm/iommu.h
@@ -29,12 +29,6 @@ struct g2m_ioport {
     unsigned int np;
 };
 
-struct mapped_rmrr {
-    struct list_head list;
-    u64 base;
-    u64 end;
-};
-
 struct hvm_iommu {
     u64 pgd_maddr;                 /* io page directory machine address */
     spinlock_t mapping_lock;       /* io page table lock */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:10 +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 1WXQsy-0000pR-OC; Tue, 08 Apr 2014 07:56:00 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQsw-0000oF-G1
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:58 +0000
Received: from [85.158.137.68:45183] by server-17.bemta-3.messagelabs.com id
	77/06-22741-D8BA3435; Tue, 08 Apr 2014 07:55:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1396943755!4132211!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18929 invoked from network); 8 Apr 2014 07:55:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:55:56 -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 1WXQst-0002BP-HK
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQst-0005M7-Fo
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:55:55 +0000
Date: Tue, 08 Apr 2014 07:55:55 +0000
Message-Id: <E1WXQst-0005M7-Fo@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] VT-d: fix RMRR handling
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 3ef7b3a64473fae523ef84398eb00c7ab3ff1c1a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:41:23 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:41:23 2014 +0200

    VT-d: fix RMRR handling
    
    Removing mapped RMRR tracking structures in dma_pte_clear_one() is
    wrong for two reasons: First, these regions may cover more than a
    single page. And second, multiple devices (and hence multiple devices
    assigned to any particular guest) may share a single RMRR (whether
    assigning such devices to distinct guests is a safe thing to do is
    another question).
    
    Therefore move the removal of the tracking structures into the
    counterpart function to the one doing the insertion -
    intel_iommu_remove_device(), and add a reference count to the tracking
    structure.
    
    Further, for the handling of the mappings of the respective memory
    regions to be correct, RMRRs must not overlap. Add a respective check
    to acpi_parse_one_rmrr().
    
    And finally, with all of this being VT-d specific, move the cleanup
    of the list as well as the structure type definition where it belongs -
    in VT-d specific rather than IOMMU generic code.
    
    Note that this doesn't address yet another issue associated with RMRR
    handling: The purpose of the RMRRs as well as the way the respective
    IOMMU page table mappings get inserted both suggest that these regions
    would need to be marked E820_RESERVED in all (HVM?) guests' memory
    maps, yet nothing like this is being done in hvmloader. (For PV guests
    this would also seem to be necessary, but may conflict with PV guests
    possibly assuming there to be just a single E820 entry representing all
    of its RAM.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
    master commit: dd527061770789d8152b1dea68056987b202d87a
    master date: 2014-03-17 16:45:04 +0100
---
 xen/drivers/passthrough/iommu.c     |   10 +---
 xen/drivers/passthrough/vtd/dmar.c  |   10 ++++
 xen/drivers/passthrough/vtd/iommu.c |   92 ++++++++++++++++++++++++-----------
 xen/include/xen/hvm/iommu.h         |    6 --
 4 files changed, 74 insertions(+), 44 deletions(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 19b0e23..c687c53 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -412,9 +412,8 @@ static int iommu_populate_page_table(struct domain *d)
 void iommu_domain_destroy(struct domain *d)
 {
     struct hvm_iommu *hd  = domain_hvm_iommu(d);
-    struct list_head *ioport_list, *rmrr_list, *tmp;
+    struct list_head *ioport_list, *tmp;
     struct g2m_ioport *ioport;
-    struct mapped_rmrr *mrmrr;
 
     if ( !iommu_enabled || !hd->platform_ops )
         return;
@@ -428,13 +427,6 @@ void iommu_domain_destroy(struct domain *d)
         list_del(&ioport->list);
         xfree(ioport);
     }
-
-    list_for_each_safe ( rmrr_list, tmp, &hd->mapped_rmrrs )
-    {
-        mrmrr = list_entry(rmrr_list, struct mapped_rmrr, list);
-        list_del(&mrmrr->list);
-        xfree(mrmrr);
-    }
 }
 
 int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn,
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index cb998e2..1152c3a 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -580,6 +580,16 @@ acpi_parse_one_rmrr(struct acpi_dmar_header *header)
     if ( (ret = acpi_dmar_check_length(header, sizeof(*rmrr))) != 0 )
         return ret;
 
+    list_for_each_entry(rmrru, &acpi_rmrr_units, list)
+       if ( base_addr <= rmrru->end_address && rmrru->base_address <= end_addr )
+       {
+           printk(XENLOG_ERR VTDPREFIX
+                  "Overlapping RMRRs [%"PRIx64",%"PRIx64"] and [%"PRIx64",%"PRIx64"]\n",
+                  rmrru->base_address, rmrru->end_address,
+                  base_addr, end_addr);
+           return -EEXIST;
+       }
+
     /* This check is here simply to detect when RMRR values are
      * not properly represented in the system memory map and
      * inform the user
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index e2a4778..3cce78c 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -42,6 +42,12 @@
 #include "vtd.h"
 #include "../ats.h"
 
+struct mapped_rmrr {
+    struct list_head list;
+    u64 base, end;
+    unsigned int count;
+};
+
 /* Possible unfiltered LAPIC/MSI messages from untrusted sources? */
 bool_t __read_mostly untrusted_msi;
 
@@ -619,7 +625,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
     struct hvm_iommu *hd = domain_hvm_iommu(domain);
     struct dma_pte *page = NULL, *pte = NULL;
     u64 pg_maddr;
-    struct mapped_rmrr *mrmrr;
 
     spin_lock(&hd->mapping_lock);
     /* get last level pte */
@@ -648,21 +653,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
         __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K, 1, 1);
 
     unmap_vtd_domain_page(page);
-
-    /* if the cleared address is between mapped RMRR region,
-     * remove the mapped RMRR
-     */
-    spin_lock(&hd->mapping_lock);
-    list_for_each_entry ( mrmrr, &hd->mapped_rmrrs, list )
-    {
-        if ( addr >= mrmrr->base && addr <= mrmrr->end )
-        {
-            list_del(&mrmrr->list);
-            xfree(mrmrr);
-            break;
-        }
-    }
-    spin_unlock(&hd->mapping_lock);
 }
 
 static void iommu_free_pagetable(u64 pt_maddr, int level)
@@ -1700,10 +1690,17 @@ static int reassign_device_ownership(
 void iommu_domain_teardown(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
+    struct mapped_rmrr *mrmrr, *tmp;
 
     if ( list_empty(&acpi_drhd_units) )
         return;
 
+    list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
+    {
+        list_del(&mrmrr->list);
+        xfree(mrmrr);
+    }
+
     if ( iommu_use_hap_pt(d) )
         return;
 
@@ -1848,14 +1845,17 @@ static int rmrr_identity_mapping(struct domain *d,
     ASSERT(rmrr->base_address < rmrr->end_address);
 
     /*
-     * No need to acquire hd->mapping_lock, as the only theoretical race is
-     * with the insertion below (impossible due to holding pcidevs_lock).
+     * No need to acquire hd->mapping_lock: Both insertion and removal
+     * get done while holding pcidevs_lock.
      */
     list_for_each_entry( mrmrr, &hd->mapped_rmrrs, list )
     {
         if ( mrmrr->base == rmrr->base_address &&
              mrmrr->end == rmrr->end_address )
+        {
+            ++mrmrr->count;
             return 0;
+        }
     }
 
     base = rmrr->base_address & PAGE_MASK_4K;
@@ -1876,9 +1876,8 @@ static int rmrr_identity_mapping(struct domain *d,
         return -ENOMEM;
     mrmrr->base = rmrr->base_address;
     mrmrr->end = rmrr->end_address;
-    spin_lock(&hd->mapping_lock);
+    mrmrr->count = 1;
     list_add_tail(&mrmrr->list, &hd->mapped_rmrrs);
-    spin_unlock(&hd->mapping_lock);
 
     return 0;
 }
@@ -1940,17 +1939,52 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
     if ( !pdev->domain )
         return -EINVAL;
 
-    /* If the device belongs to dom0, and it has RMRR, don't remove it
-     * from dom0, because BIOS may use RMRR at booting time.
-     */
-    if ( pdev->domain->domain_id == 0 )
+    for_each_rmrr_device ( rmrr, bdf, i )
     {
-        for_each_rmrr_device ( rmrr, bdf, i )
+        struct hvm_iommu *hd;
+        struct mapped_rmrr *mrmrr, *tmp;
+
+        if ( rmrr->segment != pdev->seg ||
+             PCI_BUS(bdf) != pdev->bus ||
+             PCI_DEVFN2(bdf) != devfn )
+            continue;
+
+        /*
+         * If the device belongs to dom0, and it has RMRR, don't remove
+         * it from dom0, because BIOS may use RMRR at booting time.
+         */
+        if ( is_hardware_domain(pdev->domain) )
+            return 0;
+
+        hd = domain_hvm_iommu(pdev->domain);
+
+        /*
+         * No need to acquire hd->mapping_lock: Both insertion and removal
+         * get done while holding pcidevs_lock.
+         */
+        ASSERT(spin_is_locked(&pcidevs_lock));
+        list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
         {
-            if ( rmrr->segment == pdev->seg &&
-                 PCI_BUS(bdf) == pdev->bus &&
-                 PCI_DEVFN2(bdf) == devfn )
-                return 0;
+            unsigned long base_pfn, end_pfn;
+
+            if ( rmrr->base_address != mrmrr->base ||
+                 rmrr->end_address != mrmrr->end )
+                continue;
+
+            if ( --mrmrr->count )
+                break;
+
+            base_pfn = (mrmrr->base & PAGE_MASK_4K) >> PAGE_SHIFT_4K;
+            end_pfn = PAGE_ALIGN_4K(mrmrr->end) >> PAGE_SHIFT_4K;
+            while ( base_pfn < end_pfn )
+            {
+                if ( intel_iommu_unmap_page(pdev->domain, base_pfn) )
+                    return -ENXIO;
+                base_pfn++;
+            }
+
+            list_del(&mrmrr->list);
+            xfree(mrmrr);
         }
     }
 
diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h
index 26539e0..8c98274 100644
--- a/xen/include/xen/hvm/iommu.h
+++ b/xen/include/xen/hvm/iommu.h
@@ -29,12 +29,6 @@ struct g2m_ioport {
     unsigned int np;
 };
 
-struct mapped_rmrr {
-    struct list_head list;
-    u64 base;
-    u64 end;
-};
-
 struct hvm_iommu {
     u64 pgd_maddr;                 /* io page directory machine address */
     spinlock_t mapping_lock;       /* io page table lock */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56: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 1WXQt7-0000t8-UP; Tue, 08 Apr 2014 07:56:09 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQt6-0000sw-Mj
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:08 +0000
Received: from [193.109.254.147:16418] by server-5.bemta-14.messagelabs.com id
	F9/8B-26413-79BA3435; Tue, 08 Apr 2014 07:56:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1396943765!6869612!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8266 invoked from network); 8 Apr 2014 07:56:06 -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;
	8 Apr 2014 07:56: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 1WXQt3-0002Bz-MR
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQt3-0005Md-Ka
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:05 +0000
Date: Tue, 08 Apr 2014 07:56:05 +0000
Message-Id: <E1WXQt3-0005Md-Ka@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86/Intel: work around Xeon 7400
	series erratum AAI65
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 46e32001165a2d85cc6cda41240e6fbe9103bf07
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:42:18 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:42:18 2014 +0200

    x86/Intel: work around Xeon 7400 series erratum AAI65
    
    Linux commit 40e2d7f9b5dae048789c64672bf3027fbb663ffa ("x86 idle:
    Repair large-server 50-watt idle-power regression") tells us that this
    applies not just to the named Xeon 7400 series, but also NHM-EX and
    WSM-EX; sadly Intel's documentation is so badly searchable that I
    wasn't able to locate the respective errata (and hence can't quote
    their numbers here).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
    master commit: 96d1b237ae9b2f2718bb1c59820701f17d3d86e0
    master date: 2014-03-17 16:47:22 +0100
---
 xen/arch/x86/acpi/cpu_idle.c     |    3 +++
 xen/arch/x86/cpu/intel.c         |    7 +++++++
 xen/include/asm-x86/cpufeature.h |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 597befa..ab86c75 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -296,6 +296,9 @@ void mwait_idle_with_hints(unsigned int eax, unsigned int ecx)
     unsigned int cpu = smp_processor_id();
     s_time_t expires = per_cpu(timer_deadline, cpu);
 
+    if ( boot_cpu_has(X86_FEATURE_CLFLUSH_MONITOR) )
+        clflush((void *)&mwait_wakeup(cpu));
+
     __monitor((void *)&mwait_wakeup(cpu), 0, 0);
     smp_mb();
 
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 27fe762..992650f 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -147,6 +147,9 @@ void __devinit early_intel_workaround(struct cpuinfo_x86 *c)
 /*
  * P4 Xeon errata 037 workaround.
  * Hardware prefetcher may cause stale data to be loaded into the cache.
+ *
+ * Xeon 7400 erratum AAI65 (and further newer Xeons)
+ * MONITOR/MWAIT may have excessive false wakeups
  */
 static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 {
@@ -161,6 +164,10 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 			wrmsr (MSR_IA32_MISC_ENABLE, lo, hi);
 		}
 	}
+
+	if (c->x86 == 6 && cpu_has_clflush &&
+	    (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47))
+		set_bit(X86_FEATURE_CLFLUSH_MONITOR, c->x86_capability);
 }
 
 
diff --git a/xen/include/asm-x86/cpufeature.h b/xen/include/asm-x86/cpufeature.h
index 1cfaf94..526821f 100644
--- a/xen/include/asm-x86/cpufeature.h
+++ b/xen/include/asm-x86/cpufeature.h
@@ -71,6 +71,7 @@
 #define X86_FEATURE_TSC_RELIABLE (3*32+12) /* TSC is known to be reliable */
 #define X86_FEATURE_XTOPOLOGY    (3*32+13) /* cpu topology enum extensions */
 #define X86_FEATURE_CPUID_FAULTING (3*32+14) /* cpuid faulting */
+#define X86_FEATURE_CLFLUSH_MONITOR (3*32+15) /* clflush reqd with monitor */
 
 /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
 #define X86_FEATURE_XMM3	(4*32+ 0) /* Streaming SIMD Extensions-3 */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56: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 1WXQt7-0000t8-UP; Tue, 08 Apr 2014 07:56:09 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQt6-0000sw-Mj
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:08 +0000
Received: from [193.109.254.147:16418] by server-5.bemta-14.messagelabs.com id
	F9/8B-26413-79BA3435; Tue, 08 Apr 2014 07:56:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1396943765!6869612!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8266 invoked from network); 8 Apr 2014 07:56:06 -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;
	8 Apr 2014 07:56: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 1WXQt3-0002Bz-MR
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQt3-0005Md-Ka
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:05 +0000
Date: Tue, 08 Apr 2014 07:56:05 +0000
Message-Id: <E1WXQt3-0005Md-Ka@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86/Intel: work around Xeon 7400
	series erratum AAI65
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 46e32001165a2d85cc6cda41240e6fbe9103bf07
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:42:18 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:42:18 2014 +0200

    x86/Intel: work around Xeon 7400 series erratum AAI65
    
    Linux commit 40e2d7f9b5dae048789c64672bf3027fbb663ffa ("x86 idle:
    Repair large-server 50-watt idle-power regression") tells us that this
    applies not just to the named Xeon 7400 series, but also NHM-EX and
    WSM-EX; sadly Intel's documentation is so badly searchable that I
    wasn't able to locate the respective errata (and hence can't quote
    their numbers here).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
    master commit: 96d1b237ae9b2f2718bb1c59820701f17d3d86e0
    master date: 2014-03-17 16:47:22 +0100
---
 xen/arch/x86/acpi/cpu_idle.c     |    3 +++
 xen/arch/x86/cpu/intel.c         |    7 +++++++
 xen/include/asm-x86/cpufeature.h |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 597befa..ab86c75 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -296,6 +296,9 @@ void mwait_idle_with_hints(unsigned int eax, unsigned int ecx)
     unsigned int cpu = smp_processor_id();
     s_time_t expires = per_cpu(timer_deadline, cpu);
 
+    if ( boot_cpu_has(X86_FEATURE_CLFLUSH_MONITOR) )
+        clflush((void *)&mwait_wakeup(cpu));
+
     __monitor((void *)&mwait_wakeup(cpu), 0, 0);
     smp_mb();
 
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 27fe762..992650f 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -147,6 +147,9 @@ void __devinit early_intel_workaround(struct cpuinfo_x86 *c)
 /*
  * P4 Xeon errata 037 workaround.
  * Hardware prefetcher may cause stale data to be loaded into the cache.
+ *
+ * Xeon 7400 erratum AAI65 (and further newer Xeons)
+ * MONITOR/MWAIT may have excessive false wakeups
  */
 static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 {
@@ -161,6 +164,10 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 			wrmsr (MSR_IA32_MISC_ENABLE, lo, hi);
 		}
 	}
+
+	if (c->x86 == 6 && cpu_has_clflush &&
+	    (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47))
+		set_bit(X86_FEATURE_CLFLUSH_MONITOR, c->x86_capability);
 }
 
 
diff --git a/xen/include/asm-x86/cpufeature.h b/xen/include/asm-x86/cpufeature.h
index 1cfaf94..526821f 100644
--- a/xen/include/asm-x86/cpufeature.h
+++ b/xen/include/asm-x86/cpufeature.h
@@ -71,6 +71,7 @@
 #define X86_FEATURE_TSC_RELIABLE (3*32+12) /* TSC is known to be reliable */
 #define X86_FEATURE_XTOPOLOGY    (3*32+13) /* cpu topology enum extensions */
 #define X86_FEATURE_CPUID_FAULTING (3*32+14) /* cpuid faulting */
+#define X86_FEATURE_CLFLUSH_MONITOR (3*32+15) /* clflush reqd with monitor */
 
 /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
 #define X86_FEATURE_XMM3	(4*32+ 0) /* Streaming SIMD Extensions-3 */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:51 +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 1WXQtS-0000xs-3c; Tue, 08 Apr 2014 07:56:30 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtQ-0000wZ-Np
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:29 +0000
Received: from [193.109.254.147:10089] by server-7.bemta-14.messagelabs.com id
	5B/1E-17726-CABA3435; Tue, 08 Apr 2014 07:56:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1396943786!6889411!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21801 invoked from network); 8 Apr 2014 07:56: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;
	8 Apr 2014 07:56:27 -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 1WXQtO-0002CG-0u
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtN-0005NT-Vu
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:26 +0000
Date: Tue, 08 Apr 2014 07:56:25 +0000
Message-Id: <E1WXQtN-0005NT-Vu@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86/HVM: correct CPUID leaf
	80000008 handling
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 dc9b9e6d987ba825660f35634639e95559174a22
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:44:09 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:44:09 2014 +0200

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: ef437690af8b75e6758dce77af75a22b63982883
    master date: 2014-03-28 13:33:34 +0100
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   27 ++++++++++++++-------------
 2 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 4228cf4..93d49ec 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2883,6 +2883,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2916,8 +2918,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2934,7 +2934,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2948,6 +2948,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, NULL, NULL, NULL, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, NULL, NULL, NULL, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index dd1561e..bf8bdc5 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,11 +172,7 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -455,7 +451,7 @@ bool_t mtrr_fix_range_msr_set(struct mtrr_state *m, uint32_t row,
 bool_t mtrr_var_range_msr_set(
     struct domain *d, struct mtrr_state *m, uint32_t msr, uint64_t msr_content)
 {
-    uint32_t index, type, phys_addr, eax, ebx, ecx, edx;
+    uint32_t index, type, phys_addr, eax;
     uint64_t msr_mask;
     uint64_t *var_range_base = (uint64_t*)m->var_ranges;
 
@@ -468,16 +464,21 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, NULL, NULL, NULL);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, NULL, NULL, NULL);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:51 +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 1WXQtH-0000uS-0i; Tue, 08 Apr 2014 07:56:19 +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 1WXQtG-0000uI-B5
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:18 +0000
Received: from [85.158.143.35:14924] by server-3.bemta-4.messagelabs.com id
	60/61-13602-1ABA3435; Tue, 08 Apr 2014 07:56:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1396943776!7575102!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19629 invoked from network); 8 Apr 2014 07:56:16 -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;
	8 Apr 2014 07:56:16 -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 1WXQtD-0002C7-SH
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtD-0005N4-PF
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:15 +0000
Date: Tue, 08 Apr 2014 07:56:15 +0000
Message-Id: <E1WXQtD-0005N4-PF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86: fix determination of bit
	count for struct domain allocations
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 6e399a5006dbbba68817307cbf4edbb2bde530f1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:43:07 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:43:07 2014 +0200

    x86: fix determination of bit count for struct domain allocations
    
    We can't just add in the hole shift value, as the hole may be at or
    above the 44-bit boundary. Instead we need to determine the total bit
    count until reaching 32 significant (not squashed out) bits in PFN
    representations.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: b3d2f8b2cba9fce5bc8995612d0d13fcefec7769
    master date: 2014-03-24 10:48:03 +0100
---
 xen/arch/x86/domain.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index bc073e5..5aa8f96 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -180,6 +180,28 @@ void dump_pageframe_info(struct domain *d)
     spin_unlock(&d->page_alloc_lock);
 }
 
+/*
+ * The hole may be at or above the 44-bit boundary, so we need to determine
+ * the total bit count until reaching 32 significant (not squashed out) bits
+ * in PFN representations.
+ * Note that the way "bits" gets initialized/updated/bounds-checked guarantees
+ * that the function will never return zero, and hence will never be called
+ * more than once (which is important due to it being deliberately placed in
+ * .init.text).
+ */
+static unsigned int __init noinline _domain_struct_bits(void)
+{
+    unsigned int bits = 32 + PAGE_SHIFT;
+    unsigned int sig = hweight32(~pfn_hole_mask);
+    unsigned int mask = pfn_hole_mask >> 32;
+
+    for ( ; bits < BITS_PER_LONG && sig < 32; ++bits, mask >>= 1 )
+        if ( !(mask & 1) )
+            ++sig;
+
+    return bits;
+}
+
 struct domain *alloc_domain_struct(void)
 {
     struct domain *d;
@@ -187,7 +209,10 @@ struct domain *alloc_domain_struct(void)
      * We pack the PDX of the domain structure into a 32-bit field within
      * the page_info structure. Hence the MEMF_bits() restriction.
      */
-    unsigned int bits = 32 + PAGE_SHIFT + pfn_pdx_hole_shift;
+    static unsigned int __read_mostly bits;
+
+    if ( unlikely(!bits) )
+         bits = _domain_struct_bits();
 
     BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
     d = alloc_xenheap_pages(0, MEMF_bits(bits));
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:51 +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 1WXQtm-00012F-92; Tue, 08 Apr 2014 07:56:50 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtk-000126-Oy
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:48 +0000
Received: from [193.109.254.147:60892] by server-12.bemta-14.messagelabs.com
	id D8/77-27473-0CBA3435; Tue, 08 Apr 2014 07:56:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1396943806!6889511!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24297 invoked from network); 8 Apr 2014 07:56:47 -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 Apr 2014 07:56:47 -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 1WXQti-0002CQ-9T
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQti-0005OG-8B
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:46 +0000
Date: Tue, 08 Apr 2014 07:56:46 +0000
Message-Id: <E1WXQti-0005OG-8B@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] kexec: propagate ENOMEM result in
	error handling
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 4a4a1d457bc9264b4399728348a2bb84c739e253
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Fri Apr 4 10:45:31 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:45:31 2014 +0200

    kexec: propagate ENOMEM result in error handling
    
    ...otherwise if kimage_alloc_control_page fails (presumably due to
    out-of-memory; see the invocation just before this one), the caller of
    do_kimage_alloc will think the call was successful.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 66c6349265d6536d0b77cd958ee3e5074e86233a
    master date: 2014-04-01 16:48:02 +0200
---
 xen/common/kimage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/common/kimage.c b/xen/common/kimage.c
index 91943f1..9b79a5e 100644
--- a/xen/common/kimage.c
+++ b/xen/common/kimage.c
@@ -182,6 +182,7 @@ static int do_kimage_alloc(struct kexec_image **rimage, paddr_t entry,
         goto out;
 
     /* Add an empty indirection page. */
+    result = -ENOMEM;
     image->entry_page = kimage_alloc_control_page(image, 0);
     if ( !image->entry_page )
         goto out;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:51 +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 1WXQtS-0000xs-3c; Tue, 08 Apr 2014 07:56:30 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtQ-0000wZ-Np
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:29 +0000
Received: from [193.109.254.147:10089] by server-7.bemta-14.messagelabs.com id
	5B/1E-17726-CABA3435; Tue, 08 Apr 2014 07:56:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1396943786!6889411!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21801 invoked from network); 8 Apr 2014 07:56: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;
	8 Apr 2014 07:56:27 -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 1WXQtO-0002CG-0u
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtN-0005NT-Vu
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:26 +0000
Date: Tue, 08 Apr 2014 07:56:25 +0000
Message-Id: <E1WXQtN-0005NT-Vu@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86/HVM: correct CPUID leaf
	80000008 handling
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 dc9b9e6d987ba825660f35634639e95559174a22
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:44:09 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:44:09 2014 +0200

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: ef437690af8b75e6758dce77af75a22b63982883
    master date: 2014-03-28 13:33:34 +0100
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   27 ++++++++++++++-------------
 2 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 4228cf4..93d49ec 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2883,6 +2883,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2916,8 +2918,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2934,7 +2934,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2948,6 +2948,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, NULL, NULL, NULL, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, NULL, NULL, NULL, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index dd1561e..bf8bdc5 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,11 +172,7 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -455,7 +451,7 @@ bool_t mtrr_fix_range_msr_set(struct mtrr_state *m, uint32_t row,
 bool_t mtrr_var_range_msr_set(
     struct domain *d, struct mtrr_state *m, uint32_t msr, uint64_t msr_content)
 {
-    uint32_t index, type, phys_addr, eax, ebx, ecx, edx;
+    uint32_t index, type, phys_addr, eax;
     uint64_t msr_mask;
     uint64_t *var_range_base = (uint64_t*)m->var_ranges;
 
@@ -468,16 +464,21 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, NULL, NULL, NULL);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, NULL, NULL, NULL);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:51 +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 1WXQtc-00011B-6S; Tue, 08 Apr 2014 07:56:40 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQta-00010x-Qm
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:38 +0000
Received: from [85.158.137.68:9358] by server-15.bemta-3.messagelabs.com id
	A1/6E-13757-6BBA3435; Tue, 08 Apr 2014 07:56:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-31.messagelabs.com!1396943796!5641960!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21849 invoked from network); 8 Apr 2014 07:56:37 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:56:37 -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 1WXQtY-0002CL-4t
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtY-0005Nu-3h
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:36 +0000
Date: Tue, 08 Apr 2014 07:56:36 +0000
Message-Id: <E1WXQtY-0005Nu-3h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86/EPT: relax treatment of APIC
	MFN
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 aa538fe0fcede95b17fa11bc008395159aa87a89
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:44:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:44:56 2014 +0200

    x86/EPT: relax treatment of APIC MFN
    
    There's no point in this being mapped UC by the guest due to using a
    respective PAT index - set the ignore-PAT flag to true.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: 1f8b57779785bf9f55c16312bb1ec679929c314b
    master date: 2014-03-28 13:43:25 +0100
---
 xen/arch/x86/hvm/mtrr.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index bf8bdc5..e13647c 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -711,8 +711,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     if ( direct_mmio )
-        return mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn
-               ? MTRR_TYPE_UNCACHABLE : MTRR_TYPE_WRBACK;
+    {
+        if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+            return MTRR_TYPE_UNCACHABLE;
+        *ipat = 1;
+        return MTRR_TYPE_WRBACK;
+    }
 
     if ( iommu_snoop )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:51 +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 1WXQtH-0000uS-0i; Tue, 08 Apr 2014 07:56:19 +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 1WXQtG-0000uI-B5
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:18 +0000
Received: from [85.158.143.35:14924] by server-3.bemta-4.messagelabs.com id
	60/61-13602-1ABA3435; Tue, 08 Apr 2014 07:56:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1396943776!7575102!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19629 invoked from network); 8 Apr 2014 07:56:16 -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;
	8 Apr 2014 07:56:16 -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 1WXQtD-0002C7-SH
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtD-0005N4-PF
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:15 +0000
Date: Tue, 08 Apr 2014 07:56:15 +0000
Message-Id: <E1WXQtD-0005N4-PF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86: fix determination of bit
	count for struct domain allocations
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 6e399a5006dbbba68817307cbf4edbb2bde530f1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:43:07 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:43:07 2014 +0200

    x86: fix determination of bit count for struct domain allocations
    
    We can't just add in the hole shift value, as the hole may be at or
    above the 44-bit boundary. Instead we need to determine the total bit
    count until reaching 32 significant (not squashed out) bits in PFN
    representations.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: b3d2f8b2cba9fce5bc8995612d0d13fcefec7769
    master date: 2014-03-24 10:48:03 +0100
---
 xen/arch/x86/domain.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index bc073e5..5aa8f96 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -180,6 +180,28 @@ void dump_pageframe_info(struct domain *d)
     spin_unlock(&d->page_alloc_lock);
 }
 
+/*
+ * The hole may be at or above the 44-bit boundary, so we need to determine
+ * the total bit count until reaching 32 significant (not squashed out) bits
+ * in PFN representations.
+ * Note that the way "bits" gets initialized/updated/bounds-checked guarantees
+ * that the function will never return zero, and hence will never be called
+ * more than once (which is important due to it being deliberately placed in
+ * .init.text).
+ */
+static unsigned int __init noinline _domain_struct_bits(void)
+{
+    unsigned int bits = 32 + PAGE_SHIFT;
+    unsigned int sig = hweight32(~pfn_hole_mask);
+    unsigned int mask = pfn_hole_mask >> 32;
+
+    for ( ; bits < BITS_PER_LONG && sig < 32; ++bits, mask >>= 1 )
+        if ( !(mask & 1) )
+            ++sig;
+
+    return bits;
+}
+
 struct domain *alloc_domain_struct(void)
 {
     struct domain *d;
@@ -187,7 +209,10 @@ struct domain *alloc_domain_struct(void)
      * We pack the PDX of the domain structure into a 32-bit field within
      * the page_info structure. Hence the MEMF_bits() restriction.
      */
-    unsigned int bits = 32 + PAGE_SHIFT + pfn_pdx_hole_shift;
+    static unsigned int __read_mostly bits;
+
+    if ( unlikely(!bits) )
+         bits = _domain_struct_bits();
 
     BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
     d = alloc_xenheap_pages(0, MEMF_bits(bits));
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:51 +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 1WXQtc-00011B-6S; Tue, 08 Apr 2014 07:56:40 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQta-00010x-Qm
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:38 +0000
Received: from [85.158.137.68:9358] by server-15.bemta-3.messagelabs.com id
	A1/6E-13757-6BBA3435; Tue, 08 Apr 2014 07:56:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-31.messagelabs.com!1396943796!5641960!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21849 invoked from network); 8 Apr 2014 07:56:37 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:56:37 -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 1WXQtY-0002CL-4t
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtY-0005Nu-3h
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:36 +0000
Date: Tue, 08 Apr 2014 07:56:36 +0000
Message-Id: <E1WXQtY-0005Nu-3h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] x86/EPT: relax treatment of APIC
	MFN
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 aa538fe0fcede95b17fa11bc008395159aa87a89
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:44:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:44:56 2014 +0200

    x86/EPT: relax treatment of APIC MFN
    
    There's no point in this being mapped UC by the guest due to using a
    respective PAT index - set the ignore-PAT flag to true.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: 1f8b57779785bf9f55c16312bb1ec679929c314b
    master date: 2014-03-28 13:43:25 +0100
---
 xen/arch/x86/hvm/mtrr.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index bf8bdc5..e13647c 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -711,8 +711,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     if ( direct_mmio )
-        return mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn
-               ? MTRR_TYPE_UNCACHABLE : MTRR_TYPE_WRBACK;
+    {
+        if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+            return MTRR_TYPE_UNCACHABLE;
+        *ipat = 1;
+        return MTRR_TYPE_WRBACK;
+    }
 
     if ( iommu_snoop )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:56:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:56:51 +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 1WXQtm-00012F-92; Tue, 08 Apr 2014 07:56:50 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtk-000126-Oy
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:48 +0000
Received: from [193.109.254.147:60892] by server-12.bemta-14.messagelabs.com
	id D8/77-27473-0CBA3435; Tue, 08 Apr 2014 07:56:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1396943806!6889511!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24297 invoked from network); 8 Apr 2014 07:56:47 -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 Apr 2014 07:56:47 -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 1WXQti-0002CQ-9T
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQti-0005OG-8B
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:46 +0000
Date: Tue, 08 Apr 2014 07:56:46 +0000
Message-Id: <E1WXQti-0005OG-8B@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] kexec: propagate ENOMEM result in
	error handling
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 4a4a1d457bc9264b4399728348a2bb84c739e253
Author:     Matthew Daley <mattd@bugfuzz.com>
AuthorDate: Fri Apr 4 10:45:31 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:45:31 2014 +0200

    kexec: propagate ENOMEM result in error handling
    
    ...otherwise if kimage_alloc_control_page fails (presumably due to
    out-of-memory; see the invocation just before this one), the caller of
    do_kimage_alloc will think the call was successful.
    
    Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    master commit: 66c6349265d6536d0b77cd958ee3e5074e86233a
    master date: 2014-04-01 16:48:02 +0200
---
 xen/common/kimage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/common/kimage.c b/xen/common/kimage.c
index 91943f1..9b79a5e 100644
--- a/xen/common/kimage.c
+++ b/xen/common/kimage.c
@@ -182,6 +182,7 @@ static int do_kimage_alloc(struct kexec_image **rimage, paddr_t entry,
         goto out;
 
     /* Add an empty indirection page. */
+    result = -ENOMEM;
     image->entry_page = kimage_alloc_control_page(image, 0);
     if ( !image->entry_page )
         goto out;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:00 +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 1WXQtw-00014z-Bh; Tue, 08 Apr 2014 07:57:00 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtu-00014b-Oa
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:58 +0000
Received: from [193.109.254.147:33518] by server-11.bemta-14.messagelabs.com
	id A8/69-09902-ACBA3435; Tue, 08 Apr 2014 07:56:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1396943816!6894849!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31147 invoked from network); 8 Apr 2014 07:56:57 -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;
	8 Apr 2014 07:56:57 -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 1WXQts-0002Ck-DM
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQts-0005PL-CP
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:56 +0000
Date: Tue, 08 Apr 2014 07:56:56 +0000
Message-Id: <E1WXQts-0005PL-CP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] VMX: fix PAT value seen by guest
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 be5c793b143825bca6f231f0c648982ac1afef0c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:46:13 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:46:13 2014 +0200

    VMX: fix PAT value seen by guest
    
    The XSA-60 fixes introduced a window during which the guest PAT gets
    forced to all zeros. This shouldn't be visible to the guest. Therefore
    we need to intercept PAT MSR accesses during that time period.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: fce79f8ce91dc45f3a4d699ee67c49e6cbeb1197
    master date: 2014-04-01 16:49:18 +0200
---
 xen/arch/x86/hvm/vmx/vmx.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index fb514a6..39c6d83 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -984,6 +984,8 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
 
             vmx_get_guest_pat(v, pat);
             vmx_set_guest_pat(v, uc_pat);
+            vmx_enable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                         MSR_TYPE_R | MSR_TYPE_W);
 
             wbinvd();               /* flush possibly polluted cache */
             hvm_asid_flush_vcpu(v); /* invalidate memory type cached in TLB */
@@ -993,6 +995,9 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
         {
             v->arch.hvm_vcpu.cache_mode = NORMAL_CACHE_MODE;
             vmx_set_guest_pat(v, *pat);
+            if ( !iommu_enabled || iommu_snoop )
+                vmx_disable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                              MSR_TYPE_R | MSR_TYPE_W);
             hvm_asid_flush_vcpu(v); /* no need to flush cache */
         }
     }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:00 +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 1WXQtw-00014z-Bh; Tue, 08 Apr 2014 07:57:00 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQtu-00014b-Oa
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:58 +0000
Received: from [193.109.254.147:33518] by server-11.bemta-14.messagelabs.com
	id A8/69-09902-ACBA3435; Tue, 08 Apr 2014 07:56:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1396943816!6894849!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31147 invoked from network); 8 Apr 2014 07:56:57 -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;
	8 Apr 2014 07:56:57 -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 1WXQts-0002Ck-DM
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQts-0005PL-CP
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:56:56 +0000
Date: Tue, 08 Apr 2014 07:56:56 +0000
Message-Id: <E1WXQts-0005PL-CP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] VMX: fix PAT value seen by guest
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 be5c793b143825bca6f231f0c648982ac1afef0c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:46:13 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:46:13 2014 +0200

    VMX: fix PAT value seen by guest
    
    The XSA-60 fixes introduced a window during which the guest PAT gets
    forced to all zeros. This shouldn't be visible to the guest. Therefore
    we need to intercept PAT MSR accesses during that time period.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: fce79f8ce91dc45f3a4d699ee67c49e6cbeb1197
    master date: 2014-04-01 16:49:18 +0200
---
 xen/arch/x86/hvm/vmx/vmx.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index fb514a6..39c6d83 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -984,6 +984,8 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
 
             vmx_get_guest_pat(v, pat);
             vmx_set_guest_pat(v, uc_pat);
+            vmx_enable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                         MSR_TYPE_R | MSR_TYPE_W);
 
             wbinvd();               /* flush possibly polluted cache */
             hvm_asid_flush_vcpu(v); /* invalidate memory type cached in TLB */
@@ -993,6 +995,9 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
         {
             v->arch.hvm_vcpu.cache_mode = NORMAL_CACHE_MODE;
             vmx_set_guest_pat(v, *pat);
+            if ( !iommu_enabled || iommu_snoop )
+                vmx_disable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                              MSR_TYPE_R | MSR_TYPE_W);
             hvm_asid_flush_vcpu(v); /* no need to flush cache */
         }
     }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:10 +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 1WXQu6-00016k-EU; Tue, 08 Apr 2014 07:57:10 +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 1WXQu4-00016X-Uh
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:09 +0000
Received: from [85.158.143.35:22755] by server-2.bemta-4.messagelabs.com id
	16/9A-06539-4DBA3435; Tue, 08 Apr 2014 07:57:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1396943826!7659723!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7377 invoked from network); 8 Apr 2014 07:57:07 -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;
	8 Apr 2014 07:57:07 -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 1WXQu2-0002DJ-HA
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQu2-0005Pr-G9
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:06 +0000
Date: Tue, 08 Apr 2014 07:57:06 +0000
Message-Id: <E1WXQu2-0005Pr-G9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] libxl: Hold the atfork lock while
	closing carefd
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 86c00cb6e2d78d5be861656a1e83956c9de96003
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:14 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:01:53 2014 +0100

    libxl: Hold the atfork lock while closing carefd
    
    This avoids the process being forked while a carefd is recorded in the
    list but the actual fd has been closed.  If that happened, a
    subsequent libxl_postfork_child_noexec would attempt to close the fd
    again.  If we are lucky that results in a harmless warning; but if we
    are unlucky the fd number has been reused and we close an unrelated
    fd.
    
    This race has not been observed anywhere as far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 2a0c3a62ea4ad6c6bcbf80122b070f3ff3fe7dae)
---
 tools/libxl/libxl_fork.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_fork.c b/tools/libxl/libxl_fork.c
index 8421296..fa15095 100644
--- a/tools/libxl/libxl_fork.c
+++ b/tools/libxl/libxl_fork.c
@@ -184,9 +184,9 @@ void libxl_postfork_child_noexec(libxl_ctx *ctx)
 int libxl__carefd_close(libxl__carefd *cf)
 {
     if (!cf) return 0;
+    atfork_lock();
     int r = cf->fd < 0 ? 0 : close(cf->fd);
     int esave = errno;
-    atfork_lock();
     LIBXL_LIST_REMOVE(cf, entry);
     atfork_unlock();
     free(cf);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:10 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:10 +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 1WXQu6-00016k-EU; Tue, 08 Apr 2014 07:57:10 +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 1WXQu4-00016X-Uh
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:09 +0000
Received: from [85.158.143.35:22755] by server-2.bemta-4.messagelabs.com id
	16/9A-06539-4DBA3435; Tue, 08 Apr 2014 07:57:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1396943826!7659723!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7377 invoked from network); 8 Apr 2014 07:57:07 -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;
	8 Apr 2014 07:57:07 -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 1WXQu2-0002DJ-HA
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQu2-0005Pr-G9
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:06 +0000
Date: Tue, 08 Apr 2014 07:57:06 +0000
Message-Id: <E1WXQu2-0005Pr-G9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] libxl: Hold the atfork lock while
	closing carefd
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 86c00cb6e2d78d5be861656a1e83956c9de96003
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:14 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:01:53 2014 +0100

    libxl: Hold the atfork lock while closing carefd
    
    This avoids the process being forked while a carefd is recorded in the
    list but the actual fd has been closed.  If that happened, a
    subsequent libxl_postfork_child_noexec would attempt to close the fd
    again.  If we are lucky that results in a harmless warning; but if we
    are unlucky the fd number has been reused and we close an unrelated
    fd.
    
    This race has not been observed anywhere as far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 2a0c3a62ea4ad6c6bcbf80122b070f3ff3fe7dae)
---
 tools/libxl/libxl_fork.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_fork.c b/tools/libxl/libxl_fork.c
index 8421296..fa15095 100644
--- a/tools/libxl/libxl_fork.c
+++ b/tools/libxl/libxl_fork.c
@@ -184,9 +184,9 @@ void libxl_postfork_child_noexec(libxl_ctx *ctx)
 int libxl__carefd_close(libxl__carefd *cf)
 {
     if (!cf) return 0;
+    atfork_lock();
     int r = cf->fd < 0 ? 0 : close(cf->fd);
     int esave = errno;
-    atfork_lock();
     LIBXL_LIST_REMOVE(cf, entry);
     atfork_unlock();
     free(cf);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57: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 1WXQuI-00019N-Iz; Tue, 08 Apr 2014 07:57:22 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuG-00018x-Re
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:21 +0000
Received: from [85.158.139.211:21192] by server-7.bemta-5.messagelabs.com id
	A5/80-20531-0EBA3435; Tue, 08 Apr 2014 07:57:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1396943836!3165555!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24283 invoked from network); 8 Apr 2014 07:57:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:57:17 -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 1WXQuC-0002DM-Kt
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuC-0005QF-Jw
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:16 +0000
Date: Tue, 08 Apr 2014 07:57:16 +0000
Message-Id: <E1WXQuC-0005QF-Jw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] libxl: Fix carefd lock leak in
	save callout
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 4bb3a17449a4472930030a627631f788bb678123
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:15 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:01:56 2014 +0100

    libxl: Fix carefd lock leak in save callout
    
    If libxl_pipe fails we leave the carefd locked, which translates to
    the atfork lock remaining held.  This would probably cause the process
    to deadlock shortly afterwards.
    
    Of course libxl_pipe is very unlikely to fail unless things are
    already going very badly.  This bug has not been observed anywhere as
    far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 7eb73add5de5839f160b902dd894d3aecc10ba0c)
---
 tools/libxl/libxl_save_callout.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c
index 6e45b2f..e3bda8f 100644
--- a/tools/libxl/libxl_save_callout.c
+++ b/tools/libxl/libxl_save_callout.c
@@ -185,7 +185,11 @@ static void run_helper(libxl__egc *egc, libxl__save_helper_state *shs,
     for (childfd=0; childfd<2; childfd++) {
         /* Setting up the pipe for the child's fd childfd */
         int fds[2];
-        if (libxl_pipe(CTX,fds)) { rc = ERROR_FAIL; goto out; }
+        if (libxl_pipe(CTX,fds)) {
+            rc = ERROR_FAIL;
+            libxl__carefd_unlock();
+            goto out;
+        }
         int childs_end = childfd==0 ? 0 /*read*/  : 1 /*write*/;
         int our_end    = childfd==0 ? 1 /*write*/ : 0 /*read*/;
         childs_pipes[childfd] = libxl__carefd_record(CTX, fds[childs_end]);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57: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 1WXQuI-00019N-Iz; Tue, 08 Apr 2014 07:57:22 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuG-00018x-Re
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:21 +0000
Received: from [85.158.139.211:21192] by server-7.bemta-5.messagelabs.com id
	A5/80-20531-0EBA3435; Tue, 08 Apr 2014 07:57:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1396943836!3165555!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24283 invoked from network); 8 Apr 2014 07:57:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:57:17 -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 1WXQuC-0002DM-Kt
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuC-0005QF-Jw
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:16 +0000
Date: Tue, 08 Apr 2014 07:57:16 +0000
Message-Id: <E1WXQuC-0005QF-Jw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] libxl: Fix carefd lock leak in
	save callout
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 4bb3a17449a4472930030a627631f788bb678123
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:15 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:01:56 2014 +0100

    libxl: Fix carefd lock leak in save callout
    
    If libxl_pipe fails we leave the carefd locked, which translates to
    the atfork lock remaining held.  This would probably cause the process
    to deadlock shortly afterwards.
    
    Of course libxl_pipe is very unlikely to fail unless things are
    already going very badly.  This bug has not been observed anywhere as
    far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 7eb73add5de5839f160b902dd894d3aecc10ba0c)
---
 tools/libxl/libxl_save_callout.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c
index 6e45b2f..e3bda8f 100644
--- a/tools/libxl/libxl_save_callout.c
+++ b/tools/libxl/libxl_save_callout.c
@@ -185,7 +185,11 @@ static void run_helper(libxl__egc *egc, libxl__save_helper_state *shs,
     for (childfd=0; childfd<2; childfd++) {
         /* Setting up the pipe for the child's fd childfd */
         int fds[2];
-        if (libxl_pipe(CTX,fds)) { rc = ERROR_FAIL; goto out; }
+        if (libxl_pipe(CTX,fds)) {
+            rc = ERROR_FAIL;
+            libxl__carefd_unlock();
+            goto out;
+        }
         int childs_end = childfd==0 ? 0 /*read*/  : 1 /*write*/;
         int our_end    = childfd==0 ? 1 /*write*/ : 0 /*read*/;
         childs_pipes[childfd] = libxl__carefd_record(CTX, fds[childs_end]);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:32 +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 1WXQuS-0001CJ-M2; Tue, 08 Apr 2014 07:57:32 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuQ-0001BG-Pw
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:31 +0000
Received: from [193.109.254.147:39723] by server-1.bemta-14.messagelabs.com id
	CC/D4-00839-AEBA3435; Tue, 08 Apr 2014 07:57:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1396943846!6891203!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24786 invoked from network); 8 Apr 2014 07:57:27 -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;
	8 Apr 2014 07:57:27 -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 1WXQuM-0002DS-Ps
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuM-0005Qc-Nx
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:26 +0000
Date: Tue, 08 Apr 2014 07:57:26 +0000
Message-Id: <E1WXQuM-0005Qc-Nx@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] tools: update config.{sub,guess}
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 65309a919df8a684efb4507281b4c0fe99cee0f3
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Fri Mar 14 12:00:11 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:09:34 2014 +0100

    tools: update config.{sub,guess}
    
    Update to versions from Debian Wheezy's autotools-dev package (20120608.1)
    
    Adds ARM aarch64 support.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 0c68ddf3085b90d72b7d3b6affd1fe8fa16eb6be)
---
 config.guess |  258 ++++++++++++++++++++++++++++++++--------------------------
 config.sub   |  218 ++++++++++++++++++++++++++++++++-----------------
 2 files changed, 286 insertions(+), 190 deletions(-)

diff --git a/config.guess b/config.guess
index c2246a4..d622a44 100755
--- a/config.guess
+++ b/config.guess
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2012-02-10'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2009-12-30'
 # 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 to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -57,8 +55,8 @@ GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
@@ -181,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -224,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
 		;;
 	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 		;;
 	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
@@ -296,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo s390-ibm-zvmoe
 	exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
@@ -395,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
 	exit ;;
@@ -481,8 +482,8 @@ EOF
 	echo m88k-motorola-sysv3
 	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 	then
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -495,7 +496,7 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
 	exit ;;
@@ -552,7 +553,7 @@ EOF
 		echo rs6000-ibm-aix3.2
 	fi
 	exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
@@ -595,52 +596,52 @@ EOF
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -731,22 +732,22 @@ EOF
 	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
@@ -770,14 +771,14 @@ EOF
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -789,13 +790,12 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit ;;
     *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
 	    amd64)
 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	esac
 	exit ;;
     i*:CYGWIN*:*)
@@ -804,15 +804,18 @@ EOF
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
     i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
 	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit ;;
     *:Interix*:*)
-    	case ${UNAME_MACHINE} in
+	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
@@ -858,6 +861,13 @@ EOF
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -867,7 +877,7 @@ EOF
 	  EV6)   UNAME_MACHINE=alphaev6 ;;
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@ -879,20 +889,29 @@ EOF
 	then
 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
 	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     cris:Linux:*:*)
-	echo cris-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:Linux:*:*)
 	LIBC=gnu
@@ -934,7 +953,7 @@ EOF
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
     or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     padre:Linux:*:*)
 	echo sparc-unknown-linux-gnu
@@ -960,7 +979,7 @@ EOF
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -968,14 +987,17 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -984,11 +1006,11 @@ EOF
 	echo i386-sequent-sysv4
 	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit ;;
     i*86:OS/2:*:*)
@@ -1020,7 +1042,7 @@ EOF
 	fi
 	exit ;;
     i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
@@ -1048,13 +1070,13 @@ EOF
 	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i586.
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
 	# Note: whatever this is, it MUST be the same as what config.sub
 	# prints for the "djgpp" host, or else GDB configury will decide that
 	# this is a cross-build.
 	echo i586-pc-msdosdjgpp
-        exit ;;
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit ;;
@@ -1089,8 +1111,8 @@ EOF
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
 	OS_REL='.3'
 	test -r /etc/.relid \
@@ -1133,10 +1155,10 @@ EOF
 		echo ns32k-sni-sysv
 	fi
 	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
@@ -1162,11 +1184,11 @@ EOF
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
 	exit ;;
@@ -1231,6 +1253,9 @@ EOF
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
     NSE-?:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
@@ -1276,13 +1301,13 @@ EOF
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit ;;
     *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 	case "${UNAME_MACHINE}" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
@@ -1300,6 +1325,9 @@ EOF
     i*86:AROS:*:*)
 	echo ${UNAME_MACHINE}-pc-aros
 	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1322,11 +1350,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
diff --git a/config.sub b/config.sub
index c2d1257..6205f84 100755
--- a/config.sub
+++ b/config.sub
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2010-01-22'
+timestamp='2012-04-18'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2010-01-22'
 # 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 to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -76,8 +74,8 @@ version="\
 GNU config.sub ($timestamp)
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -124,13 +122,18 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -157,8 +160,8 @@ case $os in
 		os=
 		basic_machine=$1
 		;;
-        -bluegene*)
-	        os=-cnk
+	-bluegene*)
+		os=-cnk
 		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
@@ -174,10 +177,10 @@ case $os in
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
@@ -222,6 +225,12 @@ case $os in
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -246,17 +255,22 @@ case $basic_machine in
 	# Some are omitted here because they have special meanings below.
 	1750a | 580 \
 	| a29k \
+	| aarch64 | aarch64_be \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+        | be32 | be64 \
 	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
 	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
 	| maxq | mb | microblaze | mcore | mep | metag \
@@ -282,29 +296,39 @@ case $basic_machine in
 	| moxie \
 	| mt \
 	| msp430 \
+	| nds32 | nds32le | nds32be \
 	| nios | nios2 \
 	| ns16k | ns32k \
+	| open8 \
 	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
-	| rx \
+	| rl78 | rx \
 	| score \
 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
-	| v850 | v850e \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-		# Motorola 68HC11/12.
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -314,6 +338,21 @@ case $basic_machine in
 		basic_machine=mt-unknown
 		;;
 
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
@@ -328,21 +367,25 @@ case $basic_machine in
 	# Recognize the basic CPU types with company name.
 	580-* \
 	| a29k-* \
+	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@@ -368,26 +411,29 @@ case $basic_machine in
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
 	| nios-* | nios2-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| romp-* | rs6000-* | rx-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tile-* | tilegx-* \
+	| tile*-* \
 	| tron-* \
 	| ubicom32-* \
-	| v850-* | v850e-* | vax-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-* | z80-*)
@@ -412,7 +458,7 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-    	abacus)
+	abacus)
 		basic_machine=abacus-unknown
 		;;
 	adobe68k)
@@ -482,11 +528,20 @@ case $basic_machine in
 		basic_machine=powerpc-ibm
 		os=-cnk
 		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
-        cegcc)
+	cegcc)
 		basic_machine=arm-unknown
 		os=-cegcc
 		;;
@@ -518,7 +573,7 @@ case $basic_machine in
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16)
+	cr16 | cr16-*)
 		basic_machine=cr16-unknown
 		os=-elf
 		;;
@@ -676,7 +731,6 @@ case $basic_machine in
 	i370-ibm* | ibm*)
 		basic_machine=i370-ibm
 		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
 	i*86v32)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv32
@@ -734,7 +788,7 @@ case $basic_machine in
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
-        microblaze)
+	microblaze)
 		basic_machine=microblaze-xilinx
 		;;
 	mingw32)
@@ -773,10 +827,18 @@ case $basic_machine in
 	ms1-*)
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
@@ -841,6 +903,12 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -923,9 +991,10 @@ case $basic_machine in
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -1019,6 +1088,9 @@ case $basic_machine in
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -1075,25 +1147,8 @@ case $basic_machine in
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-        # This must be matched before tile*.
-        tilegx*)
-		basic_machine=tilegx-unknown
-		os=-linux-gnu
-		;;
 	tile*)
-		basic_machine=tile-unknown
+		basic_machine=$basic_machine-unknown
 		os=-linux-gnu
 		;;
 	tx39)
@@ -1163,6 +1218,9 @@ case $basic_machine in
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1260,11 +1318,11 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
-        -auroraux)
-	        os=-auroraux
+	-auroraux)
+		os=-auroraux
 		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1300,8 +1358,9 @@ case $os in
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1348,7 +1407,7 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
-        -os400*)
+	-os400*)
 		os=-os400
 		;;
 	-wince*)
@@ -1397,7 +1456,7 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
-        -tpf*)
+	-tpf*)
 		os=-tpf
 		;;
 	-triton*)
@@ -1442,8 +1501,8 @@ case $os in
 	-dicos*)
 		os=-dicos
 		;;
-        -nacl*)
-	        ;;
+	-nacl*)
+		;;
 	-none)
 		;;
 	*)
@@ -1466,10 +1525,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+	score-*)
 		os=-elf
 		;;
-        spu-*)
+	spu-*)
 		os=-elf
 		;;
 	*-acorn)
@@ -1481,8 +1540,20 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	hexagon-*)
+		os=-elf
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
 		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
@@ -1502,14 +1573,11 @@ case $basic_machine in
 		;;
 	m68000-sun)
 		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
 		;;
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
+	mep-*)
 		os=-elf
 		;;
 	mips*-cisco)
@@ -1536,7 +1604,7 @@ case $basic_machine in
 	*-ibm)
 		os=-aix
 		;;
-    	*-knuth)
+	*-knuth)
 		os=-mmixware
 		;;
 	*-wec)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:32 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:32 +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 1WXQuS-0001CJ-M2; Tue, 08 Apr 2014 07:57:32 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuQ-0001BG-Pw
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:31 +0000
Received: from [193.109.254.147:39723] by server-1.bemta-14.messagelabs.com id
	CC/D4-00839-AEBA3435; Tue, 08 Apr 2014 07:57:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1396943846!6891203!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24786 invoked from network); 8 Apr 2014 07:57:27 -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;
	8 Apr 2014 07:57:27 -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 1WXQuM-0002DS-Ps
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:26 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuM-0005Qc-Nx
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:26 +0000
Date: Tue, 08 Apr 2014 07:57:26 +0000
Message-Id: <E1WXQuM-0005Qc-Nx@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] tools: update config.{sub,guess}
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 65309a919df8a684efb4507281b4c0fe99cee0f3
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Fri Mar 14 12:00:11 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:09:34 2014 +0100

    tools: update config.{sub,guess}
    
    Update to versions from Debian Wheezy's autotools-dev package (20120608.1)
    
    Adds ARM aarch64 support.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    (cherry picked from commit 0c68ddf3085b90d72b7d3b6affd1fe8fa16eb6be)
---
 config.guess |  258 ++++++++++++++++++++++++++++++++--------------------------
 config.sub   |  218 ++++++++++++++++++++++++++++++++-----------------
 2 files changed, 286 insertions(+), 190 deletions(-)

diff --git a/config.guess b/config.guess
index c2246a4..d622a44 100755
--- a/config.guess
+++ b/config.guess
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2012-02-10'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2009-12-30'
 # 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 to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -57,8 +55,8 @@ GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
@@ -181,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -224,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
 		;;
 	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 		;;
 	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -270,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
@@ -296,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo s390-ibm-zvmoe
 	exit ;;
     *:OS400:*:*)
-        echo powerpc-ibm-os400
+	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
@@ -395,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint${UNAME_RELEASE}
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
     m68k:machten:*:*)
 	echo m68k-apple-machten${UNAME_RELEASE}
 	exit ;;
@@ -481,8 +482,8 @@ EOF
 	echo m88k-motorola-sysv3
 	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 	then
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -495,7 +496,7 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
 	exit ;;
@@ -552,7 +553,7 @@ EOF
 		echo rs6000-ibm-aix3.2
 	fi
 	exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
@@ -595,52 +596,52 @@ EOF
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -731,22 +732,22 @@ EOF
 	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
@@ -770,14 +771,14 @@ EOF
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
     5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@@ -789,13 +790,12 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 	exit ;;
     *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
 	    amd64)
 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 	esac
 	exit ;;
     i*:CYGWIN*:*)
@@ -804,15 +804,18 @@ EOF
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
     i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
 	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
 	exit ;;
     *:Interix*:*)
-    	case ${UNAME_MACHINE} in
+	case ${UNAME_MACHINE} in
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
@@ -858,6 +861,13 @@ EOF
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -867,7 +877,7 @@ EOF
 	  EV6)   UNAME_MACHINE=alphaev6 ;;
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
+	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
@@ -879,20 +889,29 @@ EOF
 	then
 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
 	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     cris:Linux:*:*)
-	echo cris-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:Linux:*:*)
 	LIBC=gnu
@@ -934,7 +953,7 @@ EOF
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
     or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     padre:Linux:*:*)
 	echo sparc-unknown-linux-gnu
@@ -960,7 +979,7 @@ EOF
 	echo ${UNAME_MACHINE}-ibm-linux
 	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -968,14 +987,17 @@ EOF
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -984,11 +1006,11 @@ EOF
 	echo i386-sequent-sysv4
 	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
 	exit ;;
     i*86:OS/2:*:*)
@@ -1020,7 +1042,7 @@ EOF
 	fi
 	exit ;;
     i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
@@ -1048,13 +1070,13 @@ EOF
 	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i586.
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
 	# Note: whatever this is, it MUST be the same as what config.sub
 	# prints for the "djgpp" host, or else GDB configury will decide that
 	# this is a cross-build.
 	echo i586-pc-msdosdjgpp
-        exit ;;
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
 	exit ;;
@@ -1089,8 +1111,8 @@ EOF
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
 	OS_REL='.3'
 	test -r /etc/.relid \
@@ -1133,10 +1155,10 @@ EOF
 		echo ns32k-sni-sysv
 	fi
 	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
@@ -1162,11 +1184,11 @@ EOF
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
 	exit ;;
@@ -1231,6 +1253,9 @@ EOF
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
     NSE-?:NONSTOP_KERNEL:*:*)
 	echo nse-tandem-nsk${UNAME_RELEASE}
 	exit ;;
@@ -1276,13 +1301,13 @@ EOF
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit ;;
     *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
 	case "${UNAME_MACHINE}" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
@@ -1300,6 +1325,9 @@ EOF
     i*86:AROS:*:*)
 	echo ${UNAME_MACHINE}-pc-aros
 	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1322,11 +1350,11 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
diff --git a/config.sub b/config.sub
index c2d1257..6205f84 100755
--- a/config.sub
+++ b/config.sub
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
 
-timestamp='2010-01-22'
+timestamp='2012-04-18'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2010-01-22'
 # 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 to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -76,8 +74,8 @@ version="\
 GNU config.sub ($timestamp)
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -124,13 +122,18 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -157,8 +160,8 @@ case $os in
 		os=
 		basic_machine=$1
 		;;
-        -bluegene*)
-	        os=-cnk
+	-bluegene*)
+		os=-cnk
 		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
@@ -174,10 +177,10 @@ case $os in
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
@@ -222,6 +225,12 @@ case $os in
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -246,17 +255,22 @@ case $basic_machine in
 	# Some are omitted here because they have special meanings below.
 	1750a | 580 \
 	| a29k \
+	| aarch64 | aarch64_be \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
 	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+        | be32 | be64 \
 	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
 	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
 	| maxq | mb | microblaze | mcore | mep | metag \
@@ -282,29 +296,39 @@ case $basic_machine in
 	| moxie \
 	| mt \
 	| msp430 \
+	| nds32 | nds32le | nds32be \
 	| nios | nios2 \
 	| ns16k | ns32k \
+	| open8 \
 	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
-	| rx \
+	| rl78 | rx \
 	| score \
 	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
-	| v850 | v850e \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-		# Motorola 68HC11/12.
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -314,6 +338,21 @@ case $basic_machine in
 		basic_machine=mt-unknown
 		;;
 
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
 	# (2) the word "unknown" tends to confuse beginning users.
@@ -328,21 +367,25 @@ case $basic_machine in
 	# Recognize the basic CPU types with company name.
 	580-* \
 	| a29k-* \
+	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@@ -368,26 +411,29 @@ case $basic_machine in
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
 	| nios-* | nios2-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| romp-* | rs6000-* | rx-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tile-* | tilegx-* \
+	| tile*-* \
 	| tron-* \
 	| ubicom32-* \
-	| v850-* | v850e-* | vax-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
 	| z8k-* | z80-*)
@@ -412,7 +458,7 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
-    	abacus)
+	abacus)
 		basic_machine=abacus-unknown
 		;;
 	adobe68k)
@@ -482,11 +528,20 @@ case $basic_machine in
 		basic_machine=powerpc-ibm
 		os=-cnk
 		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
-        cegcc)
+	cegcc)
 		basic_machine=arm-unknown
 		os=-cegcc
 		;;
@@ -518,7 +573,7 @@ case $basic_machine in
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16)
+	cr16 | cr16-*)
 		basic_machine=cr16-unknown
 		os=-elf
 		;;
@@ -676,7 +731,6 @@ case $basic_machine in
 	i370-ibm* | ibm*)
 		basic_machine=i370-ibm
 		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
 	i*86v32)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv32
@@ -734,7 +788,7 @@ case $basic_machine in
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
-        microblaze)
+	microblaze)
 		basic_machine=microblaze-xilinx
 		;;
 	mingw32)
@@ -773,10 +827,18 @@ case $basic_machine in
 	ms1-*)
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
@@ -841,6 +903,12 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -923,9 +991,10 @@ case $basic_machine in
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -1019,6 +1088,9 @@ case $basic_machine in
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -1075,25 +1147,8 @@ case $basic_machine in
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-        # This must be matched before tile*.
-        tilegx*)
-		basic_machine=tilegx-unknown
-		os=-linux-gnu
-		;;
 	tile*)
-		basic_machine=tile-unknown
+		basic_machine=$basic_machine-unknown
 		os=-linux-gnu
 		;;
 	tx39)
@@ -1163,6 +1218,9 @@ case $basic_machine in
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1260,11 +1318,11 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
-        -auroraux)
-	        os=-auroraux
+	-auroraux)
+		os=-auroraux
 		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -1300,8 +1358,9 @@ case $os in
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
 	      | -chorusos* | -chorusrdb* | -cegcc* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1348,7 +1407,7 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
-        -os400*)
+	-os400*)
 		os=-os400
 		;;
 	-wince*)
@@ -1397,7 +1456,7 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
-        -tpf*)
+	-tpf*)
 		os=-tpf
 		;;
 	-triton*)
@@ -1442,8 +1501,8 @@ case $os in
 	-dicos*)
 		os=-dicos
 		;;
-        -nacl*)
-	        ;;
+	-nacl*)
+		;;
 	-none)
 		;;
 	*)
@@ -1466,10 +1525,10 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
-        score-*)
+	score-*)
 		os=-elf
 		;;
-        spu-*)
+	spu-*)
 		os=-elf
 		;;
 	*-acorn)
@@ -1481,8 +1540,20 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
-        c4x-* | tic4x-*)
-        	os=-coff
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	hexagon-*)
+		os=-elf
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
 		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
@@ -1502,14 +1573,11 @@ case $basic_machine in
 		;;
 	m68000-sun)
 		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
 		;;
 	m68*-cisco)
 		os=-aout
 		;;
-        mep-*)
+	mep-*)
 		os=-elf
 		;;
 	mips*-cisco)
@@ -1536,7 +1604,7 @@ case $basic_machine in
 	*-ibm)
 		os=-aix
 		;;
-    	*-knuth)
+	*-knuth)
 		os=-mmixware
 		;;
 	*-wec)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:40 +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 1WXQua-0001Ec-SC; Tue, 08 Apr 2014 07:57:40 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuZ-0001E8-Fo
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:39 +0000
Received: from [85.158.139.211:8611] by server-7.bemta-5.messagelabs.com id
	8A/01-20531-2FBA3435; Tue, 08 Apr 2014 07:57:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1396943857!6113990!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8853 invoked from network); 8 Apr 2014 07:57:38 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:57:38 -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 1WXQuW-0002Dd-U4
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuW-0005R2-Sd
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:36 +0000
Date: Tue, 08 Apr 2014 07:57:36 +0000
Message-Id: <E1WXQuW-0005R2-Sd@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] libxl: arm: do not create
	/chosen/bootargs in DTB if no cmdline is specified
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 a77a6c892c573f8750d84e951461f6f27fc7e111
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Feb 26 12:13:00 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:10:40 2014 +0100

    libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
    
    Otherwise we deference a NULL pointer.
    
    I saw this while experimenting with libvirt on Xen on ARM, xl already checks
    that the command line is non NULL and provides "" as a default.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Cc: george.dunlap@citrix.com>
    (cherry picked from commit 3647a486ec05b1e01930ff299b18fc2b632e2cb0)
---
 tools/libxl/libxl_arm.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 0a1c8c5..0cfd0cf 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -164,8 +164,10 @@ static int make_chosen_node(libxl__gc *gc, void *fdt,
     res = fdt_begin_node(fdt, "chosen");
     if (res) return res;
 
-    res = fdt_property_string(fdt, "bootargs", info->u.pv.cmdline);
-    if (res) return res;
+    if (info->u.pv.cmdline) {
+        res = fdt_property_string(fdt, "bootargs", info->u.pv.cmdline);
+        if (res) return res;
+    }
 
     res = fdt_end_node(fdt);
     if (res) return res;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:40 +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 1WXQua-0001Ec-SC; Tue, 08 Apr 2014 07:57:40 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuZ-0001E8-Fo
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:39 +0000
Received: from [85.158.139.211:8611] by server-7.bemta-5.messagelabs.com id
	8A/01-20531-2FBA3435; Tue, 08 Apr 2014 07:57:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1396943857!6113990!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8853 invoked from network); 8 Apr 2014 07:57:38 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:57:38 -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 1WXQuW-0002Dd-U4
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:36 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuW-0005R2-Sd
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:36 +0000
Date: Tue, 08 Apr 2014 07:57:36 +0000
Message-Id: <E1WXQuW-0005R2-Sd@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] libxl: arm: do not create
	/chosen/bootargs in DTB if no cmdline is specified
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 a77a6c892c573f8750d84e951461f6f27fc7e111
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Feb 26 12:13:00 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:10:40 2014 +0100

    libxl: arm: do not create /chosen/bootargs in DTB if no cmdline is specified
    
    Otherwise we deference a NULL pointer.
    
    I saw this while experimenting with libvirt on Xen on ARM, xl already checks
    that the command line is non NULL and provides "" as a default.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Cc: george.dunlap@citrix.com>
    (cherry picked from commit 3647a486ec05b1e01930ff299b18fc2b632e2cb0)
---
 tools/libxl/libxl_arm.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 0a1c8c5..0cfd0cf 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -164,8 +164,10 @@ static int make_chosen_node(libxl__gc *gc, void *fdt,
     res = fdt_begin_node(fdt, "chosen");
     if (res) return res;
 
-    res = fdt_property_string(fdt, "bootargs", info->u.pv.cmdline);
-    if (res) return res;
+    if (info->u.pv.cmdline) {
+        res = fdt_property_string(fdt, "bootargs", info->u.pv.cmdline);
+        if (res) return res;
+    }
 
     res = fdt_end_node(fdt);
     if (res) return res;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:52 +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 1WXQul-0001KE-Uv; Tue, 08 Apr 2014 07:57:51 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuj-0001If-Th
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:50 +0000
Received: from [85.158.137.68:14651] by server-9.bemta-3.messagelabs.com id
	F9/40-30063-DFBA3435; Tue, 08 Apr 2014 07:57:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1396943867!5632388!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14444 invoked from network); 8 Apr 2014 07:57:48 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:57:48 -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 1WXQuh-0002Dj-1c
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuh-0005Ru-0g
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:47 +0000
Date: Tue, 08 Apr 2014 07:57:47 +0000
Message-Id: <E1WXQuh-0005Ru-0g@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] xen/pygrub: grub2/grub.cfg from
	RHEL 7 has new commands in menuentry
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 607d9c98e8161d93fc93dd0e2c3a5b5be57f0d2a
Author:     Joby Poriyath <joby.poriyath@citrix.com>
AuthorDate: Tue Feb 4 18:10:35 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:12:26 2014 +0100

    xen/pygrub: grub2/grub.cfg from RHEL 7 has new commands in menuentry
    
    menuentry in grub2/grub.cfg uses linux16 and initrd16 commands
    instead of linux and initrd. Due to this RHEL 7 (beta) guest failed to
    boot after the installation.
    
    In addition to this, RHEL 7 menu entries have two different single-quote
    delimited strings on the same line, and the greedy grouping for menuentry
    parsing gets both strings, and the options inbetween.
    
    Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: george.dunlap@citrix.com
    (cherry picked from commit dd03048708af072374963d6d0721cc6d4c5f52cf)
---
 tools/pygrub/examples/rhel-7-beta.grub2 |  118 +++++++++++++++++++++++++++++++
 tools/pygrub/src/GrubConf.py            |    4 +-
 2 files changed, 121 insertions(+), 1 deletions(-)

diff --git a/tools/pygrub/examples/rhel-7-beta.grub2 b/tools/pygrub/examples/rhel-7-beta.grub2
new file mode 100644
index 0000000..88f0f99
--- /dev/null
+++ b/tools/pygrub/examples/rhel-7-beta.grub2
@@ -0,0 +1,118 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 3.10.0-54.0.1.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-54.0.1.el7.x86_64-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-3.10.0-54.0.1.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16 LANG=en_GB.UTF-8
+	initrd16 /initramfs-3.10.0-54.0.1.el7.x86_64.img
+}
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 0-rescue-af34f0b8cf364cdbbe6d093f8228a37f' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16
+	initrd16 /initramfs-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index cb853c9..974cded 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -348,7 +348,9 @@ class Grub2Image(_GrubImage):
                 
     commands = {'set:root': 'root',
                 'linux': 'kernel',
+                'linux16': 'kernel',
                 'initrd': 'initrd',
+                'initrd16': 'initrd',
                 'echo': None,
                 'insmod': None,
                 'search': None}
@@ -394,7 +396,7 @@ class Grub2ConfigFile(_GrubConfigFile):
                 continue
 
             # new image
-            title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
+            title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)
             if title_match:
                 if img is not None:
                     raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:57:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:57:52 +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 1WXQul-0001KE-Uv; Tue, 08 Apr 2014 07:57:51 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuj-0001If-Th
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:50 +0000
Received: from [85.158.137.68:14651] by server-9.bemta-3.messagelabs.com id
	F9/40-30063-DFBA3435; Tue, 08 Apr 2014 07:57:49 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1396943867!5632388!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14444 invoked from network); 8 Apr 2014 07:57:48 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 07:57:48 -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 1WXQuh-0002Dj-1c
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:47 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQuh-0005Ru-0g
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:47 +0000
Date: Tue, 08 Apr 2014 07:57:47 +0000
Message-Id: <E1WXQuh-0005Ru-0g@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] xen/pygrub: grub2/grub.cfg from
	RHEL 7 has new commands in menuentry
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 607d9c98e8161d93fc93dd0e2c3a5b5be57f0d2a
Author:     Joby Poriyath <joby.poriyath@citrix.com>
AuthorDate: Tue Feb 4 18:10:35 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:12:26 2014 +0100

    xen/pygrub: grub2/grub.cfg from RHEL 7 has new commands in menuentry
    
    menuentry in grub2/grub.cfg uses linux16 and initrd16 commands
    instead of linux and initrd. Due to this RHEL 7 (beta) guest failed to
    boot after the installation.
    
    In addition to this, RHEL 7 menu entries have two different single-quote
    delimited strings on the same line, and the greedy grouping for menuentry
    parsing gets both strings, and the options inbetween.
    
    Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: george.dunlap@citrix.com
    (cherry picked from commit dd03048708af072374963d6d0721cc6d4c5f52cf)
---
 tools/pygrub/examples/rhel-7-beta.grub2 |  118 +++++++++++++++++++++++++++++++
 tools/pygrub/src/GrubConf.py            |    4 +-
 2 files changed, 121 insertions(+), 1 deletions(-)

diff --git a/tools/pygrub/examples/rhel-7-beta.grub2 b/tools/pygrub/examples/rhel-7-beta.grub2
new file mode 100644
index 0000000..88f0f99
--- /dev/null
+++ b/tools/pygrub/examples/rhel-7-beta.grub2
@@ -0,0 +1,118 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 3.10.0-54.0.1.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-54.0.1.el7.x86_64-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-3.10.0-54.0.1.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16 LANG=en_GB.UTF-8
+	initrd16 /initramfs-3.10.0-54.0.1.el7.x86_64.img
+}
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 0-rescue-af34f0b8cf364cdbbe6d093f8228a37f' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16
+	initrd16 /initramfs-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index cb853c9..974cded 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -348,7 +348,9 @@ class Grub2Image(_GrubImage):
                 
     commands = {'set:root': 'root',
                 'linux': 'kernel',
+                'linux16': 'kernel',
                 'initrd': 'initrd',
+                'initrd16': 'initrd',
                 'echo': None,
                 'insmod': None,
                 'search': None}
@@ -394,7 +396,7 @@ class Grub2ConfigFile(_GrubConfigFile):
                 continue
 
             # new image
-            title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
+            title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)
             if title_match:
                 if img is not None:
                     raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:58:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:58:01 +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 1WXQuv-0001N6-1I; Tue, 08 Apr 2014 07:58:01 +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 1WXQut-0001Mr-Pk
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:59 +0000
Received: from [85.158.143.35:45356] by server-2.bemta-4.messagelabs.com id
	D3/FB-06539-70CA3435; Tue, 08 Apr 2014 07:57:59 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1396943877!3829554!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29328 invoked from network); 8 Apr 2014 07:57:58 -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;
	8 Apr 2014 07:57:58 -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 1WXQur-0002Ds-5H
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQur-0005SG-4O
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:57 +0000
Date: Tue, 08 Apr 2014 07:57:57 +0000
Message-Id: <E1WXQur-0005SG-4O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] PV-GRUB: fix blk access at end of
	disk
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 03eb5134056d61167e6781eecf7e570b491bda73
Author:     Samuel Thibault <samuel.thibault@ens-lyon.org>
AuthorDate: Fri Mar 21 02:56:56 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:16:10 2014 +0100

    PV-GRUB: fix blk access at end of disk
    
    GRUB usually always loads a whole disk track, even if that means going
    beyond the end of the disk.  We thus have to gracefully return an error,
    instead of letting the blkfront go panic.
    
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    (cherry picked from commit 51e18e41e39a682de5a2e60ad86048dc6344efec)
---
 stubdom/grub/mini-os.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 8cecf90..64ab962 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -126,6 +126,9 @@ biosdisk (int read, int drive, struct geometry *geometry,
     if (i >= blk_nb)
         return -1;
 
+    if (sector + nsec > geometry->total_sectors)
+      return -1;
+
     aiocb.aio_dev = blk_dev[i];
     aiocb.aio_buf = addr;
     aiocb.aio_nbytes = (size_t)nsec * blk_info[i].sector_size;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 07:58:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 07:58:01 +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 1WXQuv-0001N6-1I; Tue, 08 Apr 2014 07:58:01 +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 1WXQut-0001Mr-Pk
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:59 +0000
Received: from [85.158.143.35:45356] by server-2.bemta-4.messagelabs.com id
	D3/FB-06539-70CA3435; Tue, 08 Apr 2014 07:57:59 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-21.messagelabs.com!1396943877!3829554!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29328 invoked from network); 8 Apr 2014 07:57:58 -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;
	8 Apr 2014 07:57:58 -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 1WXQur-0002Ds-5H
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:57 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXQur-0005SG-4O
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 07:57:57 +0000
Date: Tue, 08 Apr 2014 07:57:57 +0000
Message-Id: <E1WXQur-0005SG-4O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.4] PV-GRUB: fix blk access at end of
	disk
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 03eb5134056d61167e6781eecf7e570b491bda73
Author:     Samuel Thibault <samuel.thibault@ens-lyon.org>
AuthorDate: Fri Mar 21 02:56:56 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:16:10 2014 +0100

    PV-GRUB: fix blk access at end of disk
    
    GRUB usually always loads a whole disk track, even if that means going
    beyond the end of the disk.  We thus have to gracefully return an error,
    instead of letting the blkfront go panic.
    
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    (cherry picked from commit 51e18e41e39a682de5a2e60ad86048dc6344efec)
---
 stubdom/grub/mini-os.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 8cecf90..64ab962 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -126,6 +126,9 @@ biosdisk (int read, int drive, struct geometry *geometry,
     if (i >= blk_nb)
         return -1;
 
+    if (sector + nsec > geometry->total_sectors)
+      return -1;
+
     aiocb.aio_dev = blk_dev[i];
     aiocb.aio_buf = addr;
     aiocb.aio_nbytes = (size_t)nsec * blk_info[i].sector_size;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 09:00:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 09:00: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 1WXRt1-0007Ff-HR; Tue, 08 Apr 2014 09:00:07 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXRt0-0007E6-7I
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 09:00:06 +0000
Received: from [85.158.137.68:19453] by server-9.bemta-3.messagelabs.com id
	19/31-30063-59AB3435; Tue, 08 Apr 2014 09:00:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1396947603!5635818!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19539 invoked from network); 8 Apr 2014 09:00:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 09:00: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 1WXRsx-0003KP-Ik
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 09:00:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXRsx-0007Yi-5O
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 09:00:03 +0000
Date: Tue, 08 Apr 2014 09:00:03 +0000
Message-Id: <E1WXRsx-0007Yi-5O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: remove dumb check in
	do_tmem_destroy_pool
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 ac0f56a2fa407e0704fade12630a5a960dedce87
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Fri Apr 4 11:13:32 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 11:13:32 2014 +0200

    tmem: remove dumb check in do_tmem_destroy_pool
    
    do_tmem_destroy_pool is checking if pools == NULL. But, pools is a fixed
    array.
    
    Clang 3.5 will fail to compile xen/common/tmem.c with the following error:
    tmem.c:1848:18: error: comparison of array 'client->pools' equal to a null
    pointer is always false [-Werror,-Wtautological-pointer-compare]
        if ( client->pools == NULL )
    
    Coverity-ID:1055632
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 73007f7..602a38b 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1848,8 +1848,6 @@ static int do_tmem_destroy_pool(uint32_t pool_id)
     struct client *client = current->domain->tmem_client;
     struct tmem_pool *pool;
 
-    if ( client->pools == NULL )
-        return 0;
     if ( pool_id >= MAX_POOLS_PER_DOMAIN )
         return 0;
     if ( (pool = client->pools[pool_id]) == NULL )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 09:00:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 09:00: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 1WXRt1-0007Ff-HR; Tue, 08 Apr 2014 09:00:07 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXRt0-0007E6-7I
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 09:00:06 +0000
Received: from [85.158.137.68:19453] by server-9.bemta-3.messagelabs.com id
	19/31-30063-59AB3435; Tue, 08 Apr 2014 09:00:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1396947603!5635818!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19539 invoked from network); 8 Apr 2014 09:00:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 09:00: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 1WXRsx-0003KP-Ik
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 09:00:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXRsx-0007Yi-5O
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 09:00:03 +0000
Date: Tue, 08 Apr 2014 09:00:03 +0000
Message-Id: <E1WXRsx-0007Yi-5O@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: remove dumb check in
	do_tmem_destroy_pool
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 ac0f56a2fa407e0704fade12630a5a960dedce87
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Fri Apr 4 11:13:32 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 11:13:32 2014 +0200

    tmem: remove dumb check in do_tmem_destroy_pool
    
    do_tmem_destroy_pool is checking if pools == NULL. But, pools is a fixed
    array.
    
    Clang 3.5 will fail to compile xen/common/tmem.c with the following error:
    tmem.c:1848:18: error: comparison of array 'client->pools' equal to a null
    pointer is always false [-Werror,-Wtautological-pointer-compare]
        if ( client->pools == NULL )
    
    Coverity-ID:1055632
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 73007f7..602a38b 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1848,8 +1848,6 @@ static int do_tmem_destroy_pool(uint32_t pool_id)
     struct client *client = current->domain->tmem_client;
     struct tmem_pool *pool;
 
-    if ( client->pools == NULL )
-        return 0;
     if ( pool_id >= MAX_POOLS_PER_DOMAIN )
         return 0;
     if ( (pool = client->pools[pool_id]) == NULL )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 16:55:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 16:55: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 1WXZIl-0000Oj-H3; Tue, 08 Apr 2014 16:55:11 +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 1WXZIj-0000OT-7P
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:09 +0000
Received: from [85.158.143.35:54826] by server-1.bemta-4.messagelabs.com id
	A4/CF-09853-CE924435; Tue, 08 Apr 2014 16:55:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1396976106!782039!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19506 invoked from network); 8 Apr 2014 16:55:07 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 16:55:07 -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 1WXZId-0000jX-Le
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXZId-0005WY-Af
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:03 +0000
Date: Tue, 08 Apr 2014 16:55:03 +0000
Message-Id: <E1WXZId-0005WY-Af@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] xen/pygrub: grub2/grub.cfg from
	RHEL 7 has new commands in menuentry
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 8320ab88bfe2c16a94b6b6797955ac5f3f56aad3
Author:     Joby Poriyath <joby.poriyath@citrix.com>
AuthorDate: Tue Feb 4 18:10:35 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:13:14 2014 +0100

    xen/pygrub: grub2/grub.cfg from RHEL 7 has new commands in menuentry
    
    menuentry in grub2/grub.cfg uses linux16 and initrd16 commands
    instead of linux and initrd. Due to this RHEL 7 (beta) guest failed to
    boot after the installation.
    
    In addition to this, RHEL 7 menu entries have two different single-quote
    delimited strings on the same line, and the greedy grouping for menuentry
    parsing gets both strings, and the options inbetween.
    
    Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: george.dunlap@citrix.com
    (cherry picked from commit dd03048708af072374963d6d0721cc6d4c5f52cf)
    (cherry picked from commit 607d9c98e8161d93fc93dd0e2c3a5b5be57f0d2a)
    (cherry picked from commit 4481b30d5ea980fe469c8dfa1580ba2d107fa12f)
---
 tools/pygrub/examples/rhel-7-beta.grub2 |  118 +++++++++++++++++++++++++++++++
 tools/pygrub/src/GrubConf.py            |    4 +-
 2 files changed, 121 insertions(+), 1 deletions(-)

diff --git a/tools/pygrub/examples/rhel-7-beta.grub2 b/tools/pygrub/examples/rhel-7-beta.grub2
new file mode 100644
index 0000000..88f0f99
--- /dev/null
+++ b/tools/pygrub/examples/rhel-7-beta.grub2
@@ -0,0 +1,118 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 3.10.0-54.0.1.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-54.0.1.el7.x86_64-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-3.10.0-54.0.1.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16 LANG=en_GB.UTF-8
+	initrd16 /initramfs-3.10.0-54.0.1.el7.x86_64.img
+}
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 0-rescue-af34f0b8cf364cdbbe6d093f8228a37f' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16
+	initrd16 /initramfs-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index 237d4d7..9acafe0 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -344,7 +344,9 @@ class Grub2Image(_GrubImage):
                 
     commands = {'set:root': 'root',
                 'linux': 'kernel',
+                'linux16': 'kernel',
                 'initrd': 'initrd',
+                'initrd16': 'initrd',
                 'echo': None,
                 'insmod': None,
                 'search': None}
@@ -390,7 +392,7 @@ class Grub2ConfigFile(_GrubConfigFile):
                 continue
 
             # new image
-            title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
+            title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)
             if title_match:
                 if img is not None:
                     raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 16:55:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 16:55: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 1WXZIl-0000Oj-H3; Tue, 08 Apr 2014 16:55:11 +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 1WXZIj-0000OT-7P
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:09 +0000
Received: from [85.158.143.35:54826] by server-1.bemta-4.messagelabs.com id
	A4/CF-09853-CE924435; Tue, 08 Apr 2014 16:55:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-21.messagelabs.com!1396976106!782039!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19506 invoked from network); 8 Apr 2014 16:55:07 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 16:55:07 -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 1WXZId-0000jX-Le
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXZId-0005WY-Af
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:03 +0000
Date: Tue, 08 Apr 2014 16:55:03 +0000
Message-Id: <E1WXZId-0005WY-Af@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] xen/pygrub: grub2/grub.cfg from
	RHEL 7 has new commands in menuentry
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 8320ab88bfe2c16a94b6b6797955ac5f3f56aad3
Author:     Joby Poriyath <joby.poriyath@citrix.com>
AuthorDate: Tue Feb 4 18:10:35 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:13:14 2014 +0100

    xen/pygrub: grub2/grub.cfg from RHEL 7 has new commands in menuentry
    
    menuentry in grub2/grub.cfg uses linux16 and initrd16 commands
    instead of linux and initrd. Due to this RHEL 7 (beta) guest failed to
    boot after the installation.
    
    In addition to this, RHEL 7 menu entries have two different single-quote
    delimited strings on the same line, and the greedy grouping for menuentry
    parsing gets both strings, and the options inbetween.
    
    Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: george.dunlap@citrix.com
    (cherry picked from commit dd03048708af072374963d6d0721cc6d4c5f52cf)
    (cherry picked from commit 607d9c98e8161d93fc93dd0e2c3a5b5be57f0d2a)
    (cherry picked from commit 4481b30d5ea980fe469c8dfa1580ba2d107fa12f)
---
 tools/pygrub/examples/rhel-7-beta.grub2 |  118 +++++++++++++++++++++++++++++++
 tools/pygrub/src/GrubConf.py            |    4 +-
 2 files changed, 121 insertions(+), 1 deletions(-)

diff --git a/tools/pygrub/examples/rhel-7-beta.grub2 b/tools/pygrub/examples/rhel-7-beta.grub2
new file mode 100644
index 0000000..88f0f99
--- /dev/null
+++ b/tools/pygrub/examples/rhel-7-beta.grub2
@@ -0,0 +1,118 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 3.10.0-54.0.1.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-54.0.1.el7.x86_64-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-3.10.0-54.0.1.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16 LANG=en_GB.UTF-8
+	initrd16 /initramfs-3.10.0-54.0.1.el7.x86_64.img
+}
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 0-rescue-af34f0b8cf364cdbbe6d093f8228a37f' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16
+	initrd16 /initramfs-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index 237d4d7..9acafe0 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -344,7 +344,9 @@ class Grub2Image(_GrubImage):
                 
     commands = {'set:root': 'root',
                 'linux': 'kernel',
+                'linux16': 'kernel',
                 'initrd': 'initrd',
+                'initrd16': 'initrd',
                 'echo': None,
                 'insmod': None,
                 'search': None}
@@ -390,7 +392,7 @@ class Grub2ConfigFile(_GrubConfigFile):
                 continue
 
             # new image
-            title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
+            title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)
             if title_match:
                 if img is not None:
                     raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 16:55:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 16:55: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 1WXZIs-0000PQ-Ju; Tue, 08 Apr 2014 16:55:18 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXZIq-0000P9-Ie
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:16 +0000
Received: from [85.158.139.211:10649] by server-1.bemta-5.messagelabs.com id
	F8/B5-10259-3F924435; Tue, 08 Apr 2014 16:55:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1396976114!6291287!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4535 invoked from network); 8 Apr 2014 16:55:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 16:55:15 -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 1WXZIn-0000ja-Vi
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXZIn-0005X5-Tg
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:13 +0000
Date: Tue, 08 Apr 2014 16:55:13 +0000
Message-Id: <E1WXZIn-0005X5-Tg@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] PV-GRUB: fix blk access at end of
	disk
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 4911963dd76abcc1f1770b118b7e4d04f584438b
Author:     Samuel Thibault <samuel.thibault@ens-lyon.org>
AuthorDate: Fri Mar 21 02:56:56 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:26:16 2014 +0100

    PV-GRUB: fix blk access at end of disk
    
    GRUB usually always loads a whole disk track, even if that means going
    beyond the end of the disk.  We thus have to gracefully return an error,
    instead of letting the blkfront go panic.
    
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    (cherry picked from commit 51e18e41e39a682de5a2e60ad86048dc6344efec)
    (cherry picked from commit 03eb5134056d61167e6781eecf7e570b491bda73)
    (cherry picked from commit e3f630b73c159078a6991161c5255048b16d366f)
---
 stubdom/grub/mini-os.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 251e2ad..8cb91d1 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -126,6 +126,9 @@ biosdisk (int read, int drive, struct geometry *geometry,
     if (i >= blk_nb)
         return -1;
 
+    if (sector + nsec > geometry->total_sectors)
+      return -1;
+
     aiocb.aio_dev = blk_dev[i];
     aiocb.aio_buf = addr;
     aiocb.aio_nbytes = (size_t)nsec * blk_info[i].sector_size;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Tue Apr 08 16:55:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 08 Apr 2014 16:55: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 1WXZIs-0000PQ-Ju; Tue, 08 Apr 2014 16:55:18 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXZIq-0000P9-Ie
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:16 +0000
Received: from [85.158.139.211:10649] by server-1.bemta-5.messagelabs.com id
	F8/B5-10259-3F924435; Tue, 08 Apr 2014 16:55:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1396976114!6291287!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4535 invoked from network); 8 Apr 2014 16:55:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	8 Apr 2014 16:55:15 -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 1WXZIn-0000ja-Vi
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXZIn-0005X5-Tg
	for xen-changelog@lists.xensource.com; Tue, 08 Apr 2014 16:55:13 +0000
Date: Tue, 08 Apr 2014 16:55:13 +0000
Message-Id: <E1WXZIn-0005X5-Tg@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] PV-GRUB: fix blk access at end of
	disk
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 4911963dd76abcc1f1770b118b7e4d04f584438b
Author:     Samuel Thibault <samuel.thibault@ens-lyon.org>
AuthorDate: Fri Mar 21 02:56:56 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:26:16 2014 +0100

    PV-GRUB: fix blk access at end of disk
    
    GRUB usually always loads a whole disk track, even if that means going
    beyond the end of the disk.  We thus have to gracefully return an error,
    instead of letting the blkfront go panic.
    
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    (cherry picked from commit 51e18e41e39a682de5a2e60ad86048dc6344efec)
    (cherry picked from commit 03eb5134056d61167e6781eecf7e570b491bda73)
    (cherry picked from commit e3f630b73c159078a6991161c5255048b16d366f)
---
 stubdom/grub/mini-os.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 251e2ad..8cb91d1 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -126,6 +126,9 @@ biosdisk (int read, int drive, struct geometry *geometry,
     if (i >= blk_nb)
         return -1;
 
+    if (sector + nsec > geometry->total_sectors)
+      return -1;
+
     aiocb.aio_dev = blk_dev[i];
     aiocb.aio_buf = addr;
     aiocb.aio_nbytes = (size_t)nsec * blk_info[i].sector_size;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:55:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:55: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 1WXjbR-0006T4-Nj; Wed, 09 Apr 2014 03:55:09 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbP-0006Sw-Fr
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:07 +0000
Received: from [193.109.254.147:44468] by server-8.bemta-14.messagelabs.com id
	13/52-01877-A94C4435; Wed, 09 Apr 2014 03:55:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397015704!7088356!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5549 invoked from network); 9 Apr 2014 03:55:05 -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;
	9 Apr 2014 03:55:05 -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 1WXjbL-0006e1-WE
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbL-0000CU-OQ
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:03 +0000
Date: Wed, 09 Apr 2014 03:55:03 +0000
Message-Id: <E1WXjbL-0000CU-OQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] common: make hypercall preemption
	checks consistent
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 21ff0c9141472da64c999f4cc2e12d938fe50f83
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:48:53 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:48:53 2014 +0200

    common: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - do cheap checks first
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 8c0eed2cc8d8a2ccccdffe4c386b625b672dc12a
    master date: 2014-03-13 14:26:35 +0100
---
 xen/common/memory.c        |    9 +++++----
 xen/common/multicall.c     |    2 +-
 xen/drivers/char/console.c |    4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 06a0d0a..78b0c6c 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -59,7 +59,7 @@ static void increase_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -105,7 +105,7 @@ static void populate_physmap(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -242,7 +242,7 @@ static void decrease_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -365,7 +365,8 @@ static long memory_exchange(XEN_GUEST_HANDLE_PARAM(xen_memory_exchange_t) arg)
           i < (exch.in.nr_extents >> in_chunk_order);
           i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != (exch.nr_exchanged >> in_chunk_order) &&
+             hypercall_preempt_check() )
         {
             exch.nr_exchanged = i << in_chunk_order;
             rcu_unlock_domain(d);
diff --git a/xen/common/multicall.c b/xen/common/multicall.c
index 2afba98..e66c798 100644
--- a/xen/common/multicall.c
+++ b/xen/common/multicall.c
@@ -52,7 +52,7 @@ do_multicall(
 
     for ( i = 0; !rc && i < nr_calls; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i && hypercall_preempt_check() )
             goto preempted;
 
         if ( unlikely(__copy_from_guest(&mcs->call, call_list, 1)) )
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 110addc..3bb7c22 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -369,11 +369,11 @@ static DECLARE_SOFTIRQ_TASKLET(notify_dom0_con_ring_tasklet,
 static long guest_console_write(XEN_GUEST_HANDLE_PARAM(char) buffer, int count)
 {
     char kbuf[128], *kptr;
-    int kcount;
+    int kcount = 0;
 
     while ( count > 0 )
     {
-        if ( hypercall_preempt_check() )
+        if ( kcount && hypercall_preempt_check() )
             return hypercall_create_continuation(
                 __HYPERVISOR_console_io, "iih",
                 CONSOLEIO_write, count, buffer);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:55:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:55: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 1WXjbR-0006T4-Nj; Wed, 09 Apr 2014 03:55:09 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbP-0006Sw-Fr
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:07 +0000
Received: from [193.109.254.147:44468] by server-8.bemta-14.messagelabs.com id
	13/52-01877-A94C4435; Wed, 09 Apr 2014 03:55:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397015704!7088356!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5549 invoked from network); 9 Apr 2014 03:55:05 -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;
	9 Apr 2014 03:55:05 -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 1WXjbL-0006e1-WE
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbL-0000CU-OQ
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:03 +0000
Date: Wed, 09 Apr 2014 03:55:03 +0000
Message-Id: <E1WXjbL-0000CU-OQ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] common: make hypercall preemption
	checks consistent
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 21ff0c9141472da64c999f4cc2e12d938fe50f83
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:48:53 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:48:53 2014 +0200

    common: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - do cheap checks first
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 8c0eed2cc8d8a2ccccdffe4c386b625b672dc12a
    master date: 2014-03-13 14:26:35 +0100
---
 xen/common/memory.c        |    9 +++++----
 xen/common/multicall.c     |    2 +-
 xen/drivers/char/console.c |    4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 06a0d0a..78b0c6c 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -59,7 +59,7 @@ static void increase_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -105,7 +105,7 @@ static void populate_physmap(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -242,7 +242,7 @@ static void decrease_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -365,7 +365,8 @@ static long memory_exchange(XEN_GUEST_HANDLE_PARAM(xen_memory_exchange_t) arg)
           i < (exch.in.nr_extents >> in_chunk_order);
           i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != (exch.nr_exchanged >> in_chunk_order) &&
+             hypercall_preempt_check() )
         {
             exch.nr_exchanged = i << in_chunk_order;
             rcu_unlock_domain(d);
diff --git a/xen/common/multicall.c b/xen/common/multicall.c
index 2afba98..e66c798 100644
--- a/xen/common/multicall.c
+++ b/xen/common/multicall.c
@@ -52,7 +52,7 @@ do_multicall(
 
     for ( i = 0; !rc && i < nr_calls; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i && hypercall_preempt_check() )
             goto preempted;
 
         if ( unlikely(__copy_from_guest(&mcs->call, call_list, 1)) )
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 110addc..3bb7c22 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -369,11 +369,11 @@ static DECLARE_SOFTIRQ_TASKLET(notify_dom0_con_ring_tasklet,
 static long guest_console_write(XEN_GUEST_HANDLE_PARAM(char) buffer, int count)
 {
     char kbuf[128], *kptr;
-    int kcount;
+    int kcount = 0;
 
     while ( count > 0 )
     {
-        if ( hypercall_preempt_check() )
+        if ( kcount && hypercall_preempt_check() )
             return hypercall_create_continuation(
                 __HYPERVISOR_console_io, "iih",
                 CONSOLEIO_write, count, buffer);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:55:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:55: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 1WXjba-0006TK-TU; Wed, 09 Apr 2014 03:55:18 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjba-0006TE-8j
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:18 +0000
Received: from [85.158.137.68:14212] by server-10.bemta-3.messagelabs.com id
	0A/0B-16608-5A4C4435; Wed, 09 Apr 2014 03:55:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1397015714!5855838!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2173 invoked from network); 9 Apr 2014 03:55:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:55:15 -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 1WXjbW-0006e4-AA
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbW-0000D0-4v
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:14 +0000
Date: Wed, 09 Apr 2014 03:55:14 +0000
Message-Id: <E1WXjbW-0000D0-4v@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86: make hypercall preemption
	checks consistent
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 1c20a463f93d30eb3d3a1f036e4ef93d74cd23b3
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:49:51 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:49:51 2014 +0200

    x86: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - never preempt on the last iteration (pointless/wasteful)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: fd7bfce0395ace266159760e35dc49f7af3b90ce
    master date: 2014-03-13 14:27:51 +0100
---
 xen/arch/x86/mm.c                  |    4 ++--
 xen/arch/x86/mm/hap/hap.c          |    4 +++-
 xen/arch/x86/mm/p2m-pod.c          |    6 ++++--
 xen/arch/x86/mm/shadow/common.c    |    4 +++-
 xen/arch/x86/traps.c               |   14 +++++++-------
 xen/arch/x86/x86_64/compat/traps.c |   14 +++++++-------
 6 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 1103cbe..aa13011 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -2934,7 +2934,7 @@ long do_mmuext_op(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
@@ -3481,7 +3481,7 @@ long do_mmu_update(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index bff05d9..5fc05c2 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -319,7 +319,7 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
     else
         pages -= d->arch.paging.hap.p2m_pages;
 
-    while ( d->arch.paging.hap.total_pages != pages )
+    for ( ; ; )
     {
         if ( d->arch.paging.hap.total_pages < pages )
         {
@@ -348,6 +348,8 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
             d->arch.paging.hap.total_pages--;
             free_domheap_page(pg);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 04ffbcb..0375afa 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -242,7 +242,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
         p2m_pod_cache_add(p2m, page, order);
 
-        if ( hypercall_preempt_check() && preemptible )
+        if ( preemptible && pod_target != p2m->pod.count &&
+             hypercall_preempt_check() )
         {
             ret = -EAGAIN;
             goto out;
@@ -286,7 +287,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
             put_page(page+i);
 
-            if ( hypercall_preempt_check() && preemptible )
+            if ( preemptible && pod_target != p2m->pod.count &&
+                 hypercall_preempt_check() )
             {
                 ret = -EAGAIN;
                 goto out;
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index adffa06..cbdb8b9 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1674,7 +1674,7 @@ static unsigned int sh_set_allocation(struct domain *d,
     SHADOW_PRINTK("current %i target %i\n", 
                    d->arch.paging.shadow.total_pages, pages);
 
-    while ( d->arch.paging.shadow.total_pages != pages ) 
+    for ( ; ; )
     {
         if ( d->arch.paging.shadow.total_pages < pages ) 
         {
@@ -1709,6 +1709,8 @@ static unsigned int sh_set_allocation(struct domain *d,
             d->arch.paging.shadow.total_pages--;
             free_domheap_page(sp);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index fec382b..1f4b327 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3608,13 +3608,6 @@ long do_set_trap_table(XEN_GUEST_HANDLE_PARAM(const_trap_info_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -3635,6 +3628,13 @@ long do_set_trap_table(XEN_GUEST_HANDLE_PARAM(const_trap_info_t) traps)
             init_int80_direct_trap(curr);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c
index 21a82b9..5f0ea0a 100644
--- a/xen/arch/x86/x86_64/compat/traps.c
+++ b/xen/arch/x86/x86_64/compat/traps.c
@@ -329,13 +329,6 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -353,6 +346,13 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
             init_int80_direct_trap(current);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:55:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:55: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 1WXjba-0006TK-TU; Wed, 09 Apr 2014 03:55:18 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjba-0006TE-8j
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:18 +0000
Received: from [85.158.137.68:14212] by server-10.bemta-3.messagelabs.com id
	0A/0B-16608-5A4C4435; Wed, 09 Apr 2014 03:55:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1397015714!5855838!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2173 invoked from network); 9 Apr 2014 03:55:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:55:15 -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 1WXjbW-0006e4-AA
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbW-0000D0-4v
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:14 +0000
Date: Wed, 09 Apr 2014 03:55:14 +0000
Message-Id: <E1WXjbW-0000D0-4v@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86: make hypercall preemption
	checks consistent
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 1c20a463f93d30eb3d3a1f036e4ef93d74cd23b3
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:49:51 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:49:51 2014 +0200

    x86: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - never preempt on the last iteration (pointless/wasteful)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: fd7bfce0395ace266159760e35dc49f7af3b90ce
    master date: 2014-03-13 14:27:51 +0100
---
 xen/arch/x86/mm.c                  |    4 ++--
 xen/arch/x86/mm/hap/hap.c          |    4 +++-
 xen/arch/x86/mm/p2m-pod.c          |    6 ++++--
 xen/arch/x86/mm/shadow/common.c    |    4 +++-
 xen/arch/x86/traps.c               |   14 +++++++-------
 xen/arch/x86/x86_64/compat/traps.c |   14 +++++++-------
 6 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 1103cbe..aa13011 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -2934,7 +2934,7 @@ long do_mmuext_op(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
@@ -3481,7 +3481,7 @@ long do_mmu_update(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index bff05d9..5fc05c2 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -319,7 +319,7 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
     else
         pages -= d->arch.paging.hap.p2m_pages;
 
-    while ( d->arch.paging.hap.total_pages != pages )
+    for ( ; ; )
     {
         if ( d->arch.paging.hap.total_pages < pages )
         {
@@ -348,6 +348,8 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
             d->arch.paging.hap.total_pages--;
             free_domheap_page(pg);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 04ffbcb..0375afa 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -242,7 +242,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
         p2m_pod_cache_add(p2m, page, order);
 
-        if ( hypercall_preempt_check() && preemptible )
+        if ( preemptible && pod_target != p2m->pod.count &&
+             hypercall_preempt_check() )
         {
             ret = -EAGAIN;
             goto out;
@@ -286,7 +287,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
             put_page(page+i);
 
-            if ( hypercall_preempt_check() && preemptible )
+            if ( preemptible && pod_target != p2m->pod.count &&
+                 hypercall_preempt_check() )
             {
                 ret = -EAGAIN;
                 goto out;
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index adffa06..cbdb8b9 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1674,7 +1674,7 @@ static unsigned int sh_set_allocation(struct domain *d,
     SHADOW_PRINTK("current %i target %i\n", 
                    d->arch.paging.shadow.total_pages, pages);
 
-    while ( d->arch.paging.shadow.total_pages != pages ) 
+    for ( ; ; )
     {
         if ( d->arch.paging.shadow.total_pages < pages ) 
         {
@@ -1709,6 +1709,8 @@ static unsigned int sh_set_allocation(struct domain *d,
             d->arch.paging.shadow.total_pages--;
             free_domheap_page(sp);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index fec382b..1f4b327 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3608,13 +3608,6 @@ long do_set_trap_table(XEN_GUEST_HANDLE_PARAM(const_trap_info_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -3635,6 +3628,13 @@ long do_set_trap_table(XEN_GUEST_HANDLE_PARAM(const_trap_info_t) traps)
             init_int80_direct_trap(curr);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c
index 21a82b9..5f0ea0a 100644
--- a/xen/arch/x86/x86_64/compat/traps.c
+++ b/xen/arch/x86/x86_64/compat/traps.c
@@ -329,13 +329,6 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -353,6 +346,13 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
             init_int80_direct_trap(current);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:55:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:55:39 +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 1WXjbl-0006UO-2s; Wed, 09 Apr 2014 03:55:29 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbj-0006Tw-Od
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:28 +0000
Received: from [85.158.137.68:14483] by server-14.bemta-3.messagelabs.com id
	2C/7B-30903-EA4C4435; Wed, 09 Apr 2014 03:55:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397015724!5816295!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3951 invoked from network); 9 Apr 2014 03:55:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:55:25 -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 1WXjbg-0006e7-Gz
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbg-0000Ds-Dp
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:24 +0000
Date: Wed, 09 Apr 2014 03:55:24 +0000
Message-Id: <E1WXjbg-0000Ds-Dp@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] VT-d: fix RMRR handling
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 6c63041428cc348bcb2887afabd606bc4bd5523f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:50:30 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:50:30 2014 +0200

    VT-d: fix RMRR handling
    
    Removing mapped RMRR tracking structures in dma_pte_clear_one() is
    wrong for two reasons: First, these regions may cover more than a
    single page. And second, multiple devices (and hence multiple devices
    assigned to any particular guest) may share a single RMRR (whether
    assigning such devices to distinct guests is a safe thing to do is
    another question).
    
    Therefore move the removal of the tracking structures into the
    counterpart function to the one doing the insertion -
    intel_iommu_remove_device(), and add a reference count to the tracking
    structure.
    
    Further, for the handling of the mappings of the respective memory
    regions to be correct, RMRRs must not overlap. Add a respective check
    to acpi_parse_one_rmrr().
    
    And finally, with all of this being VT-d specific, move the cleanup
    of the list as well as the structure type definition where it belongs -
    in VT-d specific rather than IOMMU generic code.
    
    Note that this doesn't address yet another issue associated with RMRR
    handling: The purpose of the RMRRs as well as the way the respective
    IOMMU page table mappings get inserted both suggest that these regions
    would need to be marked E820_RESERVED in all (HVM?) guests' memory
    maps, yet nothing like this is being done in hvmloader. (For PV guests
    this would also seem to be necessary, but may conflict with PV guests
    possibly assuming there to be just a single E820 entry representing all
    of its RAM.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
    master commit: dd527061770789d8152b1dea68056987b202d87a
    master date: 2014-03-17 16:45:04 +0100
---
 xen/drivers/passthrough/iommu.c     |   10 +---
 xen/drivers/passthrough/vtd/dmar.c  |   10 ++++
 xen/drivers/passthrough/vtd/iommu.c |   92 ++++++++++++++++++++++++-----------
 xen/include/xen/hvm/iommu.h         |    6 --
 4 files changed, 74 insertions(+), 44 deletions(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index bf8b6ba..ab66280 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -340,9 +340,8 @@ static int iommu_populate_page_table(struct domain *d)
 void iommu_domain_destroy(struct domain *d)
 {
     struct hvm_iommu *hd  = domain_hvm_iommu(d);
-    struct list_head *ioport_list, *rmrr_list, *tmp;
+    struct list_head *ioport_list, *tmp;
     struct g2m_ioport *ioport;
-    struct mapped_rmrr *mrmrr;
 
     if ( !iommu_enabled || !hd->platform_ops )
         return;
@@ -359,13 +358,6 @@ void iommu_domain_destroy(struct domain *d)
         list_del(&ioport->list);
         xfree(ioport);
     }
-
-    list_for_each_safe ( rmrr_list, tmp, &hd->mapped_rmrrs )
-    {
-        mrmrr = list_entry(rmrr_list, struct mapped_rmrr, list);
-        list_del(&mrmrr->list);
-        xfree(mrmrr);
-    }
 }
 
 int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn,
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index cb998e2..1152c3a 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -580,6 +580,16 @@ acpi_parse_one_rmrr(struct acpi_dmar_header *header)
     if ( (ret = acpi_dmar_check_length(header, sizeof(*rmrr))) != 0 )
         return ret;
 
+    list_for_each_entry(rmrru, &acpi_rmrr_units, list)
+       if ( base_addr <= rmrru->end_address && rmrru->base_address <= end_addr )
+       {
+           printk(XENLOG_ERR VTDPREFIX
+                  "Overlapping RMRRs [%"PRIx64",%"PRIx64"] and [%"PRIx64",%"PRIx64"]\n",
+                  rmrru->base_address, rmrru->end_address,
+                  base_addr, end_addr);
+           return -EEXIST;
+       }
+
     /* This check is here simply to detect when RMRR values are
      * not properly represented in the system memory map and
      * inform the user
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index ac1753f..7ba1be7 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -42,6 +42,12 @@
 #include "vtd.h"
 #include "../ats.h"
 
+struct mapped_rmrr {
+    struct list_head list;
+    u64 base, end;
+    unsigned int count;
+};
+
 /* Possible unfiltered LAPIC/MSI messages from untrusted sources? */
 bool_t __read_mostly untrusted_msi;
 
@@ -619,7 +625,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
     struct hvm_iommu *hd = domain_hvm_iommu(domain);
     struct dma_pte *page = NULL, *pte = NULL;
     u64 pg_maddr;
-    struct mapped_rmrr *mrmrr;
 
     spin_lock(&hd->mapping_lock);
     /* get last level pte */
@@ -648,21 +653,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
         __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K, 1, 1);
 
     unmap_vtd_domain_page(page);
-
-    /* if the cleared address is between mapped RMRR region,
-     * remove the mapped RMRR
-     */
-    spin_lock(&hd->mapping_lock);
-    list_for_each_entry ( mrmrr, &hd->mapped_rmrrs, list )
-    {
-        if ( addr >= mrmrr->base && addr <= mrmrr->end )
-        {
-            list_del(&mrmrr->list);
-            xfree(mrmrr);
-            break;
-        }
-    }
-    spin_unlock(&hd->mapping_lock);
 }
 
 static void iommu_free_pagetable(u64 pt_maddr, int level)
@@ -1683,10 +1673,17 @@ static int reassign_device_ownership(
 void iommu_domain_teardown(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
+    struct mapped_rmrr *mrmrr, *tmp;
 
     if ( list_empty(&acpi_drhd_units) )
         return;
 
+    list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
+    {
+        list_del(&mrmrr->list);
+        xfree(mrmrr);
+    }
+
     if ( iommu_use_hap_pt(d) )
         return;
 
@@ -1831,14 +1828,17 @@ static int rmrr_identity_mapping(struct domain *d,
     ASSERT(rmrr->base_address < rmrr->end_address);
 
     /*
-     * No need to acquire hd->mapping_lock, as the only theoretical race is
-     * with the insertion below (impossible due to holding pcidevs_lock).
+     * No need to acquire hd->mapping_lock: Both insertion and removal
+     * get done while holding pcidevs_lock.
      */
     list_for_each_entry( mrmrr, &hd->mapped_rmrrs, list )
     {
         if ( mrmrr->base == rmrr->base_address &&
              mrmrr->end == rmrr->end_address )
+        {
+            ++mrmrr->count;
             return 0;
+        }
     }
 
     base = rmrr->base_address & PAGE_MASK_4K;
@@ -1859,9 +1859,8 @@ static int rmrr_identity_mapping(struct domain *d,
         return -ENOMEM;
     mrmrr->base = rmrr->base_address;
     mrmrr->end = rmrr->end_address;
-    spin_lock(&hd->mapping_lock);
+    mrmrr->count = 1;
     list_add_tail(&mrmrr->list, &hd->mapped_rmrrs);
-    spin_unlock(&hd->mapping_lock);
 
     return 0;
 }
@@ -1923,17 +1922,52 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
     if ( !pdev->domain )
         return -EINVAL;
 
-    /* If the device belongs to dom0, and it has RMRR, don't remove it
-     * from dom0, because BIOS may use RMRR at booting time.
-     */
-    if ( pdev->domain->domain_id == 0 )
+    for_each_rmrr_device ( rmrr, bdf, i )
     {
-        for_each_rmrr_device ( rmrr, bdf, i )
+        struct hvm_iommu *hd;
+        struct mapped_rmrr *mrmrr, *tmp;
+
+        if ( rmrr->segment != pdev->seg ||
+             PCI_BUS(bdf) != pdev->bus ||
+             PCI_DEVFN2(bdf) != devfn )
+            continue;
+
+        /*
+         * If the device belongs to dom0, and it has RMRR, don't remove
+         * it from dom0, because BIOS may use RMRR at booting time.
+         */
+        if ( is_hardware_domain(pdev->domain) )
+            return 0;
+
+        hd = domain_hvm_iommu(pdev->domain);
+
+        /*
+         * No need to acquire hd->mapping_lock: Both insertion and removal
+         * get done while holding pcidevs_lock.
+         */
+        ASSERT(spin_is_locked(&pcidevs_lock));
+        list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
         {
-            if ( rmrr->segment == pdev->seg &&
-                 PCI_BUS(bdf) == pdev->bus &&
-                 PCI_DEVFN2(bdf) == devfn )
-                return 0;
+            unsigned long base_pfn, end_pfn;
+
+            if ( rmrr->base_address != mrmrr->base ||
+                 rmrr->end_address != mrmrr->end )
+                continue;
+
+            if ( --mrmrr->count )
+                break;
+
+            base_pfn = (mrmrr->base & PAGE_MASK_4K) >> PAGE_SHIFT_4K;
+            end_pfn = PAGE_ALIGN_4K(mrmrr->end) >> PAGE_SHIFT_4K;
+            while ( base_pfn < end_pfn )
+            {
+                if ( intel_iommu_unmap_page(pdev->domain, base_pfn) )
+                    return -ENXIO;
+                base_pfn++;
+            }
+
+            list_del(&mrmrr->list);
+            xfree(mrmrr);
         }
     }
 
diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h
index 26539e0..8c98274 100644
--- a/xen/include/xen/hvm/iommu.h
+++ b/xen/include/xen/hvm/iommu.h
@@ -29,12 +29,6 @@ struct g2m_ioport {
     unsigned int np;
 };
 
-struct mapped_rmrr {
-    struct list_head list;
-    u64 base;
-    u64 end;
-};
-
 struct hvm_iommu {
     u64 pgd_maddr;                 /* io page directory machine address */
     spinlock_t mapping_lock;       /* io page table lock */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:55:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:55:39 +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 1WXjbl-0006UO-2s; Wed, 09 Apr 2014 03:55:29 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbj-0006Tw-Od
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:28 +0000
Received: from [85.158.137.68:14483] by server-14.bemta-3.messagelabs.com id
	2C/7B-30903-EA4C4435; Wed, 09 Apr 2014 03:55:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397015724!5816295!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3951 invoked from network); 9 Apr 2014 03:55:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:55:25 -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 1WXjbg-0006e7-Gz
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbg-0000Ds-Dp
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:24 +0000
Date: Wed, 09 Apr 2014 03:55:24 +0000
Message-Id: <E1WXjbg-0000Ds-Dp@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] VT-d: fix RMRR handling
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 6c63041428cc348bcb2887afabd606bc4bd5523f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:50:30 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:50:30 2014 +0200

    VT-d: fix RMRR handling
    
    Removing mapped RMRR tracking structures in dma_pte_clear_one() is
    wrong for two reasons: First, these regions may cover more than a
    single page. And second, multiple devices (and hence multiple devices
    assigned to any particular guest) may share a single RMRR (whether
    assigning such devices to distinct guests is a safe thing to do is
    another question).
    
    Therefore move the removal of the tracking structures into the
    counterpart function to the one doing the insertion -
    intel_iommu_remove_device(), and add a reference count to the tracking
    structure.
    
    Further, for the handling of the mappings of the respective memory
    regions to be correct, RMRRs must not overlap. Add a respective check
    to acpi_parse_one_rmrr().
    
    And finally, with all of this being VT-d specific, move the cleanup
    of the list as well as the structure type definition where it belongs -
    in VT-d specific rather than IOMMU generic code.
    
    Note that this doesn't address yet another issue associated with RMRR
    handling: The purpose of the RMRRs as well as the way the respective
    IOMMU page table mappings get inserted both suggest that these regions
    would need to be marked E820_RESERVED in all (HVM?) guests' memory
    maps, yet nothing like this is being done in hvmloader. (For PV guests
    this would also seem to be necessary, but may conflict with PV guests
    possibly assuming there to be just a single E820 entry representing all
    of its RAM.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
    master commit: dd527061770789d8152b1dea68056987b202d87a
    master date: 2014-03-17 16:45:04 +0100
---
 xen/drivers/passthrough/iommu.c     |   10 +---
 xen/drivers/passthrough/vtd/dmar.c  |   10 ++++
 xen/drivers/passthrough/vtd/iommu.c |   92 ++++++++++++++++++++++++-----------
 xen/include/xen/hvm/iommu.h         |    6 --
 4 files changed, 74 insertions(+), 44 deletions(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index bf8b6ba..ab66280 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -340,9 +340,8 @@ static int iommu_populate_page_table(struct domain *d)
 void iommu_domain_destroy(struct domain *d)
 {
     struct hvm_iommu *hd  = domain_hvm_iommu(d);
-    struct list_head *ioport_list, *rmrr_list, *tmp;
+    struct list_head *ioport_list, *tmp;
     struct g2m_ioport *ioport;
-    struct mapped_rmrr *mrmrr;
 
     if ( !iommu_enabled || !hd->platform_ops )
         return;
@@ -359,13 +358,6 @@ void iommu_domain_destroy(struct domain *d)
         list_del(&ioport->list);
         xfree(ioport);
     }
-
-    list_for_each_safe ( rmrr_list, tmp, &hd->mapped_rmrrs )
-    {
-        mrmrr = list_entry(rmrr_list, struct mapped_rmrr, list);
-        list_del(&mrmrr->list);
-        xfree(mrmrr);
-    }
 }
 
 int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn,
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index cb998e2..1152c3a 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -580,6 +580,16 @@ acpi_parse_one_rmrr(struct acpi_dmar_header *header)
     if ( (ret = acpi_dmar_check_length(header, sizeof(*rmrr))) != 0 )
         return ret;
 
+    list_for_each_entry(rmrru, &acpi_rmrr_units, list)
+       if ( base_addr <= rmrru->end_address && rmrru->base_address <= end_addr )
+       {
+           printk(XENLOG_ERR VTDPREFIX
+                  "Overlapping RMRRs [%"PRIx64",%"PRIx64"] and [%"PRIx64",%"PRIx64"]\n",
+                  rmrru->base_address, rmrru->end_address,
+                  base_addr, end_addr);
+           return -EEXIST;
+       }
+
     /* This check is here simply to detect when RMRR values are
      * not properly represented in the system memory map and
      * inform the user
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index ac1753f..7ba1be7 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -42,6 +42,12 @@
 #include "vtd.h"
 #include "../ats.h"
 
+struct mapped_rmrr {
+    struct list_head list;
+    u64 base, end;
+    unsigned int count;
+};
+
 /* Possible unfiltered LAPIC/MSI messages from untrusted sources? */
 bool_t __read_mostly untrusted_msi;
 
@@ -619,7 +625,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
     struct hvm_iommu *hd = domain_hvm_iommu(domain);
     struct dma_pte *page = NULL, *pte = NULL;
     u64 pg_maddr;
-    struct mapped_rmrr *mrmrr;
 
     spin_lock(&hd->mapping_lock);
     /* get last level pte */
@@ -648,21 +653,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
         __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K, 1, 1);
 
     unmap_vtd_domain_page(page);
-
-    /* if the cleared address is between mapped RMRR region,
-     * remove the mapped RMRR
-     */
-    spin_lock(&hd->mapping_lock);
-    list_for_each_entry ( mrmrr, &hd->mapped_rmrrs, list )
-    {
-        if ( addr >= mrmrr->base && addr <= mrmrr->end )
-        {
-            list_del(&mrmrr->list);
-            xfree(mrmrr);
-            break;
-        }
-    }
-    spin_unlock(&hd->mapping_lock);
 }
 
 static void iommu_free_pagetable(u64 pt_maddr, int level)
@@ -1683,10 +1673,17 @@ static int reassign_device_ownership(
 void iommu_domain_teardown(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
+    struct mapped_rmrr *mrmrr, *tmp;
 
     if ( list_empty(&acpi_drhd_units) )
         return;
 
+    list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
+    {
+        list_del(&mrmrr->list);
+        xfree(mrmrr);
+    }
+
     if ( iommu_use_hap_pt(d) )
         return;
 
@@ -1831,14 +1828,17 @@ static int rmrr_identity_mapping(struct domain *d,
     ASSERT(rmrr->base_address < rmrr->end_address);
 
     /*
-     * No need to acquire hd->mapping_lock, as the only theoretical race is
-     * with the insertion below (impossible due to holding pcidevs_lock).
+     * No need to acquire hd->mapping_lock: Both insertion and removal
+     * get done while holding pcidevs_lock.
      */
     list_for_each_entry( mrmrr, &hd->mapped_rmrrs, list )
     {
         if ( mrmrr->base == rmrr->base_address &&
              mrmrr->end == rmrr->end_address )
+        {
+            ++mrmrr->count;
             return 0;
+        }
     }
 
     base = rmrr->base_address & PAGE_MASK_4K;
@@ -1859,9 +1859,8 @@ static int rmrr_identity_mapping(struct domain *d,
         return -ENOMEM;
     mrmrr->base = rmrr->base_address;
     mrmrr->end = rmrr->end_address;
-    spin_lock(&hd->mapping_lock);
+    mrmrr->count = 1;
     list_add_tail(&mrmrr->list, &hd->mapped_rmrrs);
-    spin_unlock(&hd->mapping_lock);
 
     return 0;
 }
@@ -1923,17 +1922,52 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
     if ( !pdev->domain )
         return -EINVAL;
 
-    /* If the device belongs to dom0, and it has RMRR, don't remove it
-     * from dom0, because BIOS may use RMRR at booting time.
-     */
-    if ( pdev->domain->domain_id == 0 )
+    for_each_rmrr_device ( rmrr, bdf, i )
     {
-        for_each_rmrr_device ( rmrr, bdf, i )
+        struct hvm_iommu *hd;
+        struct mapped_rmrr *mrmrr, *tmp;
+
+        if ( rmrr->segment != pdev->seg ||
+             PCI_BUS(bdf) != pdev->bus ||
+             PCI_DEVFN2(bdf) != devfn )
+            continue;
+
+        /*
+         * If the device belongs to dom0, and it has RMRR, don't remove
+         * it from dom0, because BIOS may use RMRR at booting time.
+         */
+        if ( is_hardware_domain(pdev->domain) )
+            return 0;
+
+        hd = domain_hvm_iommu(pdev->domain);
+
+        /*
+         * No need to acquire hd->mapping_lock: Both insertion and removal
+         * get done while holding pcidevs_lock.
+         */
+        ASSERT(spin_is_locked(&pcidevs_lock));
+        list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
         {
-            if ( rmrr->segment == pdev->seg &&
-                 PCI_BUS(bdf) == pdev->bus &&
-                 PCI_DEVFN2(bdf) == devfn )
-                return 0;
+            unsigned long base_pfn, end_pfn;
+
+            if ( rmrr->base_address != mrmrr->base ||
+                 rmrr->end_address != mrmrr->end )
+                continue;
+
+            if ( --mrmrr->count )
+                break;
+
+            base_pfn = (mrmrr->base & PAGE_MASK_4K) >> PAGE_SHIFT_4K;
+            end_pfn = PAGE_ALIGN_4K(mrmrr->end) >> PAGE_SHIFT_4K;
+            while ( base_pfn < end_pfn )
+            {
+                if ( intel_iommu_unmap_page(pdev->domain, base_pfn) )
+                    return -ENXIO;
+                base_pfn++;
+            }
+
+            list_del(&mrmrr->list);
+            xfree(mrmrr);
         }
     }
 
diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h
index 26539e0..8c98274 100644
--- a/xen/include/xen/hvm/iommu.h
+++ b/xen/include/xen/hvm/iommu.h
@@ -29,12 +29,6 @@ struct g2m_ioport {
     unsigned int np;
 };
 
-struct mapped_rmrr {
-    struct list_head list;
-    u64 base;
-    u64 end;
-};
-
 struct hvm_iommu {
     u64 pgd_maddr;                 /* io page directory machine address */
     spinlock_t mapping_lock;       /* io page table lock */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:55:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:55:42 +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 1WXjbu-0006Vu-AR; Wed, 09 Apr 2014 03:55:38 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbt-0006Vk-Az
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:37 +0000
Received: from [193.109.254.147:35377] by server-7.bemta-14.messagelabs.com id
	7C/BD-17726-8B4C4435; Wed, 09 Apr 2014 03:55:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1397015734!7104684!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22994 invoked from network); 9 Apr 2014 03:55:35 -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 Apr 2014 03:55:35 -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 1WXjbq-0006eI-Mv
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbq-0000EL-L1
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:34 +0000
Date: Wed, 09 Apr 2014 03:55:34 +0000
Message-Id: <E1WXjbq-0000EL-L1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/Intel: work around Xeon 7400
	series erratum AAI65
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 e2aa3f21e5b1746913f7d4605f631d383c7f2551
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:51:27 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:51:27 2014 +0200

    x86/Intel: work around Xeon 7400 series erratum AAI65
    
    Linux commit 40e2d7f9b5dae048789c64672bf3027fbb663ffa ("x86 idle:
    Repair large-server 50-watt idle-power regression") tells us that this
    applies not just to the named Xeon 7400 series, but also NHM-EX and
    WSM-EX; sadly Intel's documentation is so badly searchable that I
    wasn't able to locate the respective errata (and hence can't quote
    their numbers here).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
    master commit: 96d1b237ae9b2f2718bb1c59820701f17d3d86e0
    master date: 2014-03-17 16:47:22 +0100
---
 xen/arch/x86/acpi/cpu_idle.c     |    3 +++
 xen/arch/x86/cpu/intel.c         |    7 +++++++
 xen/include/asm-x86/cpufeature.h |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 5412338..a9b5ba9 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -296,6 +296,9 @@ void mwait_idle_with_hints(unsigned int eax, unsigned int ecx)
     unsigned int cpu = smp_processor_id();
     s_time_t expires = per_cpu(timer_deadline, cpu);
 
+    if ( boot_cpu_has(X86_FEATURE_CLFLUSH_MONITOR) )
+        clflush((void *)&mwait_wakeup(cpu));
+
     __monitor((void *)&mwait_wakeup(cpu), 0, 0);
     smp_mb();
 
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 9b71d36..c1a9da4 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -154,6 +154,9 @@ void __devinit early_intel_workaround(struct cpuinfo_x86 *c)
 /*
  * P4 Xeon errata 037 workaround.
  * Hardware prefetcher may cause stale data to be loaded into the cache.
+ *
+ * Xeon 7400 erratum AAI65 (and further newer Xeons)
+ * MONITOR/MWAIT may have excessive false wakeups
  */
 static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 {
@@ -168,6 +171,10 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 			wrmsr (MSR_IA32_MISC_ENABLE, lo, hi);
 		}
 	}
+
+	if (c->x86 == 6 && cpu_has_clflush &&
+	    (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47))
+		set_bit(X86_FEATURE_CLFLUSH_MONITOR, c->x86_capability);
 }
 
 
diff --git a/xen/include/asm-x86/cpufeature.h b/xen/include/asm-x86/cpufeature.h
index 1cfaf94..526821f 100644
--- a/xen/include/asm-x86/cpufeature.h
+++ b/xen/include/asm-x86/cpufeature.h
@@ -71,6 +71,7 @@
 #define X86_FEATURE_TSC_RELIABLE (3*32+12) /* TSC is known to be reliable */
 #define X86_FEATURE_XTOPOLOGY    (3*32+13) /* cpu topology enum extensions */
 #define X86_FEATURE_CPUID_FAULTING (3*32+14) /* cpuid faulting */
+#define X86_FEATURE_CLFLUSH_MONITOR (3*32+15) /* clflush reqd with monitor */
 
 /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
 #define X86_FEATURE_XMM3	(4*32+ 0) /* Streaming SIMD Extensions-3 */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:55:42 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:55:42 +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 1WXjbu-0006Vu-AR; Wed, 09 Apr 2014 03:55:38 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbt-0006Vk-Az
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:37 +0000
Received: from [193.109.254.147:35377] by server-7.bemta-14.messagelabs.com id
	7C/BD-17726-8B4C4435; Wed, 09 Apr 2014 03:55:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1397015734!7104684!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22994 invoked from network); 9 Apr 2014 03:55:35 -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 Apr 2014 03:55:35 -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 1WXjbq-0006eI-Mv
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjbq-0000EL-L1
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:34 +0000
Date: Wed, 09 Apr 2014 03:55:34 +0000
Message-Id: <E1WXjbq-0000EL-L1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/Intel: work around Xeon 7400
	series erratum AAI65
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 e2aa3f21e5b1746913f7d4605f631d383c7f2551
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:51:27 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:51:27 2014 +0200

    x86/Intel: work around Xeon 7400 series erratum AAI65
    
    Linux commit 40e2d7f9b5dae048789c64672bf3027fbb663ffa ("x86 idle:
    Repair large-server 50-watt idle-power regression") tells us that this
    applies not just to the named Xeon 7400 series, but also NHM-EX and
    WSM-EX; sadly Intel's documentation is so badly searchable that I
    wasn't able to locate the respective errata (and hence can't quote
    their numbers here).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
    master commit: 96d1b237ae9b2f2718bb1c59820701f17d3d86e0
    master date: 2014-03-17 16:47:22 +0100
---
 xen/arch/x86/acpi/cpu_idle.c     |    3 +++
 xen/arch/x86/cpu/intel.c         |    7 +++++++
 xen/include/asm-x86/cpufeature.h |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 5412338..a9b5ba9 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -296,6 +296,9 @@ void mwait_idle_with_hints(unsigned int eax, unsigned int ecx)
     unsigned int cpu = smp_processor_id();
     s_time_t expires = per_cpu(timer_deadline, cpu);
 
+    if ( boot_cpu_has(X86_FEATURE_CLFLUSH_MONITOR) )
+        clflush((void *)&mwait_wakeup(cpu));
+
     __monitor((void *)&mwait_wakeup(cpu), 0, 0);
     smp_mb();
 
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 9b71d36..c1a9da4 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -154,6 +154,9 @@ void __devinit early_intel_workaround(struct cpuinfo_x86 *c)
 /*
  * P4 Xeon errata 037 workaround.
  * Hardware prefetcher may cause stale data to be loaded into the cache.
+ *
+ * Xeon 7400 erratum AAI65 (and further newer Xeons)
+ * MONITOR/MWAIT may have excessive false wakeups
  */
 static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 {
@@ -168,6 +171,10 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 			wrmsr (MSR_IA32_MISC_ENABLE, lo, hi);
 		}
 	}
+
+	if (c->x86 == 6 && cpu_has_clflush &&
+	    (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47))
+		set_bit(X86_FEATURE_CLFLUSH_MONITOR, c->x86_capability);
 }
 
 
diff --git a/xen/include/asm-x86/cpufeature.h b/xen/include/asm-x86/cpufeature.h
index 1cfaf94..526821f 100644
--- a/xen/include/asm-x86/cpufeature.h
+++ b/xen/include/asm-x86/cpufeature.h
@@ -71,6 +71,7 @@
 #define X86_FEATURE_TSC_RELIABLE (3*32+12) /* TSC is known to be reliable */
 #define X86_FEATURE_XTOPOLOGY    (3*32+13) /* cpu topology enum extensions */
 #define X86_FEATURE_CPUID_FAULTING (3*32+14) /* cpuid faulting */
+#define X86_FEATURE_CLFLUSH_MONITOR (3*32+15) /* clflush reqd with monitor */
 
 /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
 #define X86_FEATURE_XMM3	(4*32+ 0) /* Streaming SIMD Extensions-3 */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56:02 +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 1WXjc8-0006YP-FW; Wed, 09 Apr 2014 03:55:52 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjc6-0006Xi-Rr
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:51 +0000
Received: from [85.158.139.211:48771] by server-7.bemta-5.messagelabs.com id
	E8/CD-20531-2C4C4435; Wed, 09 Apr 2014 03:55:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1397015745!6322830!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12864 invoked from network); 9 Apr 2014 03:55:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:55:46 -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 1WXjc0-0006eP-TB
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjc0-0000Eh-Qk
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:44 +0000
Date: Wed, 09 Apr 2014 03:55:44 +0000
Message-Id: <E1WXjc0-0000Eh-Qk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86: fix determination of bit
	count for struct domain allocations
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 da44176cc1b45558f8ec53ef7f5e8796372f57a9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:52:36 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:52:36 2014 +0200

    x86: fix determination of bit count for struct domain allocations
    
    We can't just add in the hole shift value, as the hole may be at or
    above the 44-bit boundary. Instead we need to determine the total bit
    count until reaching 32 significant (not squashed out) bits in PFN
    representations.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: b3d2f8b2cba9fce5bc8995612d0d13fcefec7769
    master date: 2014-03-24 10:48:03 +0100
---
 xen/arch/x86/domain.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index c0a11c0..eecb69a 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -180,6 +180,28 @@ void dump_pageframe_info(struct domain *d)
     spin_unlock(&d->page_alloc_lock);
 }
 
+/*
+ * The hole may be at or above the 44-bit boundary, so we need to determine
+ * the total bit count until reaching 32 significant (not squashed out) bits
+ * in PFN representations.
+ * Note that the way "bits" gets initialized/updated/bounds-checked guarantees
+ * that the function will never return zero, and hence will never be called
+ * more than once (which is important due to it being deliberately placed in
+ * .init.text).
+ */
+static unsigned int __init noinline _domain_struct_bits(void)
+{
+    unsigned int bits = 32 + PAGE_SHIFT;
+    unsigned int sig = hweight32(~pfn_hole_mask);
+    unsigned int mask = pfn_hole_mask >> 32;
+
+    for ( ; bits < BITS_PER_LONG && sig < 32; ++bits, mask >>= 1 )
+        if ( !(mask & 1) )
+            ++sig;
+
+    return bits;
+}
+
 struct domain *alloc_domain_struct(void)
 {
     struct domain *d;
@@ -187,7 +209,10 @@ struct domain *alloc_domain_struct(void)
      * We pack the PDX of the domain structure into a 32-bit field within
      * the page_info structure. Hence the MEMF_bits() restriction.
      */
-    unsigned int bits = 32 + PAGE_SHIFT + pfn_pdx_hole_shift;
+    static unsigned int __read_mostly bits;
+
+    if ( unlikely(!bits) )
+         bits = _domain_struct_bits();
 
     BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
     d = alloc_xenheap_pages(0, MEMF_bits(bits));
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:02 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56:02 +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 1WXjc8-0006YP-FW; Wed, 09 Apr 2014 03:55:52 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjc6-0006Xi-Rr
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:51 +0000
Received: from [85.158.139.211:48771] by server-7.bemta-5.messagelabs.com id
	E8/CD-20531-2C4C4435; Wed, 09 Apr 2014 03:55:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1397015745!6322830!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12864 invoked from network); 9 Apr 2014 03:55:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:55:46 -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 1WXjc0-0006eP-TB
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjc0-0000Eh-Qk
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:44 +0000
Date: Wed, 09 Apr 2014 03:55:44 +0000
Message-Id: <E1WXjc0-0000Eh-Qk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86: fix determination of bit
	count for struct domain allocations
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 da44176cc1b45558f8ec53ef7f5e8796372f57a9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:52:36 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:52:36 2014 +0200

    x86: fix determination of bit count for struct domain allocations
    
    We can't just add in the hole shift value, as the hole may be at or
    above the 44-bit boundary. Instead we need to determine the total bit
    count until reaching 32 significant (not squashed out) bits in PFN
    representations.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: b3d2f8b2cba9fce5bc8995612d0d13fcefec7769
    master date: 2014-03-24 10:48:03 +0100
---
 xen/arch/x86/domain.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index c0a11c0..eecb69a 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -180,6 +180,28 @@ void dump_pageframe_info(struct domain *d)
     spin_unlock(&d->page_alloc_lock);
 }
 
+/*
+ * The hole may be at or above the 44-bit boundary, so we need to determine
+ * the total bit count until reaching 32 significant (not squashed out) bits
+ * in PFN representations.
+ * Note that the way "bits" gets initialized/updated/bounds-checked guarantees
+ * that the function will never return zero, and hence will never be called
+ * more than once (which is important due to it being deliberately placed in
+ * .init.text).
+ */
+static unsigned int __init noinline _domain_struct_bits(void)
+{
+    unsigned int bits = 32 + PAGE_SHIFT;
+    unsigned int sig = hweight32(~pfn_hole_mask);
+    unsigned int mask = pfn_hole_mask >> 32;
+
+    for ( ; bits < BITS_PER_LONG && sig < 32; ++bits, mask >>= 1 )
+        if ( !(mask & 1) )
+            ++sig;
+
+    return bits;
+}
+
 struct domain *alloc_domain_struct(void)
 {
     struct domain *d;
@@ -187,7 +209,10 @@ struct domain *alloc_domain_struct(void)
      * We pack the PDX of the domain structure into a 32-bit field within
      * the page_info structure. Hence the MEMF_bits() restriction.
      */
-    unsigned int bits = 32 + PAGE_SHIFT + pfn_pdx_hole_shift;
+    static unsigned int __read_mostly bits;
+
+    if ( unlikely(!bits) )
+         bits = _domain_struct_bits();
 
     BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
     d = alloc_xenheap_pages(0, MEMF_bits(bits));
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56:11 +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 1WXjcH-0006ZW-J2; Wed, 09 Apr 2014 03:56:01 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcG-0006ZJ-D1
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:00 +0000
Received: from [85.158.139.211:49142] by server-16.bemta-5.messagelabs.com id
	3B/D2-19700-FC4C4435; Wed, 09 Apr 2014 03:55:59 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1397015755!6285097!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4146 invoked from network); 9 Apr 2014 03:55:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:55:56 -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 1WXjcB-0006eX-3k
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcB-0000F3-1L
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:55 +0000
Date: Wed, 09 Apr 2014 03:55:55 +0000
Message-Id: <E1WXjcB-0000F3-1L@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/HVM: correct CPUID leaf
	80000008 handling
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 e7516b4015c87dc0e136352d8b6a1c850ebdda3f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:53:20 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:53:20 2014 +0200

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: ef437690af8b75e6758dce77af75a22b63982883
    master date: 2014-03-28 13:33:34 +0100
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   25 +++++++++++++------------
 2 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index a3a2c32..c52044e 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2810,6 +2810,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2843,8 +2845,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2861,7 +2861,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2875,6 +2875,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, NULL, NULL, NULL, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, NULL, NULL, NULL, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 146c2e6..1ee08ed 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,11 +172,7 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -468,16 +464,21 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56:11 +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 1WXjcH-0006ZW-J2; Wed, 09 Apr 2014 03:56:01 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcG-0006ZJ-D1
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:00 +0000
Received: from [85.158.139.211:49142] by server-16.bemta-5.messagelabs.com id
	3B/D2-19700-FC4C4435; Wed, 09 Apr 2014 03:55:59 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1397015755!6285097!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4146 invoked from network); 9 Apr 2014 03:55:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:55:56 -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 1WXjcB-0006eX-3k
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcB-0000F3-1L
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:55:55 +0000
Date: Wed, 09 Apr 2014 03:55:55 +0000
Message-Id: <E1WXjcB-0000F3-1L@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/HVM: correct CPUID leaf
	80000008 handling
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 e7516b4015c87dc0e136352d8b6a1c850ebdda3f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:53:20 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:53:20 2014 +0200

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: ef437690af8b75e6758dce77af75a22b63982883
    master date: 2014-03-28 13:33:34 +0100
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   25 +++++++++++++------------
 2 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index a3a2c32..c52044e 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2810,6 +2810,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2843,8 +2845,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2861,7 +2861,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2875,6 +2875,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, NULL, NULL, NULL, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, NULL, NULL, NULL, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 146c2e6..1ee08ed 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,11 +172,7 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -468,16 +464,21 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56: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 1WXjcP-0006au-N6; Wed, 09 Apr 2014 03:56:09 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcN-0006aV-RG
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:07 +0000
Received: from [85.158.137.68:48619] by server-15.bemta-3.messagelabs.com id
	8B/99-13757-7D4C4435; Wed, 09 Apr 2014 03:56:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397015765!5816350!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7138 invoked from network); 9 Apr 2014 03:56:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56: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 1WXjcL-0006f4-8v
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcL-0000FZ-74
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:05 +0000
Date: Wed, 09 Apr 2014 03:56:05 +0000
Message-Id: <E1WXjcL-0000FZ-74@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/EPT: relax treatment of APIC
	MFN
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 015fd7910b15243d17ff79ed887a5fdb43fa0629
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:54:10 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:54:10 2014 +0200

    x86/EPT: relax treatment of APIC MFN
    
    There's no point in this being mapped UC by the guest due to using a
    respective PAT index - set the ignore-PAT flag to true.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: 1f8b57779785bf9f55c16312bb1ec679929c314b
    master date: 2014-03-28 13:43:25 +0100
---
 xen/arch/x86/hvm/mtrr.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 1ee08ed..243fa8b 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -711,8 +711,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     if ( direct_mmio )
-        return mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn
-               ? MTRR_TYPE_UNCACHABLE : MTRR_TYPE_WRBACK;
+    {
+        if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+            return MTRR_TYPE_UNCACHABLE;
+        *ipat = 1;
+        return MTRR_TYPE_WRBACK;
+    }
 
     if ( iommu_snoop )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56: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 1WXjcP-0006au-N6; Wed, 09 Apr 2014 03:56:09 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcN-0006aV-RG
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:07 +0000
Received: from [85.158.137.68:48619] by server-15.bemta-3.messagelabs.com id
	8B/99-13757-7D4C4435; Wed, 09 Apr 2014 03:56:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397015765!5816350!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7138 invoked from network); 9 Apr 2014 03:56:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56: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 1WXjcL-0006f4-8v
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcL-0000FZ-74
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:05 +0000
Date: Wed, 09 Apr 2014 03:56:05 +0000
Message-Id: <E1WXjcL-0000FZ-74@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/EPT: relax treatment of APIC
	MFN
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 015fd7910b15243d17ff79ed887a5fdb43fa0629
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:54:10 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:54:10 2014 +0200

    x86/EPT: relax treatment of APIC MFN
    
    There's no point in this being mapped UC by the guest due to using a
    respective PAT index - set the ignore-PAT flag to true.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: 1f8b57779785bf9f55c16312bb1ec679929c314b
    master date: 2014-03-28 13:43:25 +0100
---
 xen/arch/x86/hvm/mtrr.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 1ee08ed..243fa8b 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -711,8 +711,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     if ( direct_mmio )
-        return mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn
-               ? MTRR_TYPE_UNCACHABLE : MTRR_TYPE_WRBACK;
+    {
+        if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+            return MTRR_TYPE_UNCACHABLE;
+        *ipat = 1;
+        return MTRR_TYPE_WRBACK;
+    }
 
     if ( iommu_snoop )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56: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 1WXjck-0006dv-6K; Wed, 09 Apr 2014 03:56:30 +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 1WXjci-0006db-8t
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:28 +0000
Received: from [85.158.143.35:54505] by server-1.bemta-4.messagelabs.com id
	05/CD-09853-BE4C4435; Wed, 09 Apr 2014 03:56:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1397015785!7873947!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9336 invoked from network); 9 Apr 2014 03:56:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56:26 -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 1WXjcf-0006fI-KA
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcf-0000H3-HP
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:25 +0000
Date: Wed, 09 Apr 2014 03:56:25 +0000
Message-Id: <E1WXjcf-0000H3-HP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: Hold the atfork lock while
	closing carefd
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 d0c5e6a5e531b726f220a5645f07fae1ef22c41b
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:14 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:02:40 2014 +0100

    libxl: Hold the atfork lock while closing carefd
    
    This avoids the process being forked while a carefd is recorded in the
    list but the actual fd has been closed.  If that happened, a
    subsequent libxl_postfork_child_noexec would attempt to close the fd
    again.  If we are lucky that results in a harmless warning; but if we
    are unlucky the fd number has been reused and we close an unrelated
    fd.
    
    This race has not been observed anywhere as far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 2a0c3a62ea4ad6c6bcbf80122b070f3ff3fe7dae)
    (cherry picked from commit 86c00cb6e2d78d5be861656a1e83956c9de96003)
---
 tools/libxl/libxl_fork.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_fork.c b/tools/libxl/libxl_fork.c
index b6f0b2d..1dc30e1 100644
--- a/tools/libxl/libxl_fork.c
+++ b/tools/libxl/libxl_fork.c
@@ -135,9 +135,9 @@ void libxl_postfork_child_noexec(libxl_ctx *ctx)
 int libxl__carefd_close(libxl__carefd *cf)
 {
     if (!cf) return 0;
+    atfork_lock();
     int r = cf->fd < 0 ? 0 : close(cf->fd);
     int esave = errno;
-    atfork_lock();
     LIBXL_LIST_REMOVE(cf, entry);
     atfork_unlock();
     free(cf);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56: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 1WXjcu-0006ew-Hz; Wed, 09 Apr 2014 03:56:40 +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 1WXjcs-0006ee-C0
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:38 +0000
Received: from [85.158.143.35:20396] by server-2.bemta-4.messagelabs.com id
	96/3E-06539-5F4C4435; Wed, 09 Apr 2014 03:56:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1397015796!7881255!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20130 invoked from network); 9 Apr 2014 03:56:37 -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;
	9 Apr 2014 03:56:37 -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 1WXjcp-0006fN-TP
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcp-0000HT-OP
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:35 +0000
Date: Wed, 09 Apr 2014 03:56:35 +0000
Message-Id: <E1WXjcp-0000HT-OP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: Fix carefd lock leak in
	save callout
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 de474025e7f25fa0cdcaaaf923ceb2accf1591fb
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:15 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:02:45 2014 +0100

    libxl: Fix carefd lock leak in save callout
    
    If libxl_pipe fails we leave the carefd locked, which translates to
    the atfork lock remaining held.  This would probably cause the process
    to deadlock shortly afterwards.
    
    Of course libxl_pipe is very unlikely to fail unless things are
    already going very badly.  This bug has not been observed anywhere as
    far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 7eb73add5de5839f160b902dd894d3aecc10ba0c)
    (cherry picked from commit 4bb3a17449a4472930030a627631f788bb678123)
---
 tools/libxl/libxl_save_callout.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c
index f164e98..f1a3a6f 100644
--- a/tools/libxl/libxl_save_callout.c
+++ b/tools/libxl/libxl_save_callout.c
@@ -185,7 +185,11 @@ static void run_helper(libxl__egc *egc, libxl__save_helper_state *shs,
     for (childfd=0; childfd<2; childfd++) {
         /* Setting up the pipe for the child's fd childfd */
         int fds[2];
-        if (libxl_pipe(CTX,fds)) { rc = ERROR_FAIL; goto out; }
+        if (libxl_pipe(CTX,fds)) {
+            rc = ERROR_FAIL;
+            libxl__carefd_unlock();
+            goto out;
+        }
         int childs_end = childfd==0 ? 0 /*read*/  : 1 /*write*/;
         int our_end    = childfd==0 ? 1 /*write*/ : 0 /*read*/;
         childs_pipes[childfd] = libxl__carefd_record(CTX, fds[childs_end]);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56: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 1WXjca-0006cb-TC; Wed, 09 Apr 2014 03:56:20 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcY-0006c6-Lg
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:18 +0000
Received: from [85.158.139.211:53671] by server-9.bemta-5.messagelabs.com id
	F7/2C-04350-1E4C4435; Wed, 09 Apr 2014 03:56:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1397015775!6329518!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30047 invoked from network); 9 Apr 2014 03:56:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56:17 -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 1WXjcV-0006fC-EB
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcV-0000Gg-C8
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:15 +0000
Date: Wed, 09 Apr 2014 03:56:15 +0000
Message-Id: <E1WXjcV-0000Gg-C8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] VMX: fix PAT value seen by guest
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 852d1f224dc29d0398b378b3a8a1d2c9c2c2bc8e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:54:46 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:54:46 2014 +0200

    VMX: fix PAT value seen by guest
    
    The XSA-60 fixes introduced a window during which the guest PAT gets
    forced to all zeros. This shouldn't be visible to the guest. Therefore
    we need to intercept PAT MSR accesses during that time period.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: fce79f8ce91dc45f3a4d699ee67c49e6cbeb1197
    master date: 2014-04-01 16:49:18 +0200
---
 xen/arch/x86/hvm/vmx/vmx.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 45b77a1..cfd67de 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -978,6 +978,8 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
 
             vmx_get_guest_pat(v, pat);
             vmx_set_guest_pat(v, uc_pat);
+            vmx_enable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                         MSR_TYPE_R | MSR_TYPE_W);
 
             wbinvd();               /* flush possibly polluted cache */
             hvm_asid_flush_vcpu(v); /* invalidate memory type cached in TLB */
@@ -987,6 +989,9 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
         {
             v->arch.hvm_vcpu.cache_mode = NORMAL_CACHE_MODE;
             vmx_set_guest_pat(v, *pat);
+            if ( !iommu_enabled || iommu_snoop )
+                vmx_disable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                              MSR_TYPE_R | MSR_TYPE_W);
             hvm_asid_flush_vcpu(v); /* no need to flush cache */
         }
     }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56: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 1WXjca-0006cb-TC; Wed, 09 Apr 2014 03:56:20 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcY-0006c6-Lg
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:18 +0000
Received: from [85.158.139.211:53671] by server-9.bemta-5.messagelabs.com id
	F7/2C-04350-1E4C4435; Wed, 09 Apr 2014 03:56:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-206.messagelabs.com!1397015775!6329518!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 30047 invoked from network); 9 Apr 2014 03:56:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56:17 -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 1WXjcV-0006fC-EB
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcV-0000Gg-C8
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:15 +0000
Date: Wed, 09 Apr 2014 03:56:15 +0000
Message-Id: <E1WXjcV-0000Gg-C8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] VMX: fix PAT value seen by guest
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 852d1f224dc29d0398b378b3a8a1d2c9c2c2bc8e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 4 10:54:46 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 4 10:54:46 2014 +0200

    VMX: fix PAT value seen by guest
    
    The XSA-60 fixes introduced a window during which the guest PAT gets
    forced to all zeros. This shouldn't be visible to the guest. Therefore
    we need to intercept PAT MSR accesses during that time period.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: fce79f8ce91dc45f3a4d699ee67c49e6cbeb1197
    master date: 2014-04-01 16:49:18 +0200
---
 xen/arch/x86/hvm/vmx/vmx.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 45b77a1..cfd67de 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -978,6 +978,8 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
 
             vmx_get_guest_pat(v, pat);
             vmx_set_guest_pat(v, uc_pat);
+            vmx_enable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                         MSR_TYPE_R | MSR_TYPE_W);
 
             wbinvd();               /* flush possibly polluted cache */
             hvm_asid_flush_vcpu(v); /* invalidate memory type cached in TLB */
@@ -987,6 +989,9 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
         {
             v->arch.hvm_vcpu.cache_mode = NORMAL_CACHE_MODE;
             vmx_set_guest_pat(v, *pat);
+            if ( !iommu_enabled || iommu_snoop )
+                vmx_disable_intercept_for_msr(v, MSR_IA32_CR_PAT,
+                                              MSR_TYPE_R | MSR_TYPE_W);
             hvm_asid_flush_vcpu(v); /* no need to flush cache */
         }
     }
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56: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 1WXjck-0006dv-6K; Wed, 09 Apr 2014 03:56:30 +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 1WXjci-0006db-8t
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:28 +0000
Received: from [85.158.143.35:54505] by server-1.bemta-4.messagelabs.com id
	05/CD-09853-BE4C4435; Wed, 09 Apr 2014 03:56:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1397015785!7873947!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9336 invoked from network); 9 Apr 2014 03:56:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56:26 -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 1WXjcf-0006fI-KA
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcf-0000H3-HP
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:25 +0000
Date: Wed, 09 Apr 2014 03:56:25 +0000
Message-Id: <E1WXjcf-0000H3-HP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: Hold the atfork lock while
	closing carefd
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 d0c5e6a5e531b726f220a5645f07fae1ef22c41b
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:14 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:02:40 2014 +0100

    libxl: Hold the atfork lock while closing carefd
    
    This avoids the process being forked while a carefd is recorded in the
    list but the actual fd has been closed.  If that happened, a
    subsequent libxl_postfork_child_noexec would attempt to close the fd
    again.  If we are lucky that results in a harmless warning; but if we
    are unlucky the fd number has been reused and we close an unrelated
    fd.
    
    This race has not been observed anywhere as far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 2a0c3a62ea4ad6c6bcbf80122b070f3ff3fe7dae)
    (cherry picked from commit 86c00cb6e2d78d5be861656a1e83956c9de96003)
---
 tools/libxl/libxl_fork.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_fork.c b/tools/libxl/libxl_fork.c
index b6f0b2d..1dc30e1 100644
--- a/tools/libxl/libxl_fork.c
+++ b/tools/libxl/libxl_fork.c
@@ -135,9 +135,9 @@ void libxl_postfork_child_noexec(libxl_ctx *ctx)
 int libxl__carefd_close(libxl__carefd *cf)
 {
     if (!cf) return 0;
+    atfork_lock();
     int r = cf->fd < 0 ? 0 : close(cf->fd);
     int esave = errno;
-    atfork_lock();
     LIBXL_LIST_REMOVE(cf, entry);
     atfork_unlock();
     free(cf);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56: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 1WXjcu-0006ew-Hz; Wed, 09 Apr 2014 03:56:40 +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 1WXjcs-0006ee-C0
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:38 +0000
Received: from [85.158.143.35:20396] by server-2.bemta-4.messagelabs.com id
	96/3E-06539-5F4C4435; Wed, 09 Apr 2014 03:56:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1397015796!7881255!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20130 invoked from network); 9 Apr 2014 03:56:37 -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;
	9 Apr 2014 03:56:37 -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 1WXjcp-0006fN-TP
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjcp-0000HT-OP
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:35 +0000
Date: Wed, 09 Apr 2014 03:56:35 +0000
Message-Id: <E1WXjcp-0000HT-OP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] libxl: Fix carefd lock leak in
	save callout
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 de474025e7f25fa0cdcaaaf923ceb2accf1591fb
Author:     Ian Jackson <ian.jackson@eu.citrix.com>
AuthorDate: Mon Feb 24 14:19:15 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:02:45 2014 +0100

    libxl: Fix carefd lock leak in save callout
    
    If libxl_pipe fails we leave the carefd locked, which translates to
    the atfork lock remaining held.  This would probably cause the process
    to deadlock shortly afterwards.
    
    Of course libxl_pipe is very unlikely to fail unless things are
    already going very badly.  This bug has not been observed anywhere as
    far as we are aware.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
    CC: George Dunlap <george.dunlap@eu.citrix.com>
    (cherry picked from commit 7eb73add5de5839f160b902dd894d3aecc10ba0c)
    (cherry picked from commit 4bb3a17449a4472930030a627631f788bb678123)
---
 tools/libxl/libxl_save_callout.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c
index f164e98..f1a3a6f 100644
--- a/tools/libxl/libxl_save_callout.c
+++ b/tools/libxl/libxl_save_callout.c
@@ -185,7 +185,11 @@ static void run_helper(libxl__egc *egc, libxl__save_helper_state *shs,
     for (childfd=0; childfd<2; childfd++) {
         /* Setting up the pipe for the child's fd childfd */
         int fds[2];
-        if (libxl_pipe(CTX,fds)) { rc = ERROR_FAIL; goto out; }
+        if (libxl_pipe(CTX,fds)) {
+            rc = ERROR_FAIL;
+            libxl__carefd_unlock();
+            goto out;
+        }
         int childs_end = childfd==0 ? 0 /*read*/  : 1 /*write*/;
         int our_end    = childfd==0 ? 1 /*write*/ : 0 /*read*/;
         childs_pipes[childfd] = libxl__carefd_record(CTX, fds[childs_end]);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56:52 +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 1WXjd6-0006hF-EY; Wed, 09 Apr 2014 03:56:52 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjd3-0006gl-Nt
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:50 +0000
Received: from [85.158.139.211:59643] by server-15.bemta-5.messagelabs.com id
	72/7E-11079-005C4435; Wed, 09 Apr 2014 03:56:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1397015806!6285166!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7757 invoked from network); 9 Apr 2014 03:56:47 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56:47 -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 1WXjd0-0006fS-1i
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjd0-0000Hp-0h
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:46 +0000
Date: Wed, 09 Apr 2014 03:56:46 +0000
Message-Id: <E1WXjd0-0000Hp-0h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] xen/pygrub: grub2/grub.cfg from
	RHEL 7 has new commands in menuentry
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 4481b30d5ea980fe469c8dfa1580ba2d107fa12f
Author:     Joby Poriyath <joby.poriyath@citrix.com>
AuthorDate: Tue Feb 4 18:10:35 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:13:06 2014 +0100

    xen/pygrub: grub2/grub.cfg from RHEL 7 has new commands in menuentry
    
    menuentry in grub2/grub.cfg uses linux16 and initrd16 commands
    instead of linux and initrd. Due to this RHEL 7 (beta) guest failed to
    boot after the installation.
    
    In addition to this, RHEL 7 menu entries have two different single-quote
    delimited strings on the same line, and the greedy grouping for menuentry
    parsing gets both strings, and the options inbetween.
    
    Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: george.dunlap@citrix.com
    (cherry picked from commit dd03048708af072374963d6d0721cc6d4c5f52cf)
    (cherry picked from commit 607d9c98e8161d93fc93dd0e2c3a5b5be57f0d2a)
---
 tools/pygrub/examples/rhel-7-beta.grub2 |  118 +++++++++++++++++++++++++++++++
 tools/pygrub/src/GrubConf.py            |    4 +-
 2 files changed, 121 insertions(+), 1 deletions(-)

diff --git a/tools/pygrub/examples/rhel-7-beta.grub2 b/tools/pygrub/examples/rhel-7-beta.grub2
new file mode 100644
index 0000000..88f0f99
--- /dev/null
+++ b/tools/pygrub/examples/rhel-7-beta.grub2
@@ -0,0 +1,118 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 3.10.0-54.0.1.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-54.0.1.el7.x86_64-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-3.10.0-54.0.1.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16 LANG=en_GB.UTF-8
+	initrd16 /initramfs-3.10.0-54.0.1.el7.x86_64.img
+}
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 0-rescue-af34f0b8cf364cdbbe6d093f8228a37f' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16
+	initrd16 /initramfs-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index 6324c62..9ff8437 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -344,7 +344,9 @@ class Grub2Image(_GrubImage):
                 
     commands = {'set:root': 'root',
                 'linux': 'kernel',
+                'linux16': 'kernel',
                 'initrd': 'initrd',
+                'initrd16': 'initrd',
                 'echo': None,
                 'insmod': None,
                 'search': None}
@@ -390,7 +392,7 @@ class Grub2ConfigFile(_GrubConfigFile):
                 continue
 
             # new image
-            title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
+            title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)
             if title_match:
                 if img is not None:
                     raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:56:52 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:56:52 +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 1WXjd6-0006hF-EY; Wed, 09 Apr 2014 03:56:52 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjd3-0006gl-Nt
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:50 +0000
Received: from [85.158.139.211:59643] by server-15.bemta-5.messagelabs.com id
	72/7E-11079-005C4435; Wed, 09 Apr 2014 03:56:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-206.messagelabs.com!1397015806!6285166!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7757 invoked from network); 9 Apr 2014 03:56:47 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56:47 -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 1WXjd0-0006fS-1i
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjd0-0000Hp-0h
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:46 +0000
Date: Wed, 09 Apr 2014 03:56:46 +0000
Message-Id: <E1WXjd0-0000Hp-0h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] xen/pygrub: grub2/grub.cfg from
	RHEL 7 has new commands in menuentry
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 4481b30d5ea980fe469c8dfa1580ba2d107fa12f
Author:     Joby Poriyath <joby.poriyath@citrix.com>
AuthorDate: Tue Feb 4 18:10:35 2014 +0000
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:13:06 2014 +0100

    xen/pygrub: grub2/grub.cfg from RHEL 7 has new commands in menuentry
    
    menuentry in grub2/grub.cfg uses linux16 and initrd16 commands
    instead of linux and initrd. Due to this RHEL 7 (beta) guest failed to
    boot after the installation.
    
    In addition to this, RHEL 7 menu entries have two different single-quote
    delimited strings on the same line, and the greedy grouping for menuentry
    parsing gets both strings, and the options inbetween.
    
    Signed-off-by: Joby Poriyath <joby.poriyath@citrix.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: george.dunlap@citrix.com
    (cherry picked from commit dd03048708af072374963d6d0721cc6d4c5f52cf)
    (cherry picked from commit 607d9c98e8161d93fc93dd0e2c3a5b5be57f0d2a)
---
 tools/pygrub/examples/rhel-7-beta.grub2 |  118 +++++++++++++++++++++++++++++++
 tools/pygrub/src/GrubConf.py            |    4 +-
 2 files changed, 121 insertions(+), 1 deletions(-)

diff --git a/tools/pygrub/examples/rhel-7-beta.grub2 b/tools/pygrub/examples/rhel-7-beta.grub2
new file mode 100644
index 0000000..88f0f99
--- /dev/null
+++ b/tools/pygrub/examples/rhel-7-beta.grub2
@@ -0,0 +1,118 @@
+#
+# DO NOT EDIT THIS FILE
+#
+# It is automatically generated by grub2-mkconfig using templates
+# from /etc/grub.d and settings from /etc/default/grub
+#
+
+### BEGIN /etc/grub.d/00_header ###
+set pager=1
+
+if [ -s $prefix/grubenv ]; then
+  load_env
+fi
+if [ "${next_entry}" ] ; then
+   set default="${next_entry}"
+   set next_entry=
+   save_env next_entry
+   set boot_once=true
+else
+   set default="${saved_entry}"
+fi
+
+if [ x"${feature_menuentry_id}" = xy ]; then
+  menuentry_id_option="--id"
+else
+  menuentry_id_option=""
+fi
+
+export menuentry_id_option
+
+if [ "${prev_saved_entry}" ]; then
+  set saved_entry="${prev_saved_entry}"
+  save_env saved_entry
+  set prev_saved_entry=
+  save_env prev_saved_entry
+  set boot_once=true
+fi
+
+function savedefault {
+  if [ -z "${boot_once}" ]; then
+    saved_entry="${chosen}"
+    save_env saved_entry
+  fi
+}
+
+function load_video {
+  if [ x$feature_all_video_module = xy ]; then
+    insmod all_video
+  else
+    insmod efi_gop
+    insmod efi_uga
+    insmod ieee1275_fb
+    insmod vbe
+    insmod vga
+    insmod video_bochs
+    insmod video_cirrus
+  fi
+}
+
+terminal_output console
+set timeout=5
+### END /etc/grub.d/00_header ###
+
+### BEGIN /etc/grub.d/10_linux ###
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 3.10.0-54.0.1.el7.x86_64' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.0-54.0.1.el7.x86_64-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	set gfxpayload=keep
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-3.10.0-54.0.1.el7.x86_64 root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16 LANG=en_GB.UTF-8
+	initrd16 /initramfs-3.10.0-54.0.1.el7.x86_64.img
+}
+menuentry 'Red Hat Enterprise Linux Everything, with Linux 0-rescue-af34f0b8cf364cdbbe6d093f8228a37f' --class red --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f-advanced-d23b8b49-4cfe-4900-8ef1-ec80bc633163' {
+	load_video
+	insmod gzio
+	insmod part_msdos
+	insmod xfs
+	set root='hd0,msdos1'
+	if [ x$feature_platform_search_hint = xy ]; then
+	  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  89ffef78-82b3-457c-bc57-42cccc373851
+	else
+	  search --no-floppy --fs-uuid --set=root 89ffef78-82b3-457c-bc57-42cccc373851
+	fi
+	linux16 /vmlinuz-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f root=/dev/mapper/rhel-root ro rd.lvm.lv=rhel/swap vconsole.keymap=uk crashkernel=auto rd.lvm.lv=rhel/root vconsole.font=latarcyrheb-sun16
+	initrd16 /initramfs-0-rescue-af34f0b8cf364cdbbe6d093f8228a37f.img
+}
+
+### END /etc/grub.d/10_linux ###
+
+### BEGIN /etc/grub.d/20_linux_xen ###
+### END /etc/grub.d/20_linux_xen ###
+
+### BEGIN /etc/grub.d/20_ppc_terminfo ###
+### END /etc/grub.d/20_ppc_terminfo ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/40_custom ###
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+### END /etc/grub.d/40_custom ###
+
+### BEGIN /etc/grub.d/41_custom ###
+if [ -f  ${config_directory}/custom.cfg ]; then
+  source ${config_directory}/custom.cfg
+elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
+  source $prefix/custom.cfg;
+fi
+### END /etc/grub.d/41_custom ###
diff --git a/tools/pygrub/src/GrubConf.py b/tools/pygrub/src/GrubConf.py
index 6324c62..9ff8437 100644
--- a/tools/pygrub/src/GrubConf.py
+++ b/tools/pygrub/src/GrubConf.py
@@ -344,7 +344,9 @@ class Grub2Image(_GrubImage):
                 
     commands = {'set:root': 'root',
                 'linux': 'kernel',
+                'linux16': 'kernel',
                 'initrd': 'initrd',
+                'initrd16': 'initrd',
                 'echo': None,
                 'insmod': None,
                 'search': None}
@@ -390,7 +392,7 @@ class Grub2ConfigFile(_GrubConfigFile):
                 continue
 
             # new image
-            title_match = re.match('^menuentry ["\'](.*)["\'] (.*){', l)
+            title_match = re.match('^menuentry ["\'](.*?)["\'] (.*){', l)
             if title_match:
                 if img is not None:
                     raise RuntimeError, "syntax error: cannot nest menuentry (%d %s)" % (len(img),img)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:57:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:57:00 +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 1WXjdE-0006j2-Oo; Wed, 09 Apr 2014 03:57:00 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjdC-0006ik-Ts
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:59 +0000
Received: from [85.158.137.68:34781] by server-1.bemta-3.messagelabs.com id
	E3/62-11134-A05C4435; Wed, 09 Apr 2014 03:56:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1397015816!5839678!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3106 invoked from network); 9 Apr 2014 03:56:57 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56:57 -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 1WXjdA-0006fm-6b
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjdA-0000IE-4x
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:56 +0000
Date: Wed, 09 Apr 2014 03:56:56 +0000
Message-Id: <E1WXjdA-0000IE-4x@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] PV-GRUB: fix blk access at end of
	disk
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 e3f630b73c159078a6991161c5255048b16d366f
Author:     Samuel Thibault <samuel.thibault@ens-lyon.org>
AuthorDate: Fri Mar 21 02:56:56 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:21:50 2014 +0100

    PV-GRUB: fix blk access at end of disk
    
    GRUB usually always loads a whole disk track, even if that means going
    beyond the end of the disk.  We thus have to gracefully return an error,
    instead of letting the blkfront go panic.
    
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    (cherry picked from commit 51e18e41e39a682de5a2e60ad86048dc6344efec)
    (cherry picked from commit 03eb5134056d61167e6781eecf7e570b491bda73)
---
 stubdom/grub/mini-os.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 8cecf90..64ab962 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -126,6 +126,9 @@ biosdisk (int read, int drive, struct geometry *geometry,
     if (i >= blk_nb)
         return -1;
 
+    if (sector + nsec > geometry->total_sectors)
+      return -1;
+
     aiocb.aio_dev = blk_dev[i];
     aiocb.aio_buf = addr;
     aiocb.aio_nbytes = (size_t)nsec * blk_info[i].sector_size;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:57:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:57:00 +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 1WXjdE-0006j2-Oo; Wed, 09 Apr 2014 03:57:00 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjdC-0006ik-Ts
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:59 +0000
Received: from [85.158.137.68:34781] by server-1.bemta-3.messagelabs.com id
	E3/62-11134-A05C4435; Wed, 09 Apr 2014 03:56:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-31.messagelabs.com!1397015816!5839678!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3106 invoked from network); 9 Apr 2014 03:56:57 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 03:56:57 -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 1WXjdA-0006fm-6b
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjdA-0000IE-4x
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:56:56 +0000
Date: Wed, 09 Apr 2014 03:56:56 +0000
Message-Id: <E1WXjdA-0000IE-4x@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] PV-GRUB: fix blk access at end of
	disk
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 e3f630b73c159078a6991161c5255048b16d366f
Author:     Samuel Thibault <samuel.thibault@ens-lyon.org>
AuthorDate: Fri Mar 21 02:56:56 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 4 16:21:50 2014 +0100

    PV-GRUB: fix blk access at end of disk
    
    GRUB usually always loads a whole disk track, even if that means going
    beyond the end of the disk.  We thus have to gracefully return an error,
    instead of letting the blkfront go panic.
    
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    (cherry picked from commit 51e18e41e39a682de5a2e60ad86048dc6344efec)
    (cherry picked from commit 03eb5134056d61167e6781eecf7e570b491bda73)
---
 stubdom/grub/mini-os.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/stubdom/grub/mini-os.c b/stubdom/grub/mini-os.c
index 8cecf90..64ab962 100644
--- a/stubdom/grub/mini-os.c
+++ b/stubdom/grub/mini-os.c
@@ -126,6 +126,9 @@ biosdisk (int read, int drive, struct geometry *geometry,
     if (i >= blk_nb)
         return -1;
 
+    if (sector + nsec > geometry->total_sectors)
+      return -1;
+
     aiocb.aio_dev = blk_dev[i];
     aiocb.aio_buf = addr;
     aiocb.aio_nbytes = (size_t)nsec * blk_info[i].sector_size;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:57:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:57:13 +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 1WXjdQ-0006kl-Uy; Wed, 09 Apr 2014 03:57:12 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjdP-0006kU-Eo
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:57:11 +0000
Received: from [193.109.254.147:49729] by server-2.bemta-14.messagelabs.com id
	23/AA-21684-615C4435; Wed, 09 Apr 2014 03:57:10 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397015828!7088534!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11601 invoked from network); 9 Apr 2014 03:57:09 -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;
	9 Apr 2014 03:57:09 -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 1WXjdK-0006gL-Br
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:57:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjdK-0000Ik-Am
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:57:06 +0000
Date: Wed, 09 Apr 2014 03:57:06 +0000
Message-Id: <E1WXjdK-0000Ik-Am@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] Revert "x86/HVM: correct CPUID
	leaf 80000008 handling"
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 651da73a2bbe4a54008f779ef65a147a760f4def
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 8 12:13:49 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 8 12:13:49 2014 +0200

    Revert "x86/HVM: correct CPUID leaf 80000008 handling"
    
    This reverts commit e7516b4015c87dc0e136352d8b6a1c850ebdda3f
    (wrongly passing NULLs to hvm_cpuid()).
---
 xen/arch/x86/hvm/hvm.c  |   23 +++--------------------
 xen/arch/x86/hvm/mtrr.c |   25 ++++++++++++-------------
 2 files changed, 15 insertions(+), 33 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index c52044e..a3a2c32 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2810,8 +2810,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
-
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2845,6 +2843,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
+    {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2861,7 +2861,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-
+    }
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2875,23 +2875,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
-
-    case 0x80000008:
-        count = cpuid_eax(0x80000008);
-        count = (count >> 16) & 0xff ?: count & 0xff;
-        if ( (*eax & 0xff) > count )
-            *eax = (*eax & ~0xff) | count;
-
-        hvm_cpuid(1, NULL, NULL, NULL, &_edx);
-        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
-                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
-        if ( (*eax & 0xff) < count )
-            *eax = (*eax & ~0xff) | count;
-
-        hvm_cpuid(0x80000001, NULL, NULL, NULL, &_edx);
-        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
-                                     ? 0x3000 : 0x2000);
-        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 243fa8b..aac80cc 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j;
+    unsigned int i, j, phys_addr;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,7 +172,11 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
+    phys_addr = 36;
+    if ( cpuid_eax(0x80000000) >= 0x80000008 )
+        phys_addr = (uint8_t)cpuid_eax(0x80000008);
+
+    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -464,21 +468,16 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    if ( d == current->domain )
+    phys_addr = 36;
+    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
+    if ( eax >= 0x80000008 )
     {
-        phys_addr = 36;
-        hvm_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
-        if ( eax >= 0x80000008 )
-        {
-            hvm_cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
-            phys_addr = (uint8_t)eax;
-        }
+        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
+        phys_addr = (uint8_t)eax;
     }
-    else
-        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content & msr_mask) )
+    if ( unlikely(msr_content && (msr_content & msr_mask)) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 03:57:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 03:57:13 +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 1WXjdQ-0006kl-Uy; Wed, 09 Apr 2014 03:57:12 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjdP-0006kU-Eo
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:57:11 +0000
Received: from [193.109.254.147:49729] by server-2.bemta-14.messagelabs.com id
	23/AA-21684-615C4435; Wed, 09 Apr 2014 03:57:10 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397015828!7088534!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11601 invoked from network); 9 Apr 2014 03:57:09 -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;
	9 Apr 2014 03:57:09 -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 1WXjdK-0006gL-Br
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:57:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXjdK-0000Ik-Am
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 03:57:06 +0000
Date: Wed, 09 Apr 2014 03:57:06 +0000
Message-Id: <E1WXjdK-0000Ik-Am@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] Revert "x86/HVM: correct CPUID
	leaf 80000008 handling"
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 651da73a2bbe4a54008f779ef65a147a760f4def
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 8 12:13:49 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 8 12:13:49 2014 +0200

    Revert "x86/HVM: correct CPUID leaf 80000008 handling"
    
    This reverts commit e7516b4015c87dc0e136352d8b6a1c850ebdda3f
    (wrongly passing NULLs to hvm_cpuid()).
---
 xen/arch/x86/hvm/hvm.c  |   23 +++--------------------
 xen/arch/x86/hvm/mtrr.c |   25 ++++++++++++-------------
 2 files changed, 15 insertions(+), 33 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index c52044e..a3a2c32 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2810,8 +2810,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
-
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2845,6 +2843,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
+    {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2861,7 +2861,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-
+    }
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2875,23 +2875,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
-
-    case 0x80000008:
-        count = cpuid_eax(0x80000008);
-        count = (count >> 16) & 0xff ?: count & 0xff;
-        if ( (*eax & 0xff) > count )
-            *eax = (*eax & ~0xff) | count;
-
-        hvm_cpuid(1, NULL, NULL, NULL, &_edx);
-        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
-                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
-        if ( (*eax & 0xff) < count )
-            *eax = (*eax & ~0xff) | count;
-
-        hvm_cpuid(0x80000001, NULL, NULL, NULL, &_edx);
-        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
-                                     ? 0x3000 : 0x2000);
-        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 243fa8b..aac80cc 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j;
+    unsigned int i, j, phys_addr;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,7 +172,11 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
+    phys_addr = 36;
+    if ( cpuid_eax(0x80000000) >= 0x80000008 )
+        phys_addr = (uint8_t)cpuid_eax(0x80000008);
+
+    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -464,21 +468,16 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    if ( d == current->domain )
+    phys_addr = 36;
+    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
+    if ( eax >= 0x80000008 )
     {
-        phys_addr = 36;
-        hvm_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
-        if ( eax >= 0x80000008 )
-        {
-            hvm_cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
-            phys_addr = (uint8_t)eax;
-        }
+        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
+        phys_addr = (uint8_t)eax;
     }
-    else
-        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content & msr_mask) )
+    if ( unlikely(msr_content && (msr_content & msr_mask)) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:07 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:44:07 +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 1WXpzC-00061h-OZ; Wed, 09 Apr 2014 10:44:06 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzB-00061F-Lu
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:05 +0000
Received: from [85.158.137.68:17374] by server-6.bemta-3.messagelabs.com id
	10/D3-00470-47425435; Wed, 09 Apr 2014 10:44:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1397040242!5868906!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19219 invoked from network); 9 Apr 2014 10:44:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44: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 1WXpz8-0003Gh-PV
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpz8-0004bw-L6
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:02 +0000
Date: Wed, 09 Apr 2014 10:44:02 +0000
Message-Id: <E1WXpz8-0004bw-L6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] atomic: use static inlines instead of
	macros
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 a8bbd5e7e74cf226c068bb4bfac594cf66697d93
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 8 12:39:23 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 8 12:39:23 2014 +0200

    atomic: use static inlines instead of macros
    
    This is some coverity-inspired tidying.
    
    Coverity has some grief analysing the call sites of atomic_read().  This is
    believed to be a bug in Coverity itself when expanding the nested macros, but
    there is no legitimate reason for it to be a macro in the first place.
    
    This patch changes {,_}atomic_{read,set}() from being macros to being static
    inline functions, thus gaining some type safety.
    
    One issue which is not immediately obvious is that the non-atomic variants take
    their atomic_t at a different level of indirection to the atomic variants.
    
    This is not suitable for _atomic_set() (when used to initialise an atomic_t)
    which is converted to take its parameter as a pointer.  One callsite of
    _atomic_set() is updated, while the other two callsites are updated to
    ATOMIC_INIT().
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan<tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    [For the arm bits:]
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/common/domain.c          |    5 +--
 xen/include/asm-arm/atomic.h |   22 +++++++++++++++++---
 xen/include/asm-x86/atomic.h |   43 +++++++++++++++++++++++++++++++++++------
 xen/include/xen/sched.h      |    2 +-
 4 files changed, 57 insertions(+), 15 deletions(-)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index ad8a1b6..b414a7d 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -754,13 +754,12 @@ static void complete_domain_destroy(struct rcu_head *head)
 void domain_destroy(struct domain *d)
 {
     struct domain **pd;
-    atomic_t      old, new;
+    atomic_t old = ATOMIC_INIT(0);
+    atomic_t new = ATOMIC_INIT(DOMAIN_DESTROYED);
 
     BUG_ON(!d->is_dying);
 
     /* May be already destroyed, or get_domain() can race us. */
-    _atomic_set(old, 0);
-    _atomic_set(new, DOMAIN_DESTROYED);
     old = atomic_compareandswap(old, new, &d->refcnt);
     if ( _atomic_read(old) != 0 )
         return;
diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
index 2c92de9..7d15fb0 100644
--- a/xen/include/asm-arm/atomic.h
+++ b/xen/include/asm-arm/atomic.h
@@ -84,11 +84,25 @@ typedef struct { int counter; } atomic_t;
  * strex/ldrex monitor on some implementations. The reason we can use it for
  * atomic_set() is the clrex or dummy strex done on every exception return.
  */
-#define _atomic_read(v) ((v).counter)
-#define atomic_read(v)  (*(volatile int *)&(v)->counter)
+static inline int atomic_read(atomic_t *v)
+{
+    return *(volatile int *)&v->counter;
+}
+
+static inline int _atomic_read(atomic_t v)
+{
+    return v.counter;
+}
 
-#define _atomic_set(v,i) (((v).counter) = (i))
-#define atomic_set(v,i) (((v)->counter) = (i))
+static inline void atomic_set(atomic_t *v, int i)
+{
+    v->counter = i;
+}
+
+static inline void _atomic_set(atomic_t *v, int i)
+{
+    v->counter = i;
+}
 
 #if defined(CONFIG_ARM_32)
 # include <asm/arm32/atomic.h>
diff --git a/xen/include/asm-x86/atomic.h b/xen/include/asm-x86/atomic.h
index e476ab5..8972463 100644
--- a/xen/include/asm-x86/atomic.h
+++ b/xen/include/asm-x86/atomic.h
@@ -66,21 +66,50 @@ typedef struct { int counter; } atomic_t;
 /**
  * atomic_read - read atomic variable
  * @v: pointer of type atomic_t
- * 
+ *
  * Atomically reads the value of @v.
  */
-#define _atomic_read(v)  ((v).counter)
-#define atomic_read(v)   read_atomic(&((v)->counter))
+static inline int atomic_read(atomic_t *v)
+{
+    return read_atomic(&v->counter);
+}
+
+/**
+ * _atomic_read - read atomic variable non-atomically
+ * @v atomic_t
+ *
+ * Non-atomically reads the value of @v
+ */
+static inline int _atomic_read(atomic_t v)
+{
+    return v.counter;
+}
+
 
 /**
  * atomic_set - set atomic variable
  * @v: pointer of type atomic_t
  * @i: required value
- * 
+ *
  * Atomically sets the value of @v to @i.
- */ 
-#define _atomic_set(v,i) (((v).counter) = (i))
-#define atomic_set(v,i)  write_atomic(&((v)->counter), (i))
+ */
+static inline void atomic_set(atomic_t *v, int i)
+{
+    write_atomic(&v->counter, i);
+}
+
+/**
+ * _atomic_set - set atomic variable non-atomically
+ * @v: pointer of type atomic_t
+ * @i: required value
+ *
+ * Non-atomically sets the value of @v to @i.
+ */
+static inline void _atomic_set(atomic_t *v, int i)
+{
+    v->counter = i;
+}
+
 
 /**
  * atomic_add - add integer to atomic variable
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 94c7db3..a925776 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -487,7 +487,7 @@ static always_inline int get_domain(struct domain *d)
         old = seen;
         if ( unlikely(_atomic_read(old) & DOMAIN_DESTROYED) )
             return 0;
-        _atomic_set(new, _atomic_read(old) + 1);
+        _atomic_set(&new, _atomic_read(old) + 1);
         seen = atomic_compareandswap(old, new, &d->refcnt);
     }
     while ( unlikely(_atomic_read(seen) != _atomic_read(old)) );
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:07 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:44:07 +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 1WXpzC-00061h-OZ; Wed, 09 Apr 2014 10:44:06 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzB-00061F-Lu
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:05 +0000
Received: from [85.158.137.68:17374] by server-6.bemta-3.messagelabs.com id
	10/D3-00470-47425435; Wed, 09 Apr 2014 10:44:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1397040242!5868906!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19219 invoked from network); 9 Apr 2014 10:44:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44: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 1WXpz8-0003Gh-PV
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpz8-0004bw-L6
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:02 +0000
Date: Wed, 09 Apr 2014 10:44:02 +0000
Message-Id: <E1WXpz8-0004bw-L6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] atomic: use static inlines instead of
	macros
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 a8bbd5e7e74cf226c068bb4bfac594cf66697d93
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 8 12:39:23 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 8 12:39:23 2014 +0200

    atomic: use static inlines instead of macros
    
    This is some coverity-inspired tidying.
    
    Coverity has some grief analysing the call sites of atomic_read().  This is
    believed to be a bug in Coverity itself when expanding the nested macros, but
    there is no legitimate reason for it to be a macro in the first place.
    
    This patch changes {,_}atomic_{read,set}() from being macros to being static
    inline functions, thus gaining some type safety.
    
    One issue which is not immediately obvious is that the non-atomic variants take
    their atomic_t at a different level of indirection to the atomic variants.
    
    This is not suitable for _atomic_set() (when used to initialise an atomic_t)
    which is converted to take its parameter as a pointer.  One callsite of
    _atomic_set() is updated, while the other two callsites are updated to
    ATOMIC_INIT().
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan<tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    [For the arm bits:]
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/common/domain.c          |    5 +--
 xen/include/asm-arm/atomic.h |   22 +++++++++++++++++---
 xen/include/asm-x86/atomic.h |   43 +++++++++++++++++++++++++++++++++++------
 xen/include/xen/sched.h      |    2 +-
 4 files changed, 57 insertions(+), 15 deletions(-)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index ad8a1b6..b414a7d 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -754,13 +754,12 @@ static void complete_domain_destroy(struct rcu_head *head)
 void domain_destroy(struct domain *d)
 {
     struct domain **pd;
-    atomic_t      old, new;
+    atomic_t old = ATOMIC_INIT(0);
+    atomic_t new = ATOMIC_INIT(DOMAIN_DESTROYED);
 
     BUG_ON(!d->is_dying);
 
     /* May be already destroyed, or get_domain() can race us. */
-    _atomic_set(old, 0);
-    _atomic_set(new, DOMAIN_DESTROYED);
     old = atomic_compareandswap(old, new, &d->refcnt);
     if ( _atomic_read(old) != 0 )
         return;
diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
index 2c92de9..7d15fb0 100644
--- a/xen/include/asm-arm/atomic.h
+++ b/xen/include/asm-arm/atomic.h
@@ -84,11 +84,25 @@ typedef struct { int counter; } atomic_t;
  * strex/ldrex monitor on some implementations. The reason we can use it for
  * atomic_set() is the clrex or dummy strex done on every exception return.
  */
-#define _atomic_read(v) ((v).counter)
-#define atomic_read(v)  (*(volatile int *)&(v)->counter)
+static inline int atomic_read(atomic_t *v)
+{
+    return *(volatile int *)&v->counter;
+}
+
+static inline int _atomic_read(atomic_t v)
+{
+    return v.counter;
+}
 
-#define _atomic_set(v,i) (((v).counter) = (i))
-#define atomic_set(v,i) (((v)->counter) = (i))
+static inline void atomic_set(atomic_t *v, int i)
+{
+    v->counter = i;
+}
+
+static inline void _atomic_set(atomic_t *v, int i)
+{
+    v->counter = i;
+}
 
 #if defined(CONFIG_ARM_32)
 # include <asm/arm32/atomic.h>
diff --git a/xen/include/asm-x86/atomic.h b/xen/include/asm-x86/atomic.h
index e476ab5..8972463 100644
--- a/xen/include/asm-x86/atomic.h
+++ b/xen/include/asm-x86/atomic.h
@@ -66,21 +66,50 @@ typedef struct { int counter; } atomic_t;
 /**
  * atomic_read - read atomic variable
  * @v: pointer of type atomic_t
- * 
+ *
  * Atomically reads the value of @v.
  */
-#define _atomic_read(v)  ((v).counter)
-#define atomic_read(v)   read_atomic(&((v)->counter))
+static inline int atomic_read(atomic_t *v)
+{
+    return read_atomic(&v->counter);
+}
+
+/**
+ * _atomic_read - read atomic variable non-atomically
+ * @v atomic_t
+ *
+ * Non-atomically reads the value of @v
+ */
+static inline int _atomic_read(atomic_t v)
+{
+    return v.counter;
+}
+
 
 /**
  * atomic_set - set atomic variable
  * @v: pointer of type atomic_t
  * @i: required value
- * 
+ *
  * Atomically sets the value of @v to @i.
- */ 
-#define _atomic_set(v,i) (((v).counter) = (i))
-#define atomic_set(v,i)  write_atomic(&((v)->counter), (i))
+ */
+static inline void atomic_set(atomic_t *v, int i)
+{
+    write_atomic(&v->counter, i);
+}
+
+/**
+ * _atomic_set - set atomic variable non-atomically
+ * @v: pointer of type atomic_t
+ * @i: required value
+ *
+ * Non-atomically sets the value of @v to @i.
+ */
+static inline void _atomic_set(atomic_t *v, int i)
+{
+    v->counter = i;
+}
+
 
 /**
  * atomic_add - add integer to atomic variable
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 94c7db3..a925776 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -487,7 +487,7 @@ static always_inline int get_domain(struct domain *d)
         old = seen;
         if ( unlikely(_atomic_read(old) & DOMAIN_DESTROYED) )
             return 0;
-        _atomic_set(new, _atomic_read(old) + 1);
+        _atomic_set(&new, _atomic_read(old) + 1);
         seen = atomic_compareandswap(old, new, &d->refcnt);
     }
     while ( unlikely(_atomic_read(seen) != _atomic_read(old)) );
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10: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 1WXpzO-00064Z-RX; Wed, 09 Apr 2014 10:44:18 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzN-00063w-EO
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:17 +0000
Received: from [85.158.139.211:36987] by server-2.bemta-5.messagelabs.com id
	44/73-12074-F7425435; Wed, 09 Apr 2014 10:44:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1397040253!3462806!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_32,
	spamassassin: 
X-StarScan-Received: 
X-StarScan-Version: 6.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5366 invoked from network); 9 Apr 2014 10:44:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:14 -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 1WXpzI-0003Gn-Uc
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzI-0004cK-Sh
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:12 +0000
Date: Wed, 09 Apr 2014 10:44:12 +0000
Message-Id: <E1WXpzI-0004cK-Sh@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Remove GIC definitions in
	asm-arm/config.h
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 9afeacf08335ea91d0bf1053d38eb5cefc855830
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Apr 2 15:13:36 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:37:30 2014 +0100

    xen/arm: Remove GIC definitions in asm-arm/config.h
    
    The GIC is not used anymore in assembly code.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/asm-arm/config.h |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
index 5b7b1a8..ef291ff 100644
--- a/xen/include/asm-arm/config.h
+++ b/xen/include/asm-arm/config.h
@@ -192,17 +192,6 @@ extern unsigned long frametable_virt_end;
 #define watchdog_disable() ((void)0)
 #define watchdog_enable()  ((void)0)
 
-#ifdef __ASSEMBLY__
-/* Board-specific: regs base address for the GIC
- * Theses constants are only intend to be used in assembly file
- * because the DT is not yet parsed.
- */
-#define GIC_DR_OFFSET 0x1000
-#define GIC_CR_OFFSET 0x2000
-#define GIC_HR_OFFSET 0x4000 /* Guess work http://lists.infradead.org/pipermail/linux-arm-kernel/2011-September/064219.html */
-#define GIC_VR_OFFSET 0x6000 /* Virtual Machine CPU interface) */
-#endif /* __ASSEMBLY__ */
-
 #endif /* __ARM_CONFIG_H__ */
 /*
  * Local variables:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:18 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10: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 1WXpzO-00064Z-RX; Wed, 09 Apr 2014 10:44:18 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzN-00063w-EO
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:17 +0000
Received: from [85.158.139.211:36987] by server-2.bemta-5.messagelabs.com id
	44/73-12074-F7425435; Wed, 09 Apr 2014 10:44:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1397040253!3462806!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_32,
	spamassassin: 
X-StarScan-Received: 
X-StarScan-Version: 6.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5366 invoked from network); 9 Apr 2014 10:44:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:14 -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 1WXpzI-0003Gn-Uc
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzI-0004cK-Sh
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:12 +0000
Date: Wed, 09 Apr 2014 10:44:12 +0000
Message-Id: <E1WXpzI-0004cK-Sh@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Remove GIC definitions in
	asm-arm/config.h
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 9afeacf08335ea91d0bf1053d38eb5cefc855830
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Wed Apr 2 15:13:36 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:37:30 2014 +0100

    xen/arm: Remove GIC definitions in asm-arm/config.h
    
    The GIC is not used anymore in assembly code.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/asm-arm/config.h |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
index 5b7b1a8..ef291ff 100644
--- a/xen/include/asm-arm/config.h
+++ b/xen/include/asm-arm/config.h
@@ -192,17 +192,6 @@ extern unsigned long frametable_virt_end;
 #define watchdog_disable() ((void)0)
 #define watchdog_enable()  ((void)0)
 
-#ifdef __ASSEMBLY__
-/* Board-specific: regs base address for the GIC
- * Theses constants are only intend to be used in assembly file
- * because the DT is not yet parsed.
- */
-#define GIC_DR_OFFSET 0x1000
-#define GIC_CR_OFFSET 0x2000
-#define GIC_HR_OFFSET 0x4000 /* Guess work http://lists.infradead.org/pipermail/linux-arm-kernel/2011-September/064219.html */
-#define GIC_VR_OFFSET 0x6000 /* Virtual Machine CPU interface) */
-#endif /* __ASSEMBLY__ */
-
 #endif /* __ARM_CONFIG_H__ */
 /*
  * Local variables:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:26 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:44: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 1WXpzW-00067c-UV; Wed, 09 Apr 2014 10:44:26 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzV-00066Y-PG
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:25 +0000
Received: from [85.158.139.211:50169] by server-8.bemta-5.messagelabs.com id
	F4/31-11310-98425435; Wed, 09 Apr 2014 10:44:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1397040263!6407499!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26644 invoked from network); 9 Apr 2014 10:44:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:24 -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 1WXpzT-0003Gt-3I
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzT-0004cg-1U
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:23 +0000
Date: Wed, 09 Apr 2014 10:44:23 +0000
Message-Id: <E1WXpzT-0004cg-1U@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: Set guest parameters from
	config file during a restore
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 2c4f066719ca50d795a9a38318ccfe0bbef454d9
Author:     Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Tue Apr 1 11:53:57 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:37:55 2014 +0100

    libxl: Set guest parameters from config file during a restore
    
    Guest's configuration parameters (e.g. timer_mode) are used by the hypervisor
    during runtime. We should therefore set them during restore.
    
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_dom.c |   49 +++++++++++++++++++++++++++-------------------
 1 files changed, 29 insertions(+), 20 deletions(-)

diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index 36e70b5..3351c09 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -201,6 +201,32 @@ static int numa_place_domain(libxl__gc *gc, uint32_t domid,
     return rc;
 }
 
+static unsigned long timer_mode(const libxl_domain_build_info *info)
+{
+    const libxl_timer_mode mode = info->u.hvm.timer_mode;
+    assert(mode >= LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
+           mode <= LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING);
+    return ((unsigned long)mode);
+}
+
+static void hvm_set_conf_params(xc_interface *handle, uint32_t domid,
+                                libxl_domain_build_info *const info)
+{
+    xc_set_hvm_param(handle, domid, HVM_PARAM_PAE_ENABLED,
+                    libxl_defbool_val(info->u.hvm.pae));
+#if defined(__i386__) || defined(__x86_64__)
+    xc_set_hvm_param(handle, domid, HVM_PARAM_VIRIDIAN,
+                    libxl_defbool_val(info->u.hvm.viridian));
+    xc_set_hvm_param(handle, domid, HVM_PARAM_HPET_ENABLED,
+                    libxl_defbool_val(info->u.hvm.hpet));
+#endif
+    xc_set_hvm_param(handle, domid, HVM_PARAM_TIMER_MODE, timer_mode(info));
+    xc_set_hvm_param(handle, domid, HVM_PARAM_VPT_ALIGN,
+                    libxl_defbool_val(info->u.hvm.vpt_align));
+    xc_set_hvm_param(handle, domid, HVM_PARAM_NESTEDHVM,
+                    libxl_defbool_val(info->u.hvm.nested_hvm));
+}
+
 int libxl__build_pre(libxl__gc *gc, uint32_t domid,
               libxl_domain_config *d_config, libxl__domain_build_state *state)
 {
@@ -255,6 +281,9 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
     state->console_port = xc_evtchn_alloc_unbound(ctx->xch, domid, state->console_domid);
     state->vm_generationid_addr = 0;
 
+    if (info->type == LIBXL_DOMAIN_TYPE_HVM)
+        hvm_set_conf_params(ctx->xch, domid, info);
+
     rc = libxl__arch_domain_create(gc, d_config, domid);
 
     return rc;
@@ -449,13 +478,6 @@ out:
     return ret == 0 ? 0 : ERROR_FAIL;
 }
 
-static unsigned long timer_mode(const libxl_domain_build_info *info)
-{
-    const libxl_timer_mode mode = info->u.hvm.timer_mode;
-    assert(mode >= LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
-           mode <= LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING);
-    return ((unsigned long)mode);
-}
 static int hvm_build_set_params(xc_interface *handle, uint32_t domid,
                                 libxl_domain_build_info *info,
                                 int store_evtchn, unsigned long *store_mfn,
@@ -484,19 +506,6 @@ static int hvm_build_set_params(xc_interface *handle, uint32_t domid,
 
     xc_get_hvm_param(handle, domid, HVM_PARAM_STORE_PFN, store_mfn);
     xc_get_hvm_param(handle, domid, HVM_PARAM_CONSOLE_PFN, console_mfn);
-    xc_set_hvm_param(handle, domid, HVM_PARAM_PAE_ENABLED,
-                     libxl_defbool_val(info->u.hvm.pae));
-#if defined(__i386__) || defined(__x86_64__)
-    xc_set_hvm_param(handle, domid, HVM_PARAM_VIRIDIAN,
-                     libxl_defbool_val(info->u.hvm.viridian));
-    xc_set_hvm_param(handle, domid, HVM_PARAM_HPET_ENABLED,
-                     libxl_defbool_val(info->u.hvm.hpet));
-#endif
-    xc_set_hvm_param(handle, domid, HVM_PARAM_TIMER_MODE, timer_mode(info));
-    xc_set_hvm_param(handle, domid, HVM_PARAM_VPT_ALIGN,
-                     libxl_defbool_val(info->u.hvm.vpt_align));
-    xc_set_hvm_param(handle, domid, HVM_PARAM_NESTEDHVM,
-                     libxl_defbool_val(info->u.hvm.nested_hvm));
     xc_set_hvm_param(handle, domid, HVM_PARAM_STORE_EVTCHN, store_evtchn);
     xc_set_hvm_param(handle, domid, HVM_PARAM_CONSOLE_EVTCHN, console_evtchn);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:26 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:44: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 1WXpzW-00067c-UV; Wed, 09 Apr 2014 10:44:26 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzV-00066Y-PG
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:25 +0000
Received: from [85.158.139.211:50169] by server-8.bemta-5.messagelabs.com id
	F4/31-11310-98425435; Wed, 09 Apr 2014 10:44:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1397040263!6407499!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26644 invoked from network); 9 Apr 2014 10:44:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:24 -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 1WXpzT-0003Gt-3I
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzT-0004cg-1U
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:23 +0000
Date: Wed, 09 Apr 2014 10:44:23 +0000
Message-Id: <E1WXpzT-0004cg-1U@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: Set guest parameters from
	config file during a restore
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 2c4f066719ca50d795a9a38318ccfe0bbef454d9
Author:     Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Tue Apr 1 11:53:57 2014 -0400
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:37:55 2014 +0100

    libxl: Set guest parameters from config file during a restore
    
    Guest's configuration parameters (e.g. timer_mode) are used by the hypervisor
    during runtime. We should therefore set them during restore.
    
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_dom.c |   49 +++++++++++++++++++++++++++-------------------
 1 files changed, 29 insertions(+), 20 deletions(-)

diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index 36e70b5..3351c09 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -201,6 +201,32 @@ static int numa_place_domain(libxl__gc *gc, uint32_t domid,
     return rc;
 }
 
+static unsigned long timer_mode(const libxl_domain_build_info *info)
+{
+    const libxl_timer_mode mode = info->u.hvm.timer_mode;
+    assert(mode >= LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
+           mode <= LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING);
+    return ((unsigned long)mode);
+}
+
+static void hvm_set_conf_params(xc_interface *handle, uint32_t domid,
+                                libxl_domain_build_info *const info)
+{
+    xc_set_hvm_param(handle, domid, HVM_PARAM_PAE_ENABLED,
+                    libxl_defbool_val(info->u.hvm.pae));
+#if defined(__i386__) || defined(__x86_64__)
+    xc_set_hvm_param(handle, domid, HVM_PARAM_VIRIDIAN,
+                    libxl_defbool_val(info->u.hvm.viridian));
+    xc_set_hvm_param(handle, domid, HVM_PARAM_HPET_ENABLED,
+                    libxl_defbool_val(info->u.hvm.hpet));
+#endif
+    xc_set_hvm_param(handle, domid, HVM_PARAM_TIMER_MODE, timer_mode(info));
+    xc_set_hvm_param(handle, domid, HVM_PARAM_VPT_ALIGN,
+                    libxl_defbool_val(info->u.hvm.vpt_align));
+    xc_set_hvm_param(handle, domid, HVM_PARAM_NESTEDHVM,
+                    libxl_defbool_val(info->u.hvm.nested_hvm));
+}
+
 int libxl__build_pre(libxl__gc *gc, uint32_t domid,
               libxl_domain_config *d_config, libxl__domain_build_state *state)
 {
@@ -255,6 +281,9 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
     state->console_port = xc_evtchn_alloc_unbound(ctx->xch, domid, state->console_domid);
     state->vm_generationid_addr = 0;
 
+    if (info->type == LIBXL_DOMAIN_TYPE_HVM)
+        hvm_set_conf_params(ctx->xch, domid, info);
+
     rc = libxl__arch_domain_create(gc, d_config, domid);
 
     return rc;
@@ -449,13 +478,6 @@ out:
     return ret == 0 ? 0 : ERROR_FAIL;
 }
 
-static unsigned long timer_mode(const libxl_domain_build_info *info)
-{
-    const libxl_timer_mode mode = info->u.hvm.timer_mode;
-    assert(mode >= LIBXL_TIMER_MODE_DELAY_FOR_MISSED_TICKS &&
-           mode <= LIBXL_TIMER_MODE_ONE_MISSED_TICK_PENDING);
-    return ((unsigned long)mode);
-}
 static int hvm_build_set_params(xc_interface *handle, uint32_t domid,
                                 libxl_domain_build_info *info,
                                 int store_evtchn, unsigned long *store_mfn,
@@ -484,19 +506,6 @@ static int hvm_build_set_params(xc_interface *handle, uint32_t domid,
 
     xc_get_hvm_param(handle, domid, HVM_PARAM_STORE_PFN, store_mfn);
     xc_get_hvm_param(handle, domid, HVM_PARAM_CONSOLE_PFN, console_mfn);
-    xc_set_hvm_param(handle, domid, HVM_PARAM_PAE_ENABLED,
-                     libxl_defbool_val(info->u.hvm.pae));
-#if defined(__i386__) || defined(__x86_64__)
-    xc_set_hvm_param(handle, domid, HVM_PARAM_VIRIDIAN,
-                     libxl_defbool_val(info->u.hvm.viridian));
-    xc_set_hvm_param(handle, domid, HVM_PARAM_HPET_ENABLED,
-                     libxl_defbool_val(info->u.hvm.hpet));
-#endif
-    xc_set_hvm_param(handle, domid, HVM_PARAM_TIMER_MODE, timer_mode(info));
-    xc_set_hvm_param(handle, domid, HVM_PARAM_VPT_ALIGN,
-                     libxl_defbool_val(info->u.hvm.vpt_align));
-    xc_set_hvm_param(handle, domid, HVM_PARAM_NESTEDHVM,
-                     libxl_defbool_val(info->u.hvm.nested_hvm));
     xc_set_hvm_param(handle, domid, HVM_PARAM_STORE_EVTCHN, store_evtchn);
     xc_set_hvm_param(handle, domid, HVM_PARAM_CONSOLE_EVTCHN, console_evtchn);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:44:39 +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 1WXpzj-0006Br-3Y; Wed, 09 Apr 2014 10:44:39 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzh-0006Ag-CL
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:37 +0000
Received: from [85.158.137.68:32238] by server-9.bemta-3.messagelabs.com id
	D0/67-30063-39425435; Wed, 09 Apr 2014 10:44:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1397040273!5897004!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 918 invoked from network); 9 Apr 2014 10:44:34 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:34 -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 1WXpzd-0003H1-7q
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzd-0004d3-5r
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:33 +0000
Date: Wed, 09 Apr 2014 10:44:33 +0000
Message-Id: <E1WXpzd-0004d3-5r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxc: X86: expose RDSEED, ADX,
	and PREFETCHW to pv/hvm
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 62060f3227733d40f3fe663349bc936107ffbdec
Author:     Liu Jinsong <jinsong.liu@intel.com>
AuthorDate: Thu Feb 13 21:05:01 2014 +0800
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:41:42 2014 +0100

    libxc: X86: expose RDSEED, ADX, and PREFETCHW to pv/hvm
    
    Intel recently released some new features, including RDSEED, ADX, and
    PREFETCHW.  This patch exposes these new features to pv and hvm.
    
    Signed-off-by: Xudong Hao <xudong.hao@intel.com>
    Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/xc_cpufeature.h |    3 +++
 tools/libxc/xc_cpuid_x86.c  |    5 +++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tools/libxc/xc_cpufeature.h b/tools/libxc/xc_cpufeature.h
index c464e3a..09b2c82 100644
--- a/tools/libxc/xc_cpufeature.h
+++ b/tools/libxc/xc_cpufeature.h
@@ -137,5 +137,8 @@
 #define X86_FEATURE_ERMS         9 /* Enhanced REP MOVSB/STOSB */
 #define X86_FEATURE_INVPCID     10 /* Invalidate Process Context ID */
 #define X86_FEATURE_RTM         11 /* Restricted Transactional Memory */
+#define X86_FEATURE_RDSEED      18 /* RDSEED instruction */
+#define X86_FEATURE_ADX         19 /* ADCX, ADOX instructions */
+
 
 #endif /* __LIBXC_CPUFEATURE_H */
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index bbbf9b8..9264039 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -197,6 +197,7 @@ static void intel_xc_cpuid_policy(
 
         /* Only a few features are advertised in Intel's 0x80000001. */
         regs[2] &= (is_64bit ? bitmaskof(X86_FEATURE_LAHF_LM) : 0) |
+                               bitmaskof(X86_FEATURE_3DNOWPREFETCH) |
                                bitmaskof(X86_FEATURE_ABM);
         regs[3] &= ((is_pae ? bitmaskof(X86_FEATURE_NX) : 0) |
                     (is_64bit ? bitmaskof(X86_FEATURE_LM) : 0) |
@@ -371,6 +372,8 @@ static void xc_cpuid_hvm_policy(
                         bitmaskof(X86_FEATURE_ERMS) |
                         bitmaskof(X86_FEATURE_INVPCID) |
                         bitmaskof(X86_FEATURE_RTM)  |
+                        bitmaskof(X86_FEATURE_RDSEED)  |
+                        bitmaskof(X86_FEATURE_ADX)  |
                         bitmaskof(X86_FEATURE_FSGSBASE));
         } else
             regs[1] = 0;
@@ -502,6 +505,8 @@ static void xc_cpuid_pv_policy(
                         bitmaskof(X86_FEATURE_BMI2) |
                         bitmaskof(X86_FEATURE_ERMS) |
                         bitmaskof(X86_FEATURE_RTM)  |
+                        bitmaskof(X86_FEATURE_RDSEED)  |
+                        bitmaskof(X86_FEATURE_ADX)  |
                         bitmaskof(X86_FEATURE_FSGSBASE));
         else
             regs[1] = 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:44:39 +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 1WXpzj-0006Br-3Y; Wed, 09 Apr 2014 10:44:39 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzh-0006Ag-CL
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:37 +0000
Received: from [85.158.137.68:32238] by server-9.bemta-3.messagelabs.com id
	D0/67-30063-39425435; Wed, 09 Apr 2014 10:44:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-31.messagelabs.com!1397040273!5897004!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 918 invoked from network); 9 Apr 2014 10:44:34 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:34 -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 1WXpzd-0003H1-7q
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzd-0004d3-5r
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:33 +0000
Date: Wed, 09 Apr 2014 10:44:33 +0000
Message-Id: <E1WXpzd-0004d3-5r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxc: X86: expose RDSEED, ADX,
	and PREFETCHW to pv/hvm
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 62060f3227733d40f3fe663349bc936107ffbdec
Author:     Liu Jinsong <jinsong.liu@intel.com>
AuthorDate: Thu Feb 13 21:05:01 2014 +0800
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:41:42 2014 +0100

    libxc: X86: expose RDSEED, ADX, and PREFETCHW to pv/hvm
    
    Intel recently released some new features, including RDSEED, ADX, and
    PREFETCHW.  This patch exposes these new features to pv and hvm.
    
    Signed-off-by: Xudong Hao <xudong.hao@intel.com>
    Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/xc_cpufeature.h |    3 +++
 tools/libxc/xc_cpuid_x86.c  |    5 +++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tools/libxc/xc_cpufeature.h b/tools/libxc/xc_cpufeature.h
index c464e3a..09b2c82 100644
--- a/tools/libxc/xc_cpufeature.h
+++ b/tools/libxc/xc_cpufeature.h
@@ -137,5 +137,8 @@
 #define X86_FEATURE_ERMS         9 /* Enhanced REP MOVSB/STOSB */
 #define X86_FEATURE_INVPCID     10 /* Invalidate Process Context ID */
 #define X86_FEATURE_RTM         11 /* Restricted Transactional Memory */
+#define X86_FEATURE_RDSEED      18 /* RDSEED instruction */
+#define X86_FEATURE_ADX         19 /* ADCX, ADOX instructions */
+
 
 #endif /* __LIBXC_CPUFEATURE_H */
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index bbbf9b8..9264039 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -197,6 +197,7 @@ static void intel_xc_cpuid_policy(
 
         /* Only a few features are advertised in Intel's 0x80000001. */
         regs[2] &= (is_64bit ? bitmaskof(X86_FEATURE_LAHF_LM) : 0) |
+                               bitmaskof(X86_FEATURE_3DNOWPREFETCH) |
                                bitmaskof(X86_FEATURE_ABM);
         regs[3] &= ((is_pae ? bitmaskof(X86_FEATURE_NX) : 0) |
                     (is_64bit ? bitmaskof(X86_FEATURE_LM) : 0) |
@@ -371,6 +372,8 @@ static void xc_cpuid_hvm_policy(
                         bitmaskof(X86_FEATURE_ERMS) |
                         bitmaskof(X86_FEATURE_INVPCID) |
                         bitmaskof(X86_FEATURE_RTM)  |
+                        bitmaskof(X86_FEATURE_RDSEED)  |
+                        bitmaskof(X86_FEATURE_ADX)  |
                         bitmaskof(X86_FEATURE_FSGSBASE));
         } else
             regs[1] = 0;
@@ -502,6 +505,8 @@ static void xc_cpuid_pv_policy(
                         bitmaskof(X86_FEATURE_BMI2) |
                         bitmaskof(X86_FEATURE_ERMS) |
                         bitmaskof(X86_FEATURE_RTM)  |
+                        bitmaskof(X86_FEATURE_RDSEED)  |
+                        bitmaskof(X86_FEATURE_ADX)  |
                         bitmaskof(X86_FEATURE_FSGSBASE));
         else
             regs[1] = 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:44:49 +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 1WXpzt-0006Ep-72; Wed, 09 Apr 2014 10:44:49 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzq-0006E6-On
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:47 +0000
Received: from [85.158.137.68:15708] by server-10.bemta-3.messagelabs.com id
	BC/0F-16608-E9425435; Wed, 09 Apr 2014 10:44:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397040283!5904556!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6321 invoked from network); 9 Apr 2014 10:44:44 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:44 -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 1WXpzn-0003HB-CH
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzn-0004dV-Ab
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:43 +0000
Date: Wed, 09 Apr 2014 10:44:43 +0000
Message-Id: <E1WXpzn-0004dV-Ab@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: implement initial ramdisk
	support for ARM.
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 314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96b
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Apr 4 14:28:45 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:48:22 2014 +0100

    tools: implement initial ramdisk support for ARM.
    
    The ramdisk is passed to the kernel as a property in the chosen node of the
    device tree. This is somewhat tricky since in order to place the ramdisk and
    dtb in ram we first need to know the size of the dtb. So we initially create a
    DTB with placeholders for the ramdisk and finalise the value (which doesn't
    change the size) once we know where everything is.
    
    Rename libxl__arch_domain_configure to xl__arch_domain_init_hw_description to
    better reflect its use and to be consistent with the new
    libxl__arch_domain_finalise_hw_description.
    
    The common xc_dom_build_image() function did not support explicit placement of
    the ramdisk, instead passing 0 to xc_dom_alloc_segment, meaning "pick
    somewhere". This change instead passes ramdisk_seg.vstart. If nothing has set
    vstart then it will be zero because the entire dom struct is zeroed on
    allocation in xc_dom_allocate(). Therefore there is no change to the behaviour
    on x86. This is also consistent with how other segments (kernel, dtb) are
    handled.
    
    Furthermore if the ramdisk has been explicitly placed then xc_dom_build_image()
    assumes that it is not to be decompressed (since that would muck up the sizings
    used on placement).
    
    With all that I'm able to boot a domain using the current Debian Jessie armhf
    installer initrd and have it complete successfully.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- s/itherwise/otherwise and dropped bogus emacs magic change ]
---
 tools/libxc/xc_dom.h      |    8 +++++
 tools/libxc/xc_dom_arm.c  |   64 ++++++++++++++++++++++++++++++++++---------
 tools/libxc/xc_dom_core.c |   13 +++++++--
 tools/libxl/libxl_arch.h  |   11 +++++--
 tools/libxl/libxl_arm.c   |   66 ++++++++++++++++++++++++++++++++++++++++-----
 tools/libxl/libxl_dom.c   |    8 ++++-
 tools/libxl/libxl_x86.c   |   13 +++++++--
 7 files changed, 152 insertions(+), 31 deletions(-)

diff --git a/tools/libxc/xc_dom.h b/tools/libxc/xc_dom.h
index 7099cee..c9af0ce 100644
--- a/tools/libxc/xc_dom.h
+++ b/tools/libxc/xc_dom.h
@@ -68,6 +68,14 @@ struct xc_dom_image {
 
     /* memory layout */
     struct xc_dom_seg kernel_seg;
+    /* If ramdisk_seg.vstart is non zero then the ramdisk will be
+     * loaded at that address, otherwise it will automatically placed.
+     *
+     * If automatic placement is used and the ramdisk is gzip
+     * compressed then it will be decompressed as it is loaded. If the
+     * ramdisk has been explicitly placed then it is loaded as is
+     * otherwise decompressing risks undoing the manual placement.
+     */
     struct xc_dom_seg ramdisk_seg;
     struct xc_dom_seg p2m_seg;
     struct xc_dom_seg pgtables_seg;
diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
index a40e04d..f051515 100644
--- a/tools/libxc/xc_dom_arm.c
+++ b/tools/libxc/xc_dom_arm.c
@@ -249,6 +249,18 @@ int arch_setup_meminit(struct xc_dom_image *dom)
 {
     int rc;
     xen_pfn_t pfn, allocsz, i;
+    uint64_t modbase;
+
+    /* Convenient */
+    const uint64_t rambase = dom->rambase_pfn << XC_PAGE_SHIFT;
+    const uint64_t ramend = rambase + ( dom->total_pages << XC_PAGE_SHIFT );
+    const uint64_t kernend = ROUNDUP(dom->kernel_seg.vend, 21/*2MB*/);
+    const uint64_t dtb_size = dom->devicetree_blob ?
+        ROUNDUP(dom->devicetree_size, XC_PAGE_SHIFT) : 0;
+    const uint64_t ramdisk_size = dom->ramdisk_blob ?
+        ROUNDUP(dom->ramdisk_size, XC_PAGE_SHIFT) : 0;
+    const uint64_t modsize = dtb_size + ramdisk_size;
+    const uint64_t ram128mb = rambase + (128<<20);
 
     rc = set_mode(dom->xch, dom->guest_domid, dom->guest_type);
     if ( rc )
@@ -278,23 +290,49 @@ int arch_setup_meminit(struct xc_dom_image *dom)
             0, 0, &dom->p2m_host[i]);
     }
 
-    if ( dom->devicetree_blob )
+
+    /*
+     * Place boot modules at 128MB into RAM if there is enough RAM and
+     * the kernel does not overlap. Otherwise place them immediately
+     * after the kernel. If there is no space after the kernel then
+     * there is insufficient RAM and we fail.
+     */
+    if ( ramend >= ram128mb + modsize && kernend < ram128mb )
+        modbase = ram128mb;
+    else if ( ramend >= kernend + modsize )
+        modbase = kernend;
+    else
+        return -1;
+
+    DOMPRINTF("%s: placing boot modules at 0x%" PRIx64, __FUNCTION__, modbase);
+
+    /*
+     * Must map DTB *after* initrd, to satisfy order of calls to
+     * xc_dom_alloc_segment in xc_dom_build_image, which must map
+     * things at monotonolically increasing addresses.
+     */
+    if ( ramdisk_size )
     {
-        const uint64_t rambase = dom->rambase_pfn << XC_PAGE_SHIFT;
-        const uint64_t ramend = rambase + ( dom->total_pages << XC_PAGE_SHIFT );
-        const uint64_t dtbsize = ROUNDUP(dom->devicetree_size, XC_PAGE_SHIFT);
-
-        /* Place at 128MB if there is sufficient RAM */
-        if ( ramend >= rambase + 128*1024*1024 + dtbsize )
-            dom->devicetree_seg.vstart = rambase + 128*1024*1024;
-        else /* otherwise at top of RAM */
-            dom->devicetree_seg.vstart = ramend - dtbsize;
-
-        dom->devicetree_seg.vend =
-            dom->devicetree_seg.vstart + dom->devicetree_size;
+        dom->ramdisk_seg.vstart = modbase;
+        dom->ramdisk_seg.vend = modbase + ramdisk_size;
+
+        DOMPRINTF("%s: ramdisk: 0x%" PRIx64 " -> 0x%" PRIx64 "",
+                  __FUNCTION__,
+                  dom->ramdisk_seg.vstart, dom->ramdisk_seg.vend);
+
+        modbase += ramdisk_size;
+    }
+
+    if ( dtb_size )
+    {
+        dom->devicetree_seg.vstart = modbase;
+        dom->devicetree_seg.vend = modbase + dtb_size;
+
         DOMPRINTF("%s: devicetree: 0x%" PRIx64 " -> 0x%" PRIx64 "",
                   __FUNCTION__,
                   dom->devicetree_seg.vstart, dom->devicetree_seg.vend);
+
+        modbase += dtb_size;
     }
 
     return 0;
diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index b9d1015..baa62a1 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -955,13 +955,20 @@ int xc_dom_build_image(struct xc_dom_image *dom)
         size_t unziplen, ramdisklen;
         void *ramdiskmap;
 
-        unziplen = xc_dom_check_gzip(dom->xch, dom->ramdisk_blob, dom->ramdisk_size);
-        if ( xc_dom_ramdisk_check_size(dom, unziplen) != 0 )
+        if ( !dom->ramdisk_seg.vstart )
+        {
+            unziplen = xc_dom_check_gzip(dom->xch,
+                                         dom->ramdisk_blob, dom->ramdisk_size);
+            if ( xc_dom_ramdisk_check_size(dom, unziplen) != 0 )
+                unziplen = 0;
+        }
+        else
             unziplen = 0;
 
         ramdisklen = unziplen ? unziplen : dom->ramdisk_size;
 
-        if ( xc_dom_alloc_segment(dom, &dom->ramdisk_seg, "ramdisk", 0,
+        if ( xc_dom_alloc_segment(dom, &dom->ramdisk_seg, "ramdisk",
+                                  dom->ramdisk_seg.vstart,
                                   ramdisklen) != 0 )
             goto err;
         ramdiskmap = xc_dom_seg_to_ptr(dom, &dom->ramdisk_seg);
diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h
index aee0a91..d3bc136 100644
--- a/tools/libxl/libxl_arch.h
+++ b/tools/libxl/libxl_arch.h
@@ -19,7 +19,12 @@
 int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
                uint32_t domid);
 
-int libxl__arch_domain_configure(libxl__gc *gc,
-                                 libxl_domain_build_info *info,
-                                 struct xc_dom_image *dom);
+/* setup arch specific hardware description, i.e. DTB on ARM */
+int libxl__arch_domain_init_hw_description(libxl__gc *gc,
+                                           libxl_domain_build_info *info,
+                                           struct xc_dom_image *dom);
+/* finalize arch specific hardware description. */
+int libxl__arch_domain_finalise_hw_description(libxl__gc *gc,
+                                      libxl_domain_build_info *info,
+                                      struct xc_dom_image *dom);
 #endif
diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 0cfd0cf..4f0f0e2 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -2,6 +2,7 @@
 #include "libxl_arch.h"
 
 #include <xc_dom.h>
+#include <stdbool.h>
 #include <libfdt.h>
 #include <assert.h>
 
@@ -31,6 +32,9 @@ typedef be32 gic_interrupt[3];
 #define ROOT_ADDRESS_CELLS 2
 #define ROOT_SIZE_CELLS 2
 
+#define PROP_INITRD_START "linux,initrd-start"
+#define PROP_INITRD_END "linux,initrd-end"
+
 static void set_cell(be32 **cellp, int size, uint64_t val)
 {
     int cells = size;
@@ -155,7 +159,7 @@ static int make_root_properties(libxl__gc *gc,
     return 0;
 }
 
-static int make_chosen_node(libxl__gc *gc, void *fdt,
+static int make_chosen_node(libxl__gc *gc, void *fdt, bool ramdisk,
                             const libxl_domain_build_info *info)
 {
     int res;
@@ -169,6 +173,15 @@ static int make_chosen_node(libxl__gc *gc, void *fdt,
         if (res) return res;
     }
 
+    if (ramdisk) {
+        uint64_t dummy = 0;
+        LOG(DEBUG, "/chosen adding placeholder linux,initrd properties");
+        res = fdt_property(fdt, PROP_INITRD_START, &dummy, sizeof(dummy));
+        if (res) return res;
+        res = fdt_property(fdt, PROP_INITRD_END, &dummy, sizeof(dummy));
+        if (res) return res;
+    }
+
     res = fdt_end_node(fdt);
     if (res) return res;
 
@@ -412,9 +425,9 @@ out:
 
 #define FDT_MAX_SIZE (1<<20)
 
-int libxl__arch_domain_configure(libxl__gc *gc,
-                                 libxl_domain_build_info *info,
-                                 struct xc_dom_image *dom)
+int libxl__arch_domain_init_hw_description(libxl__gc *gc,
+                                           libxl_domain_build_info *info,
+                                           struct xc_dom_image *dom)
 {
     void *fdt = NULL;
     int rc, res;
@@ -475,7 +488,7 @@ next_resize:
         FDT( fdt_begin_node(fdt, "") );
 
         FDT( make_root_properties(gc, vers, fdt) );
-        FDT( make_chosen_node(gc, fdt, info) );
+        FDT( make_chosen_node(gc, fdt, !!dom->ramdisk_blob, info) );
         FDT( make_cpus_node(gc, fdt, info->max_vcpus, ainfo) );
         FDT( make_psci_node(gc, fdt) );
 
@@ -505,10 +518,49 @@ next_resize:
         goto out;
     }
 
-    debug_dump_fdt(gc, fdt);
-
     rc = 0;
 
 out:
     return rc;
 }
+
+int libxl__arch_domain_finalise_hw_description(libxl__gc *gc,
+                                               libxl_domain_build_info *info,
+                                               struct xc_dom_image *dom)
+{
+    void *fdt = dom->devicetree_blob;
+
+    const struct xc_dom_seg *ramdisk = dom->ramdisk_blob ?
+        &dom->ramdisk_seg : NULL;
+
+    if (ramdisk) {
+        int chosen, res;
+        uint64_t val;
+
+        /* Neither the fdt_path_offset() nor either of the
+         * fdt_setprop_inplace() calls can fail. If they do then
+         * make_chosen_node() (see above) has got something very
+         * wrong.
+         */
+        chosen = fdt_path_offset(fdt, "/chosen");
+        assert(chosen > 0);
+
+        LOG(DEBUG, "/chosen updating initrd properties to cover "
+            "%"PRIx64"-%"PRIx64,
+            ramdisk->vstart, ramdisk->vend);
+
+        val = cpu_to_fdt64(ramdisk->vstart);
+        res = fdt_setprop_inplace(fdt, chosen, PROP_INITRD_START,
+                                  &val, sizeof(val));
+        assert(!res);
+
+        val = cpu_to_fdt64(ramdisk->vend);
+        res = fdt_setprop_inplace(fdt, chosen,PROP_INITRD_END,
+                                  &val, sizeof(val));
+        assert(!res);
+    }
+
+    debug_dump_fdt(gc, fdt);
+
+    return 0;
+}
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index 3351c09..661999c 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -436,8 +436,8 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,
         LOGE(ERROR, "xc_dom_parse_image failed");
         goto out;
     }
-    if ( (ret = libxl__arch_domain_configure(gc, info, dom)) != 0 ) {
-        LOGE(ERROR, "libxl__arch_domain_configure failed");
+    if ( (ret = libxl__arch_domain_init_hw_description(gc, info, dom)) != 0 ) {
+        LOGE(ERROR, "libxl__arch_domain_init_hw_description failed");
         goto out;
     }
     if ( (ret = xc_dom_mem_init(dom, info->target_memkb / 1024)) != 0 ) {
@@ -448,6 +448,10 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,
         LOGE(ERROR, "xc_dom_boot_mem_init failed");
         goto out;
     }
+    if ( (ret = libxl__arch_domain_finalise_hw_description(gc, info, dom)) != 0 ) {
+        LOGE(ERROR, "libxl__arch_domain_finalise_hw_description failed");
+        goto out;
+    }
     if ( (ret = xc_dom_build_image(dom)) != 0 ) {
         LOGE(ERROR, "xc_dom_build_image failed");
         goto out;
diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
index b11d036..7589060 100644
--- a/tools/libxl/libxl_x86.c
+++ b/tools/libxl/libxl_x86.c
@@ -311,9 +311,16 @@ int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
     return ret;
 }
 
-int libxl__arch_domain_configure(libxl__gc *gc,
-                                 libxl_domain_build_info *info,
-                                 struct xc_dom_image *dom)
+int libxl__arch_domain_init_hw_description(libxl__gc *gc,
+                                           libxl_domain_build_info *info,
+                                           struct xc_dom_image *dom)
+{
+    return 0;
+}
+
+int libxl__arch_domain_finalise_hw_description(libxl__gc *gc,
+                                               libxl_domain_build_info *info,
+                                               struct xc_dom_image *dom)
 {
     return 0;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:44:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:44:49 +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 1WXpzt-0006Ep-72; Wed, 09 Apr 2014 10:44:49 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzq-0006E6-On
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:47 +0000
Received: from [85.158.137.68:15708] by server-10.bemta-3.messagelabs.com id
	BC/0F-16608-E9425435; Wed, 09 Apr 2014 10:44:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397040283!5904556!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6321 invoked from network); 9 Apr 2014 10:44:44 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:44 -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 1WXpzn-0003HB-CH
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzn-0004dV-Ab
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:43 +0000
Date: Wed, 09 Apr 2014 10:44:43 +0000
Message-Id: <E1WXpzn-0004dV-Ab@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: implement initial ramdisk
	support for ARM.
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 314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96b
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Apr 4 14:28:45 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:48:22 2014 +0100

    tools: implement initial ramdisk support for ARM.
    
    The ramdisk is passed to the kernel as a property in the chosen node of the
    device tree. This is somewhat tricky since in order to place the ramdisk and
    dtb in ram we first need to know the size of the dtb. So we initially create a
    DTB with placeholders for the ramdisk and finalise the value (which doesn't
    change the size) once we know where everything is.
    
    Rename libxl__arch_domain_configure to xl__arch_domain_init_hw_description to
    better reflect its use and to be consistent with the new
    libxl__arch_domain_finalise_hw_description.
    
    The common xc_dom_build_image() function did not support explicit placement of
    the ramdisk, instead passing 0 to xc_dom_alloc_segment, meaning "pick
    somewhere". This change instead passes ramdisk_seg.vstart. If nothing has set
    vstart then it will be zero because the entire dom struct is zeroed on
    allocation in xc_dom_allocate(). Therefore there is no change to the behaviour
    on x86. This is also consistent with how other segments (kernel, dtb) are
    handled.
    
    Furthermore if the ramdisk has been explicitly placed then xc_dom_build_image()
    assumes that it is not to be decompressed (since that would muck up the sizings
    used on placement).
    
    With all that I'm able to boot a domain using the current Debian Jessie armhf
    installer initrd and have it complete successfully.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- s/itherwise/otherwise and dropped bogus emacs magic change ]
---
 tools/libxc/xc_dom.h      |    8 +++++
 tools/libxc/xc_dom_arm.c  |   64 ++++++++++++++++++++++++++++++++++---------
 tools/libxc/xc_dom_core.c |   13 +++++++--
 tools/libxl/libxl_arch.h  |   11 +++++--
 tools/libxl/libxl_arm.c   |   66 ++++++++++++++++++++++++++++++++++++++++-----
 tools/libxl/libxl_dom.c   |    8 ++++-
 tools/libxl/libxl_x86.c   |   13 +++++++--
 7 files changed, 152 insertions(+), 31 deletions(-)

diff --git a/tools/libxc/xc_dom.h b/tools/libxc/xc_dom.h
index 7099cee..c9af0ce 100644
--- a/tools/libxc/xc_dom.h
+++ b/tools/libxc/xc_dom.h
@@ -68,6 +68,14 @@ struct xc_dom_image {
 
     /* memory layout */
     struct xc_dom_seg kernel_seg;
+    /* If ramdisk_seg.vstart is non zero then the ramdisk will be
+     * loaded at that address, otherwise it will automatically placed.
+     *
+     * If automatic placement is used and the ramdisk is gzip
+     * compressed then it will be decompressed as it is loaded. If the
+     * ramdisk has been explicitly placed then it is loaded as is
+     * otherwise decompressing risks undoing the manual placement.
+     */
     struct xc_dom_seg ramdisk_seg;
     struct xc_dom_seg p2m_seg;
     struct xc_dom_seg pgtables_seg;
diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
index a40e04d..f051515 100644
--- a/tools/libxc/xc_dom_arm.c
+++ b/tools/libxc/xc_dom_arm.c
@@ -249,6 +249,18 @@ int arch_setup_meminit(struct xc_dom_image *dom)
 {
     int rc;
     xen_pfn_t pfn, allocsz, i;
+    uint64_t modbase;
+
+    /* Convenient */
+    const uint64_t rambase = dom->rambase_pfn << XC_PAGE_SHIFT;
+    const uint64_t ramend = rambase + ( dom->total_pages << XC_PAGE_SHIFT );
+    const uint64_t kernend = ROUNDUP(dom->kernel_seg.vend, 21/*2MB*/);
+    const uint64_t dtb_size = dom->devicetree_blob ?
+        ROUNDUP(dom->devicetree_size, XC_PAGE_SHIFT) : 0;
+    const uint64_t ramdisk_size = dom->ramdisk_blob ?
+        ROUNDUP(dom->ramdisk_size, XC_PAGE_SHIFT) : 0;
+    const uint64_t modsize = dtb_size + ramdisk_size;
+    const uint64_t ram128mb = rambase + (128<<20);
 
     rc = set_mode(dom->xch, dom->guest_domid, dom->guest_type);
     if ( rc )
@@ -278,23 +290,49 @@ int arch_setup_meminit(struct xc_dom_image *dom)
             0, 0, &dom->p2m_host[i]);
     }
 
-    if ( dom->devicetree_blob )
+
+    /*
+     * Place boot modules at 128MB into RAM if there is enough RAM and
+     * the kernel does not overlap. Otherwise place them immediately
+     * after the kernel. If there is no space after the kernel then
+     * there is insufficient RAM and we fail.
+     */
+    if ( ramend >= ram128mb + modsize && kernend < ram128mb )
+        modbase = ram128mb;
+    else if ( ramend >= kernend + modsize )
+        modbase = kernend;
+    else
+        return -1;
+
+    DOMPRINTF("%s: placing boot modules at 0x%" PRIx64, __FUNCTION__, modbase);
+
+    /*
+     * Must map DTB *after* initrd, to satisfy order of calls to
+     * xc_dom_alloc_segment in xc_dom_build_image, which must map
+     * things at monotonolically increasing addresses.
+     */
+    if ( ramdisk_size )
     {
-        const uint64_t rambase = dom->rambase_pfn << XC_PAGE_SHIFT;
-        const uint64_t ramend = rambase + ( dom->total_pages << XC_PAGE_SHIFT );
-        const uint64_t dtbsize = ROUNDUP(dom->devicetree_size, XC_PAGE_SHIFT);
-
-        /* Place at 128MB if there is sufficient RAM */
-        if ( ramend >= rambase + 128*1024*1024 + dtbsize )
-            dom->devicetree_seg.vstart = rambase + 128*1024*1024;
-        else /* otherwise at top of RAM */
-            dom->devicetree_seg.vstart = ramend - dtbsize;
-
-        dom->devicetree_seg.vend =
-            dom->devicetree_seg.vstart + dom->devicetree_size;
+        dom->ramdisk_seg.vstart = modbase;
+        dom->ramdisk_seg.vend = modbase + ramdisk_size;
+
+        DOMPRINTF("%s: ramdisk: 0x%" PRIx64 " -> 0x%" PRIx64 "",
+                  __FUNCTION__,
+                  dom->ramdisk_seg.vstart, dom->ramdisk_seg.vend);
+
+        modbase += ramdisk_size;
+    }
+
+    if ( dtb_size )
+    {
+        dom->devicetree_seg.vstart = modbase;
+        dom->devicetree_seg.vend = modbase + dtb_size;
+
         DOMPRINTF("%s: devicetree: 0x%" PRIx64 " -> 0x%" PRIx64 "",
                   __FUNCTION__,
                   dom->devicetree_seg.vstart, dom->devicetree_seg.vend);
+
+        modbase += dtb_size;
     }
 
     return 0;
diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index b9d1015..baa62a1 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -955,13 +955,20 @@ int xc_dom_build_image(struct xc_dom_image *dom)
         size_t unziplen, ramdisklen;
         void *ramdiskmap;
 
-        unziplen = xc_dom_check_gzip(dom->xch, dom->ramdisk_blob, dom->ramdisk_size);
-        if ( xc_dom_ramdisk_check_size(dom, unziplen) != 0 )
+        if ( !dom->ramdisk_seg.vstart )
+        {
+            unziplen = xc_dom_check_gzip(dom->xch,
+                                         dom->ramdisk_blob, dom->ramdisk_size);
+            if ( xc_dom_ramdisk_check_size(dom, unziplen) != 0 )
+                unziplen = 0;
+        }
+        else
             unziplen = 0;
 
         ramdisklen = unziplen ? unziplen : dom->ramdisk_size;
 
-        if ( xc_dom_alloc_segment(dom, &dom->ramdisk_seg, "ramdisk", 0,
+        if ( xc_dom_alloc_segment(dom, &dom->ramdisk_seg, "ramdisk",
+                                  dom->ramdisk_seg.vstart,
                                   ramdisklen) != 0 )
             goto err;
         ramdiskmap = xc_dom_seg_to_ptr(dom, &dom->ramdisk_seg);
diff --git a/tools/libxl/libxl_arch.h b/tools/libxl/libxl_arch.h
index aee0a91..d3bc136 100644
--- a/tools/libxl/libxl_arch.h
+++ b/tools/libxl/libxl_arch.h
@@ -19,7 +19,12 @@
 int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
                uint32_t domid);
 
-int libxl__arch_domain_configure(libxl__gc *gc,
-                                 libxl_domain_build_info *info,
-                                 struct xc_dom_image *dom);
+/* setup arch specific hardware description, i.e. DTB on ARM */
+int libxl__arch_domain_init_hw_description(libxl__gc *gc,
+                                           libxl_domain_build_info *info,
+                                           struct xc_dom_image *dom);
+/* finalize arch specific hardware description. */
+int libxl__arch_domain_finalise_hw_description(libxl__gc *gc,
+                                      libxl_domain_build_info *info,
+                                      struct xc_dom_image *dom);
 #endif
diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
index 0cfd0cf..4f0f0e2 100644
--- a/tools/libxl/libxl_arm.c
+++ b/tools/libxl/libxl_arm.c
@@ -2,6 +2,7 @@
 #include "libxl_arch.h"
 
 #include <xc_dom.h>
+#include <stdbool.h>
 #include <libfdt.h>
 #include <assert.h>
 
@@ -31,6 +32,9 @@ typedef be32 gic_interrupt[3];
 #define ROOT_ADDRESS_CELLS 2
 #define ROOT_SIZE_CELLS 2
 
+#define PROP_INITRD_START "linux,initrd-start"
+#define PROP_INITRD_END "linux,initrd-end"
+
 static void set_cell(be32 **cellp, int size, uint64_t val)
 {
     int cells = size;
@@ -155,7 +159,7 @@ static int make_root_properties(libxl__gc *gc,
     return 0;
 }
 
-static int make_chosen_node(libxl__gc *gc, void *fdt,
+static int make_chosen_node(libxl__gc *gc, void *fdt, bool ramdisk,
                             const libxl_domain_build_info *info)
 {
     int res;
@@ -169,6 +173,15 @@ static int make_chosen_node(libxl__gc *gc, void *fdt,
         if (res) return res;
     }
 
+    if (ramdisk) {
+        uint64_t dummy = 0;
+        LOG(DEBUG, "/chosen adding placeholder linux,initrd properties");
+        res = fdt_property(fdt, PROP_INITRD_START, &dummy, sizeof(dummy));
+        if (res) return res;
+        res = fdt_property(fdt, PROP_INITRD_END, &dummy, sizeof(dummy));
+        if (res) return res;
+    }
+
     res = fdt_end_node(fdt);
     if (res) return res;
 
@@ -412,9 +425,9 @@ out:
 
 #define FDT_MAX_SIZE (1<<20)
 
-int libxl__arch_domain_configure(libxl__gc *gc,
-                                 libxl_domain_build_info *info,
-                                 struct xc_dom_image *dom)
+int libxl__arch_domain_init_hw_description(libxl__gc *gc,
+                                           libxl_domain_build_info *info,
+                                           struct xc_dom_image *dom)
 {
     void *fdt = NULL;
     int rc, res;
@@ -475,7 +488,7 @@ next_resize:
         FDT( fdt_begin_node(fdt, "") );
 
         FDT( make_root_properties(gc, vers, fdt) );
-        FDT( make_chosen_node(gc, fdt, info) );
+        FDT( make_chosen_node(gc, fdt, !!dom->ramdisk_blob, info) );
         FDT( make_cpus_node(gc, fdt, info->max_vcpus, ainfo) );
         FDT( make_psci_node(gc, fdt) );
 
@@ -505,10 +518,49 @@ next_resize:
         goto out;
     }
 
-    debug_dump_fdt(gc, fdt);
-
     rc = 0;
 
 out:
     return rc;
 }
+
+int libxl__arch_domain_finalise_hw_description(libxl__gc *gc,
+                                               libxl_domain_build_info *info,
+                                               struct xc_dom_image *dom)
+{
+    void *fdt = dom->devicetree_blob;
+
+    const struct xc_dom_seg *ramdisk = dom->ramdisk_blob ?
+        &dom->ramdisk_seg : NULL;
+
+    if (ramdisk) {
+        int chosen, res;
+        uint64_t val;
+
+        /* Neither the fdt_path_offset() nor either of the
+         * fdt_setprop_inplace() calls can fail. If they do then
+         * make_chosen_node() (see above) has got something very
+         * wrong.
+         */
+        chosen = fdt_path_offset(fdt, "/chosen");
+        assert(chosen > 0);
+
+        LOG(DEBUG, "/chosen updating initrd properties to cover "
+            "%"PRIx64"-%"PRIx64,
+            ramdisk->vstart, ramdisk->vend);
+
+        val = cpu_to_fdt64(ramdisk->vstart);
+        res = fdt_setprop_inplace(fdt, chosen, PROP_INITRD_START,
+                                  &val, sizeof(val));
+        assert(!res);
+
+        val = cpu_to_fdt64(ramdisk->vend);
+        res = fdt_setprop_inplace(fdt, chosen,PROP_INITRD_END,
+                                  &val, sizeof(val));
+        assert(!res);
+    }
+
+    debug_dump_fdt(gc, fdt);
+
+    return 0;
+}
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index 3351c09..661999c 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -436,8 +436,8 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,
         LOGE(ERROR, "xc_dom_parse_image failed");
         goto out;
     }
-    if ( (ret = libxl__arch_domain_configure(gc, info, dom)) != 0 ) {
-        LOGE(ERROR, "libxl__arch_domain_configure failed");
+    if ( (ret = libxl__arch_domain_init_hw_description(gc, info, dom)) != 0 ) {
+        LOGE(ERROR, "libxl__arch_domain_init_hw_description failed");
         goto out;
     }
     if ( (ret = xc_dom_mem_init(dom, info->target_memkb / 1024)) != 0 ) {
@@ -448,6 +448,10 @@ int libxl__build_pv(libxl__gc *gc, uint32_t domid,
         LOGE(ERROR, "xc_dom_boot_mem_init failed");
         goto out;
     }
+    if ( (ret = libxl__arch_domain_finalise_hw_description(gc, info, dom)) != 0 ) {
+        LOGE(ERROR, "libxl__arch_domain_finalise_hw_description failed");
+        goto out;
+    }
     if ( (ret = xc_dom_build_image(dom)) != 0 ) {
         LOGE(ERROR, "xc_dom_build_image failed");
         goto out;
diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
index b11d036..7589060 100644
--- a/tools/libxl/libxl_x86.c
+++ b/tools/libxl/libxl_x86.c
@@ -311,9 +311,16 @@ int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
     return ret;
 }
 
-int libxl__arch_domain_configure(libxl__gc *gc,
-                                 libxl_domain_build_info *info,
-                                 struct xc_dom_image *dom)
+int libxl__arch_domain_init_hw_description(libxl__gc *gc,
+                                           libxl_domain_build_info *info,
+                                           struct xc_dom_image *dom)
+{
+    return 0;
+}
+
+int libxl__arch_domain_finalise_hw_description(libxl__gc *gc,
+                                               libxl_domain_build_info *info,
+                                               struct xc_dom_image *dom)
 {
     return 0;
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:45:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:45:04 +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 1WXq08-0006II-BI; Wed, 09 Apr 2014 10:45:04 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq05-0006Hs-VW
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:02 +0000
Received: from [85.158.137.68:21232] by server-1.bemta-3.messagelabs.com id
	69/CA-11134-DA425435; Wed, 09 Apr 2014 10:45:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1397040294!5869131!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=2.3 required=7.0 tests=BODY_RANDOM_LONG,DIET_1,
	HOT_NASTY,ML_RADAR_SPEW_LINKS_23,spamassassin: 
X-StarScan-Received: 
X-StarScan-Version: 6.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25914 invoked from network); 9 Apr 2014 10:44:55 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:55 -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 1WXpzy-0003HK-4Z
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzx-0004et-UK
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:54 +0000
Date: Wed, 09 Apr 2014 10:44:53 +0000
Message-Id: <E1WXpzx-0004et-UK@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: remove xend and associated
	python modules
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 9e8672f1c36d7237508c537c0a1db6c473c2be37
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Sep 12 10:21:25 2013 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:39:09 2014 +0100

    tools: remove xend and associated python modules
    
    I've retained xen.lowlevel.{xc,xs} since they seem more widely useful. I also
    kept xen.lowlevel.xl even though it is disabled by default and IMHO useless in
    its current form.
    
    I've tried to clean up the various associated bits like example configs, init
    scripts, udev rules etc but no doubt I have missed something, those can easily
    be cleaned up later.
    
    I've also removed xm-test since although it could in theory be reworked to
    test xl it hasn't been touched for years. If someone wants to resurrect it
    then they could do so via the git history.
    
    This has been built but not runtime tested.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    ---
    v2: Clean out some .*ignore cruft
        Remove some xm/xend docs.
---
 .gitignore                                         |   14 -
 .hgignore                                          |   12 -
 MAINTAINERS                                        |    2 -
 config/Tools.mk.in                                 |    1 -
 docs/man/xend-config.sxp.pod.5                     |  158 -
 docs/man/xl.pod.1                                  |    1 -
 docs/man/xm.pod.1                                  | 1004 -----
 docs/man/xmdomain.cfg.pod.5                        |  358 --
 tools/configure                                    |   48 -
 tools/configure.ac                                 |   13 -
 tools/examples/Makefile                            |   12 -
 tools/examples/xend-config.sxp                     |  304 --
 tools/examples/xend-pci-permissive.sxp             |   27 -
 tools/examples/xend-pci-quirks.sxp                 |   96 -
 tools/examples/xm-config.xml                       |   45 -
 tools/examples/xmexample.hvm                       |  373 --
 tools/examples/xmexample.hvm-stubdom               |  317 --
 tools/examples/xmexample.nbd                       |   26 -
 tools/examples/xmexample.pv-grub                   |  172 -
 tools/examples/xmexample1                          |  197 -
 tools/examples/xmexample2                          |  232 -
 tools/examples/xmexample3                          |  218 -
 tools/hotplug/Linux/Makefile                       |    5 -
 tools/hotplug/Linux/init.d/xend                    |   82 -
 tools/hotplug/Linux/xend.rules                     |    4 -
 tools/hotplug/NetBSD/Makefile                      |    3 +-
 tools/hotplug/NetBSD/rc.d/xend                     |   71 -
 tools/libxl/xl.c                                   |   16 -
 tools/python/Makefile                              |   18 +-
 tools/python/logging/logging-0.4.9.2/PKG-INFO      |   25 -
 tools/python/logging/logging-0.4.9.2/README.txt    |  311 --
 tools/python/logging/logging-0.4.9.2/default.css   |   32 -
 .../python/logging/logging-0.4.9.2/liblogging.tex  | 1281 ------
 .../logging/logging-0.4.9.2/logging/__init__.py    | 1225 ------
 .../logging/logging-0.4.9.2/logging/config.py      |  301 --
 .../logging/logging-0.4.9.2/logging/handlers.py    |  787 ----
 .../logging/logging-0.4.9.2/python_logging.html    | 1183 ------
 tools/python/logging/logging-0.4.9.2/setup.py      |   29 -
 tools/python/logging/logging-0.4.9.2/test/app.py   |    5 -
 .../logging/logging-0.4.9.2/test/critical.ini      |   60 -
 .../python/logging/logging-0.4.9.2/test/debug.ini  |   60 -
 .../python/logging/logging-0.4.9.2/test/error.ini  |   60 -
 .../python/logging/logging-0.4.9.2/test/events.xml |   31 -
 .../logging/logging-0.4.9.2/test/log_test.py       |  158 -
 .../logging/logging-0.4.9.2/test/log_test0.py      |  118 -
 .../logging/logging-0.4.9.2/test/log_test1.py      |   85 -
 .../logging/logging-0.4.9.2/test/log_test10.py     |   87 -
 .../logging/logging-0.4.9.2/test/log_test11.py     |   72 -
 .../logging/logging-0.4.9.2/test/log_test12.py     |   47 -
 .../logging/logging-0.4.9.2/test/log_test13.py     |  106 -
 .../logging/logging-0.4.9.2/test/log_test14.py     |  108 -
 .../logging/logging-0.4.9.2/test/log_test15.py     |   70 -
 .../logging/logging-0.4.9.2/test/log_test16.py     |   73 -
 .../logging/logging-0.4.9.2/test/log_test17.py     |  111 -
 .../logging/logging-0.4.9.2/test/log_test18.py     |  102 -
 .../logging/logging-0.4.9.2/test/log_test19.py     |   57 -
 .../logging/logging-0.4.9.2/test/log_test2.py      |  119 -
 .../logging/logging-0.4.9.2/test/log_test20.py     |   84 -
 .../logging/logging-0.4.9.2/test/log_test21.py     |  141 -
 .../logging/logging-0.4.9.2/test/log_test22.py     |   50 -
 .../logging/logging-0.4.9.2/test/log_test3.ini     |   95 -
 .../logging/logging-0.4.9.2/test/log_test3.py      |   70 -
 .../logging/logging-0.4.9.2/test/log_test4.py      |  168 -
 .../logging/logging-0.4.9.2/test/log_test5.py      |   44 -
 .../logging/logging-0.4.9.2/test/log_test6.py      |   47 -
 .../logging/logging-0.4.9.2/test/log_test7.py      |   48 -
 .../logging/logging-0.4.9.2/test/log_test8.py      |   69 -
 .../logging/logging-0.4.9.2/test/log_test9.py      |   71 -
 .../logging/logging-0.4.9.2/test/logconf.ini       |  180 -
 .../python/logging/logging-0.4.9.2/test/logconf.py | 1738 --------
 .../logging/logging-0.4.9.2/test/logging.dtd       |   19 -
 .../logging/logging-0.4.9.2/test/logging.xml       |    5 -
 .../logging/logging-0.4.9.2/test/logrecv.ini       |   36 -
 .../python/logging/logging-0.4.9.2/test/logrecv.py |  443 --
 tools/python/logging/logging-0.4.9.2/test/myapp.py |   13 -
 .../logging/logging-0.4.9.2/test/mymodule.py       |    8 -
 .../python/logging/logging-0.4.9.2/test/stderr.exp |  566 ---
 .../python/logging/logging-0.4.9.2/test/stdout.exp |   24 -
 tools/python/logging/logging-0.4.9.2/test/warn.ini |   60 -
 tools/python/logging/setup.py                      |   11 -
 tools/python/ptsname/ptsname.c                     |   44 -
 tools/python/setup.py                              |   95 +-
 tools/python/xen/lowlevel/checkpoint/checkpoint.c  |  371 --
 tools/python/xen/lowlevel/checkpoint/checkpoint.h  |   61 -
 .../python/xen/lowlevel/checkpoint/libcheckpoint.c |  850 ----
 tools/python/xen/lowlevel/flask/flask.c            |  292 --
 tools/python/xen/lowlevel/netlink/libnetlink.c     |  585 ---
 tools/python/xen/lowlevel/netlink/libnetlink.h     |   58 -
 tools/python/xen/lowlevel/netlink/netlink.c        |  215 -
 tools/python/xen/lowlevel/process/process.c        |  164 -
 tools/python/xen/lowlevel/scf/scf.c                |  156 -
 tools/python/xen/remus/blkdev.py                   |   31 -
 tools/python/xen/remus/device.py                   |  397 --
 tools/python/xen/remus/image.py                    |  227 -
 tools/python/xen/remus/netlink.py                  |  318 --
 tools/python/xen/remus/profile.py                  |   56 -
 tools/python/xen/remus/qdisc.py                    |  189 -
 tools/python/xen/remus/save.py                     |  186 -
 tools/python/xen/remus/tapdisk.py                  |    4 -
 tools/python/xen/remus/util.py                     |   82 -
 tools/python/xen/remus/vbd.py                      |    9 -
 tools/python/xen/remus/vdi.py                      |  121 -
 tools/python/xen/remus/vif.py                      |   18 -
 tools/python/xen/remus/vm.py                       |  168 -
 tools/python/xen/util/Brctl.py                     |  186 -
 tools/python/xen/util/SSHTransport.py              |  102 -
 tools/python/xen/util/__init__.py                  |    1 -
 tools/python/xen/util/acmpolicy.py                 | 1622 -------
 tools/python/xen/util/asserts.py                   |   27 -
 tools/python/xen/util/auxbin.py                    |   47 -
 tools/python/xen/util/blkif.py                     |  107 -
 tools/python/xen/util/bootloader.py                |  626 ---
 tools/python/xen/util/bugtool.py                   |  234 -
 tools/python/xen/util/diagnose.py                  |  185 -
 tools/python/xen/util/dictio.py                    |   50 -
 tools/python/xen/util/fileuri.py                   |  156 -
 tools/python/xen/util/ip.py                        |  121 -
 tools/python/xen/util/mac.py                       |   11 -
 tools/python/xen/util/mkdir.py                     |   44 -
 tools/python/xen/util/oshelp.py                    |   33 -
 tools/python/xen/util/pci.py                       | 1416 -------
 tools/python/xen/util/rwlock.py                    |  137 -
 tools/python/xen/util/sxputils.py                  |   64 -
 tools/python/xen/util/utils.py                     |   78 -
 tools/python/xen/util/vscsi_util.py                |  307 --
 tools/python/xen/util/vusb_util.py                 |  338 --
 tools/python/xen/util/xmlrpcclient.py              |  129 -
 tools/python/xen/util/xmlrpclib2.py                |  220 -
 tools/python/xen/util/xpopen.py                    |  182 -
 tools/python/xen/util/xsconstants.py               |  115 -
 tools/python/xen/util/xsm/__init__.py              |    2 -
 tools/python/xen/util/xsm/acm/__init__.py          |    1 -
 tools/python/xen/util/xsm/acm/acm.py               | 1627 -------
 tools/python/xen/util/xsm/dummy/__init__.py        |    1 -
 tools/python/xen/util/xsm/dummy/dummy.py           |  136 -
 tools/python/xen/util/xsm/flask/__init__.py        |    1 -
 tools/python/xen/util/xsm/flask/flask.py           |   65 -
 tools/python/xen/util/xsm/xsm.py                   |   20 -
 tools/python/xen/util/xsm/xsm_core.py              |    7 -
 tools/python/xen/util/xspolicy.py                  |   66 -
 tools/python/xen/web/SrvBase.py                    |   98 -
 tools/python/xen/web/SrvDir.py                     |  126 -
 tools/python/xen/web/__init__.py                   |   17 -
 tools/python/xen/web/connection.py                 |  333 --
 tools/python/xen/web/http.py                       |  518 ---
 tools/python/xen/web/httpserver.py                 |  367 --
 tools/python/xen/web/protocol.py                   |   40 -
 tools/python/xen/web/resource.py                   |  108 -
 tools/python/xen/web/static.py                     |   61 -
 tools/python/xen/web/tcp.py                        |  212 -
 tools/python/xen/web/unix.py                       |   69 -
 tools/python/xen/xend/Args.py                      |  166 -
 tools/python/xen/xend/MemoryPool.py                |  118 -
 tools/python/xen/xend/PrettyPrint.py               |  323 --
 tools/python/xen/xend/Vifctl.py                    |   35 -
 tools/python/xen/xend/XendAPI.py                   | 2812 -------------
 tools/python/xen/xend/XendAPIConstants.py          |   82 -
 tools/python/xen/xend/XendAPIStore.py              |   83 -
 tools/python/xen/xend/XendAPIVersion.py            |   22 -
 tools/python/xen/xend/XendAuthSessions.py          |  131 -
 tools/python/xen/xend/XendBase.py                  |  126 -
 tools/python/xen/xend/XendBootloader.py            |  230 -
 tools/python/xen/xend/XendCPUPool.py               |  910 ----
 tools/python/xen/xend/XendCheckpoint.py            |  425 --
 tools/python/xen/xend/XendClient.py                |   40 -
 tools/python/xen/xend/XendConfig.py                | 2265 ----------
 tools/python/xen/xend/XendConstants.py             |  164 -
 tools/python/xen/xend/XendDPCI.py                  |  165 -
 tools/python/xen/xend/XendDSCSI.py                 |  299 --
 tools/python/xen/xend/XendDevices.py               |   85 -
 tools/python/xen/xend/XendDmesg.py                 |   41 -
 tools/python/xen/xend/XendDomain.py                | 1958 ---------
 tools/python/xen/xend/XendDomainInfo.py            | 4429 --------------------
 tools/python/xen/xend/XendError.py                 |  252 --
 tools/python/xen/xend/XendLocalStorageRepo.py      |   93 -
 tools/python/xen/xend/XendLogging.py               |  149 -
 tools/python/xen/xend/XendMonitor.py               |  340 --
 tools/python/xen/xend/XendNetwork.py               |  238 --
 tools/python/xen/xend/XendNode.py                  | 1173 ------
 tools/python/xen/xend/XendOptions.py               |  567 ---
 tools/python/xen/xend/XendPBD.py                   |   99 -
 tools/python/xen/xend/XendPIF.py                   |  390 --
 tools/python/xen/xend/XendPIFMetrics.py            |   59 -
 tools/python/xen/xend/XendPPCI.py                  |  160 -
 tools/python/xen/xend/XendPSCSI.py                 |  211 -
 tools/python/xen/xend/XendProtocol.py              |  225 -
 tools/python/xen/xend/XendQCoWStorageRepo.py       |  340 --
 tools/python/xen/xend/XendSXPDev.py                |   13 -
 tools/python/xen/xend/XendStateStore.py            |  234 -
 tools/python/xen/xend/XendStorageRepository.py     |  118 -
 tools/python/xen/xend/XendTask.py                  |  224 -
 tools/python/xen/xend/XendTaskManager.py           |  110 -
 tools/python/xen/xend/XendVDI.py                   |  214 -
 tools/python/xen/xend/XendVMMetrics.py             |  146 -
 tools/python/xen/xend/XendVnet.py                  |  181 -
 tools/python/xen/xend/XendXSPolicy.py              |  305 --
 tools/python/xen/xend/XendXSPolicyAdmin.py         |  386 --
 tools/python/xen/xend/__init__.py                  |    1 -
 tools/python/xen/xend/arch.py                      |   31 -
 tools/python/xen/xend/balloon.py                   |  244 --
 tools/python/xen/xend/encode.py                    |  180 -
 tools/python/xen/xend/image.py                     | 1047 -----
 tools/python/xen/xend/osdep.py                     |  268 --
 tools/python/xen/xend/server/BlktapController.py   |  313 --
 tools/python/xen/xend/server/ConsoleController.py  |   38 -
 tools/python/xen/xend/server/DevConstants.py       |   49 -
 tools/python/xen/xend/server/DevController.py      |  677 ---
 tools/python/xen/xend/server/SSLXMLRPCServer.py    |  103 -
 tools/python/xen/xend/server/SrvDaemon.py          |  420 --
 tools/python/xen/xend/server/SrvDmesg.py           |   52 -
 tools/python/xen/xend/server/SrvDomain.py          |  329 --
 tools/python/xen/xend/server/SrvDomainDir.py       |  222 -
 tools/python/xen/xend/server/SrvNode.py            |   64 -
 tools/python/xen/xend/server/SrvRoot.py            |   43 -
 tools/python/xen/xend/server/SrvServer.py          |  261 --
 tools/python/xen/xend/server/SrvVnetDir.py         |  128 -
 tools/python/xen/xend/server/SrvXendLog.py         |   37 -
 tools/python/xen/xend/server/XMLRPCServer.py       |  273 --
 tools/python/xen/xend/server/__init__.py           |    1 -
 tools/python/xen/xend/server/blkif.py              |  221 -
 tools/python/xen/xend/server/iopif.py              |  102 -
 tools/python/xen/xend/server/irqif.py              |   95 -
 tools/python/xen/xend/server/netif.py              |  218 -
 tools/python/xen/xend/server/netif2.py             |  163 -
 tools/python/xen/xend/server/params.py             |   46 -
 tools/python/xen/xend/server/pciif.py              |  596 ---
 tools/python/xen/xend/server/pciquirk.py           |  149 -
 tools/python/xen/xend/server/relocate.py           |  173 -
 tools/python/xen/xend/server/tests/__init__.py     |    1 -
 .../xen/xend/server/tests/test_controllers.py      |   81 -
 tools/python/xen/xend/server/udevevent.py          |   92 -
 tools/python/xen/xend/server/vfbif.py              |   91 -
 tools/python/xen/xend/server/vscsiif.py            |  246 --
 tools/python/xen/xend/server/vusbif.py             |  126 -
 tools/python/xen/xend/sxp.py                       |  765 ----
 tools/python/xen/xend/tests/__init__.py            |    1 -
 tools/python/xen/xend/tests/test_XendConfig.py     |   42 -
 tools/python/xen/xend/tests/test_sxp.py            |   39 -
 tools/python/xen/xend/tests/test_uuid.py           |   30 -
 tools/python/xen/xend/tests/xend-config.sxp        |  131 -
 tools/python/xen/xend/uuid.py                      |   69 -
 tools/python/xen/xend/xend                         |  110 -
 tools/python/xen/xend/xenstore/__init__.py         |   16 -
 tools/python/xen/xend/xenstore/tests/__init__.py   |    2 -
 tools/python/xen/xend/xenstore/tests/stress_xs.py  |  121 -
 tools/python/xen/xend/xenstore/xstransact.py       |  368 --
 tools/python/xen/xend/xenstore/xsutil.py           |   32 -
 tools/python/xen/xend/xenstore/xswatch.py          |   80 -
 tools/python/xen/xm/XenAPI.py                      |  206 -
 tools/python/xen/xm/addlabel.py                    |  274 --
 tools/python/xen/xm/console.py                     |   88 -
 tools/python/xen/xm/cpupool-create.py              |   51 -
 tools/python/xen/xm/cpupool-new.py                 |   50 -
 tools/python/xen/xm/cpupool.py                     |  236 --
 tools/python/xen/xm/create.dtd                     |  154 -
 tools/python/xen/xm/create.py                      | 1529 -------
 tools/python/xen/xm/dry-run.py                     |  161 -
 tools/python/xen/xm/dumppolicy.py                  |   69 -
 tools/python/xen/xm/getenforce.py                  |   66 -
 tools/python/xen/xm/getlabel.py                    |  157 -
 tools/python/xen/xm/getpolicy.py                   |  135 -
 tools/python/xen/xm/help.py                        |  100 -
 tools/python/xen/xm/labels.py                      |   89 -
 tools/python/xen/xm/main.py                        | 4030 ------------------
 tools/python/xen/xm/migrate.py                     |   87 -
 tools/python/xen/xm/new.py                         |   79 -
 tools/python/xen/xm/opts.py                        |  627 ---
 tools/python/xen/xm/resetpolicy.py                 |  106 -
 tools/python/xen/xm/resources.py                   |   65 -
 tools/python/xen/xm/rmlabel.py                     |  216 -
 tools/python/xen/xm/setenforce.py                  |   74 -
 tools/python/xen/xm/setpolicy.py                   |  181 -
 tools/python/xen/xm/shutdown.py                    |  164 -
 tools/python/xen/xm/tests/__init__.py              |    2 -
 tools/python/xen/xm/tests/test_create.py           |  206 -
 tools/python/xen/xm/xenapi_create.py               | 1129 -----
 tools/python/xen/xm/xm                             |   20 -
 tools/xcutils/Makefile                             |   10 +-
 tools/xcutils/xc_restore.c                         |   73 -
 tools/xcutils/xc_save.c                            |  227 -
 tools/xm-test/COPYING                              |  340 --
 tools/xm-test/ChangeLog                            |   11 -
 tools/xm-test/Makefile.am                          |   18 -
 tools/xm-test/README                               |  310 --
 tools/xm-test/TODO                                 |    3 -
 tools/xm-test/Writing_Tests_HOWTO                  |  136 -
 tools/xm-test/autogen                              |    9 -
 tools/xm-test/configure.ac                         |  155 -
 tools/xm-test/grouptest/cpupool                    |    1 -
 tools/xm-test/grouptest/create                     |    1 -
 tools/xm-test/grouptest/default                    |   30 -
 tools/xm-test/grouptest/medium                     |   24 -
 tools/xm-test/grouptest/quick                      |    4 -
 tools/xm-test/grouptest/xapi                       |    1 -
 tools/xm-test/lib/XmTestLib/Console.py             |  302 --
 tools/xm-test/lib/XmTestLib/DomainTracking.py      |   61 -
 tools/xm-test/lib/XmTestLib/NetConfig.py           |  268 --
 tools/xm-test/lib/XmTestLib/Test.py                |  203 -
 tools/xm-test/lib/XmTestLib/XenAPIDomain.py        |  183 -
 tools/xm-test/lib/XmTestLib/XenDevice.py           |  275 --
 tools/xm-test/lib/XmTestLib/XenDomain.py           |  385 --
 tools/xm-test/lib/XmTestLib/XenMemory.py           |   68 -
 tools/xm-test/lib/XmTestLib/Xm.py                  |  245 --
 tools/xm-test/lib/XmTestLib/__init__.py            |   27 -
 tools/xm-test/lib/XmTestLib/arch.py                |  118 -
 tools/xm-test/lib/XmTestLib/block_utils.py         |   53 -
 tools/xm-test/lib/XmTestLib/config.py.in           |    7 -
 tools/xm-test/lib/XmTestLib/network_utils.py       |   60 -
 tools/xm-test/lib/XmTestLib/xapi.py                |   54 -
 tools/xm-test/lib/XmTestReport/OSReport.py         |  248 --
 tools/xm-test/lib/XmTestReport/ProgReport.py       |  119 -
 tools/xm-test/lib/XmTestReport/Report.py           |  156 -
 tools/xm-test/lib/XmTestReport/ResultReport.py     |  157 -
 tools/xm-test/lib/XmTestReport/arch.py             |   42 -
 tools/xm-test/lib/XmTestReport/utils.py            |   31 -
 tools/xm-test/lib/XmTestReport/xmtest.py.in        |   15 -
 tools/xm-test/mergereport                          |   25 -
 tools/xm-test/mkreport                             |   71 -
 tools/xm-test/ramdisk/Makefile.am                  |  126 -
 .../ramdisk/README-XenSource-initrd-0.7-img        |   42 -
 .../ramdisk/README-XenSource-initrd-0.8-img        |   42 -
 .../ramdisk/README-XenSource-initrd-1.0-img        |   46 -
 .../ramdisk/README-XenSource-initrd-1.1-img        |   45 -
 tools/xm-test/ramdisk/bin/create_disk_image        |  384 --
 tools/xm-test/ramdisk/configs/buildroot-i386       |  346 --
 tools/xm-test/ramdisk/configs/busybox              |  465 --
 tools/xm-test/ramdisk/configs/uClibc               |  172 -
 tools/xm-test/ramdisk/make-release.sh              |   44 -
 .../patches/buildroot/add_xvd_devices.patch        |   13 -
 .../xm-test/ramdisk/patches/buildroot/hping.patch  |   67 -
 tools/xm-test/ramdisk/skel/.profile                |    3 -
 tools/xm-test/ramdisk/skel/etc/init.d/rcS          |   19 -
 tools/xm-test/ramdisk/skel/etc/inittab             |    5 -
 tools/xm-test/ramdisk/skel/root/.profile           |    3 -
 tools/xm-test/runtest.sh                           |  337 --
 tools/xm-test/tests/Makefile.am                    |   43 -
 tools/xm-test/tests/Makefile.am.template           |   21 -
 tools/xm-test/tests/_sanity/01_domu_proc.py        |   32 -
 tools/xm-test/tests/_sanity/Makefile.am            |   21 -
 .../block-create/01_block_attach_device_pos.py     |   49 -
 .../02_block_attach_file_device_pos.py             |   49 -
 .../04_block_attach_device_repeatedly_pos.py       |   46 -
 ...ock_attach_and_dettach_device_repeatedly_pos.py |   49 -
 .../block-create/06_block_attach_baddomain_neg.py  |   18 -
 .../block-create/07_block_attach_baddevice_neg.py  |   53 -
 .../08_block_attach_bad_filedevice_neg.py          |   52 -
 ...ock_attach_and_dettach_device_check_data_pos.py |   66 -
 .../10_block_attach_dettach_multiple_devices.py    |  100 -
 .../block-create/11_block_attach_shared_dom0.py    |   38 -
 .../block-create/12_block_attach_shared_domU.py    |   30 -
 tools/xm-test/tests/block-create/Makefile.am       |   29 -
 .../block-destroy/01_block-destroy_btblock_pos.py  |   44 -
 .../block-destroy/02_block-destroy_rtblock_pos.py  |   41 -
 .../block-destroy/03_block-destroy_nonexist_neg.py |   17 -
 .../04_block-destroy_nonattached_neg.py            |   33 -
 .../block-destroy/05_block-destroy_byname_pos.py   |   43 -
 .../06_block-destroy_check_list_pos.py             |   42 -
 tools/xm-test/tests/block-destroy/Makefile.am      |   26 -
 .../block-integrity/01_block_device_read_verify.py |   62 -
 .../02_block_device_write_verify.py                |   63 -
 tools/xm-test/tests/block-integrity/Makefile.am    |   22 -
 .../xm-test/tests/block-list/01_block-list_pos.py  |   42 -
 .../tests/block-list/02_block-list_attachbd_pos.py |   46 -
 .../block-list/03_block-list_anotherbd_pos.py      |   54 -
 .../tests/block-list/04_block-list_nodb_pos.py     |   28 -
 .../tests/block-list/05_block-list_nonexist_neg.py |   18 -
 .../block-list/06_block-list_checkremove_pos.py    |   61 -
 tools/xm-test/tests/block-list/Makefile.am         |   26 -
 .../xm-test/tests/console/01_console_badopt_neg.py |   21 -
 .../xm-test/tests/console/02_console_baddom_neg.py |   27 -
 tools/xm-test/tests/console/Makefile.am            |   22 -
 .../xm-test/tests/cpupool/01_cpupool_basic_pos.py  |   72 -
 .../xm-test/tests/cpupool/02_cpupool_manage_pos.py |  152 -
 tools/xm-test/tests/cpupool/03_cpupool_domain.py   |  126 -
 tools/xm-test/tests/cpupool/04_cpupool_migrate.py  |   84 -
 tools/xm-test/tests/cpupool/Makefile.am            |   22 -
 tools/xm-test/tests/cpupool/pool1.cfg              |    1 -
 tools/xm-test/tests/cpupool/pools.py               |   78 -
 tools/xm-test/tests/create/01_create_basic_pos.py  |   49 -
 tools/xm-test/tests/create/02_create_noparm_neg.py |   17 -
 .../xm-test/tests/create/03_create_badparm_neg.py  |   19 -
 .../tests/create/04_create_conflictname_neg.py     |   41 -
 tools/xm-test/tests/create/06_create_mem_neg.py    |   53 -
 tools/xm-test/tests/create/07_create_mem64_pos.py  |   49 -
 tools/xm-test/tests/create/08_create_mem128_pos.py |   49 -
 tools/xm-test/tests/create/09_create_mem256_pos.py |   49 -
 .../xm-test/tests/create/10_create_fastdestroy.py  |   43 -
 .../tests/create/11_create_concurrent_pos.py       |   78 -
 .../create/12_create_concurrent_stress_pos.py      |   59 -
 .../xm-test/tests/create/13_create_multinic_pos.py |   27 -
 .../tests/create/14_create_blockroot_pos.py        |   44 -
 .../xm-test/tests/create/15_create_smallmem_pos.py |   27 -
 .../xm-test/tests/create/16_create_smallmem_neg.py |   30 -
 tools/xm-test/tests/create/Makefile.am             |   33 -
 .../xm-test/tests/destroy/01_destroy_basic_pos.py  |   40 -
 .../xm-test/tests/destroy/02_destroy_noparm_neg.py |   16 -
 .../tests/destroy/03_destroy_nonexist_neg.py       |   16 -
 .../tests/destroy/04_destroy_badparm_neg.py        |   16 -
 tools/xm-test/tests/destroy/05_destroy_byid_pos.py |   33 -
 tools/xm-test/tests/destroy/06_destroy_dom0_neg.py |   14 -
 .../xm-test/tests/destroy/07_destroy_stale_pos.py  |  133 -
 tools/xm-test/tests/destroy/Makefile.am            |   27 -
 tools/xm-test/tests/dmesg/01_dmesg_basic_pos.py    |   15 -
 tools/xm-test/tests/dmesg/02_dmesg_basic_neg.py    |   17 -
 tools/xm-test/tests/dmesg/Makefile.am              |   21 -
 tools/xm-test/tests/domid/01_domid_basic_pos.py    |   16 -
 tools/xm-test/tests/domid/02_domid_basic_neg.py    |   15 -
 tools/xm-test/tests/domid/Makefile.am              |   21 -
 .../xm-test/tests/domname/01_domname_basic_pos.py  |   17 -
 .../xm-test/tests/domname/02_domname_basic_neg.py  |   15 -
 tools/xm-test/tests/domname/Makefile.am            |   21 -
 .../01_enforce_dom0_cpus_basic_pos.py              |  126 -
 tools/xm-test/tests/enforce_dom0_cpus/Makefile.am  |   21 -
 tools/xm-test/tests/help/01_help_basic_pos.py      |   14 -
 tools/xm-test/tests/help/02_help_basic_neg.py      |   14 -
 tools/xm-test/tests/help/03_help_badparm_neg.py    |   14 -
 tools/xm-test/tests/help/04_help_long_pos.py       |   16 -
 tools/xm-test/tests/help/05_help_nonroot_pos.py    |   17 -
 tools/xm-test/tests/help/06_help_allcmds.py        |   44 -
 tools/xm-test/tests/help/Makefile.am               |   26 -
 tools/xm-test/tests/info/01_info_basic_pos.py      |   11 -
 .../xm-test/tests/info/02_info_compiledata_pos.py  |   42 -
 tools/xm-test/tests/info/Makefile.am               |   22 -
 tools/xm-test/tests/list/01_list_basic_pos.py      |   14 -
 tools/xm-test/tests/list/02_list_badparm_neg.py    |   16 -
 tools/xm-test/tests/list/03_list_nonexist_neg.py   |   17 -
 tools/xm-test/tests/list/04_list_goodparm_pos.py   |   28 -
 tools/xm-test/tests/list/05_list_long_pos.py       |   22 -
 tools/xm-test/tests/list/06_list_nonroot.py        |   15 -
 tools/xm-test/tests/list/Makefile.am               |   27 -
 .../xm-test/tests/memmax/01_memmax_badparm_neg.py  |   29 -
 tools/xm-test/tests/memmax/Makefile.am             |   21 -
 tools/xm-test/tests/memset/01_memset_basic_pos.py  |   82 -
 .../xm-test/tests/memset/02_memset_badparm_neg.py  |   56 -
 tools/xm-test/tests/memset/03_memset_random_pos.py |   64 -
 .../xm-test/tests/memset/04_memset_smallmem_pos.py |   55 -
 tools/xm-test/tests/memset/Makefile.am             |   24 -
 .../tests/migrate/01_migrate_localhost_pos.py      |   86 -
 tools/xm-test/tests/migrate/Makefile.am            |   20 -
 .../tests/network-attach/01_network_attach_pos.py  |   43 -
 .../network-attach/02_network_attach_detach_pos.py |   49 -
 .../03_network_attach_detach_multiple_pos.py       |   51 -
 .../04_network_attach_baddomain_neg.py             |   15 -
 tools/xm-test/tests/network-attach/Makefile.am     |   24 -
 .../tests/network/02_network_local_ping_pos.py     |   71 -
 .../tests/network/03_network_local_tcp_pos.py      |   75 -
 .../tests/network/04_network_local_udp_pos.py      |   76 -
 .../tests/network/05_network_dom0_ping_pos.py      |   54 -
 .../tests/network/06_network_dom0_tcp_pos.py       |   57 -
 .../tests/network/07_network_dom0_udp_pos.py       |   56 -
 .../tests/network/11_network_domU_ping_pos.py      |   62 -
 .../tests/network/12_network_domU_tcp_pos.py       |   64 -
 .../tests/network/13_network_domU_udp_pos.py       |   76 -
 tools/xm-test/tests/network/Makefile.am            |   34 -
 tools/xm-test/tests/pause/01_pause_basic_pos.py    |   63 -
 tools/xm-test/tests/pause/02_pause_badopt_neg.py   |   32 -
 tools/xm-test/tests/pause/03_pause_badname_neg.py  |   18 -
 tools/xm-test/tests/pause/04_pause_badid_neg.py    |   18 -
 tools/xm-test/tests/pause/Makefile.am              |   22 -
 tools/xm-test/tests/reboot/01_reboot_basic_pos.py  |   52 -
 tools/xm-test/tests/reboot/02_reboot_badopt_neg.py |   32 -
 .../xm-test/tests/reboot/03_reboot_badname_neg.py  |   18 -
 tools/xm-test/tests/reboot/Makefile.am             |   23 -
 .../xm-test/tests/restore/01_restore_basic_pos.py  |   82 -
 .../tests/restore/02_restore_badparm_neg.py        |   28 -
 .../tests/restore/03_restore_badfilename_neg.py    |   28 -
 .../tests/restore/04_restore_withdevices_pos.py    |  130 -
 tools/xm-test/tests/restore/Makefile.am            |   24 -
 tools/xm-test/tests/save/01_save_basic_pos.py      |   37 -
 tools/xm-test/tests/save/02_save_badparm_neg.py    |   28 -
 tools/xm-test/tests/save/03_save_bogusfile_neg.py  |   39 -
 tools/xm-test/tests/save/Makefile.am               |   24 -
 .../sched-credit/01_sched_credit_weight_cap_pos.py |   72 -
 tools/xm-test/tests/sched-credit/Makefile.am       |   20 -
 .../xm-test/tests/sedf/01_sedf_period_slice_pos.py |   62 -
 .../xm-test/tests/sedf/02_sedf_period_lower_neg.py |   44 -
 .../xm-test/tests/sedf/03_sedf_slice_lower_neg.py  |   40 -
 .../xm-test/tests/sedf/04_sedf_slice_upper_neg.py  |   48 -
 tools/xm-test/tests/sedf/05_sedf_extratime_pos.py  |   63 -
 .../tests/sedf/06_sedf_extratime_disable_neg.py    |   71 -
 tools/xm-test/tests/sedf/Makefile.am               |   25 -
 .../tests/shutdown/01_shutdown_basic_pos.py        |   54 -
 .../tests/shutdown/02_shutdown_badparm_neg.py      |   39 -
 .../tests/shutdown/03_shutdown_nonexist_neg.py     |   22 -
 tools/xm-test/tests/shutdown/Makefile.am           |   21 -
 tools/xm-test/tests/sysrq/01_sysrq_basic_neg.py    |   20 -
 tools/xm-test/tests/sysrq/02_sysrq_sync_pos.py     |   52 -
 .../xm-test/tests/sysrq/03_sysrq_withreboot_pos.py |   40 -
 tools/xm-test/tests/sysrq/Makefile.am              |   23 -
 .../xm-test/tests/unpause/01_unpause_basic_pos.py  |   76 -
 tools/xm-test/tests/unpause/Makefile.am            |   20 -
 .../vcpu-disable/01_vcpu-disable_basic_pos.py      |   82 -
 tools/xm-test/tests/vcpu-disable/Makefile.am       |   21 -
 .../tests/vcpu-pin/01_vcpu-pin_basic_pos.py        |   50 -
 tools/xm-test/tests/vcpu-pin/Makefile.am           |   21 -
 tools/xm-test/tests/xapi/01_xapi-vm_basic.py       |   61 -
 tools/xm-test/tests/xapi/02_xapi-vbd_basic.py      |  122 -
 tools/xm-test/tests/xapi/03_xapi-network_pos.py    |  123 -
 .../tests/xapi/04_xapi-data_uri_handling.py        |   65 -
 tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py |  157 -
 tools/xm-test/tests/xapi/Makefile.am               |   23 -
 501 files changed, 7 insertions(+), 83858 deletions(-)

diff --git a/.gitignore b/.gitignore
index eb210ca..af1d826 100644
--- a/.gitignore
+++ b/.gitignore
@@ -245,8 +245,6 @@ tools/vtpm/tpm_emulator/*
 tools/vtpm/vtpm/*
 tools/vtpm_manager/manager/vtpm_managerd
 tools/xcutils/lsevtchn
-tools/xcutils/xc_restore
-tools/xcutils/xc_save
 tools/xcutils/readnotes
 tools/xenfb/sdlfb
 tools/xenfb/vncfb
@@ -279,18 +277,6 @@ tools/xentrace/xentrace_setsize
 tools/xentrace/tbctl
 tools/xentrace/xenctx
 tools/xentrace/xentrace
-tools/xm-test/ramdisk/buildroot
-tools/xm-test/aclocal.m4
-tools/xm-test/autom4te
-tools/xm-test/install-sh
-tools/xm-test/mkinstalldirs
-tools/xm-test/missing
-tools/xm-test/config(ure|.log|.status|.guess|.sub)
-tools/xm-test/Makefile(.in)*
-tools/xm-test/*/Makefile(.in)*
-tools/xm-test/lib/XmTestLib/config.py
-tools/xm-test/lib/XmTestReport/xmtest.py
-tools/xm-test/tests/*.test
 tools/ocaml-xenstored*
 xen/.banner
 xen/System.map
diff --git a/.hgignore b/.hgignore
index 9c9421e..6d09b09 100644
--- a/.hgignore
+++ b/.hgignore
@@ -278,18 +278,6 @@
 ^tools/xentrace/tbctl$
 ^tools/xentrace/xenctx$
 ^tools/xentrace/xentrace$
-^tools/xm-test/ramdisk/buildroot
-^tools/xm-test/aclocal.m4$
-^tools/xm-test/autom4te
-^tools/xm-test/install-sh$
-^tools/xm-test/mkinstalldirs$
-^tools/xm-test/missing$
-^tools/xm-test/config(ure|.log|.status|.guess|.sub)$
-^tools/xm-test/Makefile(.in)*$
-^tools/xm-test/.*/Makefile(.in)*$
-^tools/xm-test/lib/XmTestLib/config.py$
-^tools/xm-test/lib/XmTestReport/xmtest.py$
-^tools/xm-test/tests/.*\.test$
 ^tools/firmware/ovmf-remote
 ^tools/firmware/ovmf$
 ^tools/qemu-xen-traditional-dir-remote
diff --git a/MAINTAINERS b/MAINTAINERS
index 3f8810b..19dd49f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -255,8 +255,6 @@ REMUS
 M:	Shriram Rajagopalan <rshriram@cs.ubc.ca>
 S:	Maintained
 F:	tools/remus/
-F:	tools/python/xen/remus/
-F:	tools/python/xen/lowlevel/checkpoint/
 F:	tools/blktap2/drivers/block-remus.c
 F:	tools/blktap2/drivers/hashtable*
 
diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index d9d3239..85379b2 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -54,7 +54,6 @@ CONFIG_ROMBIOS      := @rombios@
 CONFIG_SEABIOS      := @seabios@
 CONFIG_QEMU_TRAD    := @qemu_traditional@
 CONFIG_QEMU_XEN     := @qemu_xen@
-CONFIG_XEND         := @xend@
 CONFIG_BLKTAP1      := @blktap1@
 
 #System options
diff --git a/docs/man/xend-config.sxp.pod.5 b/docs/man/xend-config.sxp.pod.5
deleted file mode 100644
index 9504c71..0000000
--- a/docs/man/xend-config.sxp.pod.5
+++ /dev/null
@@ -1,158 +0,0 @@
-=head1 NAME
-
-xend-config.sxp - Xen daemon configuration file
-
-=head1 SYNOPSIS
-
-/etc/xen/xend-config.sxp
-
-=head1 DESCRIPTION
-
-The xend(1) program requires xend-config.sxp to specify operating
-parameters which determine the behavior of the daemon at runtime.
-
-The parameters are specified in S-expression format.  See the example
-configuration file in I</etc/xen/xend-config.sxp> for details.
-
-=head1 OPTIONS
-
-The following lists the daemon configuration parameters:
-
-=over 4
-
-=item I<logfile>
-
-The location of the file to record runtime log messages.  Defaults to
-I</var/log/xen/xend.log>.
-
-=item I<loglevel>
-
-Filters out messages below the specified level.  Possible values are
-DEBUG, INFO, WARNING, ERROR, CRITICAL.  Defaults to I<DEBUG>.
-
-=item I<xend-http-server>
-
-A boolean value that tells xend whether or not to start the http
-stream socket management server.  Defaults to I<no>.
-
-=item I<xend-unix-server>
-
-A boolean value that tells xend whether or not to start the unix
-domain socket management server.  This is required for the CLI tools
-to operate.  Defaults to I<yes>.
-
-=item I<xend-relocation-server>
-
-A boolean value that tells xend whether or not to start the relocation
-server.  This is required for cross-machine migrations.  Defaults to
-I<no>.
-
-=item I<xend-unix-path>
-
-The location of the unix domain socket the xend-unix-server will use
-to communicate with the management tools.  Defaults to
-I</var/lib/xend/xend-socket>.
-
-=item I<xend-port>
-
-The port that will be used by the http management server.  Defaults to
-I<8000>.
-
-=item I<xend-relocation-port>
-
-The port that will be used by the relocation server.  Defaults to
-I<8002>.
-
-=item I<xend-address> 
-
-The address to which the http management server will bind.  Defaults
-to I<''> which means "all interfaces".
-
-=item I<xend-relocation-address>
-
-The address to which the relocation server will bind.  Defaults to
-I<''> which means "all interfaces".
-
-=item I<console-limit>
-
-The kilobyte buffer limit that will be enforced by the console server.
-This limit is set per-domain, and is needed to prevent a single domain
-from overwhelming the console server with massive amounts of data.
-Defaults to I<1024>.
-
-=item I<network-script>
-
-The name of the script in I</etc/xen/scripts> that will be run to
-setup the networking environment.  This can be any name, but in
-general is either I<network-bridge> or I<network-route>.
-
-=item I<vif-script>
-
-The name of the script in I</etc/xen/scripts> that will be run to
-setup a virtual interface when it is created or destroyed.  This needs
-to (in general) work in unison with the I<network-script>.
-
-=item I<dom0-min-mem>
-
-This specifies the minimum number of megabytes that will be reserved
-for Domain0.  If this value is positive, Domain0 will be automatically
-ballooned down to this limit to make space for new domains.  If this
-is set to 0, Domain0 will not be automatically ballooned.
-
-=item I<dom0-cpus>
-
-This specifies the number of CPUs that Domain0 will be allowed to use.
-If the value is 0, all available CPUs will be used by Domain0.
-
-=item I<enable-dump>
-
-A boolean value that tells xend whether or not core dumps of guest
-domains should be saved when a crash occurs.  Defaults to I<no>.
-
-=item I<external-migration-tool>
-
-The name of an application or script that can handle external device
-migration, such as for example virtual TPM migration. An example
-script is I</etc/xen/scripts/external-device-migrate>.
-
-=item I<device-create-timeout>
-
-Integer value that tells xend how long it should wait for a new device
-to be created. Defaults to I<100>.
-
-=item I<device-destroy-timeout>
-
-Integer value that tells xend how long it should wait for a device to
-be destroyed. Defaults to I<100>.
-
-=back
-
-=head1 EXAMPLES
-
-An example configuration with relocation enabled for the local network:
-
-=over 4
-
- (xend-relocation-server yes)
- (xend-relocation-address 192.0.2.192)
- (network-script network-bridge)
- (vif-script vif-bridge)
- (dom0-min-mem 0)
- (dom0-cpus 0)
-
-=back
-
-=head1 CAVEATS
-
-Note that relocation is currently unsecured and is very dangerous if
-left enabled.  No authentication is performed, and very little sanity
-checking takes place.  Enable at your own risk.
-
-=head1 SEE ALSO
-
-B<xend>(1)
-
-=head1 AUTHOR
-
-Dan Smith <danms@us.ibm.com>
-
diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1
index f7ceaa8..dae0718 100644
--- a/docs/man/xl.pod.1
+++ b/docs/man/xl.pod.1
@@ -12,7 +12,6 @@ The B<xl> program is the new tool for managing Xen guest
 domains. The program can be used to create, pause, and shutdown
 domains. It can also be used to list current domains, enable or pin
 VCPUs, and attach or detach virtual block devices.
-The old B<xm> tool is deprecated and should not be used.
 
 The basic structure of every B<xl> command is almost always:
 
diff --git a/docs/man/xm.pod.1 b/docs/man/xm.pod.1
deleted file mode 100644
index 973de95..0000000
--- a/docs/man/xm.pod.1
+++ /dev/null
@@ -1,1004 +0,0 @@
-=head1 NAME
-
-xm - Obsolete xen management user interface
-
-=head1 SYNOPSIS
-
-B<xm> I<subcommand> [I<args>]
-
-=head1 DESCRIPTION
-
-This program is now superseded by B<xl>, which should be largely
-backwards-compatible with B<xm>.
-
-The B<xm> program is the main interface for managing Xen guest domains
-when the obsolete Xend toolstack is in use. The program can be used to
-create, pause, and shutdown domains. It can also be used to list
-current domains, enable or pin VCPUs, and attach or detach virtual
-block devices.
-
-The basic structure of every B<xm> command is almost always:
-
-=over 2
-
-B<xm> I<subcommand> I<domain-id> [I<OPTIONS>]
-
-=back
-
-Where I<subcommand> is one of the subcommands listed below, I<domain-id>
-is the numeric domain id, or the domain name (which will be internally
-translated to domain id), and I<OPTIONS> are subcommand specific
-options.  There are a few exceptions to this rule in the cases where
-the subcommand in question acts on all domains, the entire machine,
-or directly on the Xen hypervisor.  Those exceptions will be clear for
-each of those subcommands.
-
-=head1 NOTES
-
-All B<xm> operations rely upon the Xen control daemon, aka B<xend>.
-For any B<xm> commands to run, xend must also be running.  For this
-reason you should start xend as a service when your system first boots
-using Xen.
-
-Most B<xm> commands require root privileges to run due to the
-communications channels used to talk to the hypervisor.  Running as
-non root will return an error.
-
-Most B<xm> commands act synchronously, except maybe create, shutdown,
-mem-set and vcpu-set. The fact that the B<xm> command returned doesn't
-necessarily mean that the action is complete and you must poll through
-xm list periodically to detect that the operation completed.
-
-=head1 DOMAIN SUBCOMMANDS
-
-The following subcommands manipulate domains directly.  As stated
-previously, most commands take I<domain-id> as the first parameter.
-
-=over 4
-
-=item B<console> I<domain-id>
-
-Attach to domain I<domain-id>'s console.  If you've set up your domains to
-have a traditional log in console this will look much like a normal
-text log in screen.
-
-This uses the back end xenconsole service which currently only
-works for para-virtual domains.  
-
-The attached console will perform much like a standard serial console,
-so running curses based interfaces over the console B<is not
-advised>.  Vi tends to get very odd when using it over this interface.
-
-Use the key combination Ctrl+] to detach the domain console.
-
-=item B<create> I<configfile> [I<OPTIONS>] [I<vars>]..
-
-The create subcommand requires a config file and can optionally take a
-series of I<vars> that add to or override variables defined
-in the config file.  See L<xmdomain.cfg> for full details of that file
-format, and possible options used in either the configfile or for I<vars>.
-
-I<configfile> can either be an absolute path to a file, or a relative
-path to a file located in /etc/xen.
-
-Create will return B<as soon> as the domain is started.  This B<does
-not> mean the guest OS in the domain has actually booted, or is
-available for input.
-
-B<OPTIONS>
-
-=over 4 
-
-=item B<--help_config>
-
-Print the available configuration variables I<vars>.  These variables may be
-used on the command line or in the configuration file I<configfile>.
-
-=item B<-q>, B<--quiet>
-
-No console output.
-
-=item B<--path>
-
-Search path for configuration scripts. The value of PATH is a 
-colon-separated directory list.
-
-=item B<-f=FILE>, B<--defconfig=FILE>
-
-Use the given Python configuration script. The configuration 
-script is loaded after arguments have been processed. Each 
-command-line option sets a configuration variable named after 
-its long option name, and these variables are placed in the
-environment of the script before it is loaded. Variables 
-for options that may be repeated have list values. Other 
-variables can be set using name=value on the command line. 
-After the script is loaded, option values that were not set 
-on the command line are replaced by the values set in the script.
-
-=item B<-F=FILE>, B<--config=FILE>
-
-Use the given SXP formatted configuration script.
-SXP is the underlying configuration format used by Xen.
-SXP configuration scripts can be hand-written or generated
-from Python configuration scripts, using the -n
-(dryrun) option to print the configuration.  An SXP formatted
-configuration file may also be generated for a given I<domain-id> by 
-redirecting the output from the the B<xm list --long I<domain-id>> 
-to a file.
-
-=item B<-n>, B<--dryrun>
-
-Dry run - prints the resulting configuration in SXP
-but does not create the domain.
-
-=item B<-x>, B<--xmldryrun>
-
-XML dry run - prints the resulting configuration in
-XML but does not create the domain.
-
-=item B<-s>, B<--skipdtd>
-
-Skip DTD checking - skips checks on XML before
-creating. Experimental. Can decrease create time.
-
-=item B<-p>, B<--paused>
-
-Leave the domain paused after it is created.
-
-=item B<-c>, B<--console_autoconnect>
-
-Attach console to the domain as soon as it has started.  This is
-useful for determining issues with crashing domains.
-
-=back
-
-B<EXAMPLES>
-
-=over 4
-
-=item I<with config file>
-
-  xm create Fedora4
-
-This creates a domain with the file /etc/xen/Fedora4, and returns as
-soon as it is run.
-
-=item I<without config file>
- 
-  xm create /dev/null ramdisk=initrd.img \
-     kernel=/boot/vmlinuz-2.6.12.6-xenU \
-     name=ramdisk vif='' vcpus=1 \
-     memory=64 root=/dev/ram0
-
-This creates the domain without using a config file (more specifically
-using /dev/null as an empty config file), kernel and ramdisk as
-specified, setting the name of the domain to "ramdisk", also disabling
-virtual networking.  (This example comes from the xm-test test suite.)
-
-=back
-
-=item B<delete>
-
-Remove a domain from Xend domain management. The B<xm list> command
-shows the domain names.
-
-=item B<destroy> I<domain-id>
-
-Immediately terminate the domain I<domain-id>.  This doesn't give the
-domain OS any chance to react, and is the equivalent of ripping the
-power cord out on a physical machine.  In most cases you will want to
-use the B<shutdown> command instead.
-
-=item B<domid> I<domain-name>
-
-Converts a domain name to a domain id using xend's internal mapping.
-
-=item B<domname> I<domain-id>
-
-Converts a domain id to a domain name using xend's internal mapping.
-
-=item B<dump-core> [I<OPTIONS>] I<domain-id> [I<filename>]
-
-Dumps the virtual machine's memory for the specified domain to the
-I<filename> specified.  The dump file will be written to a distribution
-specific directory for dump files.  Such as: /var/lib/xen/dump or 
-/var/xen/dump  Defaults to dumping the core without pausing the domain
-if no I<OPTIONS> are specified.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-L>, B<--live>
-
-Dump core without pausing the domain.
-
-=item B<-C>, B<--crash>
-
-Crash domain after dumping core.
-
-=back
-
-=item B<help> [B<--long>]
-
-Displays the short help message (i.e. common commands).
-
-The B<--long> option prints out the complete set of B<xm> subcommands,
-grouped by function.
-
-=item B<list> [I<OPTIONS>] [I<domain-id> ...]
-
-Prints information about one or more domains.  If no domains are
-specified it prints out information about all domains.
-
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-l>, B<--long>
-
-The output for B<xm list> is not the table view shown below, but 
-instead presents the data in SXP format.
-
-=item B<--label>
-
-Security labels are added to the output of xm list and the lines 
-are sorted by the labels (ignoring case). 
-See the ACCESS CONTROL SUBCOMMAND section of this man page for more 
-information about labels.
-
-=item B<--state=<state>>
-
-Output information for VMs in the specified state.
-
-=back
-
-B<EXAMPLE>
-
-An example format for the list is as follows:
-
-    Name                         ID Mem(MiB) VCPUs State  Time(s)
-    Domain-0                      0       98     1 r-----  5068.6
-    Fedora3                     164      128     1 r-----     7.6
-    Fedora4                     165      128     1 ------     0.6
-    Mandrake2006                166      128     1 -b----     3.6
-    Mandrake10.2                167      128     1 ------     2.5
-    Suse9.2                     168      100     1 ------     1.8
-
-Name is the name of the domain.  ID the numeric domain id.  Mem is the
-desired amount of memory to allocate to the domain (although it may
-not be the currently allocated amount).  VCPUs is the number of
-virtual CPUs allocated to the domain.  State is the run state (see
-below).  Time is the total run time of the domain as accounted for by
-Xen.
-
-B<STATES>
-
-The State field lists 6 states for a Xen domain, and which ones the
-current domain is in.
-
-=over 4
-
-=item B<r - running>
-
-The domain is currently running on a CPU.
-
-=item B<b - blocked>
-
-The domain is blocked, and not running or runnable.  This can be caused
-because the domain is waiting on IO (a traditional wait state) or has
-gone to sleep because there was nothing else for it to do.
-
-=item B<p - paused>
-
-The domain has been paused, usually occurring through the administrator
-running B<xm pause>.  When in a paused state the domain will still
-consume allocated resources like memory, but will not be eligible for
-scheduling by the Xen hypervisor.
-
-=item B<s - shutdown>
-
-FIXME: Why would you ever see this state?
-
-=item B<c - crashed>
-
-The domain has crashed, which is always a violent ending.  Usually
-this state can only occur if the domain has been configured not to
-restart on crash.  See L<xmdomain.cfg> for more info.
-
-=item B<d - dying>
-
-The domain is in process of dying, but hasn't completely shutdown or
-crashed.
-
-FIXME: Is this right?
-
-=back
-
-B<NOTES>
-
-=over 4
-
-The Time column is deceptive.  Virtual IO (network and block devices)
-used by domains requires coordination by Domain0, which means that
-Domain0 is actually charged for much of the time that a DomainU is
-doing IO.  Use of this time value to determine relative utilizations
-by domains is thus very suspect, as a high IO workload may show as
-less utilized than a high CPU workload.  Consider yourself warned.
-
-=back
-
-=item B<mem-max> I<domain-id> I<mem>
-
-Specify the maximum amount of memory the domain is able to use.  I<mem>
-is specified in megabytes. 
-
-The mem-max value may not correspond to the actual memory used in the
-domain, as it may balloon down its memory to give more back to the OS.
-
-=item B<mem-set> I<domain-id> I<mem>
-
-Set the domain's used memory using the balloon driver.
-
-Because this operation requires cooperation from the domain operating
-system, there is no guarantee that it will succeed.  This command will
-definitely not work unless the domain has the required paravirt
-driver.
-
-B<Warning:> There is no good way to know in advance how small of a
-mem-set will make a domain unstable and cause it to crash.  Be very
-careful when using this command on running domains.
-
-=item B<migrate> I<domain-id> I<host> [I<OPTIONS>]
-
-Migrate a domain to another host machine. Xend must be running on
-other host machine, it must be running the same version of Xen, it
-must have the migration TCP port open and accepting connections from
-the source host, and there must be sufficient resources for the domain
-to run (memory, disk, etc).
-
-Migration is pretty complicated, and has many security implications.
-Please read the Xen User's Guide to ensure you understand the
-ramifications and limitations on migration before attempting it in
-production.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-l>, B<--live>
-
-Use live migration.  This will migrate the domain between hosts
-without shutting down the domain.  See the Xen User's Guide for more
-information.
-
-=item B<-r>, B<--resource> I<Mbs>
-
-Set maximum Mbs allowed for migrating the domain.  This ensures that
-the network link is not saturated with migration traffic while
-attempting to do other useful work.
-
-=back
-
-=item B<new> I<configfile> [I<OPTIONS>] [I<vars>]...
-
-Adds a domain to Xend domain management.
-
-The new subcommand requires a config file and can optionally 
-take a series of I<vars> that add to or override variables 
-defined in the config file.  See xmdomain.cfg for full details of that 
-file format, and possible options used in either the configfile or for
-I<vars>.
-
-I<configfile> can either be an absolute path to a file, or a relative 
-path to a file located in /etc/xen.
-
-The new subcommand will return without starting the domain.  The 
-domain needs to be started using the B<xm start> command.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<--help_config>
-
-Print the available configuration variables I<vars>.  These variables may be
-used on the command line or in the configuration file I<configfile>.
-
-=item B<-q>, B<--quiet>
-
-No console output.
-
-=item B<--path>
-
-Search path for configuration scripts. The value of PATH is a 
-colon-separated directory list.
-
-=item B<-f=FILE>, B<--defconfig=FILE>
-
-
-Use the given Python configuration script. The configuration 
-script is loaded after arguments have been processed. Each 
-command-line option sets a configuration variable named after 
-its long option name, and these variables are placed in the
-environment of the script before it is loaded. Variables 
-for options that may be repeated have list values. Other 
-variables can be set using name=value on the command line. 
-After the script is loaded, option values that were not set 
-on the command line are replaced by the values set in the script.
-
-=item B<-F=FILE>, B<--config=FILE>
-
-Use the given SXP formatted configuration script.
-SXP is the underlying configuration format used by Xen.
-SXP configuration scripts can be hand-written or generated
-from Python configuration scripts, using the -n
-(dryrun) option to print the configuration.  An SXP formatted
-configuration file may also be generated for a given I<domain-id> by 
-redirecting the output from the the B<xm list --long I<domain-id>> 
-to a file.
-
-=item B<-n>, B<--dryrun>
-
-Dry run - prints the resulting configuration in SXP
-but does not create the domain.
-
-=item B<-x>, B<--xmldryrun>
-
-XML dry run - prints the resulting configuration in
-XML but does not create the domain.
-
-=item B<-s>, B<--skipdtd>
-
-Skip DTD checking - skips checks on XML before
-creating. Experimental. Can decrease create time.
-
-=item B<-p>, B<--paused>
-
-Leave the domain paused after it is created.
-
-=item B<-c>, B<--console_autoconnect>
-
-Attach console to the domain as soon as it has started.  This is
-useful for determining issues with crashing domains.
-
-=back
-
-=item B<pause> I<domain-id>
-
-Pause a domain.  When in a paused state the domain will still consume
-allocated resources such as memory, but will not be eligible for
-scheduling by the Xen hypervisor.
-
-=item B<reboot> [I<OPTIONS>] I<domain-id>
-
-Reboot a domain.  This acts just as if the domain had the B<reboot>
-command run from the console.  The command returns as soon as it has
-executed the reboot action, which may be significantly before the
-domain actually reboots.
-
-The behavior of what happens to a domain when it reboots is set by the
-B<on_reboot> parameter of the xmdomain.cfg file when the domain was
-created.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-a>, B<--all>
-
-Reboot all domains.
-
-=item B<-w>, B<--wait>
-
-Wait for reboot to complete before returning.  This may take a while,
-as all services in the domain will have to be shut down cleanly.
-
-=back
-
-=item B<restore> I<state-file>
-
-Build a domain from an B<xm save> state file.  See B<save> for more info.
-
-=item B<resume> I<domain-name> [I<OPTIONS>]
-
-Moves a domain out of the suspended state and back into memory.  
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-p>, <--paused>
-
-Moves a domain back into memory but leaves the domain in a paused state.
-The B<xm unpause> subcommand may then be used to bring it out of the 
-paused state.
-
-=back
-
-=item B<save> I<domain-id> I<state-file>
-
-Saves a running domain to a state file so that it can be restored
-later.  Once saved, the domain will no longer be running on the
-system, thus the memory allocated for the domain will be free for
-other domains to use.  B<xm restore> restores from this state file.
-
-This is roughly equivalent to doing a hibernate on a running computer,
-with all the same limitations.  Open network connections may be
-severed upon restore, as TCP timeouts may have expired.
-
-=item B<shutdown> [I<OPTIONS>] I<domain-id>
-
-Gracefully shuts down a domain.  This coordinates with the domain OS
-to perform graceful shutdown, so there is no guarantee that it will
-succeed, and may take a variable length of time depending on what
-services must be shutdown in the domain.  The command returns
-immediately after signally the domain unless that B<-w> flag is used.
-
-The behavior of what happens to a domain when it reboots is set by the
-B<on_shutdown> parameter of the xmdomain.cfg file when the domain was
-created.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-a> 
-
-Shutdown B<all> domains.  Often used when doing a complete shutdown of
-a Xen system.
-
-=item B<-w>
-
-Wait for the domain to complete shutdown before returning.
-
-=back
-
-=item B<start> I<domain-name> [I<OPTIONS>]
-
-Start a Xend managed domain that was added using the B<xm new> command.
-
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-p>, B<--paused>
-
-Do not unpause domain after starting it.
-
-=item B<-c>, B<--console_autoconnect>
-
-Connect to the console after the domain is created.
-
-=back
-
-=item B<suspend> I<domain-name>
-
-Suspend a domain to a state file so that it can be later
-resumed using the B<xm resume> subcommand.  Similar to the B<xm save> 
-subcommand although the state file may not be specified.
-
-=item B<sysrq> I<domain-id> I<letter>
-
-Send a I<Magic System Request> signal to the domain.  For more
-information on available magic sys req operations, see sysrq.txt in
-your Linux Kernel sources.
-
-=item B<unpause> I<domain-id>
-
-Moves a domain out of the paused state.  This will allow a previously
-paused domain to now be eligible for scheduling by the Xen hypervisor.
-
-=item B<vcpu-set> I<domain-id> I<vcpu-count>
-
-Enables the I<vcpu-count> virtual CPUs for the domain in question.
-Like mem-set, this command can only allocate up to the maximum virtual
-CPU count configured at boot for the domain.
-
-If the I<vcpu-count> is smaller than the current number of active
-VCPUs, the highest number VCPUs will be hotplug removed.  This may be
-important for pinning purposes.
-
-Attempting to set the VCPUs to a number larger than the initially
-configured VCPU count is an error.  Trying to set VCPUs to < 1 will be
-quietly ignored.
-
-Because this operation requires cooperation from the domain operating
-system, there is no guarantee that it will succeed.  This command will
-not work with a full virt domain.
-
-=item B<vcpu-list> [I<domain-id>]
-
-Lists VCPU information for a specific domain.  If no domain is
-specified, VCPU information for all domains will be provided.
-
-=item B<vcpu-pin> I<domain-id> I<vcpu> I<cpus>
-
-Pins the the VCPU to only run on the specific CPUs.  The keyword
-B<all> can be used to apply the I<cpus> list to all VCPUs in the
-domain.
-
-Normally VCPUs can float between available CPUs whenever Xen deems a
-different run state is appropriate.  Pinning can be used to restrict
-this, by ensuring certain VCPUs can only run on certain physical
-CPUs.
-
-=back
-
-=head1 XEN HOST SUBCOMMANDS
-
-=over 4
-
-=item B<dmesg> [B<-c>]
-
-Reads the Xen message buffer, similar to dmesg on a Linux system.  The
-buffer contains informational, warning, and error messages created
-during Xen's boot process.  If you are having problems with Xen, this
-is one of the first places to look as part of problem determination.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-c>, B<--clear>
-
-Clears Xen's message buffer.
-
-=back
-
-=item B<info>
-
-Print information about the Xen host in I<name : value> format.  When
-reporting a Xen bug, please provide this information as part of the
-bug report.
-
-Sample output looks as follows (lines wrapped manually to make the man
-page more readable):
-
- host                   : talon
- release                : 2.6.12.6-xen0
- version                : #1 Mon Nov 14 14:26:26 EST 2005
- machine                : i686
- nr_cpus                : 2
- nr_nodes               : 1
- cores_per_socket       : 1
- threads_per_core       : 1
- cpu_mhz                : 696
- hw_caps                : 0383fbff:00000000:00000000:00000040
- total_memory           : 767
- free_memory            : 37
- xen_major              : 3
- xen_minor              : 0
- xen_extra              : -devel
- xen_caps               : xen-3.0-x86_32
- xen_scheduler          : credit
- xen_pagesize           : 4096
- platform_params        : virt_start=0xfc000000
- xen_changeset          : Mon Nov 14 18:13:38 2005 +0100 
-                          7793:090e44133d40
- cc_compiler            : gcc version 3.4.3 (Mandrakelinux 
-                          10.2 3.4.3-7mdk)
- cc_compile_by          : sdague
- cc_compile_domain      : (none)
- cc_compile_date        : Mon Nov 14 14:16:48 EST 2005
- xend_config_format     : 3
-
-B<FIELDS>
-
-Not all fields will be explained here, but some of the less obvious
-ones deserve explanation:
-
-=over 4
-
-=item B<hw_caps>
-
-A vector showing what hardware capabilities are supported by your
-processor.  This is equivalent to, though more cryptic, the flags
-field in /proc/cpuinfo on a normal Linux machine.
-
-=item B<free_memory>
-
-Available memory (in MB) not allocated to Xen, or any other domains.
-
-=item B<xen_caps>
-
-The Xen version and architecture.  Architecture values can be one of:
-x86_32, x86_32p (i.e. PAE enabled), x86_64, ia64.
-
-=item B<xen_changeset>
-
-The Xen mercurial changeset id.  Very useful for determining exactly
-what version of code your Xen system was built from.
-
-=back
-
-=item B<log>
-
-Print out the xend log.  This log file can be found in
-/var/log/xend.log.
-
-=item B<top>
-
-Executes the B<xentop> command, which provides real time monitoring of
-domains.  Xentop is a curses interface, and reasonably self
-explanatory.
-
-=item B<uptime>
-
-Prints the current uptime of the domains running.
-
-=back
-
-=head1 SCHEDULER SUBCOMMANDS
-
-Xen ships with a number of domain schedulers, which can be set at boot
-time with the B<sched=> parameter on the Xen command line.  By
-default B<credit> is used for scheduling.
-
-FIXME: we really need a scheduler expert to write up this section.
-
-=over 4
-
-=item B<sched-credit> [ B<-d> I<domain-id> [ B<-w>[B<=>I<WEIGHT>] | B<-c>[B<=>I<CAP>] ] ]
-
-Set credit scheduler parameters.  The credit scheduler is a
-proportional fair share CPU scheduler built from the ground up to be
-work conserving on SMP hosts.
-
-Each domain (including Domain0) is assigned a weight and a cap.
-
-B<PARAMETERS>
-
-=over 4
-
-=item I<WEIGHT>
-
-A domain with a weight of 512 will get twice as much CPU as a domain
-with a weight of 256 on a contended host. Legal weights range from 1
-to 65535 and the default is 256.
-
-=item I<CAP>
-
-The cap optionally fixes the maximum amount of CPU a domain will be
-able to consume, even if the host system has idle CPU cycles. The cap
-is expressed in percentage of one physical CPU: 100 is 1 physical CPU,
-50 is half a CPU, 400 is 4 CPUs, etc. The default, 0, means there is
-no upper cap.
-
-NB: Many systems have features that will scale down the computing
-power of a cpu that is not 100% utilized.  This can be in the
-operating system, but can also sometimes be below the operating system
-in the BIOS.  If you set a cap such that individual cores are running
-at less than 100%, this may have an impact on the performance of your
-workload over and above the impact of the cap. For example, if your
-processor runs at 2GHz, and you cap a vm at 50%, the power management
-system may also reduce the clock speed to 1GHz; the effect will be
-that your VM gets 25% of the available power (50% of 1GHz) rather than
-50% (50% of 2GHz).  If you are not getting the performance you expect,
-look at performance and cpufreq options in your operating system and
-your BIOS.
-
-=back
-
-=item B<sched-sedf> I<period> I<slice> I<latency-hint> I<extratime> I<weight>
-
-Set Simple EDF (Earliest Deadline First) scheduler parameters.  This
-scheduler provides weighted CPU sharing in an intuitive way and uses
-realtime-algorithms to ensure time guarantees.  For more information
-see docs/misc/sedf_scheduler_mini-HOWTO.txt in the Xen distribution.
-
-B<PARAMETERS>
-
-=over 4
-
-=item I<period>
-
-The normal EDF scheduling usage in nanoseconds
-
-=item I<slice>
-
-The normal EDF scheduling usage in nanoseconds
-
-FIXME: these are lame, should explain more.
-
-=item I<latency-hint>
-
-Scaled period if domain is doing heavy I/O.
-
-=item I<extratime>
-
-Flag for allowing domain to run in extra time.
-
-=item I<weight>
-
-Another way of setting CPU slice.
-
-=back
-
-B<EXAMPLES>
-
-I<normal EDF (20ms/5ms):>
-
-    xm sched-sedf <dom-id> 20000000 5000000 0 0 0
-
-I<best-effort domains (i.e. non-realtime):>
-
-    xm sched-sedf <dom-id> 20000000 0 0 1 0
-
-I<normal EDF (20ms/5ms) + share of extra-time:>
-
-    xm sched-sedf <dom-id> 20000000 5000000 0 1 0
-
-I<4 domains with weights 2:3:4:2>
-
-    xm sched-sedf <d1> 0 0 0 0 2
-    xm sched-sedf <d2> 0 0 0 0 3
-    xm sched-sedf <d3> 0 0 0 0 4
-    xm sched-sedf <d4> 0 0 0 0 2
-  
-I<1 fully-specified (10ms/3ms) domain, 3 other domains share available
-rest in 2:7:3 ratio:>
-
-    xm sched-sedf <d1> 10000000 3000000 0 0 0
-    xm sched-sedf <d2> 0 0 0 0 2
-    xm sched-sedf <d3> 0 0 0 0 7
-    xm sched-sedf <d4> 0 0 0 0 3
-
-=back
-
-=head1 VIRTUAL DEVICE COMMANDS
-
-Most virtual devices can be added and removed while guests are
-running.  The effect to the guest OS is much the same as any hotplug
-event.
-
-=head2 BLOCK DEVICES
-
-=over 4
-
-=item B<block-attach> I<domain-id> I<be-dev> I<fe-dev> I<mode> [I<bedomain-id>]
-
-Create a new virtual block device.  This will trigger a hotplug event
-for the guest.
-
-B<OPTIONS>
-
-=over 4
-
-=item I<domain-id>
-
-The domain id of the guest domain that the device will be attached to.
-
-=item I<be-dev>
-
-The device in the backend domain (usually domain 0) to be exported.
-This can be specified as a physical partition (phy:sda7) or as a file
-mounted as loopback (file://path/to/loop.iso).
-
-=item I<fe-dev>
-
-How the device should be presented to the guest domain.  It can be
-specified as either a symbolic name, such as /dev/hdc, for common
-devices, or by device id, such as 0x1400 (/dev/hdc device id in hex).
-
-=item I<mode>
-
-The access mode for the device from the guest domain.  Supported modes
-are B<w> (read/write) or B<r> (read-only).
-
-=item I<bedomain-id>
-
-The back end domain hosting the device.  This defaults to domain 0.
-
-=back
-
-B<EXAMPLES>
-
-=over 4
-
-=item I<Mount an ISO as a Disk>
-
-xm block-attach guestdomain file://path/to/dsl-2.0RC2.iso /dev/hdc r
-
-This will mount the dsl ISO as /dev/hdc in the guestdomain as a read
-only device.  This will probably not be detected as a CD-ROM by the
-guest, but mounting /dev/hdc manually will work.
-
-=back
-
-=item B<block-detach> I<domain-id> I<devid> [B<--force>]
-
-Detach a domain's virtual block device. I<devid> may be the symbolic
-name or the numeric device id given to the device by domain 0.  You
-will need to run B<xm block-list> to determine that number.
-
-Detaching the device requires the cooperation of the domain.  If the
-domain fails to release the device (perhaps because the domain is hung
-or is still using the device), the detach will fail.  The B<--force>
-parameter will forcefully detach the device, but may cause IO errors
-in the domain.
-
-=item B<block-list> [B<-l>|B<--long>] I<domain-id>
-
-List virtual block devices for a domain.  The returned output is
-formatted as a list or as an S-Expression if the B<--long> option was given.
-
-=back
-
-=head2 NETWORK DEVICES
-
-=over 4
-
-=item B<network-attach> I<domain-id> [B<script=>I<scriptname>] [B<ip=>I<ipaddr>]
-[B<mac=>I<macaddr>] [B<bridge=>I<bridge-name>] [B<backend=>I<bedomain-id>]
-
-Creates a new network device in the domain specified by I<domain-id>.  It
-takes the following optional options:
-
-=back
-
-B<OPTIONS>
-
-=over 4
-
-=item B<script=>I<scriptname>
-
-Use the specified script name to bring up the network.  Defaults to
-the default setting in xend-config.sxp for B<vif-script>.
-
-=item B<ip=>I<ipaddr>
-
-Passes the specified IP Address to the adapter on creation.  
-
-FIXME: this currently appears to be B<broken>.  I'm not sure under what
-circumstances this should actually work.
-
-=item B<mac=>I<macaddr>
-
-The MAC address that the domain will see on its Ethernet device.  If
-the device is not specified it will be randomly generated with the
-00:16:3e vendor id prefix.
-
-=item B<bridge=>I<bridge-name>
-
-The name of the bridge to attach the vif to, in case you have more
-than one.  This defaults to xenbr0.
-
-=item B<backend=>I<bedomain-id>
-
-The backend domain id.  By default this is domain 0.
-
-=back
-
-=over 4
-
-=item B<network-detach> I<domain-id> I<devid>
-
-Removes the network device from the domain specified by I<domain-id>.
-I<devid> is the virtual interface device number within the domain
-(i.e. the 3 in vif22.3).
-
-FIXME: this is currently B<broken>.  Network devices aren't completely
-removed from domain 0.
-
-=item B<network-list> [B<-l>|B<--long>]> I<domain-id>
-
-List virtual network interfaces for a domain.  The returned output is
-formatted as a list or as an S-Expression if the B<--long> option was given.
-
-=back
-
-=head1 SEE ALSO
-
-B<xmdomain.cfg>(5), B<xentop>(1)
-
-=head1 AUTHOR
-
-  Sean Dague <sean at dague dot net>
-  Daniel Stekloff <dsteklof at us dot ibm dot com>
-  Reiner Sailer <sailer at us dot ibm dot com>
-  Stefan Berger <stefanb at us dot ibm dot com>
-
-=head1 BUGS
diff --git a/docs/man/xmdomain.cfg.pod.5 b/docs/man/xmdomain.cfg.pod.5
deleted file mode 100644
index 2e73db4..0000000
--- a/docs/man/xmdomain.cfg.pod.5
+++ /dev/null
@@ -1,358 +0,0 @@
-=head1 NAME
-
-xmdomain.cfg - xm domain config file format
-
-=head1 SYNOPSIS
-
- /etc/xen/myxendomain
- /etc/xen/myxendomain2
- /etc/xen/auto/myxenautostarted
-
-=head1 DESCRIPTION
-
-The B<xm>(1) program uses python executable config files to define
-domains to create from scratch.  Each of these config files needs to
-contain a number of required options, and may specify many more.
-
-Domain configuration files live in /etc/xen by default, if you store
-config files anywhere else the full path to the config file must be
-specified in the I<xm create> command.
-
-/etc/xen/auto is a special case.  Domain config files in that
-directory will be started automatically at system boot if the
-xendomain init script is enabled.  The contents of /etc/xen/auto
-should be symlinks to files in /etc/xen to allow I<xm create> to be
-used without full paths.
-
-Options are specified by I<name = value> statements in the
-xmdomain.cfg files.
-
-=head1 OPTIONS
-
-The following lists the most commonly used options for a domain config
-file.  
-
-=over 4
-
-=item B<kernel>
-
-The kernel image for the domain.  The format of the parameter is the
-fully qualified path to the kernel image file,
-i.e. I</boot/vmlinuz-2.6.12-xenU>.
-
-
-=item B<ramdisk>
-
-The initial ramdisk for the domain.  The format of the parameter is
-the fully qualified path to the initrd, i.e. I</boot/initrd.gz>.  On
-many Linux distros you will not need a ramdisk if using the default
-xen kernel.
-
-=item B<memory>
-
-The amount of RAM, in megabytes, to allocate to the domain when it
-starts.  Allocating insufficient memory for a domain may produce
-extremely bizarre behavior.  If there isn't enough free memory left on
-the machine to fulfil this request, the domain will fail to start.
-
-Xen does not support overcommit of memory, so the total memory of all
-guests (+ 64 MB needed for Xen) must be less than or equal to the
-physical RAM in the machine.
-
-=item B<name>
-
-A unique name for the domain.  Attempting to create two domains with
-the same name will cause an error.
-
-=item B<root>
-
-Specifies the root device for the domain.  This is required for Linux
-domains, and possibly other OSes.
-
-=item B<nics>
-
-The number of network interfaces allocated to the domain on boot.  It
-defaults to 1.
-
-=item B<disk>
-
-An array of block device stanzas, in the form:
-
-    disk = [ "stanza1", "stanza2", ... ]
-
-Each stanza has 3 terms, separated by commas,
-"backend-dev,frontend-dev,mode".
-
-=over 4
-
-=item I<backend-dev>
-
-The device in the backend domain that will be exported to the guest
-(frontend) domain.  Supported formats include:
-
-I<phy:device> - export the physical device listed.  The device can be
-in symbolic form, as in sda7, or as the hex major/minor number, as in
-0x301 (which is hda1).
-
-I<file://path/to/file> - export the file listed as a loopback device.
-This will take care of the loopback setup before exporting the device.
-
-=item I<frontend-dev>
-
-How the device should appear in the guest domain.  The device can be
-in symbolic form, as in sda7, or as the hex major/minor number, as in
-0x301 (which is hda1).
-
-=item I<mode>
-
-The access mode for the device.  There are currently 2 valid options,
-I<r> (read-only), I<w> (read/write).
-
-=back
-
-=item B<vif>
-
-An array of virtual interface stanzas in the form:
-
-    vif = [ "stanza1", "stanza2", ... ]
-
-Each stanza specifies a set of I<name = value> options separated by
-commas, in the form: "name1=value1, name2=value2, ..."
-
-B<OPTIONS>
-
-=over 4
-
-=item I<bridge>
-
-The network bridge to be used for this device.  This is especially
-needed if multiple bridges exist on the machine.
-
-=item I<mac>
-
-The MAC address for the virtual interface.  If mac is not specified,
-one will be randomly chosen by xen with the 00:16:3e vendor id prefix.
-
-=back
-
-=item B<vfb>
-
-A virtual frame buffer stanza in the form:
-
-    vfb = [ "stanza" ]
-
-The stanza specifies a set of I<name = value> options separated by
-commas, in the form: "name1=value1, name2=value2, ..."
-
-B<OPTIONS>
-
-=over 4
-
-=item I<type>
-
-There are currently two valid options: I<vnc> starts a VNC server that
-lets you connect an external VNC viewer, and I<sdl> starts an internal
-viewer.
-
-=item I<vncdisplay>
-
-The VNC display number to use, defaults to the domain ID.  The
-VNC server listens on port 5900 + display number.
-
-=item I<vnclisten>
-
-The listening address for the VNC server, default 127.0.0.1.
-
-=item I<vncunused>
-
-If non-zero, the VNC server listens on the first unused port above
-5900.
-
-=item I<vncpasswd>
-
-Overrides the XenD configured default password.
-
-=item I<display>
-
-Display to use for the internal viewer, defaults to environment
-variable I<DISPLAY>.
-
-=item I<xauthority>
-
-Authority file to use for the internal viewer, defaults to environment
-variable I<XAUTHORITY>.
-
-=back
-
-=back
-
-=head1 ADDITIONAL OPTIONS
-
-The following options are also supported in the config file, though
-are far more rarely used.
-
-=over 4
-
-=item B<builder>
-
-Which builder should be used to construct the domain.  This defaults
-to the I<linux> if not specified, which is the builder for
-paravirtualized Linux domains.
-
-=item B<cpu>
-
-Specifies which CPU the domain should be started on, where 0 specifies
-the first cpu, 1 the second, and so on.  This defaults to -1, which
-means Xen is free to pick which CPU to start on.
-
-=item B<cpus>
-
-Specifies a list of CPUs on which the domains' VCPUs are allowed to
-execute upon.  The syntax supports ranges (0-3), and negation, ^1.
-For instance:
-
-    cpus = "0-3,5,^1"
-
-Will result in CPUs 0, 2, 3, 5 being available for use by the domain.
-
-=item B<extra>
-
-Extra information to append to the end of the kernel parameter line.
-The format is a string, the contents of which can be anything that the
-kernel supports.  For instance:
-
-    extra = "4"
-
-Will cause the domain to boot to runlevel 4.
-
-=item B<nfs_server>
-
-The IP address of the NFS server to use as the root device for the
-domain.  In order to do this you'll need to specify I<root=/dev/nfs>,
-and specify I<nfs_root>.
-
-=item B<nfs_root>
-
-The directory on the NFS server to be used as the root filesystem.
-Specified as a fully qualified path, i.e. I</full/path/to/root/dir>.
-
-=item B<vcpus>
-
-The number of virtual cpus to allocate to the domain.  In order to use
-this the xen kernel must be compiled with SMP support.
-
-This defaults to 1, meaning running the domain as a UP.
-
-=back
-
-=head1 DOMAIN SHUTDOWN OPTIONS
-
-There are 3 options which control domain shutdown (both planned and
-unplanned) under certain events.  The 3 events currently captured are:
-
-=over 4
-
-=item B<on_shutdown>
-
-Triggered on either an I<xm shutdown> or graceful shutdown from inside
-the DomU.
-
-=item B<on_reboot>
-
-Triggered on either an I<xm reboot> or graceful reboot from inside the
-DomU.
-
-=item B<on_crash>
-
-Triggered when a DomU goes to the crashed state for any reason.
-
-=back
-
-All of them take one of 4 valid states listed below.  
-
-=over 4
-
-=item B<destroy>
-
-The domain will be cleaned up completely.  No attempt at respawning
-will occur.  This is what a typical shutdown would look like.
-
-=item B<restart>
-
-The domain will be restarted with the same name as the old domain.
-This is what a typical reboot would look like.
-
-=item B<preserve>
-
-The domain will not be cleaned up at all.  This is often useful for
-crash state domains which ensures that enough evidence is to debug the
-real issue.
-
-=item B<rename-restart>
-
-The old domain will not be cleaned up, but will be renamed so a new
-domain can be restarted in it's place.  The old domain will be renamed with
-a suffix -1, -2, etc, and assigned a new random UUID; the new domain will
-keep the original name and UUID.  The old domain will release the devices that
-it holds, so that the new one may take them.
-
-=back
-
-Additionally, the "on_crash" event can also take:
-
-=over 4
-
-=item B<coredump-destroy>
-
-Dump the crashed domain's core and then destroy it.
-
-=item B<coredump-restart>
-
-Dump the crashed domain's core and then restart it.
-
-=back
-
-=head1 EXAMPLES
-
-The following are quick examples of ways that domains might be
-configured.  They should not be considered an exhaustive set.
-
-=over 4
-
-=item I<A Loopback File as Root>
-
-    kernel = "/boot/vmlinuz-2.6-xenU"
-    memory = 128
-    name = "MyLinux"      
-    root = "/dev/hda1 ro"
-    disk = [ "file:/var/xen/mylinux.img,hda1,w" ]
-
-This creates a domain called MyLinux with 128 MB of memory using a
-default xen kernel, and the file /var/xen/mylinux.img loopback mounted
-at hda1, which is the root filesystem.
-
-=item I<NFS Root>
-
-FIXME: write me
-
-=item I<LVM Root>
-
-FIXME: write me
-
-=item I<Two Networks>
-
-FIXME: write me
-
-=back
-
-=head1 SEE ALSO
-
-B<xm>(1)
-
-=head1 AUTHOR
-
-  Sean Dague <sean at dague dot net>
-
-=head1 BUGS
-
-Not all options are currently documented
diff --git a/tools/configure b/tools/configure
index 5c2fa14..7a44505 100755
--- a/tools/configure
+++ b/tools/configure
@@ -688,7 +688,6 @@ seabios_path
 qemu_xen
 qemu_traditional
 blktap1
-xend
 debug
 seabios
 rombios
@@ -765,7 +764,6 @@ enable_ovmf
 enable_rombios
 enable_seabios
 enable_debug
-enable_xend
 enable_blktap1
 enable_qemu_traditional
 with_system_qemu
@@ -1427,7 +1425,6 @@ Optional Features:
   --disable-rombios       Disable ROM BIOS (default is ENABLED)
   --disable-seabios       Disable SeaBIOS (default is ENABLED)
   --disable-debug         Disable debug build of tools (default is ENABLED)
-  --enable-xend           Enable xend toolstack (default is DISABLED)
   --enable-blktap1        Enable blktap1 tools (default is DISABLED)
   --enable-qemu-traditional
                           Enable qemu traditional device model, (DEFAULT is on
@@ -3747,29 +3744,6 @@ debug=$ax_cv_debug
 
 
 
-# Check whether --enable-xend was given.
-if test "${enable_xend+set}" = set; then :
-  enableval=$enable_xend;
-fi
-
-
-if test "x$enable_xend" = "xno"; then :
-
-    ax_cv_xend="n"
-
-elif test "x$enable_xend" = "xyes"; then :
-
-    ax_cv_xend="y"
-
-elif test -z $ax_cv_xend; then :
-
-    ax_cv_xend="n"
-
-fi
-xend=$ax_cv_xend
-
-
-
 # Check whether --enable-blktap1 was given.
 if test "${enable_blktap1+set}" = set; then :
   enableval=$enable_blktap1;
@@ -9480,25 +9454,3 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
 
-if test "x$xend" = "xy" ; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have enabled the xend toolstack.
-
-xend is deprecated and scheduled for removal. Please migrate to another
-toolstack ASAP.
-
-See http://wiki.xen.org/wiki/Choice_of_Toolstacks for information on
-other alternatives, including xl which is designed to be a drop in
-replacement for xm (http://wiki.xen.org/wiki/XL).
-" >&5
-$as_echo "$as_me: WARNING: You have enabled the xend toolstack.
-
-xend is deprecated and scheduled for removal. Please migrate to another
-toolstack ASAP.
-
-See http://wiki.xen.org/wiki/Choice_of_Toolstacks for information on
-other alternatives, including xl which is designed to be a drop in
-replacement for xm (http://wiki.xen.org/wiki/XL).
-" >&2;}
-
-fi
diff --git a/tools/configure.ac b/tools/configure.ac
index a62faf8..e1f7527 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -58,7 +58,6 @@ AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
 AX_ARG_DEFAULT_ENABLE([rombios], [Disable ROM BIOS])
 AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
 AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
-AX_ARG_DEFAULT_DISABLE([xend], [Enable xend toolstack])
 AX_ARG_DEFAULT_DISABLE([blktap1], [Enable blktap1 tools])
 
 AC_ARG_ENABLE([qemu-traditional],
@@ -245,15 +244,3 @@ AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h])
 
 AC_OUTPUT()
 
-AS_IF([test "x$xend" = "xy" ], [
-    AC_MSG_WARN(
-[You have enabled the xend toolstack.
-
-xend is deprecated and scheduled for removal. Please migrate to another
-toolstack ASAP.
-
-See http://wiki.xen.org/wiki/Choice_of_Toolstacks for information on
-other alternatives, including xl which is designed to be a drop in
-replacement for xm (http://wiki.xen.org/wiki/XL).
-])
-])
diff --git a/tools/examples/Makefile b/tools/examples/Makefile
index df24e38..86d9cc1 100644
--- a/tools/examples/Makefile
+++ b/tools/examples/Makefile
@@ -5,18 +5,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 XEN_READMES = README
 XEN_READMES += README.incompatibilities
 
-XEN_CONFIGS-$(CONFIG_XEND) += xend-config.sxp
-XEN_CONFIGS-$(CONFIG_XEND) += xm-config.xml
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample1
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample2
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample3
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample.hvm
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample.hvm-stubdom
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample.pv-grub
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample.nbd
-XEN_CONFIGS-$(CONFIG_XEND) += xend-pci-quirks.sxp
-XEN_CONFIGS-$(CONFIG_XEND) += xend-pci-permissive.sxp
-
 XEN_CONFIGS += xlexample.hvm
 XEN_CONFIGS += xlexample.pvlinux
 XEN_CONFIGS += xl.conf
diff --git a/tools/examples/xend-config.sxp b/tools/examples/xend-config.sxp
deleted file mode 100644
index 0896a27..0000000
--- a/tools/examples/xend-config.sxp
+++ /dev/null
@@ -1,304 +0,0 @@
-# -*- sh -*-
-
-#
-# Xend configuration file.
-#
-
-# This example configuration is appropriate for an installation that 
-# utilizes a bridged network configuration. Access to xend via http
-# is disabled.  
-
-# Commented out entries show the default for that entry, unless otherwise
-# specified.
-
-#(logfile /var/log/xen/xend.log)
-#(loglevel DEBUG)
-
-# Uncomment the line below.  Set the value to flask, acm, or dummy to 
-# select a security module.
-
-#(xsm_module_name dummy)
-
-# The Xen-API server configuration.
-#
-# This value configures the ports, interfaces, and access controls for the
-# Xen-API server.  Each entry in the list starts with either unix, a port
-# number, or an address:port pair.  If this is "unix", then a UDP socket is
-# opened, and this entry applies to that.  If it is a port, then Xend will
-# listen on all interfaces on that TCP port, and if it is an address:port
-# pair, then Xend will listen on the specified port, using the interface with
-# the specified address.
-#
-# The subsequent string configures the user-based access control for the
-# listener in question.  This can be one of "none" or "pam", indicating either
-# that users should be allowed access unconditionally, or that the local
-# Pluggable Authentication Modules configuration should be used.  If this
-# string is missing or empty, then "pam" is used.
-#
-# The final string gives the host-based access control for that listener. If
-# this is missing or empty, then all connections are accepted.  Otherwise,
-# this should be a space-separated sequence of regular expressions; any host
-# with a fully-qualified domain name or an IP address that matches one of
-# these regular expressions will be accepted.
-#
-# Example: listen on TCP port 9363 on all interfaces, accepting connections
-# only from machines in example.com or localhost, and allow access through
-# the unix domain socket unconditionally:
-#
-#   (xen-api-server ((9363 pam '^localhost$ example\\.com$')
-#                    (unix none)))
-#
-# Optionally, the TCP Xen-API server can use SSL by specifying the private
-# key and certificate location:
-#
-#                    (9367 pam '' xen-api.key xen-api.crt)
-#
-# Default:
-#   (xen-api-server ((unix)))
-
-
-#(xend-http-server no)
-#(xend-unix-server no)
-#(xend-tcp-xmlrpc-server no)
-#(xend-unix-xmlrpc-server yes)
-#(xend-relocation-server no)
-(xend-relocation-server yes)
-#(xend-relocation-ssl-server no)
-#(xend-udev-event-server no)
-
-#(xend-unix-path /var/lib/xend/xend-socket)
-
-
-# Address and port xend should use for the legacy TCP XMLRPC interface, 
-# if xend-tcp-xmlrpc-server is set.
-#(xend-tcp-xmlrpc-server-address 'localhost')
-#(xend-tcp-xmlrpc-server-port 8006)
-
-# SSL key and certificate to use for the legacy TCP XMLRPC interface.
-# Setting these will mean that this port serves only SSL connections as
-# opposed to plaintext ones.
-#(xend-tcp-xmlrpc-server-ssl-key-file  xmlrpc.key)
-#(xend-tcp-xmlrpc-server-ssl-cert-file xmlrpc.crt)
-
-
-# Port xend should use for the HTTP interface, if xend-http-server is set.
-#(xend-port            8000)
-
-# Port xend should use for the relocation interface, if xend-relocation-server
-# is set.
-#(xend-relocation-port 8002)
-
-# Port xend should use for the ssl relocation interface, if
-# xend-relocation-ssl-server is set.
-#(xend-relocation-ssl-port 8003)
-
-# SSL key and certificate to use for the ssl relocation interface, if
-# xend-relocation-ssl-server is set.
-#(xend-relocation-server-ssl-key-file   xmlrpc.key)
-#(xend-relocation-server-ssl-cert-file  xmlrpc.crt)
-
-# Whether to use ssl as default when relocating.
-#(xend-relocation-ssl no)
-
-# Address xend should listen on for HTTP connections, if xend-http-server is
-# set.
-# Specifying 'localhost' prevents remote connections.
-# Specifying the empty string '' (the default) allows all connections.
-#(xend-address '')
-#(xend-address localhost)
-
-# Address xend should listen on for relocation-socket connections, if
-# xend-relocation-server is set.
-# Meaning and default as for xend-address above.
-# Also, interface name is allowed (e.g. eth0) there to get the
-# relocation address to be bound on.
-#(xend-relocation-address '')
-
-# The hosts allowed to talk to the relocation port.  If this is empty (the
-# default), then all connections are allowed (assuming that the connection
-# arrives on a port and interface on which we are listening; see
-# xend-relocation-port and xend-relocation-address above).  Otherwise, this
-# should be a space-separated sequence of regular expressions.  Any host with
-# a fully-qualified domain name or an IP address that matches one of these
-# regular expressions will be accepted.
-#
-# For example:
-#  (xend-relocation-hosts-allow '^localhost$ ^.*\\.example\\.org$')
-#
-#(xend-relocation-hosts-allow '')
-(xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$')
-
-# The limit (in kilobytes) on the size of the console buffer
-#(console-limit 1024)
-
-##
-# To bridge network traffic, like this:
-#
-# dom0: ----------------- bridge -> real eth0 -> the network
-#                            |
-# domU: fake eth0 -> vifN.0 -+
-#
-# use
-#
-# (network-script network-bridge)
-#
-# Your default ethernet device is used as the outgoing interface, by default. 
-# To use a different one (e.g. eth1) use
-#
-# (network-script 'network-bridge netdev=eth1')
-#
-# The bridge is named eth0, by default (yes, really!)
-#
-
-# It is normally much better to create the bridge yourself in
-# /etc/network/interfaces.  network-bridge start does nothing if you
-# already have a bridge, and network-bridge stop does nothing if the
-# default bridge name (normally eth0) is not a bridge.  See
-# bridge-utils-interfaces(5) for full information on the syntax in
-# /etc/network/interfaces, but you probably want something like this:
-#    iface xenbr0 inet static
-#        address [etc]
-#        netmask [etc]
-#        [etc]
-#        bridge_ports eth0
-#
-# To have network-bridge create a differently-named bridge, use:
-# (network-script 'network-bridge bridge=<name>')
-#
-# It is possible to use the network-bridge script in more complicated
-# scenarios, such as having two outgoing interfaces, with two bridges, and
-# two fake interfaces per guest domain.  To do things like this, write
-# yourself a wrapper script, and call network-bridge from it, as appropriate.
-#
-(network-script network-bridge)
-
-# The script used to control virtual interfaces.  This can be overridden on a
-# per-vif basis when creating a domain or a configuring a new vif.  The
-# vif-bridge script is designed for use with the network-bridge script, or
-# similar configurations.
-#
-# If you have overridden the bridge name using
-# (network-script 'network-bridge bridge=<name>') then you may wish to do the
-# same here.  The bridge name can also be set when creating a domain or
-# configuring a new vif, but a value specified here would act as a default.
-#
-# If you are using only one bridge, the vif-bridge script will discover that,
-# so there is no need to specify it explicitly.  The default is to use
-# the bridge which is listed first in the output from brctl.
-#
-(vif-script vif-bridge)
-
-
-## Use the following if network traffic is routed, as an alternative to the
-# settings for bridged networking given above.
-#(network-script network-route)
-#(vif-script     vif-route)
-
-
-## Use the following if network traffic is routed with NAT, as an alternative
-# to the settings for bridged networking given above.
-#(network-script network-nat)
-#(vif-script     vif-nat)
-
-# dom0-min-mem is the lowest permissible memory level (in MB) for dom0.
-# This is a minimum both for auto-ballooning (as enabled by
-# enable-dom0-ballooning below) and for xm mem-set when applied to dom0.
-(dom0-min-mem 196)
-
-# Whether to enable auto-ballooning of dom0 to allow domUs to be created.
-# If enable-dom0-ballooning = no, dom0 will never balloon out.
-(enable-dom0-ballooning yes)
-
-# 32-bit paravirtual domains can only consume physical
-# memory below 168GB. On systems with memory beyond that address,
-# they'll be confined to memory below 128GB.
-# Using total_available_memory (in GB) to specify the amount of memory reserved
-# in the memory pool exclusively for 32-bit paravirtual domains.
-# Additionally you should use dom0_mem = <-Value> as a parameter in 
-# xen kernel to reserve the memory for 32-bit paravirtual domains, default 
-# is "0" (0GB).  
-(total_available_memory 0) 
-
-# In SMP system, dom0 will use dom0-cpus # of CPUS
-# If dom0-cpus = 0, dom0 will take all cpus available
-(dom0-cpus 0)
-
-# Whether to enable core-dumps when domains crash.
-#(enable-dump no)
-
-# The tool used for initiating virtual TPM migration
-#(external-migration-tool '')
-
-# The interface for VNC servers to listen on. Defaults
-# to 127.0.0.1  To restore old 'listen everywhere' behaviour
-# set this to 0.0.0.0
-#(vnc-listen '127.0.0.1')
-
-# The default password for VNC console on HVM domain.
-# Empty string is no authentication.
-(vncpasswd '')
-
-# The VNC server can be told to negotiate a TLS session
-# to encryption all traffic, and provide x509 cert to
-# clients enabling them to verify server identity. The
-# GTK-VNC widget, virt-viewer, virt-manager and VeNCrypt
-# all support the VNC extension for TLS used in QEMU. The
-# TightVNC/RealVNC/UltraVNC clients do not.
-#
-# To enable this create x509 certificates / keys in the
-# directory ${XEN_CONFIG_DIR} + vnc
-#
-#  ca-cert.pem       - The CA certificate
-#  server-cert.pem   - The Server certificate signed by the CA
-#  server-key.pem    - The server private key
-#
-# and then uncomment this next line
-# (vnc-tls 1)
-
-# The certificate dir can be pointed elsewhere..
-#
-# (vnc-x509-cert-dir vnc)
-
-# The server can be told to request & validate an x509
-# certificate from the client. Only clients with a cert
-# signed by the trusted CA will be able to connect. This
-# is more secure the password auth alone. Passwd auth can
-# used at the same time if desired. To enable client cert
-# checking uncomment this:
-#
-# (vnc-x509-verify 1)
-
-# The default keymap to use for the VM's virtual keyboard
-# when not specififed in VM's configuration
-#(keymap 'en-us')
-
-# Script to run when the label of a resource has changed.
-#(resource-label-change-script '')
-
-# Rotation count of qemu-dm log file.
-#(qemu-dm-logrotate-count 10)
-
-# Path where persistent domain configuration is stored.
-# Default is /var/lib/xend/domains/
-#(xend-domains-path /var/lib/xend/domains)
-
-# Number of seconds xend will wait for device creation and
-# destruction
-#(device-create-timeout 100)
-#(device-destroy-timeout 100)
-
-# When assigning device to HVM guest, we use the strict check for HVM guest by
-# default. (For PV guest, we use loose check automatically if necessary.)
-# When we assign device to HVM guest, if we meet with the co-assignment
-# issues or the ACS issue, we could try changing the option to 'no' -- however,
-# we have to realize this may incur security issue and we can't make sure the
-# device assignment could really work properly even after we do this.
-#(pci-passthrough-strict-check yes)
-
-# If we have a very big scsi device configuration, start of xend is slow,
-# because xend scans all the device paths to build its internal PSCSI device
-# list.  If we need only a few devices for assigning to a guest, we can reduce
-# the scan to this device. Set list list of device paths in same syntax like in
-# command lsscsi, e.g. ('16:0:0:0' '15:0') 
-# (pscsi-device-mask ('*'))
-
diff --git a/tools/examples/xend-pci-permissive.sxp b/tools/examples/xend-pci-permissive.sxp
deleted file mode 100644
index 1a3fb90..0000000
--- a/tools/examples/xend-pci-permissive.sxp
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Configuration file for granting quiry PCI devices full write access to their 
-# configuration space.  This file should only be used when you are unable to 
-# determine the exact registers required by your device.  Even so, it should 
-# be used only temporarily.
-# 
-# SEND A MESSAGE TO xen-devel@lists.xensource.com IF YOU USE THIS FILE.
-# 
-# Using this file should NOT be necessary.  If you must use it to make some
-# device work, send a message to the above list with as much information about 
-# your device as possible so the developers can make accomodations for it.  
-# Once developers make the necessary updates you can remove the corresponding
-# entry for your device. 
-###############################################################################
-# Entries are formated as follows:  <vendor>:<device>[:<subvendor>:<subdevice>]
-# 
-# Example: Appending to an existing list
-#  
-# (unconstrained_dev_ids
-#     ('XXXX:XXXX:XXXX:XXXX'	# existing entry
-#      'YYYY:YYYY:YYYY:YYYY' 	# new entry 1
-#      'ZZZZ:ZZZZ')		# new entry 2
-# )
-###############################################################################
-(unconstrained_dev_ids
-     #('0123:4567:89AB:CDEF')
-)
diff --git a/tools/examples/xend-pci-quirks.sxp b/tools/examples/xend-pci-quirks.sxp
deleted file mode 100644
index 6bce4b8..0000000
--- a/tools/examples/xend-pci-quirks.sxp
+++ /dev/null
@@ -1,96 +0,0 @@
-###############################################################################
-# Configuration file for quirky PCI devices that require write-access to 
-# parts of the configuration space.  Use this file to specific PCI device
-# IDs and the configuration space fields to which those devices must be
-# able to write.
-#
-# Length is important, so be sure to match new entries with the 
-# lengths of comparable existing entries. 
-#
-# Additions to this file take effect as soon as a new domain with a 
-# matching device is started.  However, to remove a field that was 
-# previously applied to a device you must unbind the device from 
-# pciback.
-###############################################################################
-# This is a bogus entry to show how a new device would be added to the list
-#
-# (new_quirky_dev_name
-#    (pci_ids 
-#       ('0123:4567:890A:BCEF') 
-#    )
-#
-#    (pci_config_space_fields 
-#       ('12345678:1:00000000')
-#    )
-# )
-###############################################################################
-
-(tg3
-    (pci_ids
-	# Entries are formated as follows:  
-	#     <vendor>:<device>[:<subvendor>:<subdevice>]
-        ('14e4:1644'   # Broadcom Tigon3 5700
-    	 '14e4:1645'   # Broadcom Tigon3 5701
-         '14e4:1646'   # Broadcom Tigon3 5702
-         '14e4:1647'   # Broadcom Tigon3 5703
-         '14e4:1648'   # Broadcom Tigon3 5704
-         '14e4:164d'   # Broadcom Tigon3 5702FE
-         '14e4:1653'   # Broadcom Tigon3 5705
-         '14e4:1654'   # Broadcom Tigon3 5705_2
-         '14e4:165d'   # Broadcom Tigon3 5705M
-         '14e4:165e'   # Broadcom Tigon3 5705M_2
-         '14e4:16a6'   # Broadcom Tigon3 5702X
-         '14e4:16a7'   # Broadcom Tigon3 5703X
-         '14e4:16a8'   # Broadcom Tigon3 5704S
-         '14e4:16c6'   # Broadcom Tigon3 5702A3
-         '14e4:16c7'   # Broadcom Tigon3 5703A3
-         '14e4:1696'   # Broadcom Tigon3 5782
-         '14e4:169c'   # Broadcom Tigon3 5788
-         '14e4:169d'   # Broadcom Tigon3 5789
-         '14e4:170d'   # Broadcom Tigon3 5901
-         '14e4:1649'   # Broadcom Tigon3 5704S_2
-         '14e4:166e'   # Broadcom Tigon3 5705F
-         '14e4:1658'   # Broadcom Tigon3 5720
-         '14e4:1659'   # Broadcom Tigon3 5721
-         '14e4:1676'   # Broadcom Tigon3 5750
-         '14e4:1677'   # Broadcom Tigon3 5751
-         '14e4:167c'   # Broadcom Tigon3 5750M
-         '14e4:167d'   # Broadcom Tigon3 5751M
-         '14e4:167e'   # Broadcom Tigon3 5751F
-         '14e4:1600'   # Broadcom Tigon3 5752
-         '14e4:1601'   # Broadcom Tigon3 5752M
-         '14e4:16f7'   # Broadcom Tigon3 5753
-         '14e4:16fd'   # Broadcom Tigon3 5753M
-         '14e4:16fe'   # Broadcom Tigon3 5753F
-         '14e4:1668'   # Broadcom Tigon3 5714
-         '14e4:1678'   # Broadcom Tigon3 5715
-         '14e4:166a'   # Broadcom Tigon3 5780
-         '14e4:166b'   # Broadcom Tigon3 5780S
-         '14e4:16dd'   # Broadcom Tigon3 5781
-         '1148:4400'   # Syskonnect 9DXX
-         '1148:4500'   # Syskonnect 9MXX
-         '173b:03e8'   # Altima AC1000
-         '173b:03e9'   # Altima AC1001
-         '173b:03eb'   # Altima AC1003
-         '173b:03ea'   # Altima AC9100
-         '106b:1645')  # Apple Tigon3
-    )
-
-    (pci_config_space_fields
-	# Entries are formated as follows:  
-    	#     <register>:<size>:<mask>
-    	# size is measured in bytes (1,2,4 are valid sizes)
-    	# mask is currently unused; use all zero's
-        ('00000078:4:00000000'   # TG3PCI_REG_BASE_ADDR
-         '0000007c:4:00000000'   # TG3PCI_MEM_WIN_BASE_ADDR
-         '00000080:4:00000000'   # TG3PCI_REG_DATA
-         '00000084:4:00000000'   # TG3PCI_MEM_WIN_DATA
-         '00000090:4:00000000'   # TG3PCI_MISC_LOCAL_CTRL
-         '00000068:4:00000000'   # TG3PCI_MISC_HOST_CTRL
-         '0000009C:4:00000000'   # TG3PCI_STD_RING_PROD_IDX + TG3_64BIT_REG_LOW
-         '00000098:4:00000000'   # TG3PCI_STD_RING_PROD_IDX + TG3_64BIT_REG_HIGH
-         '000000a4:4:00000000'   # TG3PCI_RCV_RET_RING_CON_IDX + TG3_64BIT_REG_LOW
-         '000000a0:4:00000000'   # TG3PCI_RCV_RET_RING_CON_IDX + TG3_64BIT_REG_HIGH
-         '00000070:4:00000000')  # TG3PCI_PCISTATE
-    )
-)
diff --git a/tools/examples/xm-config.xml b/tools/examples/xm-config.xml
deleted file mode 100644
index 943b74d..0000000
--- a/tools/examples/xm-config.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<!--
-
-Copyright (C) 2006 XenSource Inc.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of version 2.1 of the GNU Lesser General Public
-License as published by the Free Software Foundation.
-
-This library 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
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
--->
-
-<!--
-
-This is a configuration file for xm; it should be placed in
-/etc/xen/xm-config.xml.  If this file is missing, then xm will fall back to
-the normal behaviour that's in Xen 3.0.4 and below.  The settings here are
-most useful for experimenting with the Xen-API preview in Xen 3.0.4.
-
--->
-
-<xm>
-  <!-- The server element describes how to talk to Xend.  The type may be 
-       Xen-API or LegacyXMLRPC (the default).  The URI is that of the
-       server; you might try http://server:9363/ or
-       httpu:///var/run/xend/xen-api.sock for the Xen-API, or
-       httpu:///var/run/xend/xmlrpc.sock for the legacy server.
-
-       The username and password attributes will be used to log in if Xen-API
-       is being used.
-    -->
-  <!--
-  <server type='Xen-API'
-          uri='http://localhost:9363/'
-          username='me'
-          password='mypassword' />
-   -->
-</xm>
diff --git a/tools/examples/xmexample.hvm b/tools/examples/xmexample.hvm
deleted file mode 100644
index 96b6cc4..0000000
--- a/tools/examples/xmexample.hvm
+++ /dev/null
@@ -1,373 +0,0 @@
-#  -*- mode: python; -*-
-#============================================================================
-# Python configuration setup for 'xm create'.
-# This script sets the parameters used when a domain is created using 'xm create'.
-# You use a separate script for each domain you want to create, or 
-# you can set the parameters for the domain on the xm command line.
-#============================================================================
-
-#----------------------------------------------------------------------------
-# Kernel image file.
-kernel = "hvmloader"
-
-# The domain build function. HVM domain uses 'hvm'.
-builder='hvm'
-
-# Initial memory allocation (in megabytes) for the new domain.
-#
-# WARNING: Creating a domain with insufficient memory may cause out of
-#          memory errors. The domain needs enough memory to boot kernel
-#          and modules. Allocating less than 32MBs is not recommended.
-memory = 128
-
-# Shadow pagetable memory for the domain, in MB.
-# If not explicictly set, xend will pick an appropriate value.  
-# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
-# shadow_memory = 8
-
-# Whether to transparently share this domain's memory with other domains.
-# default = 0
-# memory_sharing = 0
-
-# A name for your domain. All domains must have different names.
-name = "ExampleHVMDomain"
-
-# 128-bit UUID for the domain.  The default behavior is to generate a new UUID
-# on each call to 'xm create'.
-#uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
-
-#-----------------------------------------------------------------------------
-# The number of cpus guest platform has, default=1
-#vcpus=1
-
-# Enable/disable HVM guest PAE, default=1 (enabled)
-#pae=1
-
-# Enable/disable HVM guest ACPI, default=1 (enabled)
-#acpi=1
-
-# Enable/disable HVM APIC mode, default=1 (enabled)
-# Note that this option is ignored if vcpus > 1
-#apic=1
-
-# Enable/disable extended power management support within HVM guest, i.e., beyond
-# S3, S4, S5 within guest like exposing battery meter.
-# 0 (default option, extended power management support disabled)
-# 1 (pass-through mode; uses pass-through as needed; efficient but limited in scope)
-# 2 (non pass-through mode; extended scope, likely to work on all applicable environment
-#    but comparitively less efficient than pass-through mode)
-# xen_extended_power_mgmt=0
-
-# List of which CPUS this domain is allowed to use, default Xen picks
-#cpus = ""         # leave to Xen to pick
-#cpus = "0"        # all vcpus run on CPU0
-#cpus = "0-3,5,^1" # all vcpus run on cpus 0,2,3,5
-#cpus = ["2", "3"] # VCPU0 runs on CPU2, VCPU1 runs on CPU3
-
-# Optionally define mac and/or bridge for the network interfaces.
-# Random MACs are assigned if not given.
-#vif = [ 'type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0, model=ne2k_pci' ]
-# type=ioemu specify the NIC is an ioemu device not netfront
-vif = [ 'type=ioemu, bridge=xenbr0' ]
-
-#----------------------------------------------------------------------------
-# Define the disk devices you want the domain to have access to, and
-# what you want them accessible as.
-# Each disk entry is of the form phy:UNAME,DEV,MODE
-# where UNAME is the device, DEV is the device name the domain will see,
-# and MODE is r for read-only, w for read-write.
-
-#disk = [ 'phy:hda1,hda1,r' ]
-disk = [ 'file:/var/images/min-el3-i386.img,hda,w', ',hdc:cdrom,r' ]
-
-#----------------------------------------------------------------------------
-# Configure the behaviour when a domain exits.  There are three 'reasons'
-# for a domain to stop: poweroff, reboot, and crash.  For each of these you
-# may specify:
-#
-#   "destroy",        meaning that the domain is cleaned up as normal;
-#   "restart",        meaning that a new domain is started in place of the old
-#                     one;
-#   "preserve",       meaning that no clean-up is done until the domain is
-#                     manually destroyed (using xm destroy, for example); or
-#   "rename-restart", meaning that the old domain is not cleaned up, but is
-#                     renamed and a new domain started in its place.
-#
-# In the event a domain stops due to a crash, you have the additional options:
-#
-#   "coredump-destroy", meaning dump the crashed domain's core and then destroy;
-#   "coredump-restart', meaning dump the crashed domain's core and the restart.
-#
-# The default is
-#
-#   on_poweroff = 'destroy'
-#   on_reboot   = 'restart'
-#   on_crash    = 'restart'
-#
-# For backwards compatibility we also support the deprecated option restart
-#
-# restart = 'onreboot' means on_poweroff = 'destroy'
-#                            on_reboot   = 'restart'
-#                            on_crash    = 'destroy'
-#
-# restart = 'always'   means on_poweroff = 'restart'
-#                            on_reboot   = 'restart'
-#                            on_crash    = 'restart'
-#
-# restart = 'never'    means on_poweroff = 'destroy'
-#                            on_reboot   = 'destroy'
-#                            on_crash    = 'destroy'
-
-#on_poweroff = 'destroy'
-#on_reboot   = 'restart'
-#on_crash    = 'restart'
-
-#============================================================================
-
-# Device Model to be used
-device_model = 'qemu-dm'
-
-#-----------------------------------------------------------------------------
-# boot on floppy (a), hard disk (c), Network (n) or CD-ROM (d) 
-# default: hard disk, cd-rom, floppy
-#boot="cda"
-
-#-----------------------------------------------------------------------------
-#  write to temporary files instead of disk image files
-#snapshot=1
-
-#----------------------------------------------------------------------------
-# enable SDL library for graphics, default = 0
-sdl=0
-
-#----------------------------------------------------------------------------
-# enable OpenGL for texture rendering inside the SDL window, default = 1
-# valid only if sdl is enabled.
-opengl=1
-
-#----------------------------------------------------------------------------
-# enable VNC library for graphics, default = 1
-vnc=1
-
-#----------------------------------------------------------------------------
-# address that should be listened on for the VNC server if vnc is set.
-# default is to use 'vnc-listen' setting from
-# auxbin.xen_configdir() + /xend-config.sxp
-#vnclisten="127.0.0.1"
-
-#----------------------------------------------------------------------------
-# set VNC display number, default = domid
-#vncdisplay=1
-
-#----------------------------------------------------------------------------
-# try to find an unused port for the VNC server, default = 1
-#vncunused=1
-
-#----------------------------------------------------------------------------
-# set password for domain's VNC console
-# default is depents on vncpasswd in xend-config.sxp
-vncpasswd=''
-
-#----------------------------------------------------------------------------
-# no graphics, use serial port
-#nographic=0
-
-#----------------------------------------------------------------------------
-# enable stdvga, default = 0 (use cirrus logic device model)
-stdvga=0
-
-#-----------------------------------------------------------------------------
-#   serial port re-direct to pty deivce, /dev/pts/n 
-#   then xm console or minicom can connect
-serial='pty'
-
-#----------------------------------------------------------------------------
-#   tsc_mode : TSC mode (0=default, 1=native TSC, 2=never emulate, 3=pvrdtscp)
-#   emulate TSC provides synced TSC for all vcpus, but lose perfomrance.
-#   native TSC leverages hardware's TSC(no perf loss), but vcpu's TSC may lose
-#    sync due to hardware's unreliable/unsynced TSC between CPUs.
-#   default intelligently uses native TSC on machines where it is safe, but
-#    switches to emulated if necessary after save/restore/migration
-#   pvrdtscp is for intelligent apps that use special Xen-only paravirtualized
-#    cpuid instructions to obtain offset/scaling/migration info and maximize
-#    performance within pools of machines that support the rdtscp instruction
-tsc_mode=0
-
-#-----------------------------------------------------------------------------
-#   Qemu Monitor, default is disable
-#   Use ctrl-alt-2 to connect

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:45:04 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:45:04 +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 1WXq08-0006II-BI; Wed, 09 Apr 2014 10:45:04 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq05-0006Hs-VW
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:02 +0000
Received: from [85.158.137.68:21232] by server-1.bemta-3.messagelabs.com id
	69/CA-11134-DA425435; Wed, 09 Apr 2014 10:45:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1397040294!5869131!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=2.3 required=7.0 tests=BODY_RANDOM_LONG,DIET_1,
	HOT_NASTY,ML_RADAR_SPEW_LINKS_23,spamassassin: 
X-StarScan-Received: 
X-StarScan-Version: 6.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25914 invoked from network); 9 Apr 2014 10:44:55 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	9 Apr 2014 10:44:55 -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 1WXpzy-0003HK-4Z
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXpzx-0004et-UK
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:44:54 +0000
Date: Wed, 09 Apr 2014 10:44:53 +0000
Message-Id: <E1WXpzx-0004et-UK@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: remove xend and associated
	python modules
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 9e8672f1c36d7237508c537c0a1db6c473c2be37
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Sep 12 10:21:25 2013 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:39:09 2014 +0100

    tools: remove xend and associated python modules
    
    I've retained xen.lowlevel.{xc,xs} since they seem more widely useful. I also
    kept xen.lowlevel.xl even though it is disabled by default and IMHO useless in
    its current form.
    
    I've tried to clean up the various associated bits like example configs, init
    scripts, udev rules etc but no doubt I have missed something, those can easily
    be cleaned up later.
    
    I've also removed xm-test since although it could in theory be reworked to
    test xl it hasn't been touched for years. If someone wants to resurrect it
    then they could do so via the git history.
    
    This has been built but not runtime tested.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    ---
    v2: Clean out some .*ignore cruft
        Remove some xm/xend docs.
---
 .gitignore                                         |   14 -
 .hgignore                                          |   12 -
 MAINTAINERS                                        |    2 -
 config/Tools.mk.in                                 |    1 -
 docs/man/xend-config.sxp.pod.5                     |  158 -
 docs/man/xl.pod.1                                  |    1 -
 docs/man/xm.pod.1                                  | 1004 -----
 docs/man/xmdomain.cfg.pod.5                        |  358 --
 tools/configure                                    |   48 -
 tools/configure.ac                                 |   13 -
 tools/examples/Makefile                            |   12 -
 tools/examples/xend-config.sxp                     |  304 --
 tools/examples/xend-pci-permissive.sxp             |   27 -
 tools/examples/xend-pci-quirks.sxp                 |   96 -
 tools/examples/xm-config.xml                       |   45 -
 tools/examples/xmexample.hvm                       |  373 --
 tools/examples/xmexample.hvm-stubdom               |  317 --
 tools/examples/xmexample.nbd                       |   26 -
 tools/examples/xmexample.pv-grub                   |  172 -
 tools/examples/xmexample1                          |  197 -
 tools/examples/xmexample2                          |  232 -
 tools/examples/xmexample3                          |  218 -
 tools/hotplug/Linux/Makefile                       |    5 -
 tools/hotplug/Linux/init.d/xend                    |   82 -
 tools/hotplug/Linux/xend.rules                     |    4 -
 tools/hotplug/NetBSD/Makefile                      |    3 +-
 tools/hotplug/NetBSD/rc.d/xend                     |   71 -
 tools/libxl/xl.c                                   |   16 -
 tools/python/Makefile                              |   18 +-
 tools/python/logging/logging-0.4.9.2/PKG-INFO      |   25 -
 tools/python/logging/logging-0.4.9.2/README.txt    |  311 --
 tools/python/logging/logging-0.4.9.2/default.css   |   32 -
 .../python/logging/logging-0.4.9.2/liblogging.tex  | 1281 ------
 .../logging/logging-0.4.9.2/logging/__init__.py    | 1225 ------
 .../logging/logging-0.4.9.2/logging/config.py      |  301 --
 .../logging/logging-0.4.9.2/logging/handlers.py    |  787 ----
 .../logging/logging-0.4.9.2/python_logging.html    | 1183 ------
 tools/python/logging/logging-0.4.9.2/setup.py      |   29 -
 tools/python/logging/logging-0.4.9.2/test/app.py   |    5 -
 .../logging/logging-0.4.9.2/test/critical.ini      |   60 -
 .../python/logging/logging-0.4.9.2/test/debug.ini  |   60 -
 .../python/logging/logging-0.4.9.2/test/error.ini  |   60 -
 .../python/logging/logging-0.4.9.2/test/events.xml |   31 -
 .../logging/logging-0.4.9.2/test/log_test.py       |  158 -
 .../logging/logging-0.4.9.2/test/log_test0.py      |  118 -
 .../logging/logging-0.4.9.2/test/log_test1.py      |   85 -
 .../logging/logging-0.4.9.2/test/log_test10.py     |   87 -
 .../logging/logging-0.4.9.2/test/log_test11.py     |   72 -
 .../logging/logging-0.4.9.2/test/log_test12.py     |   47 -
 .../logging/logging-0.4.9.2/test/log_test13.py     |  106 -
 .../logging/logging-0.4.9.2/test/log_test14.py     |  108 -
 .../logging/logging-0.4.9.2/test/log_test15.py     |   70 -
 .../logging/logging-0.4.9.2/test/log_test16.py     |   73 -
 .../logging/logging-0.4.9.2/test/log_test17.py     |  111 -
 .../logging/logging-0.4.9.2/test/log_test18.py     |  102 -
 .../logging/logging-0.4.9.2/test/log_test19.py     |   57 -
 .../logging/logging-0.4.9.2/test/log_test2.py      |  119 -
 .../logging/logging-0.4.9.2/test/log_test20.py     |   84 -
 .../logging/logging-0.4.9.2/test/log_test21.py     |  141 -
 .../logging/logging-0.4.9.2/test/log_test22.py     |   50 -
 .../logging/logging-0.4.9.2/test/log_test3.ini     |   95 -
 .../logging/logging-0.4.9.2/test/log_test3.py      |   70 -
 .../logging/logging-0.4.9.2/test/log_test4.py      |  168 -
 .../logging/logging-0.4.9.2/test/log_test5.py      |   44 -
 .../logging/logging-0.4.9.2/test/log_test6.py      |   47 -
 .../logging/logging-0.4.9.2/test/log_test7.py      |   48 -
 .../logging/logging-0.4.9.2/test/log_test8.py      |   69 -
 .../logging/logging-0.4.9.2/test/log_test9.py      |   71 -
 .../logging/logging-0.4.9.2/test/logconf.ini       |  180 -
 .../python/logging/logging-0.4.9.2/test/logconf.py | 1738 --------
 .../logging/logging-0.4.9.2/test/logging.dtd       |   19 -
 .../logging/logging-0.4.9.2/test/logging.xml       |    5 -
 .../logging/logging-0.4.9.2/test/logrecv.ini       |   36 -
 .../python/logging/logging-0.4.9.2/test/logrecv.py |  443 --
 tools/python/logging/logging-0.4.9.2/test/myapp.py |   13 -
 .../logging/logging-0.4.9.2/test/mymodule.py       |    8 -
 .../python/logging/logging-0.4.9.2/test/stderr.exp |  566 ---
 .../python/logging/logging-0.4.9.2/test/stdout.exp |   24 -
 tools/python/logging/logging-0.4.9.2/test/warn.ini |   60 -
 tools/python/logging/setup.py                      |   11 -
 tools/python/ptsname/ptsname.c                     |   44 -
 tools/python/setup.py                              |   95 +-
 tools/python/xen/lowlevel/checkpoint/checkpoint.c  |  371 --
 tools/python/xen/lowlevel/checkpoint/checkpoint.h  |   61 -
 .../python/xen/lowlevel/checkpoint/libcheckpoint.c |  850 ----
 tools/python/xen/lowlevel/flask/flask.c            |  292 --
 tools/python/xen/lowlevel/netlink/libnetlink.c     |  585 ---
 tools/python/xen/lowlevel/netlink/libnetlink.h     |   58 -
 tools/python/xen/lowlevel/netlink/netlink.c        |  215 -
 tools/python/xen/lowlevel/process/process.c        |  164 -
 tools/python/xen/lowlevel/scf/scf.c                |  156 -
 tools/python/xen/remus/blkdev.py                   |   31 -
 tools/python/xen/remus/device.py                   |  397 --
 tools/python/xen/remus/image.py                    |  227 -
 tools/python/xen/remus/netlink.py                  |  318 --
 tools/python/xen/remus/profile.py                  |   56 -
 tools/python/xen/remus/qdisc.py                    |  189 -
 tools/python/xen/remus/save.py                     |  186 -
 tools/python/xen/remus/tapdisk.py                  |    4 -
 tools/python/xen/remus/util.py                     |   82 -
 tools/python/xen/remus/vbd.py                      |    9 -
 tools/python/xen/remus/vdi.py                      |  121 -
 tools/python/xen/remus/vif.py                      |   18 -
 tools/python/xen/remus/vm.py                       |  168 -
 tools/python/xen/util/Brctl.py                     |  186 -
 tools/python/xen/util/SSHTransport.py              |  102 -
 tools/python/xen/util/__init__.py                  |    1 -
 tools/python/xen/util/acmpolicy.py                 | 1622 -------
 tools/python/xen/util/asserts.py                   |   27 -
 tools/python/xen/util/auxbin.py                    |   47 -
 tools/python/xen/util/blkif.py                     |  107 -
 tools/python/xen/util/bootloader.py                |  626 ---
 tools/python/xen/util/bugtool.py                   |  234 -
 tools/python/xen/util/diagnose.py                  |  185 -
 tools/python/xen/util/dictio.py                    |   50 -
 tools/python/xen/util/fileuri.py                   |  156 -
 tools/python/xen/util/ip.py                        |  121 -
 tools/python/xen/util/mac.py                       |   11 -
 tools/python/xen/util/mkdir.py                     |   44 -
 tools/python/xen/util/oshelp.py                    |   33 -
 tools/python/xen/util/pci.py                       | 1416 -------
 tools/python/xen/util/rwlock.py                    |  137 -
 tools/python/xen/util/sxputils.py                  |   64 -
 tools/python/xen/util/utils.py                     |   78 -
 tools/python/xen/util/vscsi_util.py                |  307 --
 tools/python/xen/util/vusb_util.py                 |  338 --
 tools/python/xen/util/xmlrpcclient.py              |  129 -
 tools/python/xen/util/xmlrpclib2.py                |  220 -
 tools/python/xen/util/xpopen.py                    |  182 -
 tools/python/xen/util/xsconstants.py               |  115 -
 tools/python/xen/util/xsm/__init__.py              |    2 -
 tools/python/xen/util/xsm/acm/__init__.py          |    1 -
 tools/python/xen/util/xsm/acm/acm.py               | 1627 -------
 tools/python/xen/util/xsm/dummy/__init__.py        |    1 -
 tools/python/xen/util/xsm/dummy/dummy.py           |  136 -
 tools/python/xen/util/xsm/flask/__init__.py        |    1 -
 tools/python/xen/util/xsm/flask/flask.py           |   65 -
 tools/python/xen/util/xsm/xsm.py                   |   20 -
 tools/python/xen/util/xsm/xsm_core.py              |    7 -
 tools/python/xen/util/xspolicy.py                  |   66 -
 tools/python/xen/web/SrvBase.py                    |   98 -
 tools/python/xen/web/SrvDir.py                     |  126 -
 tools/python/xen/web/__init__.py                   |   17 -
 tools/python/xen/web/connection.py                 |  333 --
 tools/python/xen/web/http.py                       |  518 ---
 tools/python/xen/web/httpserver.py                 |  367 --
 tools/python/xen/web/protocol.py                   |   40 -
 tools/python/xen/web/resource.py                   |  108 -
 tools/python/xen/web/static.py                     |   61 -
 tools/python/xen/web/tcp.py                        |  212 -
 tools/python/xen/web/unix.py                       |   69 -
 tools/python/xen/xend/Args.py                      |  166 -
 tools/python/xen/xend/MemoryPool.py                |  118 -
 tools/python/xen/xend/PrettyPrint.py               |  323 --
 tools/python/xen/xend/Vifctl.py                    |   35 -
 tools/python/xen/xend/XendAPI.py                   | 2812 -------------
 tools/python/xen/xend/XendAPIConstants.py          |   82 -
 tools/python/xen/xend/XendAPIStore.py              |   83 -
 tools/python/xen/xend/XendAPIVersion.py            |   22 -
 tools/python/xen/xend/XendAuthSessions.py          |  131 -
 tools/python/xen/xend/XendBase.py                  |  126 -
 tools/python/xen/xend/XendBootloader.py            |  230 -
 tools/python/xen/xend/XendCPUPool.py               |  910 ----
 tools/python/xen/xend/XendCheckpoint.py            |  425 --
 tools/python/xen/xend/XendClient.py                |   40 -
 tools/python/xen/xend/XendConfig.py                | 2265 ----------
 tools/python/xen/xend/XendConstants.py             |  164 -
 tools/python/xen/xend/XendDPCI.py                  |  165 -
 tools/python/xen/xend/XendDSCSI.py                 |  299 --
 tools/python/xen/xend/XendDevices.py               |   85 -
 tools/python/xen/xend/XendDmesg.py                 |   41 -
 tools/python/xen/xend/XendDomain.py                | 1958 ---------
 tools/python/xen/xend/XendDomainInfo.py            | 4429 --------------------
 tools/python/xen/xend/XendError.py                 |  252 --
 tools/python/xen/xend/XendLocalStorageRepo.py      |   93 -
 tools/python/xen/xend/XendLogging.py               |  149 -
 tools/python/xen/xend/XendMonitor.py               |  340 --
 tools/python/xen/xend/XendNetwork.py               |  238 --
 tools/python/xen/xend/XendNode.py                  | 1173 ------
 tools/python/xen/xend/XendOptions.py               |  567 ---
 tools/python/xen/xend/XendPBD.py                   |   99 -
 tools/python/xen/xend/XendPIF.py                   |  390 --
 tools/python/xen/xend/XendPIFMetrics.py            |   59 -
 tools/python/xen/xend/XendPPCI.py                  |  160 -
 tools/python/xen/xend/XendPSCSI.py                 |  211 -
 tools/python/xen/xend/XendProtocol.py              |  225 -
 tools/python/xen/xend/XendQCoWStorageRepo.py       |  340 --
 tools/python/xen/xend/XendSXPDev.py                |   13 -
 tools/python/xen/xend/XendStateStore.py            |  234 -
 tools/python/xen/xend/XendStorageRepository.py     |  118 -
 tools/python/xen/xend/XendTask.py                  |  224 -
 tools/python/xen/xend/XendTaskManager.py           |  110 -
 tools/python/xen/xend/XendVDI.py                   |  214 -
 tools/python/xen/xend/XendVMMetrics.py             |  146 -
 tools/python/xen/xend/XendVnet.py                  |  181 -
 tools/python/xen/xend/XendXSPolicy.py              |  305 --
 tools/python/xen/xend/XendXSPolicyAdmin.py         |  386 --
 tools/python/xen/xend/__init__.py                  |    1 -
 tools/python/xen/xend/arch.py                      |   31 -
 tools/python/xen/xend/balloon.py                   |  244 --
 tools/python/xen/xend/encode.py                    |  180 -
 tools/python/xen/xend/image.py                     | 1047 -----
 tools/python/xen/xend/osdep.py                     |  268 --
 tools/python/xen/xend/server/BlktapController.py   |  313 --
 tools/python/xen/xend/server/ConsoleController.py  |   38 -
 tools/python/xen/xend/server/DevConstants.py       |   49 -
 tools/python/xen/xend/server/DevController.py      |  677 ---
 tools/python/xen/xend/server/SSLXMLRPCServer.py    |  103 -
 tools/python/xen/xend/server/SrvDaemon.py          |  420 --
 tools/python/xen/xend/server/SrvDmesg.py           |   52 -
 tools/python/xen/xend/server/SrvDomain.py          |  329 --
 tools/python/xen/xend/server/SrvDomainDir.py       |  222 -
 tools/python/xen/xend/server/SrvNode.py            |   64 -
 tools/python/xen/xend/server/SrvRoot.py            |   43 -
 tools/python/xen/xend/server/SrvServer.py          |  261 --
 tools/python/xen/xend/server/SrvVnetDir.py         |  128 -
 tools/python/xen/xend/server/SrvXendLog.py         |   37 -
 tools/python/xen/xend/server/XMLRPCServer.py       |  273 --
 tools/python/xen/xend/server/__init__.py           |    1 -
 tools/python/xen/xend/server/blkif.py              |  221 -
 tools/python/xen/xend/server/iopif.py              |  102 -
 tools/python/xen/xend/server/irqif.py              |   95 -
 tools/python/xen/xend/server/netif.py              |  218 -
 tools/python/xen/xend/server/netif2.py             |  163 -
 tools/python/xen/xend/server/params.py             |   46 -
 tools/python/xen/xend/server/pciif.py              |  596 ---
 tools/python/xen/xend/server/pciquirk.py           |  149 -
 tools/python/xen/xend/server/relocate.py           |  173 -
 tools/python/xen/xend/server/tests/__init__.py     |    1 -
 .../xen/xend/server/tests/test_controllers.py      |   81 -
 tools/python/xen/xend/server/udevevent.py          |   92 -
 tools/python/xen/xend/server/vfbif.py              |   91 -
 tools/python/xen/xend/server/vscsiif.py            |  246 --
 tools/python/xen/xend/server/vusbif.py             |  126 -
 tools/python/xen/xend/sxp.py                       |  765 ----
 tools/python/xen/xend/tests/__init__.py            |    1 -
 tools/python/xen/xend/tests/test_XendConfig.py     |   42 -
 tools/python/xen/xend/tests/test_sxp.py            |   39 -
 tools/python/xen/xend/tests/test_uuid.py           |   30 -
 tools/python/xen/xend/tests/xend-config.sxp        |  131 -
 tools/python/xen/xend/uuid.py                      |   69 -
 tools/python/xen/xend/xend                         |  110 -
 tools/python/xen/xend/xenstore/__init__.py         |   16 -
 tools/python/xen/xend/xenstore/tests/__init__.py   |    2 -
 tools/python/xen/xend/xenstore/tests/stress_xs.py  |  121 -
 tools/python/xen/xend/xenstore/xstransact.py       |  368 --
 tools/python/xen/xend/xenstore/xsutil.py           |   32 -
 tools/python/xen/xend/xenstore/xswatch.py          |   80 -
 tools/python/xen/xm/XenAPI.py                      |  206 -
 tools/python/xen/xm/addlabel.py                    |  274 --
 tools/python/xen/xm/console.py                     |   88 -
 tools/python/xen/xm/cpupool-create.py              |   51 -
 tools/python/xen/xm/cpupool-new.py                 |   50 -
 tools/python/xen/xm/cpupool.py                     |  236 --
 tools/python/xen/xm/create.dtd                     |  154 -
 tools/python/xen/xm/create.py                      | 1529 -------
 tools/python/xen/xm/dry-run.py                     |  161 -
 tools/python/xen/xm/dumppolicy.py                  |   69 -
 tools/python/xen/xm/getenforce.py                  |   66 -
 tools/python/xen/xm/getlabel.py                    |  157 -
 tools/python/xen/xm/getpolicy.py                   |  135 -
 tools/python/xen/xm/help.py                        |  100 -
 tools/python/xen/xm/labels.py                      |   89 -
 tools/python/xen/xm/main.py                        | 4030 ------------------
 tools/python/xen/xm/migrate.py                     |   87 -
 tools/python/xen/xm/new.py                         |   79 -
 tools/python/xen/xm/opts.py                        |  627 ---
 tools/python/xen/xm/resetpolicy.py                 |  106 -
 tools/python/xen/xm/resources.py                   |   65 -
 tools/python/xen/xm/rmlabel.py                     |  216 -
 tools/python/xen/xm/setenforce.py                  |   74 -
 tools/python/xen/xm/setpolicy.py                   |  181 -
 tools/python/xen/xm/shutdown.py                    |  164 -
 tools/python/xen/xm/tests/__init__.py              |    2 -
 tools/python/xen/xm/tests/test_create.py           |  206 -
 tools/python/xen/xm/xenapi_create.py               | 1129 -----
 tools/python/xen/xm/xm                             |   20 -
 tools/xcutils/Makefile                             |   10 +-
 tools/xcutils/xc_restore.c                         |   73 -
 tools/xcutils/xc_save.c                            |  227 -
 tools/xm-test/COPYING                              |  340 --
 tools/xm-test/ChangeLog                            |   11 -
 tools/xm-test/Makefile.am                          |   18 -
 tools/xm-test/README                               |  310 --
 tools/xm-test/TODO                                 |    3 -
 tools/xm-test/Writing_Tests_HOWTO                  |  136 -
 tools/xm-test/autogen                              |    9 -
 tools/xm-test/configure.ac                         |  155 -
 tools/xm-test/grouptest/cpupool                    |    1 -
 tools/xm-test/grouptest/create                     |    1 -
 tools/xm-test/grouptest/default                    |   30 -
 tools/xm-test/grouptest/medium                     |   24 -
 tools/xm-test/grouptest/quick                      |    4 -
 tools/xm-test/grouptest/xapi                       |    1 -
 tools/xm-test/lib/XmTestLib/Console.py             |  302 --
 tools/xm-test/lib/XmTestLib/DomainTracking.py      |   61 -
 tools/xm-test/lib/XmTestLib/NetConfig.py           |  268 --
 tools/xm-test/lib/XmTestLib/Test.py                |  203 -
 tools/xm-test/lib/XmTestLib/XenAPIDomain.py        |  183 -
 tools/xm-test/lib/XmTestLib/XenDevice.py           |  275 --
 tools/xm-test/lib/XmTestLib/XenDomain.py           |  385 --
 tools/xm-test/lib/XmTestLib/XenMemory.py           |   68 -
 tools/xm-test/lib/XmTestLib/Xm.py                  |  245 --
 tools/xm-test/lib/XmTestLib/__init__.py            |   27 -
 tools/xm-test/lib/XmTestLib/arch.py                |  118 -
 tools/xm-test/lib/XmTestLib/block_utils.py         |   53 -
 tools/xm-test/lib/XmTestLib/config.py.in           |    7 -
 tools/xm-test/lib/XmTestLib/network_utils.py       |   60 -
 tools/xm-test/lib/XmTestLib/xapi.py                |   54 -
 tools/xm-test/lib/XmTestReport/OSReport.py         |  248 --
 tools/xm-test/lib/XmTestReport/ProgReport.py       |  119 -
 tools/xm-test/lib/XmTestReport/Report.py           |  156 -
 tools/xm-test/lib/XmTestReport/ResultReport.py     |  157 -
 tools/xm-test/lib/XmTestReport/arch.py             |   42 -
 tools/xm-test/lib/XmTestReport/utils.py            |   31 -
 tools/xm-test/lib/XmTestReport/xmtest.py.in        |   15 -
 tools/xm-test/mergereport                          |   25 -
 tools/xm-test/mkreport                             |   71 -
 tools/xm-test/ramdisk/Makefile.am                  |  126 -
 .../ramdisk/README-XenSource-initrd-0.7-img        |   42 -
 .../ramdisk/README-XenSource-initrd-0.8-img        |   42 -
 .../ramdisk/README-XenSource-initrd-1.0-img        |   46 -
 .../ramdisk/README-XenSource-initrd-1.1-img        |   45 -
 tools/xm-test/ramdisk/bin/create_disk_image        |  384 --
 tools/xm-test/ramdisk/configs/buildroot-i386       |  346 --
 tools/xm-test/ramdisk/configs/busybox              |  465 --
 tools/xm-test/ramdisk/configs/uClibc               |  172 -
 tools/xm-test/ramdisk/make-release.sh              |   44 -
 .../patches/buildroot/add_xvd_devices.patch        |   13 -
 .../xm-test/ramdisk/patches/buildroot/hping.patch  |   67 -
 tools/xm-test/ramdisk/skel/.profile                |    3 -
 tools/xm-test/ramdisk/skel/etc/init.d/rcS          |   19 -
 tools/xm-test/ramdisk/skel/etc/inittab             |    5 -
 tools/xm-test/ramdisk/skel/root/.profile           |    3 -
 tools/xm-test/runtest.sh                           |  337 --
 tools/xm-test/tests/Makefile.am                    |   43 -
 tools/xm-test/tests/Makefile.am.template           |   21 -
 tools/xm-test/tests/_sanity/01_domu_proc.py        |   32 -
 tools/xm-test/tests/_sanity/Makefile.am            |   21 -
 .../block-create/01_block_attach_device_pos.py     |   49 -
 .../02_block_attach_file_device_pos.py             |   49 -
 .../04_block_attach_device_repeatedly_pos.py       |   46 -
 ...ock_attach_and_dettach_device_repeatedly_pos.py |   49 -
 .../block-create/06_block_attach_baddomain_neg.py  |   18 -
 .../block-create/07_block_attach_baddevice_neg.py  |   53 -
 .../08_block_attach_bad_filedevice_neg.py          |   52 -
 ...ock_attach_and_dettach_device_check_data_pos.py |   66 -
 .../10_block_attach_dettach_multiple_devices.py    |  100 -
 .../block-create/11_block_attach_shared_dom0.py    |   38 -
 .../block-create/12_block_attach_shared_domU.py    |   30 -
 tools/xm-test/tests/block-create/Makefile.am       |   29 -
 .../block-destroy/01_block-destroy_btblock_pos.py  |   44 -
 .../block-destroy/02_block-destroy_rtblock_pos.py  |   41 -
 .../block-destroy/03_block-destroy_nonexist_neg.py |   17 -
 .../04_block-destroy_nonattached_neg.py            |   33 -
 .../block-destroy/05_block-destroy_byname_pos.py   |   43 -
 .../06_block-destroy_check_list_pos.py             |   42 -
 tools/xm-test/tests/block-destroy/Makefile.am      |   26 -
 .../block-integrity/01_block_device_read_verify.py |   62 -
 .../02_block_device_write_verify.py                |   63 -
 tools/xm-test/tests/block-integrity/Makefile.am    |   22 -
 .../xm-test/tests/block-list/01_block-list_pos.py  |   42 -
 .../tests/block-list/02_block-list_attachbd_pos.py |   46 -
 .../block-list/03_block-list_anotherbd_pos.py      |   54 -
 .../tests/block-list/04_block-list_nodb_pos.py     |   28 -
 .../tests/block-list/05_block-list_nonexist_neg.py |   18 -
 .../block-list/06_block-list_checkremove_pos.py    |   61 -
 tools/xm-test/tests/block-list/Makefile.am         |   26 -
 .../xm-test/tests/console/01_console_badopt_neg.py |   21 -
 .../xm-test/tests/console/02_console_baddom_neg.py |   27 -
 tools/xm-test/tests/console/Makefile.am            |   22 -
 .../xm-test/tests/cpupool/01_cpupool_basic_pos.py  |   72 -
 .../xm-test/tests/cpupool/02_cpupool_manage_pos.py |  152 -
 tools/xm-test/tests/cpupool/03_cpupool_domain.py   |  126 -
 tools/xm-test/tests/cpupool/04_cpupool_migrate.py  |   84 -
 tools/xm-test/tests/cpupool/Makefile.am            |   22 -
 tools/xm-test/tests/cpupool/pool1.cfg              |    1 -
 tools/xm-test/tests/cpupool/pools.py               |   78 -
 tools/xm-test/tests/create/01_create_basic_pos.py  |   49 -
 tools/xm-test/tests/create/02_create_noparm_neg.py |   17 -
 .../xm-test/tests/create/03_create_badparm_neg.py  |   19 -
 .../tests/create/04_create_conflictname_neg.py     |   41 -
 tools/xm-test/tests/create/06_create_mem_neg.py    |   53 -
 tools/xm-test/tests/create/07_create_mem64_pos.py  |   49 -
 tools/xm-test/tests/create/08_create_mem128_pos.py |   49 -
 tools/xm-test/tests/create/09_create_mem256_pos.py |   49 -
 .../xm-test/tests/create/10_create_fastdestroy.py  |   43 -
 .../tests/create/11_create_concurrent_pos.py       |   78 -
 .../create/12_create_concurrent_stress_pos.py      |   59 -
 .../xm-test/tests/create/13_create_multinic_pos.py |   27 -
 .../tests/create/14_create_blockroot_pos.py        |   44 -
 .../xm-test/tests/create/15_create_smallmem_pos.py |   27 -
 .../xm-test/tests/create/16_create_smallmem_neg.py |   30 -
 tools/xm-test/tests/create/Makefile.am             |   33 -
 .../xm-test/tests/destroy/01_destroy_basic_pos.py  |   40 -
 .../xm-test/tests/destroy/02_destroy_noparm_neg.py |   16 -
 .../tests/destroy/03_destroy_nonexist_neg.py       |   16 -
 .../tests/destroy/04_destroy_badparm_neg.py        |   16 -
 tools/xm-test/tests/destroy/05_destroy_byid_pos.py |   33 -
 tools/xm-test/tests/destroy/06_destroy_dom0_neg.py |   14 -
 .../xm-test/tests/destroy/07_destroy_stale_pos.py  |  133 -
 tools/xm-test/tests/destroy/Makefile.am            |   27 -
 tools/xm-test/tests/dmesg/01_dmesg_basic_pos.py    |   15 -
 tools/xm-test/tests/dmesg/02_dmesg_basic_neg.py    |   17 -
 tools/xm-test/tests/dmesg/Makefile.am              |   21 -
 tools/xm-test/tests/domid/01_domid_basic_pos.py    |   16 -
 tools/xm-test/tests/domid/02_domid_basic_neg.py    |   15 -
 tools/xm-test/tests/domid/Makefile.am              |   21 -
 .../xm-test/tests/domname/01_domname_basic_pos.py  |   17 -
 .../xm-test/tests/domname/02_domname_basic_neg.py  |   15 -
 tools/xm-test/tests/domname/Makefile.am            |   21 -
 .../01_enforce_dom0_cpus_basic_pos.py              |  126 -
 tools/xm-test/tests/enforce_dom0_cpus/Makefile.am  |   21 -
 tools/xm-test/tests/help/01_help_basic_pos.py      |   14 -
 tools/xm-test/tests/help/02_help_basic_neg.py      |   14 -
 tools/xm-test/tests/help/03_help_badparm_neg.py    |   14 -
 tools/xm-test/tests/help/04_help_long_pos.py       |   16 -
 tools/xm-test/tests/help/05_help_nonroot_pos.py    |   17 -
 tools/xm-test/tests/help/06_help_allcmds.py        |   44 -
 tools/xm-test/tests/help/Makefile.am               |   26 -
 tools/xm-test/tests/info/01_info_basic_pos.py      |   11 -
 .../xm-test/tests/info/02_info_compiledata_pos.py  |   42 -
 tools/xm-test/tests/info/Makefile.am               |   22 -
 tools/xm-test/tests/list/01_list_basic_pos.py      |   14 -
 tools/xm-test/tests/list/02_list_badparm_neg.py    |   16 -
 tools/xm-test/tests/list/03_list_nonexist_neg.py   |   17 -
 tools/xm-test/tests/list/04_list_goodparm_pos.py   |   28 -
 tools/xm-test/tests/list/05_list_long_pos.py       |   22 -
 tools/xm-test/tests/list/06_list_nonroot.py        |   15 -
 tools/xm-test/tests/list/Makefile.am               |   27 -
 .../xm-test/tests/memmax/01_memmax_badparm_neg.py  |   29 -
 tools/xm-test/tests/memmax/Makefile.am             |   21 -
 tools/xm-test/tests/memset/01_memset_basic_pos.py  |   82 -
 .../xm-test/tests/memset/02_memset_badparm_neg.py  |   56 -
 tools/xm-test/tests/memset/03_memset_random_pos.py |   64 -
 .../xm-test/tests/memset/04_memset_smallmem_pos.py |   55 -
 tools/xm-test/tests/memset/Makefile.am             |   24 -
 .../tests/migrate/01_migrate_localhost_pos.py      |   86 -
 tools/xm-test/tests/migrate/Makefile.am            |   20 -
 .../tests/network-attach/01_network_attach_pos.py  |   43 -
 .../network-attach/02_network_attach_detach_pos.py |   49 -
 .../03_network_attach_detach_multiple_pos.py       |   51 -
 .../04_network_attach_baddomain_neg.py             |   15 -
 tools/xm-test/tests/network-attach/Makefile.am     |   24 -
 .../tests/network/02_network_local_ping_pos.py     |   71 -
 .../tests/network/03_network_local_tcp_pos.py      |   75 -
 .../tests/network/04_network_local_udp_pos.py      |   76 -
 .../tests/network/05_network_dom0_ping_pos.py      |   54 -
 .../tests/network/06_network_dom0_tcp_pos.py       |   57 -
 .../tests/network/07_network_dom0_udp_pos.py       |   56 -
 .../tests/network/11_network_domU_ping_pos.py      |   62 -
 .../tests/network/12_network_domU_tcp_pos.py       |   64 -
 .../tests/network/13_network_domU_udp_pos.py       |   76 -
 tools/xm-test/tests/network/Makefile.am            |   34 -
 tools/xm-test/tests/pause/01_pause_basic_pos.py    |   63 -
 tools/xm-test/tests/pause/02_pause_badopt_neg.py   |   32 -
 tools/xm-test/tests/pause/03_pause_badname_neg.py  |   18 -
 tools/xm-test/tests/pause/04_pause_badid_neg.py    |   18 -
 tools/xm-test/tests/pause/Makefile.am              |   22 -
 tools/xm-test/tests/reboot/01_reboot_basic_pos.py  |   52 -
 tools/xm-test/tests/reboot/02_reboot_badopt_neg.py |   32 -
 .../xm-test/tests/reboot/03_reboot_badname_neg.py  |   18 -
 tools/xm-test/tests/reboot/Makefile.am             |   23 -
 .../xm-test/tests/restore/01_restore_basic_pos.py  |   82 -
 .../tests/restore/02_restore_badparm_neg.py        |   28 -
 .../tests/restore/03_restore_badfilename_neg.py    |   28 -
 .../tests/restore/04_restore_withdevices_pos.py    |  130 -
 tools/xm-test/tests/restore/Makefile.am            |   24 -
 tools/xm-test/tests/save/01_save_basic_pos.py      |   37 -
 tools/xm-test/tests/save/02_save_badparm_neg.py    |   28 -
 tools/xm-test/tests/save/03_save_bogusfile_neg.py  |   39 -
 tools/xm-test/tests/save/Makefile.am               |   24 -
 .../sched-credit/01_sched_credit_weight_cap_pos.py |   72 -
 tools/xm-test/tests/sched-credit/Makefile.am       |   20 -
 .../xm-test/tests/sedf/01_sedf_period_slice_pos.py |   62 -
 .../xm-test/tests/sedf/02_sedf_period_lower_neg.py |   44 -
 .../xm-test/tests/sedf/03_sedf_slice_lower_neg.py  |   40 -
 .../xm-test/tests/sedf/04_sedf_slice_upper_neg.py  |   48 -
 tools/xm-test/tests/sedf/05_sedf_extratime_pos.py  |   63 -
 .../tests/sedf/06_sedf_extratime_disable_neg.py    |   71 -
 tools/xm-test/tests/sedf/Makefile.am               |   25 -
 .../tests/shutdown/01_shutdown_basic_pos.py        |   54 -
 .../tests/shutdown/02_shutdown_badparm_neg.py      |   39 -
 .../tests/shutdown/03_shutdown_nonexist_neg.py     |   22 -
 tools/xm-test/tests/shutdown/Makefile.am           |   21 -
 tools/xm-test/tests/sysrq/01_sysrq_basic_neg.py    |   20 -
 tools/xm-test/tests/sysrq/02_sysrq_sync_pos.py     |   52 -
 .../xm-test/tests/sysrq/03_sysrq_withreboot_pos.py |   40 -
 tools/xm-test/tests/sysrq/Makefile.am              |   23 -
 .../xm-test/tests/unpause/01_unpause_basic_pos.py  |   76 -
 tools/xm-test/tests/unpause/Makefile.am            |   20 -
 .../vcpu-disable/01_vcpu-disable_basic_pos.py      |   82 -
 tools/xm-test/tests/vcpu-disable/Makefile.am       |   21 -
 .../tests/vcpu-pin/01_vcpu-pin_basic_pos.py        |   50 -
 tools/xm-test/tests/vcpu-pin/Makefile.am           |   21 -
 tools/xm-test/tests/xapi/01_xapi-vm_basic.py       |   61 -
 tools/xm-test/tests/xapi/02_xapi-vbd_basic.py      |  122 -
 tools/xm-test/tests/xapi/03_xapi-network_pos.py    |  123 -
 .../tests/xapi/04_xapi-data_uri_handling.py        |   65 -
 tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py |  157 -
 tools/xm-test/tests/xapi/Makefile.am               |   23 -
 501 files changed, 7 insertions(+), 83858 deletions(-)

diff --git a/.gitignore b/.gitignore
index eb210ca..af1d826 100644
--- a/.gitignore
+++ b/.gitignore
@@ -245,8 +245,6 @@ tools/vtpm/tpm_emulator/*
 tools/vtpm/vtpm/*
 tools/vtpm_manager/manager/vtpm_managerd
 tools/xcutils/lsevtchn
-tools/xcutils/xc_restore
-tools/xcutils/xc_save
 tools/xcutils/readnotes
 tools/xenfb/sdlfb
 tools/xenfb/vncfb
@@ -279,18 +277,6 @@ tools/xentrace/xentrace_setsize
 tools/xentrace/tbctl
 tools/xentrace/xenctx
 tools/xentrace/xentrace
-tools/xm-test/ramdisk/buildroot
-tools/xm-test/aclocal.m4
-tools/xm-test/autom4te
-tools/xm-test/install-sh
-tools/xm-test/mkinstalldirs
-tools/xm-test/missing
-tools/xm-test/config(ure|.log|.status|.guess|.sub)
-tools/xm-test/Makefile(.in)*
-tools/xm-test/*/Makefile(.in)*
-tools/xm-test/lib/XmTestLib/config.py
-tools/xm-test/lib/XmTestReport/xmtest.py
-tools/xm-test/tests/*.test
 tools/ocaml-xenstored*
 xen/.banner
 xen/System.map
diff --git a/.hgignore b/.hgignore
index 9c9421e..6d09b09 100644
--- a/.hgignore
+++ b/.hgignore
@@ -278,18 +278,6 @@
 ^tools/xentrace/tbctl$
 ^tools/xentrace/xenctx$
 ^tools/xentrace/xentrace$
-^tools/xm-test/ramdisk/buildroot
-^tools/xm-test/aclocal.m4$
-^tools/xm-test/autom4te
-^tools/xm-test/install-sh$
-^tools/xm-test/mkinstalldirs$
-^tools/xm-test/missing$
-^tools/xm-test/config(ure|.log|.status|.guess|.sub)$
-^tools/xm-test/Makefile(.in)*$
-^tools/xm-test/.*/Makefile(.in)*$
-^tools/xm-test/lib/XmTestLib/config.py$
-^tools/xm-test/lib/XmTestReport/xmtest.py$
-^tools/xm-test/tests/.*\.test$
 ^tools/firmware/ovmf-remote
 ^tools/firmware/ovmf$
 ^tools/qemu-xen-traditional-dir-remote
diff --git a/MAINTAINERS b/MAINTAINERS
index 3f8810b..19dd49f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -255,8 +255,6 @@ REMUS
 M:	Shriram Rajagopalan <rshriram@cs.ubc.ca>
 S:	Maintained
 F:	tools/remus/
-F:	tools/python/xen/remus/
-F:	tools/python/xen/lowlevel/checkpoint/
 F:	tools/blktap2/drivers/block-remus.c
 F:	tools/blktap2/drivers/hashtable*
 
diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index d9d3239..85379b2 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -54,7 +54,6 @@ CONFIG_ROMBIOS      := @rombios@
 CONFIG_SEABIOS      := @seabios@
 CONFIG_QEMU_TRAD    := @qemu_traditional@
 CONFIG_QEMU_XEN     := @qemu_xen@
-CONFIG_XEND         := @xend@
 CONFIG_BLKTAP1      := @blktap1@
 
 #System options
diff --git a/docs/man/xend-config.sxp.pod.5 b/docs/man/xend-config.sxp.pod.5
deleted file mode 100644
index 9504c71..0000000
--- a/docs/man/xend-config.sxp.pod.5
+++ /dev/null
@@ -1,158 +0,0 @@
-=head1 NAME
-
-xend-config.sxp - Xen daemon configuration file
-
-=head1 SYNOPSIS
-
-/etc/xen/xend-config.sxp
-
-=head1 DESCRIPTION
-
-The xend(1) program requires xend-config.sxp to specify operating
-parameters which determine the behavior of the daemon at runtime.
-
-The parameters are specified in S-expression format.  See the example
-configuration file in I</etc/xen/xend-config.sxp> for details.
-
-=head1 OPTIONS
-
-The following lists the daemon configuration parameters:
-
-=over 4
-
-=item I<logfile>
-
-The location of the file to record runtime log messages.  Defaults to
-I</var/log/xen/xend.log>.
-
-=item I<loglevel>
-
-Filters out messages below the specified level.  Possible values are
-DEBUG, INFO, WARNING, ERROR, CRITICAL.  Defaults to I<DEBUG>.
-
-=item I<xend-http-server>
-
-A boolean value that tells xend whether or not to start the http
-stream socket management server.  Defaults to I<no>.
-
-=item I<xend-unix-server>
-
-A boolean value that tells xend whether or not to start the unix
-domain socket management server.  This is required for the CLI tools
-to operate.  Defaults to I<yes>.
-
-=item I<xend-relocation-server>
-
-A boolean value that tells xend whether or not to start the relocation
-server.  This is required for cross-machine migrations.  Defaults to
-I<no>.
-
-=item I<xend-unix-path>
-
-The location of the unix domain socket the xend-unix-server will use
-to communicate with the management tools.  Defaults to
-I</var/lib/xend/xend-socket>.
-
-=item I<xend-port>
-
-The port that will be used by the http management server.  Defaults to
-I<8000>.
-
-=item I<xend-relocation-port>
-
-The port that will be used by the relocation server.  Defaults to
-I<8002>.
-
-=item I<xend-address> 
-
-The address to which the http management server will bind.  Defaults
-to I<''> which means "all interfaces".
-
-=item I<xend-relocation-address>
-
-The address to which the relocation server will bind.  Defaults to
-I<''> which means "all interfaces".
-
-=item I<console-limit>
-
-The kilobyte buffer limit that will be enforced by the console server.
-This limit is set per-domain, and is needed to prevent a single domain
-from overwhelming the console server with massive amounts of data.
-Defaults to I<1024>.
-
-=item I<network-script>
-
-The name of the script in I</etc/xen/scripts> that will be run to
-setup the networking environment.  This can be any name, but in
-general is either I<network-bridge> or I<network-route>.
-
-=item I<vif-script>
-
-The name of the script in I</etc/xen/scripts> that will be run to
-setup a virtual interface when it is created or destroyed.  This needs
-to (in general) work in unison with the I<network-script>.
-
-=item I<dom0-min-mem>
-
-This specifies the minimum number of megabytes that will be reserved
-for Domain0.  If this value is positive, Domain0 will be automatically
-ballooned down to this limit to make space for new domains.  If this
-is set to 0, Domain0 will not be automatically ballooned.
-
-=item I<dom0-cpus>
-
-This specifies the number of CPUs that Domain0 will be allowed to use.
-If the value is 0, all available CPUs will be used by Domain0.
-
-=item I<enable-dump>
-
-A boolean value that tells xend whether or not core dumps of guest
-domains should be saved when a crash occurs.  Defaults to I<no>.
-
-=item I<external-migration-tool>
-
-The name of an application or script that can handle external device
-migration, such as for example virtual TPM migration. An example
-script is I</etc/xen/scripts/external-device-migrate>.
-
-=item I<device-create-timeout>
-
-Integer value that tells xend how long it should wait for a new device
-to be created. Defaults to I<100>.
-
-=item I<device-destroy-timeout>
-
-Integer value that tells xend how long it should wait for a device to
-be destroyed. Defaults to I<100>.
-
-=back
-
-=head1 EXAMPLES
-
-An example configuration with relocation enabled for the local network:
-
-=over 4
-
- (xend-relocation-server yes)
- (xend-relocation-address 192.0.2.192)
- (network-script network-bridge)
- (vif-script vif-bridge)
- (dom0-min-mem 0)
- (dom0-cpus 0)
-
-=back
-
-=head1 CAVEATS
-
-Note that relocation is currently unsecured and is very dangerous if
-left enabled.  No authentication is performed, and very little sanity
-checking takes place.  Enable at your own risk.
-
-=head1 SEE ALSO
-
-B<xend>(1)
-
-=head1 AUTHOR
-
-Dan Smith <danms@us.ibm.com>
-
diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1
index f7ceaa8..dae0718 100644
--- a/docs/man/xl.pod.1
+++ b/docs/man/xl.pod.1
@@ -12,7 +12,6 @@ The B<xl> program is the new tool for managing Xen guest
 domains. The program can be used to create, pause, and shutdown
 domains. It can also be used to list current domains, enable or pin
 VCPUs, and attach or detach virtual block devices.
-The old B<xm> tool is deprecated and should not be used.
 
 The basic structure of every B<xl> command is almost always:
 
diff --git a/docs/man/xm.pod.1 b/docs/man/xm.pod.1
deleted file mode 100644
index 973de95..0000000
--- a/docs/man/xm.pod.1
+++ /dev/null
@@ -1,1004 +0,0 @@
-=head1 NAME
-
-xm - Obsolete xen management user interface
-
-=head1 SYNOPSIS
-
-B<xm> I<subcommand> [I<args>]
-
-=head1 DESCRIPTION
-
-This program is now superseded by B<xl>, which should be largely
-backwards-compatible with B<xm>.
-
-The B<xm> program is the main interface for managing Xen guest domains
-when the obsolete Xend toolstack is in use. The program can be used to
-create, pause, and shutdown domains. It can also be used to list
-current domains, enable or pin VCPUs, and attach or detach virtual
-block devices.
-
-The basic structure of every B<xm> command is almost always:
-
-=over 2
-
-B<xm> I<subcommand> I<domain-id> [I<OPTIONS>]
-
-=back
-
-Where I<subcommand> is one of the subcommands listed below, I<domain-id>
-is the numeric domain id, or the domain name (which will be internally
-translated to domain id), and I<OPTIONS> are subcommand specific
-options.  There are a few exceptions to this rule in the cases where
-the subcommand in question acts on all domains, the entire machine,
-or directly on the Xen hypervisor.  Those exceptions will be clear for
-each of those subcommands.
-
-=head1 NOTES
-
-All B<xm> operations rely upon the Xen control daemon, aka B<xend>.
-For any B<xm> commands to run, xend must also be running.  For this
-reason you should start xend as a service when your system first boots
-using Xen.
-
-Most B<xm> commands require root privileges to run due to the
-communications channels used to talk to the hypervisor.  Running as
-non root will return an error.
-
-Most B<xm> commands act synchronously, except maybe create, shutdown,
-mem-set and vcpu-set. The fact that the B<xm> command returned doesn't
-necessarily mean that the action is complete and you must poll through
-xm list periodically to detect that the operation completed.
-
-=head1 DOMAIN SUBCOMMANDS
-
-The following subcommands manipulate domains directly.  As stated
-previously, most commands take I<domain-id> as the first parameter.
-
-=over 4
-
-=item B<console> I<domain-id>
-
-Attach to domain I<domain-id>'s console.  If you've set up your domains to
-have a traditional log in console this will look much like a normal
-text log in screen.
-
-This uses the back end xenconsole service which currently only
-works for para-virtual domains.  
-
-The attached console will perform much like a standard serial console,
-so running curses based interfaces over the console B<is not
-advised>.  Vi tends to get very odd when using it over this interface.
-
-Use the key combination Ctrl+] to detach the domain console.
-
-=item B<create> I<configfile> [I<OPTIONS>] [I<vars>]..
-
-The create subcommand requires a config file and can optionally take a
-series of I<vars> that add to or override variables defined
-in the config file.  See L<xmdomain.cfg> for full details of that file
-format, and possible options used in either the configfile or for I<vars>.
-
-I<configfile> can either be an absolute path to a file, or a relative
-path to a file located in /etc/xen.
-
-Create will return B<as soon> as the domain is started.  This B<does
-not> mean the guest OS in the domain has actually booted, or is
-available for input.
-
-B<OPTIONS>
-
-=over 4 
-
-=item B<--help_config>
-
-Print the available configuration variables I<vars>.  These variables may be
-used on the command line or in the configuration file I<configfile>.
-
-=item B<-q>, B<--quiet>
-
-No console output.
-
-=item B<--path>
-
-Search path for configuration scripts. The value of PATH is a 
-colon-separated directory list.
-
-=item B<-f=FILE>, B<--defconfig=FILE>
-
-Use the given Python configuration script. The configuration 
-script is loaded after arguments have been processed. Each 
-command-line option sets a configuration variable named after 
-its long option name, and these variables are placed in the
-environment of the script before it is loaded. Variables 
-for options that may be repeated have list values. Other 
-variables can be set using name=value on the command line. 
-After the script is loaded, option values that were not set 
-on the command line are replaced by the values set in the script.
-
-=item B<-F=FILE>, B<--config=FILE>
-
-Use the given SXP formatted configuration script.
-SXP is the underlying configuration format used by Xen.
-SXP configuration scripts can be hand-written or generated
-from Python configuration scripts, using the -n
-(dryrun) option to print the configuration.  An SXP formatted
-configuration file may also be generated for a given I<domain-id> by 
-redirecting the output from the the B<xm list --long I<domain-id>> 
-to a file.
-
-=item B<-n>, B<--dryrun>
-
-Dry run - prints the resulting configuration in SXP
-but does not create the domain.
-
-=item B<-x>, B<--xmldryrun>
-
-XML dry run - prints the resulting configuration in
-XML but does not create the domain.
-
-=item B<-s>, B<--skipdtd>
-
-Skip DTD checking - skips checks on XML before
-creating. Experimental. Can decrease create time.
-
-=item B<-p>, B<--paused>
-
-Leave the domain paused after it is created.
-
-=item B<-c>, B<--console_autoconnect>
-
-Attach console to the domain as soon as it has started.  This is
-useful for determining issues with crashing domains.
-
-=back
-
-B<EXAMPLES>
-
-=over 4
-
-=item I<with config file>
-
-  xm create Fedora4
-
-This creates a domain with the file /etc/xen/Fedora4, and returns as
-soon as it is run.
-
-=item I<without config file>
- 
-  xm create /dev/null ramdisk=initrd.img \
-     kernel=/boot/vmlinuz-2.6.12.6-xenU \
-     name=ramdisk vif='' vcpus=1 \
-     memory=64 root=/dev/ram0
-
-This creates the domain without using a config file (more specifically
-using /dev/null as an empty config file), kernel and ramdisk as
-specified, setting the name of the domain to "ramdisk", also disabling
-virtual networking.  (This example comes from the xm-test test suite.)
-
-=back
-
-=item B<delete>
-
-Remove a domain from Xend domain management. The B<xm list> command
-shows the domain names.
-
-=item B<destroy> I<domain-id>
-
-Immediately terminate the domain I<domain-id>.  This doesn't give the
-domain OS any chance to react, and is the equivalent of ripping the
-power cord out on a physical machine.  In most cases you will want to
-use the B<shutdown> command instead.
-
-=item B<domid> I<domain-name>
-
-Converts a domain name to a domain id using xend's internal mapping.
-
-=item B<domname> I<domain-id>
-
-Converts a domain id to a domain name using xend's internal mapping.
-
-=item B<dump-core> [I<OPTIONS>] I<domain-id> [I<filename>]
-
-Dumps the virtual machine's memory for the specified domain to the
-I<filename> specified.  The dump file will be written to a distribution
-specific directory for dump files.  Such as: /var/lib/xen/dump or 
-/var/xen/dump  Defaults to dumping the core without pausing the domain
-if no I<OPTIONS> are specified.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-L>, B<--live>
-
-Dump core without pausing the domain.
-
-=item B<-C>, B<--crash>
-
-Crash domain after dumping core.
-
-=back
-
-=item B<help> [B<--long>]
-
-Displays the short help message (i.e. common commands).
-
-The B<--long> option prints out the complete set of B<xm> subcommands,
-grouped by function.
-
-=item B<list> [I<OPTIONS>] [I<domain-id> ...]
-
-Prints information about one or more domains.  If no domains are
-specified it prints out information about all domains.
-
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-l>, B<--long>
-
-The output for B<xm list> is not the table view shown below, but 
-instead presents the data in SXP format.
-
-=item B<--label>
-
-Security labels are added to the output of xm list and the lines 
-are sorted by the labels (ignoring case). 
-See the ACCESS CONTROL SUBCOMMAND section of this man page for more 
-information about labels.
-
-=item B<--state=<state>>
-
-Output information for VMs in the specified state.
-
-=back
-
-B<EXAMPLE>
-
-An example format for the list is as follows:
-
-    Name                         ID Mem(MiB) VCPUs State  Time(s)
-    Domain-0                      0       98     1 r-----  5068.6
-    Fedora3                     164      128     1 r-----     7.6
-    Fedora4                     165      128     1 ------     0.6
-    Mandrake2006                166      128     1 -b----     3.6
-    Mandrake10.2                167      128     1 ------     2.5
-    Suse9.2                     168      100     1 ------     1.8
-
-Name is the name of the domain.  ID the numeric domain id.  Mem is the
-desired amount of memory to allocate to the domain (although it may
-not be the currently allocated amount).  VCPUs is the number of
-virtual CPUs allocated to the domain.  State is the run state (see
-below).  Time is the total run time of the domain as accounted for by
-Xen.
-
-B<STATES>
-
-The State field lists 6 states for a Xen domain, and which ones the
-current domain is in.
-
-=over 4
-
-=item B<r - running>
-
-The domain is currently running on a CPU.
-
-=item B<b - blocked>
-
-The domain is blocked, and not running or runnable.  This can be caused
-because the domain is waiting on IO (a traditional wait state) or has
-gone to sleep because there was nothing else for it to do.
-
-=item B<p - paused>
-
-The domain has been paused, usually occurring through the administrator
-running B<xm pause>.  When in a paused state the domain will still
-consume allocated resources like memory, but will not be eligible for
-scheduling by the Xen hypervisor.
-
-=item B<s - shutdown>
-
-FIXME: Why would you ever see this state?
-
-=item B<c - crashed>
-
-The domain has crashed, which is always a violent ending.  Usually
-this state can only occur if the domain has been configured not to
-restart on crash.  See L<xmdomain.cfg> for more info.
-
-=item B<d - dying>
-
-The domain is in process of dying, but hasn't completely shutdown or
-crashed.
-
-FIXME: Is this right?
-
-=back
-
-B<NOTES>
-
-=over 4
-
-The Time column is deceptive.  Virtual IO (network and block devices)
-used by domains requires coordination by Domain0, which means that
-Domain0 is actually charged for much of the time that a DomainU is
-doing IO.  Use of this time value to determine relative utilizations
-by domains is thus very suspect, as a high IO workload may show as
-less utilized than a high CPU workload.  Consider yourself warned.
-
-=back
-
-=item B<mem-max> I<domain-id> I<mem>
-
-Specify the maximum amount of memory the domain is able to use.  I<mem>
-is specified in megabytes. 
-
-The mem-max value may not correspond to the actual memory used in the
-domain, as it may balloon down its memory to give more back to the OS.
-
-=item B<mem-set> I<domain-id> I<mem>
-
-Set the domain's used memory using the balloon driver.
-
-Because this operation requires cooperation from the domain operating
-system, there is no guarantee that it will succeed.  This command will
-definitely not work unless the domain has the required paravirt
-driver.
-
-B<Warning:> There is no good way to know in advance how small of a
-mem-set will make a domain unstable and cause it to crash.  Be very
-careful when using this command on running domains.
-
-=item B<migrate> I<domain-id> I<host> [I<OPTIONS>]
-
-Migrate a domain to another host machine. Xend must be running on
-other host machine, it must be running the same version of Xen, it
-must have the migration TCP port open and accepting connections from
-the source host, and there must be sufficient resources for the domain
-to run (memory, disk, etc).
-
-Migration is pretty complicated, and has many security implications.
-Please read the Xen User's Guide to ensure you understand the
-ramifications and limitations on migration before attempting it in
-production.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-l>, B<--live>
-
-Use live migration.  This will migrate the domain between hosts
-without shutting down the domain.  See the Xen User's Guide for more
-information.
-
-=item B<-r>, B<--resource> I<Mbs>
-
-Set maximum Mbs allowed for migrating the domain.  This ensures that
-the network link is not saturated with migration traffic while
-attempting to do other useful work.
-
-=back
-
-=item B<new> I<configfile> [I<OPTIONS>] [I<vars>]...
-
-Adds a domain to Xend domain management.
-
-The new subcommand requires a config file and can optionally 
-take a series of I<vars> that add to or override variables 
-defined in the config file.  See xmdomain.cfg for full details of that 
-file format, and possible options used in either the configfile or for
-I<vars>.
-
-I<configfile> can either be an absolute path to a file, or a relative 
-path to a file located in /etc/xen.
-
-The new subcommand will return without starting the domain.  The 
-domain needs to be started using the B<xm start> command.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<--help_config>
-
-Print the available configuration variables I<vars>.  These variables may be
-used on the command line or in the configuration file I<configfile>.
-
-=item B<-q>, B<--quiet>
-
-No console output.
-
-=item B<--path>
-
-Search path for configuration scripts. The value of PATH is a 
-colon-separated directory list.
-
-=item B<-f=FILE>, B<--defconfig=FILE>
-
-
-Use the given Python configuration script. The configuration 
-script is loaded after arguments have been processed. Each 
-command-line option sets a configuration variable named after 
-its long option name, and these variables are placed in the
-environment of the script before it is loaded. Variables 
-for options that may be repeated have list values. Other 
-variables can be set using name=value on the command line. 
-After the script is loaded, option values that were not set 
-on the command line are replaced by the values set in the script.
-
-=item B<-F=FILE>, B<--config=FILE>
-
-Use the given SXP formatted configuration script.
-SXP is the underlying configuration format used by Xen.
-SXP configuration scripts can be hand-written or generated
-from Python configuration scripts, using the -n
-(dryrun) option to print the configuration.  An SXP formatted
-configuration file may also be generated for a given I<domain-id> by 
-redirecting the output from the the B<xm list --long I<domain-id>> 
-to a file.
-
-=item B<-n>, B<--dryrun>
-
-Dry run - prints the resulting configuration in SXP
-but does not create the domain.
-
-=item B<-x>, B<--xmldryrun>
-
-XML dry run - prints the resulting configuration in
-XML but does not create the domain.
-
-=item B<-s>, B<--skipdtd>
-
-Skip DTD checking - skips checks on XML before
-creating. Experimental. Can decrease create time.
-
-=item B<-p>, B<--paused>
-
-Leave the domain paused after it is created.
-
-=item B<-c>, B<--console_autoconnect>
-
-Attach console to the domain as soon as it has started.  This is
-useful for determining issues with crashing domains.
-
-=back
-
-=item B<pause> I<domain-id>
-
-Pause a domain.  When in a paused state the domain will still consume
-allocated resources such as memory, but will not be eligible for
-scheduling by the Xen hypervisor.
-
-=item B<reboot> [I<OPTIONS>] I<domain-id>
-
-Reboot a domain.  This acts just as if the domain had the B<reboot>
-command run from the console.  The command returns as soon as it has
-executed the reboot action, which may be significantly before the
-domain actually reboots.
-
-The behavior of what happens to a domain when it reboots is set by the
-B<on_reboot> parameter of the xmdomain.cfg file when the domain was
-created.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-a>, B<--all>
-
-Reboot all domains.
-
-=item B<-w>, B<--wait>
-
-Wait for reboot to complete before returning.  This may take a while,
-as all services in the domain will have to be shut down cleanly.
-
-=back
-
-=item B<restore> I<state-file>
-
-Build a domain from an B<xm save> state file.  See B<save> for more info.
-
-=item B<resume> I<domain-name> [I<OPTIONS>]
-
-Moves a domain out of the suspended state and back into memory.  
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-p>, <--paused>
-
-Moves a domain back into memory but leaves the domain in a paused state.
-The B<xm unpause> subcommand may then be used to bring it out of the 
-paused state.
-
-=back
-
-=item B<save> I<domain-id> I<state-file>
-
-Saves a running domain to a state file so that it can be restored
-later.  Once saved, the domain will no longer be running on the
-system, thus the memory allocated for the domain will be free for
-other domains to use.  B<xm restore> restores from this state file.
-
-This is roughly equivalent to doing a hibernate on a running computer,
-with all the same limitations.  Open network connections may be
-severed upon restore, as TCP timeouts may have expired.
-
-=item B<shutdown> [I<OPTIONS>] I<domain-id>
-
-Gracefully shuts down a domain.  This coordinates with the domain OS
-to perform graceful shutdown, so there is no guarantee that it will
-succeed, and may take a variable length of time depending on what
-services must be shutdown in the domain.  The command returns
-immediately after signally the domain unless that B<-w> flag is used.
-
-The behavior of what happens to a domain when it reboots is set by the
-B<on_shutdown> parameter of the xmdomain.cfg file when the domain was
-created.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-a> 
-
-Shutdown B<all> domains.  Often used when doing a complete shutdown of
-a Xen system.
-
-=item B<-w>
-
-Wait for the domain to complete shutdown before returning.
-
-=back
-
-=item B<start> I<domain-name> [I<OPTIONS>]
-
-Start a Xend managed domain that was added using the B<xm new> command.
-
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-p>, B<--paused>
-
-Do not unpause domain after starting it.
-
-=item B<-c>, B<--console_autoconnect>
-
-Connect to the console after the domain is created.
-
-=back
-
-=item B<suspend> I<domain-name>
-
-Suspend a domain to a state file so that it can be later
-resumed using the B<xm resume> subcommand.  Similar to the B<xm save> 
-subcommand although the state file may not be specified.
-
-=item B<sysrq> I<domain-id> I<letter>
-
-Send a I<Magic System Request> signal to the domain.  For more
-information on available magic sys req operations, see sysrq.txt in
-your Linux Kernel sources.
-
-=item B<unpause> I<domain-id>
-
-Moves a domain out of the paused state.  This will allow a previously
-paused domain to now be eligible for scheduling by the Xen hypervisor.
-
-=item B<vcpu-set> I<domain-id> I<vcpu-count>
-
-Enables the I<vcpu-count> virtual CPUs for the domain in question.
-Like mem-set, this command can only allocate up to the maximum virtual
-CPU count configured at boot for the domain.
-
-If the I<vcpu-count> is smaller than the current number of active
-VCPUs, the highest number VCPUs will be hotplug removed.  This may be
-important for pinning purposes.
-
-Attempting to set the VCPUs to a number larger than the initially
-configured VCPU count is an error.  Trying to set VCPUs to < 1 will be
-quietly ignored.
-
-Because this operation requires cooperation from the domain operating
-system, there is no guarantee that it will succeed.  This command will
-not work with a full virt domain.
-
-=item B<vcpu-list> [I<domain-id>]
-
-Lists VCPU information for a specific domain.  If no domain is
-specified, VCPU information for all domains will be provided.
-
-=item B<vcpu-pin> I<domain-id> I<vcpu> I<cpus>
-
-Pins the the VCPU to only run on the specific CPUs.  The keyword
-B<all> can be used to apply the I<cpus> list to all VCPUs in the
-domain.
-
-Normally VCPUs can float between available CPUs whenever Xen deems a
-different run state is appropriate.  Pinning can be used to restrict
-this, by ensuring certain VCPUs can only run on certain physical
-CPUs.
-
-=back
-
-=head1 XEN HOST SUBCOMMANDS
-
-=over 4
-
-=item B<dmesg> [B<-c>]
-
-Reads the Xen message buffer, similar to dmesg on a Linux system.  The
-buffer contains informational, warning, and error messages created
-during Xen's boot process.  If you are having problems with Xen, this
-is one of the first places to look as part of problem determination.
-
-B<OPTIONS>
-
-=over 4
-
-=item B<-c>, B<--clear>
-
-Clears Xen's message buffer.
-
-=back
-
-=item B<info>
-
-Print information about the Xen host in I<name : value> format.  When
-reporting a Xen bug, please provide this information as part of the
-bug report.
-
-Sample output looks as follows (lines wrapped manually to make the man
-page more readable):
-
- host                   : talon
- release                : 2.6.12.6-xen0
- version                : #1 Mon Nov 14 14:26:26 EST 2005
- machine                : i686
- nr_cpus                : 2
- nr_nodes               : 1
- cores_per_socket       : 1
- threads_per_core       : 1
- cpu_mhz                : 696
- hw_caps                : 0383fbff:00000000:00000000:00000040
- total_memory           : 767
- free_memory            : 37
- xen_major              : 3
- xen_minor              : 0
- xen_extra              : -devel
- xen_caps               : xen-3.0-x86_32
- xen_scheduler          : credit
- xen_pagesize           : 4096
- platform_params        : virt_start=0xfc000000
- xen_changeset          : Mon Nov 14 18:13:38 2005 +0100 
-                          7793:090e44133d40
- cc_compiler            : gcc version 3.4.3 (Mandrakelinux 
-                          10.2 3.4.3-7mdk)
- cc_compile_by          : sdague
- cc_compile_domain      : (none)
- cc_compile_date        : Mon Nov 14 14:16:48 EST 2005
- xend_config_format     : 3
-
-B<FIELDS>
-
-Not all fields will be explained here, but some of the less obvious
-ones deserve explanation:
-
-=over 4
-
-=item B<hw_caps>
-
-A vector showing what hardware capabilities are supported by your
-processor.  This is equivalent to, though more cryptic, the flags
-field in /proc/cpuinfo on a normal Linux machine.
-
-=item B<free_memory>
-
-Available memory (in MB) not allocated to Xen, or any other domains.
-
-=item B<xen_caps>
-
-The Xen version and architecture.  Architecture values can be one of:
-x86_32, x86_32p (i.e. PAE enabled), x86_64, ia64.
-
-=item B<xen_changeset>
-
-The Xen mercurial changeset id.  Very useful for determining exactly
-what version of code your Xen system was built from.
-
-=back
-
-=item B<log>
-
-Print out the xend log.  This log file can be found in
-/var/log/xend.log.
-
-=item B<top>
-
-Executes the B<xentop> command, which provides real time monitoring of
-domains.  Xentop is a curses interface, and reasonably self
-explanatory.
-
-=item B<uptime>
-
-Prints the current uptime of the domains running.
-
-=back
-
-=head1 SCHEDULER SUBCOMMANDS
-
-Xen ships with a number of domain schedulers, which can be set at boot
-time with the B<sched=> parameter on the Xen command line.  By
-default B<credit> is used for scheduling.
-
-FIXME: we really need a scheduler expert to write up this section.
-
-=over 4
-
-=item B<sched-credit> [ B<-d> I<domain-id> [ B<-w>[B<=>I<WEIGHT>] | B<-c>[B<=>I<CAP>] ] ]
-
-Set credit scheduler parameters.  The credit scheduler is a
-proportional fair share CPU scheduler built from the ground up to be
-work conserving on SMP hosts.
-
-Each domain (including Domain0) is assigned a weight and a cap.
-
-B<PARAMETERS>
-
-=over 4
-
-=item I<WEIGHT>
-
-A domain with a weight of 512 will get twice as much CPU as a domain
-with a weight of 256 on a contended host. Legal weights range from 1
-to 65535 and the default is 256.
-
-=item I<CAP>
-
-The cap optionally fixes the maximum amount of CPU a domain will be
-able to consume, even if the host system has idle CPU cycles. The cap
-is expressed in percentage of one physical CPU: 100 is 1 physical CPU,
-50 is half a CPU, 400 is 4 CPUs, etc. The default, 0, means there is
-no upper cap.
-
-NB: Many systems have features that will scale down the computing
-power of a cpu that is not 100% utilized.  This can be in the
-operating system, but can also sometimes be below the operating system
-in the BIOS.  If you set a cap such that individual cores are running
-at less than 100%, this may have an impact on the performance of your
-workload over and above the impact of the cap. For example, if your
-processor runs at 2GHz, and you cap a vm at 50%, the power management
-system may also reduce the clock speed to 1GHz; the effect will be
-that your VM gets 25% of the available power (50% of 1GHz) rather than
-50% (50% of 2GHz).  If you are not getting the performance you expect,
-look at performance and cpufreq options in your operating system and
-your BIOS.
-
-=back
-
-=item B<sched-sedf> I<period> I<slice> I<latency-hint> I<extratime> I<weight>
-
-Set Simple EDF (Earliest Deadline First) scheduler parameters.  This
-scheduler provides weighted CPU sharing in an intuitive way and uses
-realtime-algorithms to ensure time guarantees.  For more information
-see docs/misc/sedf_scheduler_mini-HOWTO.txt in the Xen distribution.
-
-B<PARAMETERS>
-
-=over 4
-
-=item I<period>
-
-The normal EDF scheduling usage in nanoseconds
-
-=item I<slice>
-
-The normal EDF scheduling usage in nanoseconds
-
-FIXME: these are lame, should explain more.
-
-=item I<latency-hint>
-
-Scaled period if domain is doing heavy I/O.
-
-=item I<extratime>
-
-Flag for allowing domain to run in extra time.
-
-=item I<weight>
-
-Another way of setting CPU slice.
-
-=back
-
-B<EXAMPLES>
-
-I<normal EDF (20ms/5ms):>
-
-    xm sched-sedf <dom-id> 20000000 5000000 0 0 0
-
-I<best-effort domains (i.e. non-realtime):>
-
-    xm sched-sedf <dom-id> 20000000 0 0 1 0
-
-I<normal EDF (20ms/5ms) + share of extra-time:>
-
-    xm sched-sedf <dom-id> 20000000 5000000 0 1 0
-
-I<4 domains with weights 2:3:4:2>
-
-    xm sched-sedf <d1> 0 0 0 0 2
-    xm sched-sedf <d2> 0 0 0 0 3
-    xm sched-sedf <d3> 0 0 0 0 4
-    xm sched-sedf <d4> 0 0 0 0 2
-  
-I<1 fully-specified (10ms/3ms) domain, 3 other domains share available
-rest in 2:7:3 ratio:>
-
-    xm sched-sedf <d1> 10000000 3000000 0 0 0
-    xm sched-sedf <d2> 0 0 0 0 2
-    xm sched-sedf <d3> 0 0 0 0 7
-    xm sched-sedf <d4> 0 0 0 0 3
-
-=back
-
-=head1 VIRTUAL DEVICE COMMANDS
-
-Most virtual devices can be added and removed while guests are
-running.  The effect to the guest OS is much the same as any hotplug
-event.
-
-=head2 BLOCK DEVICES
-
-=over 4
-
-=item B<block-attach> I<domain-id> I<be-dev> I<fe-dev> I<mode> [I<bedomain-id>]
-
-Create a new virtual block device.  This will trigger a hotplug event
-for the guest.
-
-B<OPTIONS>
-
-=over 4
-
-=item I<domain-id>
-
-The domain id of the guest domain that the device will be attached to.
-
-=item I<be-dev>
-
-The device in the backend domain (usually domain 0) to be exported.
-This can be specified as a physical partition (phy:sda7) or as a file
-mounted as loopback (file://path/to/loop.iso).
-
-=item I<fe-dev>
-
-How the device should be presented to the guest domain.  It can be
-specified as either a symbolic name, such as /dev/hdc, for common
-devices, or by device id, such as 0x1400 (/dev/hdc device id in hex).
-
-=item I<mode>
-
-The access mode for the device from the guest domain.  Supported modes
-are B<w> (read/write) or B<r> (read-only).
-
-=item I<bedomain-id>
-
-The back end domain hosting the device.  This defaults to domain 0.
-
-=back
-
-B<EXAMPLES>
-
-=over 4
-
-=item I<Mount an ISO as a Disk>
-
-xm block-attach guestdomain file://path/to/dsl-2.0RC2.iso /dev/hdc r
-
-This will mount the dsl ISO as /dev/hdc in the guestdomain as a read
-only device.  This will probably not be detected as a CD-ROM by the
-guest, but mounting /dev/hdc manually will work.
-
-=back
-
-=item B<block-detach> I<domain-id> I<devid> [B<--force>]
-
-Detach a domain's virtual block device. I<devid> may be the symbolic
-name or the numeric device id given to the device by domain 0.  You
-will need to run B<xm block-list> to determine that number.
-
-Detaching the device requires the cooperation of the domain.  If the
-domain fails to release the device (perhaps because the domain is hung
-or is still using the device), the detach will fail.  The B<--force>
-parameter will forcefully detach the device, but may cause IO errors
-in the domain.
-
-=item B<block-list> [B<-l>|B<--long>] I<domain-id>
-
-List virtual block devices for a domain.  The returned output is
-formatted as a list or as an S-Expression if the B<--long> option was given.
-
-=back
-
-=head2 NETWORK DEVICES
-
-=over 4
-
-=item B<network-attach> I<domain-id> [B<script=>I<scriptname>] [B<ip=>I<ipaddr>]
-[B<mac=>I<macaddr>] [B<bridge=>I<bridge-name>] [B<backend=>I<bedomain-id>]
-
-Creates a new network device in the domain specified by I<domain-id>.  It
-takes the following optional options:
-
-=back
-
-B<OPTIONS>
-
-=over 4
-
-=item B<script=>I<scriptname>
-
-Use the specified script name to bring up the network.  Defaults to
-the default setting in xend-config.sxp for B<vif-script>.
-
-=item B<ip=>I<ipaddr>
-
-Passes the specified IP Address to the adapter on creation.  
-
-FIXME: this currently appears to be B<broken>.  I'm not sure under what
-circumstances this should actually work.
-
-=item B<mac=>I<macaddr>
-
-The MAC address that the domain will see on its Ethernet device.  If
-the device is not specified it will be randomly generated with the
-00:16:3e vendor id prefix.
-
-=item B<bridge=>I<bridge-name>
-
-The name of the bridge to attach the vif to, in case you have more
-than one.  This defaults to xenbr0.
-
-=item B<backend=>I<bedomain-id>
-
-The backend domain id.  By default this is domain 0.
-
-=back
-
-=over 4
-
-=item B<network-detach> I<domain-id> I<devid>
-
-Removes the network device from the domain specified by I<domain-id>.
-I<devid> is the virtual interface device number within the domain
-(i.e. the 3 in vif22.3).
-
-FIXME: this is currently B<broken>.  Network devices aren't completely
-removed from domain 0.
-
-=item B<network-list> [B<-l>|B<--long>]> I<domain-id>
-
-List virtual network interfaces for a domain.  The returned output is
-formatted as a list or as an S-Expression if the B<--long> option was given.
-
-=back
-
-=head1 SEE ALSO
-
-B<xmdomain.cfg>(5), B<xentop>(1)
-
-=head1 AUTHOR
-
-  Sean Dague <sean at dague dot net>
-  Daniel Stekloff <dsteklof at us dot ibm dot com>
-  Reiner Sailer <sailer at us dot ibm dot com>
-  Stefan Berger <stefanb at us dot ibm dot com>
-
-=head1 BUGS
diff --git a/docs/man/xmdomain.cfg.pod.5 b/docs/man/xmdomain.cfg.pod.5
deleted file mode 100644
index 2e73db4..0000000
--- a/docs/man/xmdomain.cfg.pod.5
+++ /dev/null
@@ -1,358 +0,0 @@
-=head1 NAME
-
-xmdomain.cfg - xm domain config file format
-
-=head1 SYNOPSIS
-
- /etc/xen/myxendomain
- /etc/xen/myxendomain2
- /etc/xen/auto/myxenautostarted
-
-=head1 DESCRIPTION
-
-The B<xm>(1) program uses python executable config files to define
-domains to create from scratch.  Each of these config files needs to
-contain a number of required options, and may specify many more.
-
-Domain configuration files live in /etc/xen by default, if you store
-config files anywhere else the full path to the config file must be
-specified in the I<xm create> command.
-
-/etc/xen/auto is a special case.  Domain config files in that
-directory will be started automatically at system boot if the
-xendomain init script is enabled.  The contents of /etc/xen/auto
-should be symlinks to files in /etc/xen to allow I<xm create> to be
-used without full paths.
-
-Options are specified by I<name = value> statements in the
-xmdomain.cfg files.
-
-=head1 OPTIONS
-
-The following lists the most commonly used options for a domain config
-file.  
-
-=over 4
-
-=item B<kernel>
-
-The kernel image for the domain.  The format of the parameter is the
-fully qualified path to the kernel image file,
-i.e. I</boot/vmlinuz-2.6.12-xenU>.
-
-
-=item B<ramdisk>
-
-The initial ramdisk for the domain.  The format of the parameter is
-the fully qualified path to the initrd, i.e. I</boot/initrd.gz>.  On
-many Linux distros you will not need a ramdisk if using the default
-xen kernel.
-
-=item B<memory>
-
-The amount of RAM, in megabytes, to allocate to the domain when it
-starts.  Allocating insufficient memory for a domain may produce
-extremely bizarre behavior.  If there isn't enough free memory left on
-the machine to fulfil this request, the domain will fail to start.
-
-Xen does not support overcommit of memory, so the total memory of all
-guests (+ 64 MB needed for Xen) must be less than or equal to the
-physical RAM in the machine.
-
-=item B<name>
-
-A unique name for the domain.  Attempting to create two domains with
-the same name will cause an error.
-
-=item B<root>
-
-Specifies the root device for the domain.  This is required for Linux
-domains, and possibly other OSes.
-
-=item B<nics>
-
-The number of network interfaces allocated to the domain on boot.  It
-defaults to 1.
-
-=item B<disk>
-
-An array of block device stanzas, in the form:
-
-    disk = [ "stanza1", "stanza2", ... ]
-
-Each stanza has 3 terms, separated by commas,
-"backend-dev,frontend-dev,mode".
-
-=over 4
-
-=item I<backend-dev>
-
-The device in the backend domain that will be exported to the guest
-(frontend) domain.  Supported formats include:
-
-I<phy:device> - export the physical device listed.  The device can be
-in symbolic form, as in sda7, or as the hex major/minor number, as in
-0x301 (which is hda1).
-
-I<file://path/to/file> - export the file listed as a loopback device.
-This will take care of the loopback setup before exporting the device.
-
-=item I<frontend-dev>
-
-How the device should appear in the guest domain.  The device can be
-in symbolic form, as in sda7, or as the hex major/minor number, as in
-0x301 (which is hda1).
-
-=item I<mode>
-
-The access mode for the device.  There are currently 2 valid options,
-I<r> (read-only), I<w> (read/write).
-
-=back
-
-=item B<vif>
-
-An array of virtual interface stanzas in the form:
-
-    vif = [ "stanza1", "stanza2", ... ]
-
-Each stanza specifies a set of I<name = value> options separated by
-commas, in the form: "name1=value1, name2=value2, ..."
-
-B<OPTIONS>
-
-=over 4
-
-=item I<bridge>
-
-The network bridge to be used for this device.  This is especially
-needed if multiple bridges exist on the machine.
-
-=item I<mac>
-
-The MAC address for the virtual interface.  If mac is not specified,
-one will be randomly chosen by xen with the 00:16:3e vendor id prefix.
-
-=back
-
-=item B<vfb>
-
-A virtual frame buffer stanza in the form:
-
-    vfb = [ "stanza" ]
-
-The stanza specifies a set of I<name = value> options separated by
-commas, in the form: "name1=value1, name2=value2, ..."
-
-B<OPTIONS>
-
-=over 4
-
-=item I<type>
-
-There are currently two valid options: I<vnc> starts a VNC server that
-lets you connect an external VNC viewer, and I<sdl> starts an internal
-viewer.
-
-=item I<vncdisplay>
-
-The VNC display number to use, defaults to the domain ID.  The
-VNC server listens on port 5900 + display number.
-
-=item I<vnclisten>
-
-The listening address for the VNC server, default 127.0.0.1.
-
-=item I<vncunused>
-
-If non-zero, the VNC server listens on the first unused port above
-5900.
-
-=item I<vncpasswd>
-
-Overrides the XenD configured default password.
-
-=item I<display>
-
-Display to use for the internal viewer, defaults to environment
-variable I<DISPLAY>.
-
-=item I<xauthority>
-
-Authority file to use for the internal viewer, defaults to environment
-variable I<XAUTHORITY>.
-
-=back
-
-=back
-
-=head1 ADDITIONAL OPTIONS
-
-The following options are also supported in the config file, though
-are far more rarely used.
-
-=over 4
-
-=item B<builder>
-
-Which builder should be used to construct the domain.  This defaults
-to the I<linux> if not specified, which is the builder for
-paravirtualized Linux domains.
-
-=item B<cpu>
-
-Specifies which CPU the domain should be started on, where 0 specifies
-the first cpu, 1 the second, and so on.  This defaults to -1, which
-means Xen is free to pick which CPU to start on.
-
-=item B<cpus>
-
-Specifies a list of CPUs on which the domains' VCPUs are allowed to
-execute upon.  The syntax supports ranges (0-3), and negation, ^1.
-For instance:
-
-    cpus = "0-3,5,^1"
-
-Will result in CPUs 0, 2, 3, 5 being available for use by the domain.
-
-=item B<extra>
-
-Extra information to append to the end of the kernel parameter line.
-The format is a string, the contents of which can be anything that the
-kernel supports.  For instance:
-
-    extra = "4"
-
-Will cause the domain to boot to runlevel 4.
-
-=item B<nfs_server>
-
-The IP address of the NFS server to use as the root device for the
-domain.  In order to do this you'll need to specify I<root=/dev/nfs>,
-and specify I<nfs_root>.
-
-=item B<nfs_root>
-
-The directory on the NFS server to be used as the root filesystem.
-Specified as a fully qualified path, i.e. I</full/path/to/root/dir>.
-
-=item B<vcpus>
-
-The number of virtual cpus to allocate to the domain.  In order to use
-this the xen kernel must be compiled with SMP support.
-
-This defaults to 1, meaning running the domain as a UP.
-
-=back
-
-=head1 DOMAIN SHUTDOWN OPTIONS
-
-There are 3 options which control domain shutdown (both planned and
-unplanned) under certain events.  The 3 events currently captured are:
-
-=over 4
-
-=item B<on_shutdown>
-
-Triggered on either an I<xm shutdown> or graceful shutdown from inside
-the DomU.
-
-=item B<on_reboot>
-
-Triggered on either an I<xm reboot> or graceful reboot from inside the
-DomU.
-
-=item B<on_crash>
-
-Triggered when a DomU goes to the crashed state for any reason.
-
-=back
-
-All of them take one of 4 valid states listed below.  
-
-=over 4
-
-=item B<destroy>
-
-The domain will be cleaned up completely.  No attempt at respawning
-will occur.  This is what a typical shutdown would look like.
-
-=item B<restart>
-
-The domain will be restarted with the same name as the old domain.
-This is what a typical reboot would look like.
-
-=item B<preserve>
-
-The domain will not be cleaned up at all.  This is often useful for
-crash state domains which ensures that enough evidence is to debug the
-real issue.
-
-=item B<rename-restart>
-
-The old domain will not be cleaned up, but will be renamed so a new
-domain can be restarted in it's place.  The old domain will be renamed with
-a suffix -1, -2, etc, and assigned a new random UUID; the new domain will
-keep the original name and UUID.  The old domain will release the devices that
-it holds, so that the new one may take them.
-
-=back
-
-Additionally, the "on_crash" event can also take:
-
-=over 4
-
-=item B<coredump-destroy>
-
-Dump the crashed domain's core and then destroy it.
-
-=item B<coredump-restart>
-
-Dump the crashed domain's core and then restart it.
-
-=back
-
-=head1 EXAMPLES
-
-The following are quick examples of ways that domains might be
-configured.  They should not be considered an exhaustive set.
-
-=over 4
-
-=item I<A Loopback File as Root>
-
-    kernel = "/boot/vmlinuz-2.6-xenU"
-    memory = 128
-    name = "MyLinux"      
-    root = "/dev/hda1 ro"
-    disk = [ "file:/var/xen/mylinux.img,hda1,w" ]
-
-This creates a domain called MyLinux with 128 MB of memory using a
-default xen kernel, and the file /var/xen/mylinux.img loopback mounted
-at hda1, which is the root filesystem.
-
-=item I<NFS Root>
-
-FIXME: write me
-
-=item I<LVM Root>
-
-FIXME: write me
-
-=item I<Two Networks>
-
-FIXME: write me
-
-=back
-
-=head1 SEE ALSO
-
-B<xm>(1)
-
-=head1 AUTHOR
-
-  Sean Dague <sean at dague dot net>
-
-=head1 BUGS
-
-Not all options are currently documented
diff --git a/tools/configure b/tools/configure
index 5c2fa14..7a44505 100755
--- a/tools/configure
+++ b/tools/configure
@@ -688,7 +688,6 @@ seabios_path
 qemu_xen
 qemu_traditional
 blktap1
-xend
 debug
 seabios
 rombios
@@ -765,7 +764,6 @@ enable_ovmf
 enable_rombios
 enable_seabios
 enable_debug
-enable_xend
 enable_blktap1
 enable_qemu_traditional
 with_system_qemu
@@ -1427,7 +1425,6 @@ Optional Features:
   --disable-rombios       Disable ROM BIOS (default is ENABLED)
   --disable-seabios       Disable SeaBIOS (default is ENABLED)
   --disable-debug         Disable debug build of tools (default is ENABLED)
-  --enable-xend           Enable xend toolstack (default is DISABLED)
   --enable-blktap1        Enable blktap1 tools (default is DISABLED)
   --enable-qemu-traditional
                           Enable qemu traditional device model, (DEFAULT is on
@@ -3747,29 +3744,6 @@ debug=$ax_cv_debug
 
 
 
-# Check whether --enable-xend was given.
-if test "${enable_xend+set}" = set; then :
-  enableval=$enable_xend;
-fi
-
-
-if test "x$enable_xend" = "xno"; then :
-
-    ax_cv_xend="n"
-
-elif test "x$enable_xend" = "xyes"; then :
-
-    ax_cv_xend="y"
-
-elif test -z $ax_cv_xend; then :
-
-    ax_cv_xend="n"
-
-fi
-xend=$ax_cv_xend
-
-
-
 # Check whether --enable-blktap1 was given.
 if test "${enable_blktap1+set}" = set; then :
   enableval=$enable_blktap1;
@@ -9480,25 +9454,3 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
 
-if test "x$xend" = "xy" ; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have enabled the xend toolstack.
-
-xend is deprecated and scheduled for removal. Please migrate to another
-toolstack ASAP.
-
-See http://wiki.xen.org/wiki/Choice_of_Toolstacks for information on
-other alternatives, including xl which is designed to be a drop in
-replacement for xm (http://wiki.xen.org/wiki/XL).
-" >&5
-$as_echo "$as_me: WARNING: You have enabled the xend toolstack.
-
-xend is deprecated and scheduled for removal. Please migrate to another
-toolstack ASAP.
-
-See http://wiki.xen.org/wiki/Choice_of_Toolstacks for information on
-other alternatives, including xl which is designed to be a drop in
-replacement for xm (http://wiki.xen.org/wiki/XL).
-" >&2;}
-
-fi
diff --git a/tools/configure.ac b/tools/configure.ac
index a62faf8..e1f7527 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -58,7 +58,6 @@ AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
 AX_ARG_DEFAULT_ENABLE([rombios], [Disable ROM BIOS])
 AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
 AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
-AX_ARG_DEFAULT_DISABLE([xend], [Enable xend toolstack])
 AX_ARG_DEFAULT_DISABLE([blktap1], [Enable blktap1 tools])
 
 AC_ARG_ENABLE([qemu-traditional],
@@ -245,15 +244,3 @@ AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h])
 
 AC_OUTPUT()
 
-AS_IF([test "x$xend" = "xy" ], [
-    AC_MSG_WARN(
-[You have enabled the xend toolstack.
-
-xend is deprecated and scheduled for removal. Please migrate to another
-toolstack ASAP.
-
-See http://wiki.xen.org/wiki/Choice_of_Toolstacks for information on
-other alternatives, including xl which is designed to be a drop in
-replacement for xm (http://wiki.xen.org/wiki/XL).
-])
-])
diff --git a/tools/examples/Makefile b/tools/examples/Makefile
index df24e38..86d9cc1 100644
--- a/tools/examples/Makefile
+++ b/tools/examples/Makefile
@@ -5,18 +5,6 @@ include $(XEN_ROOT)/tools/Rules.mk
 XEN_READMES = README
 XEN_READMES += README.incompatibilities
 
-XEN_CONFIGS-$(CONFIG_XEND) += xend-config.sxp
-XEN_CONFIGS-$(CONFIG_XEND) += xm-config.xml
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample1
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample2
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample3
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample.hvm
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample.hvm-stubdom
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample.pv-grub
-XEN_CONFIGS-$(CONFIG_XEND) += xmexample.nbd
-XEN_CONFIGS-$(CONFIG_XEND) += xend-pci-quirks.sxp
-XEN_CONFIGS-$(CONFIG_XEND) += xend-pci-permissive.sxp
-
 XEN_CONFIGS += xlexample.hvm
 XEN_CONFIGS += xlexample.pvlinux
 XEN_CONFIGS += xl.conf
diff --git a/tools/examples/xend-config.sxp b/tools/examples/xend-config.sxp
deleted file mode 100644
index 0896a27..0000000
--- a/tools/examples/xend-config.sxp
+++ /dev/null
@@ -1,304 +0,0 @@
-# -*- sh -*-
-
-#
-# Xend configuration file.
-#
-
-# This example configuration is appropriate for an installation that 
-# utilizes a bridged network configuration. Access to xend via http
-# is disabled.  
-
-# Commented out entries show the default for that entry, unless otherwise
-# specified.
-
-#(logfile /var/log/xen/xend.log)
-#(loglevel DEBUG)
-
-# Uncomment the line below.  Set the value to flask, acm, or dummy to 
-# select a security module.
-
-#(xsm_module_name dummy)
-
-# The Xen-API server configuration.
-#
-# This value configures the ports, interfaces, and access controls for the
-# Xen-API server.  Each entry in the list starts with either unix, a port
-# number, or an address:port pair.  If this is "unix", then a UDP socket is
-# opened, and this entry applies to that.  If it is a port, then Xend will
-# listen on all interfaces on that TCP port, and if it is an address:port
-# pair, then Xend will listen on the specified port, using the interface with
-# the specified address.
-#
-# The subsequent string configures the user-based access control for the
-# listener in question.  This can be one of "none" or "pam", indicating either
-# that users should be allowed access unconditionally, or that the local
-# Pluggable Authentication Modules configuration should be used.  If this
-# string is missing or empty, then "pam" is used.
-#
-# The final string gives the host-based access control for that listener. If
-# this is missing or empty, then all connections are accepted.  Otherwise,
-# this should be a space-separated sequence of regular expressions; any host
-# with a fully-qualified domain name or an IP address that matches one of
-# these regular expressions will be accepted.
-#
-# Example: listen on TCP port 9363 on all interfaces, accepting connections
-# only from machines in example.com or localhost, and allow access through
-# the unix domain socket unconditionally:
-#
-#   (xen-api-server ((9363 pam '^localhost$ example\\.com$')
-#                    (unix none)))
-#
-# Optionally, the TCP Xen-API server can use SSL by specifying the private
-# key and certificate location:
-#
-#                    (9367 pam '' xen-api.key xen-api.crt)
-#
-# Default:
-#   (xen-api-server ((unix)))
-
-
-#(xend-http-server no)
-#(xend-unix-server no)
-#(xend-tcp-xmlrpc-server no)
-#(xend-unix-xmlrpc-server yes)
-#(xend-relocation-server no)
-(xend-relocation-server yes)
-#(xend-relocation-ssl-server no)
-#(xend-udev-event-server no)
-
-#(xend-unix-path /var/lib/xend/xend-socket)
-
-
-# Address and port xend should use for the legacy TCP XMLRPC interface, 
-# if xend-tcp-xmlrpc-server is set.
-#(xend-tcp-xmlrpc-server-address 'localhost')
-#(xend-tcp-xmlrpc-server-port 8006)
-
-# SSL key and certificate to use for the legacy TCP XMLRPC interface.
-# Setting these will mean that this port serves only SSL connections as
-# opposed to plaintext ones.
-#(xend-tcp-xmlrpc-server-ssl-key-file  xmlrpc.key)
-#(xend-tcp-xmlrpc-server-ssl-cert-file xmlrpc.crt)
-
-
-# Port xend should use for the HTTP interface, if xend-http-server is set.
-#(xend-port            8000)
-
-# Port xend should use for the relocation interface, if xend-relocation-server
-# is set.
-#(xend-relocation-port 8002)
-
-# Port xend should use for the ssl relocation interface, if
-# xend-relocation-ssl-server is set.
-#(xend-relocation-ssl-port 8003)
-
-# SSL key and certificate to use for the ssl relocation interface, if
-# xend-relocation-ssl-server is set.
-#(xend-relocation-server-ssl-key-file   xmlrpc.key)
-#(xend-relocation-server-ssl-cert-file  xmlrpc.crt)
-
-# Whether to use ssl as default when relocating.
-#(xend-relocation-ssl no)
-
-# Address xend should listen on for HTTP connections, if xend-http-server is
-# set.
-# Specifying 'localhost' prevents remote connections.
-# Specifying the empty string '' (the default) allows all connections.
-#(xend-address '')
-#(xend-address localhost)
-
-# Address xend should listen on for relocation-socket connections, if
-# xend-relocation-server is set.
-# Meaning and default as for xend-address above.
-# Also, interface name is allowed (e.g. eth0) there to get the
-# relocation address to be bound on.
-#(xend-relocation-address '')
-
-# The hosts allowed to talk to the relocation port.  If this is empty (the
-# default), then all connections are allowed (assuming that the connection
-# arrives on a port and interface on which we are listening; see
-# xend-relocation-port and xend-relocation-address above).  Otherwise, this
-# should be a space-separated sequence of regular expressions.  Any host with
-# a fully-qualified domain name or an IP address that matches one of these
-# regular expressions will be accepted.
-#
-# For example:
-#  (xend-relocation-hosts-allow '^localhost$ ^.*\\.example\\.org$')
-#
-#(xend-relocation-hosts-allow '')
-(xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$')
-
-# The limit (in kilobytes) on the size of the console buffer
-#(console-limit 1024)
-
-##
-# To bridge network traffic, like this:
-#
-# dom0: ----------------- bridge -> real eth0 -> the network
-#                            |
-# domU: fake eth0 -> vifN.0 -+
-#
-# use
-#
-# (network-script network-bridge)
-#
-# Your default ethernet device is used as the outgoing interface, by default. 
-# To use a different one (e.g. eth1) use
-#
-# (network-script 'network-bridge netdev=eth1')
-#
-# The bridge is named eth0, by default (yes, really!)
-#
-
-# It is normally much better to create the bridge yourself in
-# /etc/network/interfaces.  network-bridge start does nothing if you
-# already have a bridge, and network-bridge stop does nothing if the
-# default bridge name (normally eth0) is not a bridge.  See
-# bridge-utils-interfaces(5) for full information on the syntax in
-# /etc/network/interfaces, but you probably want something like this:
-#    iface xenbr0 inet static
-#        address [etc]
-#        netmask [etc]
-#        [etc]
-#        bridge_ports eth0
-#
-# To have network-bridge create a differently-named bridge, use:
-# (network-script 'network-bridge bridge=<name>')
-#
-# It is possible to use the network-bridge script in more complicated
-# scenarios, such as having two outgoing interfaces, with two bridges, and
-# two fake interfaces per guest domain.  To do things like this, write
-# yourself a wrapper script, and call network-bridge from it, as appropriate.
-#
-(network-script network-bridge)
-
-# The script used to control virtual interfaces.  This can be overridden on a
-# per-vif basis when creating a domain or a configuring a new vif.  The
-# vif-bridge script is designed for use with the network-bridge script, or
-# similar configurations.
-#
-# If you have overridden the bridge name using
-# (network-script 'network-bridge bridge=<name>') then you may wish to do the
-# same here.  The bridge name can also be set when creating a domain or
-# configuring a new vif, but a value specified here would act as a default.
-#
-# If you are using only one bridge, the vif-bridge script will discover that,
-# so there is no need to specify it explicitly.  The default is to use
-# the bridge which is listed first in the output from brctl.
-#
-(vif-script vif-bridge)
-
-
-## Use the following if network traffic is routed, as an alternative to the
-# settings for bridged networking given above.
-#(network-script network-route)
-#(vif-script     vif-route)
-
-
-## Use the following if network traffic is routed with NAT, as an alternative
-# to the settings for bridged networking given above.
-#(network-script network-nat)
-#(vif-script     vif-nat)
-
-# dom0-min-mem is the lowest permissible memory level (in MB) for dom0.
-# This is a minimum both for auto-ballooning (as enabled by
-# enable-dom0-ballooning below) and for xm mem-set when applied to dom0.
-(dom0-min-mem 196)
-
-# Whether to enable auto-ballooning of dom0 to allow domUs to be created.
-# If enable-dom0-ballooning = no, dom0 will never balloon out.
-(enable-dom0-ballooning yes)
-
-# 32-bit paravirtual domains can only consume physical
-# memory below 168GB. On systems with memory beyond that address,
-# they'll be confined to memory below 128GB.
-# Using total_available_memory (in GB) to specify the amount of memory reserved
-# in the memory pool exclusively for 32-bit paravirtual domains.
-# Additionally you should use dom0_mem = <-Value> as a parameter in 
-# xen kernel to reserve the memory for 32-bit paravirtual domains, default 
-# is "0" (0GB).  
-(total_available_memory 0) 
-
-# In SMP system, dom0 will use dom0-cpus # of CPUS
-# If dom0-cpus = 0, dom0 will take all cpus available
-(dom0-cpus 0)
-
-# Whether to enable core-dumps when domains crash.
-#(enable-dump no)
-
-# The tool used for initiating virtual TPM migration
-#(external-migration-tool '')
-
-# The interface for VNC servers to listen on. Defaults
-# to 127.0.0.1  To restore old 'listen everywhere' behaviour
-# set this to 0.0.0.0
-#(vnc-listen '127.0.0.1')
-
-# The default password for VNC console on HVM domain.
-# Empty string is no authentication.
-(vncpasswd '')
-
-# The VNC server can be told to negotiate a TLS session
-# to encryption all traffic, and provide x509 cert to
-# clients enabling them to verify server identity. The
-# GTK-VNC widget, virt-viewer, virt-manager and VeNCrypt
-# all support the VNC extension for TLS used in QEMU. The
-# TightVNC/RealVNC/UltraVNC clients do not.
-#
-# To enable this create x509 certificates / keys in the
-# directory ${XEN_CONFIG_DIR} + vnc
-#
-#  ca-cert.pem       - The CA certificate
-#  server-cert.pem   - The Server certificate signed by the CA
-#  server-key.pem    - The server private key
-#
-# and then uncomment this next line
-# (vnc-tls 1)
-
-# The certificate dir can be pointed elsewhere..
-#
-# (vnc-x509-cert-dir vnc)
-
-# The server can be told to request & validate an x509
-# certificate from the client. Only clients with a cert
-# signed by the trusted CA will be able to connect. This
-# is more secure the password auth alone. Passwd auth can
-# used at the same time if desired. To enable client cert
-# checking uncomment this:
-#
-# (vnc-x509-verify 1)
-
-# The default keymap to use for the VM's virtual keyboard
-# when not specififed in VM's configuration
-#(keymap 'en-us')
-
-# Script to run when the label of a resource has changed.
-#(resource-label-change-script '')
-
-# Rotation count of qemu-dm log file.
-#(qemu-dm-logrotate-count 10)
-
-# Path where persistent domain configuration is stored.
-# Default is /var/lib/xend/domains/
-#(xend-domains-path /var/lib/xend/domains)
-
-# Number of seconds xend will wait for device creation and
-# destruction
-#(device-create-timeout 100)
-#(device-destroy-timeout 100)
-
-# When assigning device to HVM guest, we use the strict check for HVM guest by
-# default. (For PV guest, we use loose check automatically if necessary.)
-# When we assign device to HVM guest, if we meet with the co-assignment
-# issues or the ACS issue, we could try changing the option to 'no' -- however,
-# we have to realize this may incur security issue and we can't make sure the
-# device assignment could really work properly even after we do this.
-#(pci-passthrough-strict-check yes)
-
-# If we have a very big scsi device configuration, start of xend is slow,
-# because xend scans all the device paths to build its internal PSCSI device
-# list.  If we need only a few devices for assigning to a guest, we can reduce
-# the scan to this device. Set list list of device paths in same syntax like in
-# command lsscsi, e.g. ('16:0:0:0' '15:0') 
-# (pscsi-device-mask ('*'))
-
diff --git a/tools/examples/xend-pci-permissive.sxp b/tools/examples/xend-pci-permissive.sxp
deleted file mode 100644
index 1a3fb90..0000000
--- a/tools/examples/xend-pci-permissive.sxp
+++ /dev/null
@@ -1,27 +0,0 @@
-###############################################################################
-# Configuration file for granting quiry PCI devices full write access to their 
-# configuration space.  This file should only be used when you are unable to 
-# determine the exact registers required by your device.  Even so, it should 
-# be used only temporarily.
-# 
-# SEND A MESSAGE TO xen-devel@lists.xensource.com IF YOU USE THIS FILE.
-# 
-# Using this file should NOT be necessary.  If you must use it to make some
-# device work, send a message to the above list with as much information about 
-# your device as possible so the developers can make accomodations for it.  
-# Once developers make the necessary updates you can remove the corresponding
-# entry for your device. 
-###############################################################################
-# Entries are formated as follows:  <vendor>:<device>[:<subvendor>:<subdevice>]
-# 
-# Example: Appending to an existing list
-#  
-# (unconstrained_dev_ids
-#     ('XXXX:XXXX:XXXX:XXXX'	# existing entry
-#      'YYYY:YYYY:YYYY:YYYY' 	# new entry 1
-#      'ZZZZ:ZZZZ')		# new entry 2
-# )
-###############################################################################
-(unconstrained_dev_ids
-     #('0123:4567:89AB:CDEF')
-)
diff --git a/tools/examples/xend-pci-quirks.sxp b/tools/examples/xend-pci-quirks.sxp
deleted file mode 100644
index 6bce4b8..0000000
--- a/tools/examples/xend-pci-quirks.sxp
+++ /dev/null
@@ -1,96 +0,0 @@
-###############################################################################
-# Configuration file for quirky PCI devices that require write-access to 
-# parts of the configuration space.  Use this file to specific PCI device
-# IDs and the configuration space fields to which those devices must be
-# able to write.
-#
-# Length is important, so be sure to match new entries with the 
-# lengths of comparable existing entries. 
-#
-# Additions to this file take effect as soon as a new domain with a 
-# matching device is started.  However, to remove a field that was 
-# previously applied to a device you must unbind the device from 
-# pciback.
-###############################################################################
-# This is a bogus entry to show how a new device would be added to the list
-#
-# (new_quirky_dev_name
-#    (pci_ids 
-#       ('0123:4567:890A:BCEF') 
-#    )
-#
-#    (pci_config_space_fields 
-#       ('12345678:1:00000000')
-#    )
-# )
-###############################################################################
-
-(tg3
-    (pci_ids
-	# Entries are formated as follows:  
-	#     <vendor>:<device>[:<subvendor>:<subdevice>]
-        ('14e4:1644'   # Broadcom Tigon3 5700
-    	 '14e4:1645'   # Broadcom Tigon3 5701
-         '14e4:1646'   # Broadcom Tigon3 5702
-         '14e4:1647'   # Broadcom Tigon3 5703
-         '14e4:1648'   # Broadcom Tigon3 5704
-         '14e4:164d'   # Broadcom Tigon3 5702FE
-         '14e4:1653'   # Broadcom Tigon3 5705
-         '14e4:1654'   # Broadcom Tigon3 5705_2
-         '14e4:165d'   # Broadcom Tigon3 5705M
-         '14e4:165e'   # Broadcom Tigon3 5705M_2
-         '14e4:16a6'   # Broadcom Tigon3 5702X
-         '14e4:16a7'   # Broadcom Tigon3 5703X
-         '14e4:16a8'   # Broadcom Tigon3 5704S
-         '14e4:16c6'   # Broadcom Tigon3 5702A3
-         '14e4:16c7'   # Broadcom Tigon3 5703A3
-         '14e4:1696'   # Broadcom Tigon3 5782
-         '14e4:169c'   # Broadcom Tigon3 5788
-         '14e4:169d'   # Broadcom Tigon3 5789
-         '14e4:170d'   # Broadcom Tigon3 5901
-         '14e4:1649'   # Broadcom Tigon3 5704S_2
-         '14e4:166e'   # Broadcom Tigon3 5705F
-         '14e4:1658'   # Broadcom Tigon3 5720
-         '14e4:1659'   # Broadcom Tigon3 5721
-         '14e4:1676'   # Broadcom Tigon3 5750
-         '14e4:1677'   # Broadcom Tigon3 5751
-         '14e4:167c'   # Broadcom Tigon3 5750M
-         '14e4:167d'   # Broadcom Tigon3 5751M
-         '14e4:167e'   # Broadcom Tigon3 5751F
-         '14e4:1600'   # Broadcom Tigon3 5752
-         '14e4:1601'   # Broadcom Tigon3 5752M
-         '14e4:16f7'   # Broadcom Tigon3 5753
-         '14e4:16fd'   # Broadcom Tigon3 5753M
-         '14e4:16fe'   # Broadcom Tigon3 5753F
-         '14e4:1668'   # Broadcom Tigon3 5714
-         '14e4:1678'   # Broadcom Tigon3 5715
-         '14e4:166a'   # Broadcom Tigon3 5780
-         '14e4:166b'   # Broadcom Tigon3 5780S
-         '14e4:16dd'   # Broadcom Tigon3 5781
-         '1148:4400'   # Syskonnect 9DXX
-         '1148:4500'   # Syskonnect 9MXX
-         '173b:03e8'   # Altima AC1000
-         '173b:03e9'   # Altima AC1001
-         '173b:03eb'   # Altima AC1003
-         '173b:03ea'   # Altima AC9100
-         '106b:1645')  # Apple Tigon3
-    )
-
-    (pci_config_space_fields
-	# Entries are formated as follows:  
-    	#     <register>:<size>:<mask>
-    	# size is measured in bytes (1,2,4 are valid sizes)
-    	# mask is currently unused; use all zero's
-        ('00000078:4:00000000'   # TG3PCI_REG_BASE_ADDR
-         '0000007c:4:00000000'   # TG3PCI_MEM_WIN_BASE_ADDR
-         '00000080:4:00000000'   # TG3PCI_REG_DATA
-         '00000084:4:00000000'   # TG3PCI_MEM_WIN_DATA
-         '00000090:4:00000000'   # TG3PCI_MISC_LOCAL_CTRL
-         '00000068:4:00000000'   # TG3PCI_MISC_HOST_CTRL
-         '0000009C:4:00000000'   # TG3PCI_STD_RING_PROD_IDX + TG3_64BIT_REG_LOW
-         '00000098:4:00000000'   # TG3PCI_STD_RING_PROD_IDX + TG3_64BIT_REG_HIGH
-         '000000a4:4:00000000'   # TG3PCI_RCV_RET_RING_CON_IDX + TG3_64BIT_REG_LOW
-         '000000a0:4:00000000'   # TG3PCI_RCV_RET_RING_CON_IDX + TG3_64BIT_REG_HIGH
-         '00000070:4:00000000')  # TG3PCI_PCISTATE
-    )
-)
diff --git a/tools/examples/xm-config.xml b/tools/examples/xm-config.xml
deleted file mode 100644
index 943b74d..0000000
--- a/tools/examples/xm-config.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<!--
-
-Copyright (C) 2006 XenSource Inc.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of version 2.1 of the GNU Lesser General Public
-License as published by the Free Software Foundation.
-
-This library 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
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
--->
-
-<!--
-
-This is a configuration file for xm; it should be placed in
-/etc/xen/xm-config.xml.  If this file is missing, then xm will fall back to
-the normal behaviour that's in Xen 3.0.4 and below.  The settings here are
-most useful for experimenting with the Xen-API preview in Xen 3.0.4.
-
--->
-
-<xm>
-  <!-- The server element describes how to talk to Xend.  The type may be 
-       Xen-API or LegacyXMLRPC (the default).  The URI is that of the
-       server; you might try http://server:9363/ or
-       httpu:///var/run/xend/xen-api.sock for the Xen-API, or
-       httpu:///var/run/xend/xmlrpc.sock for the legacy server.
-
-       The username and password attributes will be used to log in if Xen-API
-       is being used.
-    -->
-  <!--
-  <server type='Xen-API'
-          uri='http://localhost:9363/'
-          username='me'
-          password='mypassword' />
-   -->
-</xm>
diff --git a/tools/examples/xmexample.hvm b/tools/examples/xmexample.hvm
deleted file mode 100644
index 96b6cc4..0000000
--- a/tools/examples/xmexample.hvm
+++ /dev/null
@@ -1,373 +0,0 @@
-#  -*- mode: python; -*-
-#============================================================================
-# Python configuration setup for 'xm create'.
-# This script sets the parameters used when a domain is created using 'xm create'.
-# You use a separate script for each domain you want to create, or 
-# you can set the parameters for the domain on the xm command line.
-#============================================================================
-
-#----------------------------------------------------------------------------
-# Kernel image file.
-kernel = "hvmloader"
-
-# The domain build function. HVM domain uses 'hvm'.
-builder='hvm'
-
-# Initial memory allocation (in megabytes) for the new domain.
-#
-# WARNING: Creating a domain with insufficient memory may cause out of
-#          memory errors. The domain needs enough memory to boot kernel
-#          and modules. Allocating less than 32MBs is not recommended.
-memory = 128
-
-# Shadow pagetable memory for the domain, in MB.
-# If not explicictly set, xend will pick an appropriate value.  
-# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
-# shadow_memory = 8
-
-# Whether to transparently share this domain's memory with other domains.
-# default = 0
-# memory_sharing = 0
-
-# A name for your domain. All domains must have different names.
-name = "ExampleHVMDomain"
-
-# 128-bit UUID for the domain.  The default behavior is to generate a new UUID
-# on each call to 'xm create'.
-#uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"
-
-#-----------------------------------------------------------------------------
-# The number of cpus guest platform has, default=1
-#vcpus=1
-
-# Enable/disable HVM guest PAE, default=1 (enabled)
-#pae=1
-
-# Enable/disable HVM guest ACPI, default=1 (enabled)
-#acpi=1
-
-# Enable/disable HVM APIC mode, default=1 (enabled)
-# Note that this option is ignored if vcpus > 1
-#apic=1
-
-# Enable/disable extended power management support within HVM guest, i.e., beyond
-# S3, S4, S5 within guest like exposing battery meter.
-# 0 (default option, extended power management support disabled)
-# 1 (pass-through mode; uses pass-through as needed; efficient but limited in scope)
-# 2 (non pass-through mode; extended scope, likely to work on all applicable environment
-#    but comparitively less efficient than pass-through mode)
-# xen_extended_power_mgmt=0
-
-# List of which CPUS this domain is allowed to use, default Xen picks
-#cpus = ""         # leave to Xen to pick
-#cpus = "0"        # all vcpus run on CPU0
-#cpus = "0-3,5,^1" # all vcpus run on cpus 0,2,3,5
-#cpus = ["2", "3"] # VCPU0 runs on CPU2, VCPU1 runs on CPU3
-
-# Optionally define mac and/or bridge for the network interfaces.
-# Random MACs are assigned if not given.
-#vif = [ 'type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0, model=ne2k_pci' ]
-# type=ioemu specify the NIC is an ioemu device not netfront
-vif = [ 'type=ioemu, bridge=xenbr0' ]
-
-#----------------------------------------------------------------------------
-# Define the disk devices you want the domain to have access to, and
-# what you want them accessible as.
-# Each disk entry is of the form phy:UNAME,DEV,MODE
-# where UNAME is the device, DEV is the device name the domain will see,
-# and MODE is r for read-only, w for read-write.
-
-#disk = [ 'phy:hda1,hda1,r' ]
-disk = [ 'file:/var/images/min-el3-i386.img,hda,w', ',hdc:cdrom,r' ]
-
-#----------------------------------------------------------------------------
-# Configure the behaviour when a domain exits.  There are three 'reasons'
-# for a domain to stop: poweroff, reboot, and crash.  For each of these you
-# may specify:
-#
-#   "destroy",        meaning that the domain is cleaned up as normal;
-#   "restart",        meaning that a new domain is started in place of the old
-#                     one;
-#   "preserve",       meaning that no clean-up is done until the domain is
-#                     manually destroyed (using xm destroy, for example); or
-#   "rename-restart", meaning that the old domain is not cleaned up, but is
-#                     renamed and a new domain started in its place.
-#
-# In the event a domain stops due to a crash, you have the additional options:
-#
-#   "coredump-destroy", meaning dump the crashed domain's core and then destroy;
-#   "coredump-restart', meaning dump the crashed domain's core and the restart.
-#
-# The default is
-#
-#   on_poweroff = 'destroy'
-#   on_reboot   = 'restart'
-#   on_crash    = 'restart'
-#
-# For backwards compatibility we also support the deprecated option restart
-#
-# restart = 'onreboot' means on_poweroff = 'destroy'
-#                            on_reboot   = 'restart'
-#                            on_crash    = 'destroy'
-#
-# restart = 'always'   means on_poweroff = 'restart'
-#                            on_reboot   = 'restart'
-#                            on_crash    = 'restart'
-#
-# restart = 'never'    means on_poweroff = 'destroy'
-#                            on_reboot   = 'destroy'
-#                            on_crash    = 'destroy'
-
-#on_poweroff = 'destroy'
-#on_reboot   = 'restart'
-#on_crash    = 'restart'
-
-#============================================================================
-
-# Device Model to be used
-device_model = 'qemu-dm'
-
-#-----------------------------------------------------------------------------
-# boot on floppy (a), hard disk (c), Network (n) or CD-ROM (d) 
-# default: hard disk, cd-rom, floppy
-#boot="cda"
-
-#-----------------------------------------------------------------------------
-#  write to temporary files instead of disk image files
-#snapshot=1
-
-#----------------------------------------------------------------------------
-# enable SDL library for graphics, default = 0
-sdl=0
-
-#----------------------------------------------------------------------------
-# enable OpenGL for texture rendering inside the SDL window, default = 1
-# valid only if sdl is enabled.
-opengl=1
-
-#----------------------------------------------------------------------------
-# enable VNC library for graphics, default = 1
-vnc=1
-
-#----------------------------------------------------------------------------
-# address that should be listened on for the VNC server if vnc is set.
-# default is to use 'vnc-listen' setting from
-# auxbin.xen_configdir() + /xend-config.sxp
-#vnclisten="127.0.0.1"
-
-#----------------------------------------------------------------------------
-# set VNC display number, default = domid
-#vncdisplay=1
-
-#----------------------------------------------------------------------------
-# try to find an unused port for the VNC server, default = 1
-#vncunused=1
-
-#----------------------------------------------------------------------------
-# set password for domain's VNC console
-# default is depents on vncpasswd in xend-config.sxp
-vncpasswd=''
-
-#----------------------------------------------------------------------------
-# no graphics, use serial port
-#nographic=0
-
-#----------------------------------------------------------------------------
-# enable stdvga, default = 0 (use cirrus logic device model)
-stdvga=0
-
-#-----------------------------------------------------------------------------
-#   serial port re-direct to pty deivce, /dev/pts/n 
-#   then xm console or minicom can connect
-serial='pty'
-
-#----------------------------------------------------------------------------
-#   tsc_mode : TSC mode (0=default, 1=native TSC, 2=never emulate, 3=pvrdtscp)
-#   emulate TSC provides synced TSC for all vcpus, but lose perfomrance.
-#   native TSC leverages hardware's TSC(no perf loss), but vcpu's TSC may lose
-#    sync due to hardware's unreliable/unsynced TSC between CPUs.
-#   default intelligently uses native TSC on machines where it is safe, but
-#    switches to emulated if necessary after save/restore/migration
-#   pvrdtscp is for intelligent apps that use special Xen-only paravirtualized
-#    cpuid instructions to obtain offset/scaling/migration info and maximize
-#    performance within pools of machines that support the rdtscp instruction
-tsc_mode=0
-
-#-----------------------------------------------------------------------------
-#   Qemu Monitor, default is disable
-#   Use ctrl-alt-2 to connect

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:45:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:45:13 +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 1WXq0H-0006Ke-Le; Wed, 09 Apr 2014 10:45:13 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq0F-0006K4-LD
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:12 +0000
Received: from [193.109.254.147:16026] by server-9.bemta-14.messagelabs.com id
	90/B8-03644-7B425435; Wed, 09 Apr 2014 10:45:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1397040304!7195463!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8999 invoked from network); 9 Apr 2014 10:45:05 -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 Apr 2014 10:45:05 -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 1WXq08-0003IM-LB
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq08-0004fW-9C
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:04 +0000
Date: Wed, 09 Apr 2014 10:45:04 +0000
Message-Id: <E1WXq08-0004fW-9C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: drop libxen
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 185bb58be30e5aeb690125f0320626797f9b14df
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Mar 27 11:01:50 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:39:09 2014 +0100

    tools: drop libxen
    
    This was a C interface to a very early version of the XenAPI, it has not kept
    up with developments to the API e.g. in xapi.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 .gitignore                                         |    3 -
 .hgignore                                          |    3 -
 config/Tools.mk.in                                 |    1 -
 tools/Makefile                                     |    1 -
 tools/configure                                    |  120 --
 tools/configure.ac                                 |    5 -
 tools/libxen/COPYING                               |  510 ------
 tools/libxen/Makefile                              |   77 -
 tools/libxen/Makefile.dist                         |  115 --
 tools/libxen/README                                |   55 -
 tools/libxen/include/xen/api/xen_all.h             |   40 -
 tools/libxen/include/xen/api/xen_common.h          |  211 ---
 tools/libxen/include/xen/api/xen_console.h         |  247 ---
 tools/libxen/include/xen/api/xen_console_decl.h    |   30 -
 .../libxen/include/xen/api/xen_console_protocol.h  |   82 -
 tools/libxen/include/xen/api/xen_cpu_pool.h        |  424 -----
 tools/libxen/include/xen/api/xen_cpu_pool_decl.h   |   30 -
 tools/libxen/include/xen/api/xen_crashdump.h       |  199 ---
 tools/libxen/include/xen/api/xen_crashdump_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_event.h           |  102 --
 tools/libxen/include/xen/api/xen_event_decl.h      |   25 -
 tools/libxen/include/xen/api/xen_event_operation.h |   82 -
 tools/libxen/include/xen/api/xen_host.h            |  505 ------
 tools/libxen/include/xen/api/xen_host_cpu.h        |  263 ---
 tools/libxen/include/xen/api/xen_host_cpu_decl.h   |   30 -
 tools/libxen/include/xen/api/xen_host_decl.h       |   30 -
 tools/libxen/include/xen/api/xen_host_metrics.h    |  199 ---
 .../libxen/include/xen/api/xen_host_metrics_decl.h |   30 -
 tools/libxen/include/xen/api/xen_int_float_map.h   |   53 -
 tools/libxen/include/xen/api/xen_int_int_map.h     |   53 -
 .../include/xen/api/xen_int_string_set_map.h       |   53 -
 tools/libxen/include/xen/api/xen_network.h         |  276 ---
 tools/libxen/include/xen/api/xen_network_decl.h    |   30 -
 .../include/xen/api/xen_on_crash_behaviour.h       |   97 -
 tools/libxen/include/xen/api/xen_on_normal_exit.h  |   77 -
 tools/libxen/include/xen/api/xen_pbd.h             |  223 ---
 tools/libxen/include/xen/api/xen_pbd_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_pif.h             |  277 ---
 tools/libxen/include/xen/api/xen_pif_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_pif_metrics.h     |  198 ---
 .../libxen/include/xen/api/xen_pif_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_sr.h              |  277 ---
 tools/libxen/include/xen/api/xen_sr_decl.h         |   30 -
 tools/libxen/include/xen/api/xen_string_set.h      |   47 -
 .../libxen/include/xen/api/xen_string_string_map.h |   53 -
 tools/libxen/include/xen/api/xen_user.h            |  204 ---
 tools/libxen/include/xen/api/xen_user_decl.h       |   30 -
 tools/libxen/include/xen/api/xen_vbd.h             |  390 -----
 tools/libxen/include/xen/api/xen_vbd_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vbd_metrics.h     |  198 ---
 .../libxen/include/xen/api/xen_vbd_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_vbd_mode.h        |   77 -
 tools/libxen/include/xen/api/xen_vbd_type.h        |   77 -
 tools/libxen/include/xen/api/xen_vdi.h             |  360 ----
 tools/libxen/include/xen/api/xen_vdi_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vdi_type.h        |   92 -
 tools/libxen/include/xen/api/xen_vif.h             |  379 ----
 tools/libxen/include/xen/api/xen_vif_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vif_metrics.h     |  198 ---
 .../libxen/include/xen/api/xen_vif_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_vm.h              |  931 ----------
 tools/libxen/include/xen/api/xen_vm_decl.h         |   30 -
 .../libxen/include/xen/api/xen_vm_guest_metrics.h  |  234 ---
 .../include/xen/api/xen_vm_guest_metrics_decl.h    |   30 -
 tools/libxen/include/xen/api/xen_vm_metrics.h      |  251 ---
 tools/libxen/include/xen/api/xen_vm_metrics_decl.h |   30 -
 tools/libxen/include/xen/api/xen_vm_power_state.h  |   97 -
 tools/libxen/include/xen/api/xen_xspolicy.h        |  293 ----
 tools/libxen/include/xen/api/xen_xspolicy_decl.h   |   31 -
 .../libxen/include/xen_console_protocol_internal.h |   37 -
 .../libxen/include/xen_event_operation_internal.h  |   37 -
 tools/libxen/include/xen_internal.h                |  188 --
 .../include/xen_on_crash_behaviour_internal.h      |   38 -
 tools/libxen/include/xen_on_normal_exit_internal.h |   37 -
 tools/libxen/include/xen_vbd_mode_internal.h       |   37 -
 tools/libxen/include/xen_vbd_type_internal.h       |   37 -
 tools/libxen/include/xen_vdi_type_internal.h       |   37 -
 tools/libxen/include/xen_vm_power_state_internal.h |   37 -
 tools/libxen/src/xen_common.c                      | 1784 -------------------
 tools/libxen/src/xen_console.c                     |  298 ----
 tools/libxen/src/xen_console_protocol.c            |   82 -
 tools/libxen/src/xen_cpu_pool.c                    |  671 -------
 tools/libxen/src/xen_crashdump.c                   |  191 --
 tools/libxen/src/xen_event.c                       |  123 --
 tools/libxen/src/xen_event_operation.c             |   75 -
 tools/libxen/src/xen_host.c                        |  915 ----------
 tools/libxen/src/xen_host_cpu.c                    |  353 ----
 tools/libxen/src/xen_host_metrics.c                |  190 --
 tools/libxen/src/xen_int_float_map.c               |   39 -
 tools/libxen/src/xen_int_int_map.c                 |   39 -
 tools/libxen/src/xen_int_string_set_map.c          |   54 -
 tools/libxen/src/xen_network.c                     |  371 ----
 tools/libxen/src/xen_on_crash_behaviour.c          |   85 -
 tools/libxen/src/xen_on_normal_exit.c              |   81 -
 tools/libxen/src/xen_pbd.c                         |  249 ---
 tools/libxen/src/xen_pif.c                         |  380 ----
 tools/libxen/src/xen_pif_metrics.c                 |  190 --
 tools/libxen/src/xen_sr.c                          |  379 ----
 tools/libxen/src/xen_string_set.c                  |   48 -
 tools/libxen/src/xen_string_set.h                  |   47 -
 tools/libxen/src/xen_string_string_map.c           |   52 -
 tools/libxen/src/xen_user.c                        |  210 ---
 tools/libxen/src/xen_vbd.c                         |  626 -------
 tools/libxen/src/xen_vbd_metrics.c                 |  190 --
 tools/libxen/src/xen_vbd_mode.c                    |   81 -
 tools/libxen/src/xen_vbd_type.c                    |   81 -
 tools/libxen/src/xen_vdi.c                         |  575 ------
 tools/libxen/src/xen_vdi_type.c                    |   84 -
 tools/libxen/src/xen_vif.c                         |  616 -------
 tools/libxen/src/xen_vif_metrics.c                 |  190 --
 tools/libxen/src/xen_vm.c                          | 1837 --------------------
 tools/libxen/src/xen_vm_guest_metrics.c            |  279 ---
 tools/libxen/src/xen_vm_metrics.c                  |  318 ----
 tools/libxen/src/xen_vm_power_state.c              |   85 -
 tools/libxen/src/xen_xspolicy.c                    |  363 ----
 tools/libxen/test/test_bindings.c                  | 1453 ----------------
 tools/libxen/test/test_event_handling.c            |  210 ---
 117 files changed, 0 insertions(+), 23744 deletions(-)

diff --git a/.gitignore b/.gitignore
index af1d826..e8442c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -198,9 +198,6 @@ tools/hotplug/common/hotplugpath.sh
 tools/include/xen/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
-tools/libxen/libxenapi-
-tools/libxen/test/test_bindings
-tools/libxen/test/test_event_handling
 tools/libxl/libxlu_cfg_y.output
 tools/libxl/xl
 tools/libxl/testenum
diff --git a/.hgignore b/.hgignore
index 6d09b09..da27f80 100644
--- a/.hgignore
+++ b/.hgignore
@@ -186,9 +186,6 @@
 ^tools/include/xen/.*$
 ^tools/include/xen-foreign/.*\.(c|h|size)$
 ^tools/include/xen-foreign/checker$
-^tools/libxen/libxenapi-
-^tools/libxen/test/test_bindings$
-^tools/libxen/test/test_event_handling$
 ^tools/libxl/_.*\.h$
 ^tools/libxl/_.*\.c$
 ^tools/libxl/libxlu_cfg_y\.output$
diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 85379b2..0bdf37a 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -46,7 +46,6 @@ GIT_HTTP            := @githttp@
 
 # Optional components
 XENSTAT_XENTOP      := @monitors@
-LIBXENAPI_BINDINGS  := @xenapi@
 OCAML_TOOLS         := @ocamltools@
 FLASK_POLICY        := @xsmpolicy@
 CONFIG_OVMF         := @ovmf@
diff --git a/tools/Makefile b/tools/Makefile
index 00c69ee..c3cfb38 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -23,7 +23,6 @@ SUBDIRS-$(CONFIG_Linux) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
-SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
 SUBDIRS-$(CONFIG_Linux) += libvchan
 
 # do not recurse in to a dir we are about to delete
diff --git a/tools/configure b/tools/configure
index 7a44505..e1eeff4 100755
--- a/tools/configure
+++ b/tools/configure
@@ -694,7 +694,6 @@ rombios
 ovmf
 xsmpolicy
 ocamltools
-xenapi
 monitors
 githttp
 FILE_OFFSET_BITS
@@ -757,7 +756,6 @@ enable_option_checking
 enable_largefile
 enable_githttp
 enable_monitors
-enable_xenapi
 enable_ocamltools
 enable_xsmpolicy
 enable_ovmf
@@ -1418,7 +1416,6 @@ Optional Features:
                           DISABLED)
   --disable-monitors      Disable xenstat and xentop monitoring tools (default
                           is ENABLED)
-  --enable-xenapi         Enable Xen API Bindings (default is DISABLED)
   --disable-ocamltools    Disable Ocaml tools (default is ENABLED)
   --disable-xsmpolicy     Disable XSM policy compilation (default is ENABLED)
   --enable-ovmf           Enable OVMF (default is DISABLED)
@@ -3583,29 +3580,6 @@ monitors=$ax_cv_monitors
 
 
 
-# Check whether --enable-xenapi was given.
-if test "${enable_xenapi+set}" = set; then :
-  enableval=$enable_xenapi;
-fi
-
-
-if test "x$enable_xenapi" = "xno"; then :
-
-    ax_cv_xenapi="n"
-
-elif test "x$enable_xenapi" = "xyes"; then :
-
-    ax_cv_xenapi="y"
-
-elif test -z $ax_cv_xenapi; then :
-
-    ax_cv_xenapi="n"
-
-fi
-xenapi=$ax_cv_xenapi
-
-
-
 # Check whether --enable-ocamltools was given.
 if test "${enable_ocamltools+set}" = set; then :
   enableval=$enable_ocamltools;
@@ -4676,100 +4650,6 @@ if test x"${PERL}" = x"no"
 then
     as_fn_error $? "Unable to find perl, please install perl" "$LINENO" 5
 fi
-if test "x$xenapi" = "xy"; then :
-
-    # Extract the first word of "curl-config", so it can be a program name with args.
-set dummy curl-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CURL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CURL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CURL="$CURL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_CURL" && ac_cv_path_CURL="no"
-  ;;
-esac
-fi
-CURL=$ac_cv_path_CURL
-if test -n "$CURL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5
-$as_echo "$CURL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x"${CURL}" = x"no"
-then
-    as_fn_error $? "Unable to find curl-config, please install curl-config" "$LINENO" 5
-fi
-    # Extract the first word of "xml2-config", so it can be a program name with args.
-set dummy xml2-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_XML+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $XML in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_XML="$XML" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_XML="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_XML" && ac_cv_path_XML="no"
-  ;;
-esac
-fi
-XML=$ac_cv_path_XML
-if test -n "$XML"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML" >&5
-$as_echo "$XML" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x"${XML}" = x"no"
-then
-    as_fn_error $? "Unable to find xml2-config, please install xml2-config" "$LINENO" 5
-fi
-
-fi
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
diff --git a/tools/configure.ac b/tools/configure.ac
index e1f7527..00fb47b 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -51,7 +51,6 @@ m4_include([../m4/ax_compare_version.m4])
 # Enable/disable options
 AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
 AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
-AX_ARG_DEFAULT_DISABLE([xenapi], [Enable Xen API Bindings])
 AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
 AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation])
 AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
@@ -150,10 +149,6 @@ AC_PROG_INSTALL
 AC_PATH_PROG([BISON], [bison])
 AC_PATH_PROG([FLEX], [flex])
 AX_PATH_PROG_OR_FAIL([PERL], [perl])
-AS_IF([test "x$xenapi" = "xy"], [
-    AX_PATH_PROG_OR_FAIL([CURL], [curl-config])
-    AX_PATH_PROG_OR_FAIL([XML], [xml2-config])
-])
 AS_IF([test "x$ocamltools" = "xy"], [
     AC_PROG_OCAML
     AC_PROG_FINDLIB
diff --git a/tools/libxen/COPYING b/tools/libxen/COPYING
deleted file mode 100644
index b124cf5..0000000
--- a/tools/libxen/COPYING
+++ /dev/null
@@ -1,510 +0,0 @@
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard.  To achieve this, non-free programs must
-be allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at least
-    three years, to give the same user the materials specified in
-    Subsection 6a, above, for a charge no more than the cost of
-    performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should
-have at least the "copyright" line and a pointer to where the full
-notice is found.
-
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library 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
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or
-your school, if any, to sign a "copyright disclaimer" for the library,
-if necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James
-  Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/tools/libxen/Makefile b/tools/libxen/Makefile
deleted file mode 100644
index 262412d..0000000
--- a/tools/libxen/Makefile
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Copyright (c) 2006-2007, XenSource Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
-#
-XEN_ROOT=$(CURDIR)/../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-MAJOR = 1.0
-MINOR = 0
-
-CFLAGS += -Iinclude                     \
-          -fPIC
-
-ifeq ($(LIBXENAPI_BINDINGS),y)
-CFLAGS += $(shell $(XML2_CONFIG) --cflags) \
-          $(shell $(CURL_CONFIG) --cflags)
-
-LDFLAGS += $(shell $(XML2_CONFIG) --libs) \
-           $(shell $(CURL_CONFIG) --libs)
-endif
-
-LIBXENAPI_HDRS = $(wildcard include/xen/api/*.h) include/xen/api/xen_all.h
-LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c))
-
-TEST_PROGRAMS = test/test_bindings test/test_event_handling
-
-.PHONY: all
-all: libxenapi.so libxenapi.a
-
-libxenapi.so: libxenapi.so.$(MAJOR)
-	ln -sf $< $@
-
-libxenapi.so.$(MAJOR): libxenapi.so.$(MAJOR).$(MINOR)
-	ln -sf $< $@
-
-libxenapi.so.$(MAJOR).$(MINOR): $(LIBXENAPI_OBJS)
-	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenapi.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(APPEND_LDFLAGS)
-
-libxenapi.a: $(LIBXENAPI_OBJS)
-	$(AR) rcs libxenapi.a $^
-
-$(TEST_PROGRAMS): test/%: test/%.o libxenapi.so
-	$(CC) $(LDFLAGS) -o $@ $< -L . -lxenapi $(APPEND_LDFLAGS)
-
-
-.PHONY: install
-install: all
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/api
-	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_PROG) libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	ln -sf libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenapi.so.$(MAJOR)
-	ln -sf libxenapi.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenapi.so
-	$(INSTALL_DATA) libxenapi.a $(DESTDIR)$(LIBDIR)
-	set -e; for i in $(LIBXENAPI_HDRS); do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEDIR)/xen/api; \
-	done
-
-
-.PHONY: clean
-clean:
-	rm -f `find -name *.o`
-	rm -f libxenapi.so*
-	rm -f libxenapi.a
-	rm -f $(TEST_PROGRAMS)
diff --git a/tools/libxen/Makefile.dist b/tools/libxen/Makefile.dist
deleted file mode 100644
index 7088362..0000000
--- a/tools/libxen/Makefile.dist
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# Copyright (c) 2006-2007, XenSource Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
-#
-
-MAJOR = 1.0
-MINOR = 0
-
-CFLAGS = -Iinclude                     \
-         $(shell xml2-config --cflags) \
-         $(shell curl-config --cflags) \
-         -W -Wall -Wmissing-prototypes -Werror -std=c99 -O2 -fPIC
-
-LDFLAGS = $(shell xml2-config --libs) \
-          $(shell curl-config --libs)
-
-# -h for Solaris
-SONAME_LDFLAG ?= -soname
-# -R /usr/sfw/$(LIBDIR) -shared for Solaris
-SHLIB_LDFLAGS ?= -shared
-
-# ginstall for Solaris
-INSTALL      = install
-INSTALL_DIR  = $(INSTALL) -d -m0755 -p
-INSTALL_DATA = $(INSTALL) -m0644 -p
-
-LIBXENAPI_HDRS = $(wildcard include/*.h)
-LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c))
-
-TEST_PROGRAMS = test/test_bindings test/test_event_handling
-
-TARBALL_DEST = libxenapi-$(MAJOR).$(MINOR)
-
-.PHONY: all
-all: $(TEST_PROGRAMS)
-
-libxenapi.so: libxenapi.so.$(MAJOR)
-	ln -sf $< $@
-
-libxenapi.so.$(MAJOR): libxenapi.so.$(MAJOR).$(MINOR)
-	ln -sf $< $@
-
-libxenapi.so.$(MAJOR).$(MINOR): $(LIBXENAPI_OBJS)
-	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenapi.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^
-
-libxenapi.a: $(LIBXENAPI_OBJS)
-	$(AR) rcs libxenapi.a $^
-
-$(TEST_PROGRAMS): test/%: test/%.o libxenapi.so
-	$(CC) $(LDFLAGS) -o $@ $< -L . -lxenapi
-
-
-.PHONY: install
-install: all
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/api
-	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_PROG) libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	ln -sf libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenapi.so.$(MAJOR)
-	ln -sf libxenapi.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenapi.so
-	$(INSTALL_DATA) libxenapi.a $(DESTDIR)$(LIBDIR)
-	set -e; for i in $(LIBXENAPI_HDRS); do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEDIR)/xen/api; \
-	done
-
-
-.PHONY: tarball
-tarball: $(TARBALL_DEST).tar.bz2
-
-$(TARBALL_DEST).tar.bz2: all
-	rm -Rf $(TARBALL_DEST)
-	mkdir -p $(TARBALL_DEST)/include/xen/api
-	mkdir -p $(TARBALL_DEST)/src
-	mkdir -p $(TARBALL_DEST)/test
-	cp COPYING $(TARBALL_DEST)
-	cp Makefile.dist $(TARBALL_DEST)/Makefile
-	cp Makefile.dist $(TARBALL_DEST)/Makefile.dist
-	cp README $(TARBALL_DEST)
-	cp include/*.h $(TARBALL_DEST)/include
-	cp include/xen/api/*.h $(TARBALL_DEST)/include/xen/api
-	cp src/*.c $(TARBALL_DEST)/src
-	cp test/*.c $(TARBALL_DEST)/test
-	fakeroot chown root:root -R $(TARBALL_DEST)
-	fakeroot tar cjf $(TARBALL_DEST).tar.bz2 $(TARBALL_DEST)
-
-
-.PHONY: clean
-clean:
-	rm -f `find -name *.o`
-	rm -f libxenapi.so*
-	rm -f libxenapi.a
-	rm -f $(TEST_PROGRAMS)
-
-
-.PHONY: uberheader
-uberheader: include/xen/api/xen_all.h
-include/xen/api/xen_all.h::
-	echo "/* This file is autogenerated */" >$@
-	echo "#ifndef XEN_API_XEN_ALL_H" >>$@
-	echo "#define XEN_API_XEN_ALL_H" >>$@
-	ls include/xen/api/*.h | grep -v xen_all.h | grep -v _decl.h | \
-          sed 's,^include/\(.*\)$$,#include <\1>,g' >>$@
-	echo "#endif" >>$@
diff --git a/tools/libxen/README b/tools/libxen/README
deleted file mode 100644
index 2dd79f4..0000000
--- a/tools/libxen/README
+++ /dev/null
@@ -1,55 +0,0 @@
-Xen API C Bindings
-==================
-
-This distribution is the source code to the proposed Xen API C bindings.
-
-The Xen API project will define an XML-RPC protocol for remote and local
-management of Xen-based systems, and a set of bindings for these XML-RPC calls
-into a number of languages (this package contains those to the C language).
-
-The intention is to standardise these XML-RPC calls, and then the Xen project
-will guarantee that that wire protocol will be supported for the long term.
-The bindings will also be supported in the Xen tree, giving a stable
-foundation for Xen management tools and middlewares, in particular the Xen CIM
-providers and libvirt.
-
-THIS IS A WORK IN PROGRESS.  The API and bindings are under active design and
-development, and this is a snapshot release for developers only.  Both the API
-and the C bindings are scheduled to be stabilised by the Xen 3.0.4 release
-i.e. October 2006 at the earliest.
-
-These bindings are open-source (LGPL), and will be committed as libraries to
-the Xen trees for all to use after the Xen 3.0.3 release.
-
-We welcome any discussion about this library and the API in general.  Please
-join the Xen-API mailing list if you are interested in this project. I (Ewan
-Mellor) will collate all the feedback from that list and push out new versions
-of the document and the bindings as and when.
-
-
-URLs
-----
-
-Xen-API wiki page:
-http://wiki.xensource.com/xenwiki/XenApi
-
-Xen-API mailing list:
-  http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
-
-
-Usage
------
-
-The bindings depend upon libxml2, the XML toolkit from the GNOME project; the
-test program depends upon libcurl3 also.  On Debian, you need the packages
-libxml2-dev and libcurl3-dev.
-
-To compile, type make.  To compile the test also, type make
-test/test_bindings, remembering the additional dependency.
-
-To run the test, do
-
-LD_LIBRARY_PATH=. ./test/test_bindings <url> <username> <password>
-
-where <url> is the fragment of the server URL that follows the http://, for
-example "localhost:8005/RPC2".
diff --git a/tools/libxen/include/xen/api/xen_all.h b/tools/libxen/include/xen/api/xen_all.h
deleted file mode 100644
index 45ac171..0000000
--- a/tools/libxen/include/xen/api/xen_all.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* This file is autogenerated */
-#ifndef XEN_API_XEN_ALL_H
-#define XEN_API_XEN_ALL_H
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_console.h>
-#include <xen/api/xen_console_protocol.h>
-#include <xen/api/xen_crashdump.h>
-#include <xen/api/xen_event.h>
-#include <xen/api/xen_event_operation.h>
-#include <xen/api/xen_host_cpu.h>
-#include <xen/api/xen_host.h>
-#include <xen/api/xen_host_metrics.h>
-#include <xen/api/xen_int_float_map.h>
-#include <xen/api/xen_int_int_map.h>
-#include <xen/api/xen_int_string_set_map.h>
-#include <xen/api/xen_network.h>
-#include <xen/api/xen_on_crash_behaviour.h>
-#include <xen/api/xen_on_normal_exit.h>
-#include <xen/api/xen_pbd.h>
-#include <xen/api/xen_pif.h>
-#include <xen/api/xen_pif_metrics.h>
-#include <xen/api/xen_sr.h>
-#include <xen/api/xen_string_set.h>
-#include <xen/api/xen_string_string_map.h>
-#include <xen/api/xen_user.h>
-#include <xen/api/xen_vbd.h>
-#include <xen/api/xen_vbd_metrics.h>
-#include <xen/api/xen_vbd_mode.h>
-#include <xen/api/xen_vbd_type.h>
-#include <xen/api/xen_vdi.h>
-#include <xen/api/xen_vdi_type.h>
-#include <xen/api/xen_vif.h>
-#include <xen/api/xen_vif_metrics.h>
-#include <xen/api/xen_vm_guest_metrics.h>
-#include <xen/api/xen_vm.h>
-#include <xen/api/xen_vm_metrics.h>
-#include <xen/api/xen_vm_power_state.h>
-#include <xen/api/xen_xspolicy.h>
-#include <xen/api/xen_cpu_pool.h>
-#endif
diff --git a/tools/libxen/include/xen/api/xen_common.h b/tools/libxen/include/xen/api/xen_common.h
deleted file mode 100644
index ebcebd9..0000000
--- a/tools/libxen/include/xen/api/xen_common.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2006 XenSource, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_COMMON_H
-#define XEN_COMMON_H
-
-
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <time.h>
-
-#include "xen/api/xen_host_decl.h"
-
-
-typedef bool (*xen_result_func)(const void *data, size_t len,
-                                void *result_handle);
-
-
-/**
- * len does not include a terminating \0.
- */
-typedef int (*xen_call_func)(const void *, size_t len, void *user_handle,
-                             void *result_handle,
-                             xen_result_func result_func);
-
-
-typedef struct
-{
-    xen_call_func call_func;
-    void *handle;
-    const char *session_id;
-    bool ok;
-    char **error_description;
-    int error_description_count;
-} xen_session;
-
-
-typedef struct xen_session_record
-{
-    char *uuid;
-    struct xen_host_record_opt *this_host;
-    char *this_user;
-    time_t last_active;
-} xen_session_record;
-
-
-/**
- * Allocate a xen_session_record.
- */
-extern xen_session_record *
-xen_session_record_alloc(void);
-
-
-/**
- * Free the given xen_session_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_session_record_free(xen_session_record *record);
-
-
-struct xen_task_;
-typedef struct xen_task_ * xen_task_id;
-
-
-typedef struct
-{
-    int progress;
-    long eta;
-    /* !!! RESULT */
-}  xen_task_status;
-
-
-typedef struct
-{
-    int major;
-    int minor;
-    int patch;
-    char *extraversion;
-} xen_version;
-
-
-/**
- * Free the given xen_version, and all referenced values.
- */
-extern void xen_version_free(xen_version *version);
-
-
-/**
- * Return the version of this client-side library.  This will be the major,
- * minor, and extraversion of the Xen release with which it was released,
- * plus the library's own version as the patch.
- */
-extern xen_version *xen_get_client_side_version(void);
-
-
-extern bool
-xen_uuid_string_to_bytes(char *uuid, char **bytes);
-
-
-extern bool
-xen_uuid_bytes_to_string(char *bytes, char **uuid);
-
-
-extern void
-xen_uuid_free(char *uuid);
-
-
-extern void
-xen_uuid_bytes_free(char *bytes);
-
-
-/**
- * Initialise this library.  Call this before starting to use this library.
- * Note that since this library depends upon libxml2, you should also call
- * xmlInitParser as appropriate for your program.
- */
-extern
-void xen_init(void);
-
-
-/**
- * Clear up this library.  Call when you have finished using this library.
- * Note that since this library depends upon libxml2, you should also call
- * xmlCleanupParser as appropriate for your program.
- */
-extern
-void xen_fini(void);
-
-
-/**
- * Log in at the server, and allocate a xen_session to represent this session.
- */
-extern xen_session *
-xen_session_login_with_password(xen_call_func call_func, void *handle,
-                                const char *uname, const char *pwd);
-
-
-/**
- * Log out at the server, and free the xen_session.
- */
-extern void
-xen_session_logout(xen_session *session);
-
-
-/**
- * Clear any error condition recorded on this session.
- */
-void
-xen_session_clear_error(xen_session *session);
-
-
-/**
- * Get the UUID of the second given session.  Set *result to point at a
- * string, yours to free.
- */
-extern bool
-xen_session_get_uuid(xen_session *session, char **result,
-                     xen_session *self_session);
-
-
-/**
- * Get the this_host field of the second given session.  Set *result to be a
- * handle to that host.
- */
-extern bool
-xen_session_get_this_host(xen_session *session, xen_host *result,
-                          xen_session *self_session);
-
-
-/**
- * Get the this_user field of the second given session.  Set *result to point
- * at a string, yours to free.
- */
-extern bool
-xen_session_get_this_user(xen_session *session, char **result,
-                          xen_session *self_session);
-
-
-/**
- * Get the last_active field of the given session, and place it in *result.
- */
-extern bool
-xen_session_get_last_active(xen_session *session, time_t *result,
-                            xen_session *self_session);
-
-/**
- * Get a record containing the current state of the second given session.
- */
-extern bool
-xen_session_get_record(xen_session *session, xen_session_record **result,
-                       xen_session *self_session);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_console.h b/tools/libxen/include/xen/api/xen_console.h
deleted file mode 100644
index 19bfdeb..0000000
--- a/tools/libxen/include/xen/api/xen_console.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CONSOLE_H
-#define XEN_CONSOLE_H
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_console_decl.h>
-#include <xen/api/xen_console_protocol.h>
-#include <xen/api/xen_string_string_map.h>
-#include <xen/api/xen_vm_decl.h>
-
-
-/*
- * The console class.
- * 
- * A console.
- */
-
-
-/**
- * Free the given xen_console.  The given handle must have been
- * allocated by this library.
- */
-extern void
-xen_console_free(xen_console console);
-
-
-typedef struct xen_console_set
-{
-    size_t size;
-    xen_console *contents[];
-} xen_console_set;
-
-/**
- * Allocate a xen_console_set of the given size.
- */
-extern xen_console_set *
-xen_console_set_alloc(size_t size);
-
-/**
- * Free the given xen_console_set.  The given set must have been
- * allocated by this library.
- */
-extern void
-xen_console_set_free(xen_console_set *set);
-
-
-typedef struct xen_console_record
-{
-    xen_console handle;
-    char *uuid;
-    enum xen_console_protocol protocol;
-    char *location;
-    struct xen_vm_record_opt *vm;
-    xen_string_string_map *other_config;
-} xen_console_record;
-
-/**
- * Allocate a xen_console_record.
- */
-extern xen_console_record *
-xen_console_record_alloc(void);
-
-/**
- * Free the given xen_console_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_console_record_free(xen_console_record *record);
-
-
-typedef struct xen_console_record_opt
-{
-    bool is_record;
-    union
-    {
-        xen_console handle;
-        xen_console_record *record;
-    } u;
-} xen_console_record_opt;
-
-/**
- * Allocate a xen_console_record_opt.
- */
-extern xen_console_record_opt *
-xen_console_record_opt_alloc(void);
-
-/**
- * Free the given xen_console_record_opt, and all referenced values. 
- * The given record_opt must have been allocated by this library.
- */
-extern void
-xen_console_record_opt_free(xen_console_record_opt *record_opt);
-
-
-typedef struct xen_console_record_set
-{
-    size_t size;
-    xen_console_record *contents[];
-} xen_console_record_set;
-
-/**
- * Allocate a xen_console_record_set of the given size.
- */
-extern xen_console_record_set *
-xen_console_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_console_record_set, and all referenced values. 
- * The given set must have been allocated by this library.
- */
-extern void
-xen_console_record_set_free(xen_console_record_set *set);
-
-
-
-typedef struct xen_console_record_opt_set
-{
-    size_t size;
-    xen_console_record_opt *contents[];
-} xen_console_record_opt_set;
-
-/**
- * Allocate a xen_console_record_opt_set of the given size.
- */
-extern xen_console_record_opt_set *
-xen_console_record_opt_set_alloc(size_t size);
-
-/**
- * Free the given xen_console_record_opt_set, and all referenced
- * values.  The given set must have been allocated by this library.
- */
-extern void
-xen_console_record_opt_set_free(xen_console_record_opt_set *set);
-
-
-/**
- * Get a record containing the current state of the given console.
- */
-extern bool
-xen_console_get_record(xen_session *session, xen_console_record **result, xen_console console);
-
-
-/**
- * Get a reference to the console instance with the specified UUID.
- */
-extern bool
-xen_console_get_by_uuid(xen_session *session, xen_console *result, char *uuid);
-
-
-/**
- * Create a new console instance, and return its handle.
- */
-extern bool
-xen_console_create(xen_session *session, xen_console *result, xen_console_record *record);
-
-
-/**
- * Destroy the specified console instance.
- */
-extern bool
-xen_console_destroy(xen_session *session, xen_console console);
-
-
-/**
- * Get the uuid field of the given console.
- */
-extern bool
-xen_console_get_uuid(xen_session *session, char **result, xen_console console);
-
-
-/**
- * Get the protocol field of the given console.
- */
-extern bool
-xen_console_get_protocol(xen_session *session, enum xen_console_protocol *result, xen_console console);
-
-
-/**
- * Get the location field of the given console.
- */
-extern bool
-xen_console_get_location(xen_session *session, char **result, xen_console console);
-
-
-/**
- * Get the VM field of the given console.
- */
-extern bool
-xen_console_get_vm(xen_session *session, xen_vm *result, xen_console console);
-
-
-/**
- * Get the other_config field of the given console.
- */
-extern bool
-xen_console_get_other_config(xen_session *session, xen_string_string_map **result, xen_console console);
-
-
-/**
- * Set the other_config field of the given console.
- */
-extern bool
-xen_console_set_other_config(xen_session *session, xen_console console, xen_string_string_map *other_config);
-
-
-/**
- * Add the given key-value pair to the other_config field of the given
- * console.
- */
-extern bool
-xen_console_add_to_other_config(xen_session *session, xen_console console, char *key, char *value);
-
-
-/**
- * Remove the given key and its corresponding value from the
- * other_config field of the given console.  If the key is not in that Map,
- * then do nothing.
- */
-extern bool
-xen_console_remove_from_other_config(xen_session *session, xen_console console, char *key);
-
-
-/**
- * Return a list of all the consoles known to the system.
- */
-extern bool
-xen_console_get_all(xen_session *session, struct xen_console_set **result);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_console_decl.h b/tools/libxen/include/xen/api/xen_console_decl.h
deleted file mode 100644
index 432ff76..0000000
--- a/tools/libxen/include/xen/api/xen_console_decl.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CONSOLE_DECL_H
-#define XEN_CONSOLE_DECL_H
-
-typedef void *xen_console;
-
-struct xen_console_set;
-struct xen_console_record;
-struct xen_console_record_set;
-struct xen_console_record_opt;
-struct xen_console_record_opt_set;
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_console_protocol.h b/tools/libxen/include/xen/api/xen_console_protocol.h
deleted file mode 100644
index 413ad7a..0000000
--- a/tools/libxen/include/xen/api/xen_console_protocol.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CONSOLE_PROTOCOL_H
-#define XEN_CONSOLE_PROTOCOL_H
-
-
-#include <xen/api/xen_common.h>
-
-
-enum xen_console_protocol
-{
-    /**
-     * VT100 terminal
-     */
-    XEN_CONSOLE_PROTOCOL_VT100,
-
-    /**
-     * Remote FrameBuffer protocol (as used in VNC)
-     */
-    XEN_CONSOLE_PROTOCOL_RFB,
-
-    /**
-     * Remote Desktop Protocol
-     */
-    XEN_CONSOLE_PROTOCOL_RDP
-};
-
-
-typedef struct xen_console_protocol_set
-{
-    size_t size;
-    enum xen_console_protocol contents[];
-} xen_console_protocol_set;
-
-/**
- * Allocate a xen_console_protocol_set of the given size.
- */
-extern xen_console_protocol_set *
-xen_console_protocol_set_alloc(size_t size);
-
-/**
- * Free the given xen_console_protocol_set.  The given set must have
- * been allocated by this library.
- */
-extern void
-xen_console_protocol_set_free(xen_console_protocol_set *set);
-
-
-/**
- * Return the name corresponding to the given code.  This string must
- * not be modified or freed.
- */
-extern const char *
-xen_console_protocol_to_string(enum xen_console_protocol val);
-
-
-/**
- * Return the correct code for the given string, or set the session
- * object to failure and return an undefined value if the given string does
- * not match a known code.
- */
-extern enum xen_console_protocol
-xen_console_protocol_from_string(xen_session *session, const char *str);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_cpu_pool.h b/tools/libxen/include/xen/api/xen_cpu_pool.h
deleted file mode 100644
index 423c076..0000000
--- a/tools/libxen/include/xen/api/xen_cpu_pool.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CPU_POOL_H
-#define XEN_CPU_POOL_H
-
-#include <stddef.h>
-#include <stdlib.h>
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_string_set.h>
-#include <xen/api/xen_string_string_map.h>
-#include <xen/api/xen_host_cpu_decl.h>
-#include <xen/api/xen_host.h>
-#include <xen/api/xen_vm_decl.h>
-#include <xen/api/xen_vm.h>
-#include <xen/api/xen_cpu_pool_decl.h>
-
-/*
- * The cpu_pool class.
- *
- * Management of CPU pools.
- */
-
-
-/**
- * Free the given xen_cpu_pool.  The given handle must have been allocated
- * by this library.
- */
-extern void
-xen_cpu_pool_free(xen_cpu_pool cpu_pool);
-
-
-typedef struct xen_cpu_pool_set
-{
-    size_t size;
-    xen_cpu_pool *contents[];
-} xen_cpu_pool_set;
-
-/**
- * Allocate a xen_cpu_pool_set of the given size.
- */
-extern xen_cpu_pool_set *
-xen_cpu_pool_set_alloc(size_t size);
-
-/**
- * Free the given xen_cpu_pool_set.  The given set must have been allocated
- * by this library.
- */
-extern void
-xen_cpu_pool_set_free(xen_cpu_pool_set *set);
-
-
-typedef struct xen_cpu_pool_record
-{
-    xen_cpu_pool handle;
-    char *uuid;
-    char *name_label;
-    char *name_description;
-    struct xen_host_record_opt *resident_on;
-    bool auto_power_on;
-    struct xen_vm_record_opt_set *started_vms;
-    int64_t ncpu;
-    char *sched_policy;
-    struct xen_string_set *proposed_cpus;
-    struct xen_host_cpu_record_opt_set *host_cpus;
-    bool activated;
-    xen_string_string_map *other_config;
-} xen_cpu_pool_record;
-
-/**
- * Allocate a xen_cpu_pool_record.
- */
-extern xen_cpu_pool_record *
-xen_cpu_pool_record_alloc(void);
-
-/**
- * Free the given xen_cpu_pool_record, and all referenced values.  The given
- * record must have been allocated by this library.
- */
-extern void
-xen_cpu_pool_record_free(xen_cpu_pool_record *record);
-
-
-typedef struct xen_cpu_pool_record_opt
-{
-    bool is_record;
-    union
-    {
-        xen_cpu_pool handle;
-        xen_cpu_pool_record *record;
-    } u;
-} xen_cpu_pool_record_opt;
-
-/**
- * Allocate a xen_cpu_pool_record_opt.
- */
-extern xen_cpu_pool_record_opt *
-xen_cpu_pool_record_opt_alloc(void);
-
-/**
- * Free the given xen_cpu_pool_record_opt, and all referenced values.  The
- * given record_opt must have been allocated by this library.
- */
-extern void
-xen_cpu_pool_record_opt_free(xen_cpu_pool_record_opt *record_opt);
-
-
-typedef struct xen_cpu_pool_record_set
-{
-    size_t size;
-    xen_cpu_pool_record *contents[];
-} xen_cpu_pool_record_set;
-
-/**
- * Allocate a xen_cpu_pool_record_set of the given size.
- */
-extern xen_cpu_pool_record_set *
-xen_cpu_pool_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_cpu_pool_record_set, and all referenced values.  The
- * given set must have been allocated by this library.
- */
-extern void
-xen_cpu_pool_record_set_free(xen_cpu_pool_record_set *set);
-
-
-
-typedef struct xen_cpu_pool_record_opt_set
-{
-    size_t size;
-    xen_cpu_pool_record_opt *contents[];
-} xen_cpu_pool_record_opt_set;
-
-/**
- * Allocate a xen_cpu_pool_record_opt_set of the given size.
- */
-extern xen_cpu_pool_record_opt_set *
-xen_cpu_pool_record_opt_set_alloc(size_t size);
-
-/**
- * Free the given xen_cpu_pool_record_opt_set, and all referenced values.
- * The given set must have been allocated by this library.
- */
-extern void
-xen_cpu_pool_record_opt_set_free(xen_cpu_pool_record_opt_set *set);
-
-
-/**
- * Get a record containing the current state of the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_record(xen_session *session, xen_cpu_pool_record **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get a reference to the cpu_pool instance with the specified UUID.
- */
-extern bool
-xen_cpu_pool_get_by_uuid(xen_session *session, xen_cpu_pool *result, char *uuid);
-
-
-/**
- * Create a new cpu_pool instance, and return its handle.
- */
-extern bool
-xen_cpu_pool_create(xen_session *session, xen_cpu_pool *result,
-    xen_cpu_pool_record *record);
-
-
-/**
- * Destroy the specified VBD instance.
- */
-extern bool
-xen_cpu_pool_destroy(xen_session *session, xen_cpu_pool cpu_pool);
-
-
-/**
- * Get the uuid field of the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_uuid(xen_session *session, char **result, xen_cpu_pool cpu_pool);
-
-
-/**
- * Deactivate the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_deactivate(xen_session *session, xen_cpu_pool cpu_pool);
-
-
-/**
- * Activate the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_activate(xen_session *session, xen_cpu_pool cpu_pool);
-
-
-/**
- * Add a physical cpu to the active pool.
- */
-extern bool
-xen_cpu_pool_add_host_CPU_live(xen_session *session, xen_cpu_pool cpu_pool,
-    xen_host_cpu host_cpu);
-
-
-/**
- * Remove a physical cpu from the active pool.
- */
-extern bool
-xen_cpu_pool_remove_host_CPU_live(xen_session *session, xen_cpu_pool cpu_pool,
-    xen_host_cpu host_cpu);
-
-
-/**
- * Return a list of all the cpu_pools known to the system.
- */
-extern bool
-xen_cpu_pool_get_all(xen_session *session, struct xen_cpu_pool_set **result);
-
-
-/**
- * Get the uuid field of the cpu_pool with given name.
- */
-extern bool
-xen_cpu_pool_get_by_name_label(xen_session *session,
-    struct xen_cpu_pool_set **result, char *label);
-
-
-/**
- * Get activation state of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_activated(xen_session *session, bool *result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get auto_power_on option of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_auto_power_on(xen_session *session, bool *result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get host_cpu refs of all physical cpus of cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_host_CPUs(xen_session *session, struct xen_host_cpu_set **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get name description field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_name_description(xen_session *session, char **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get name label field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_name_label(xen_session *session, char **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get count of physical cpus to attach to cpu_pool on activation.
- */
-extern bool
-xen_cpu_pool_get_ncpu(xen_session *session, int64_t *result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get proposed_CPUs field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_proposed_CPUs(xen_session *session, struct xen_string_set **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get the other_config field of the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_other_config(xen_session *session, xen_string_string_map **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get host the cpu_pool is resident on.
- */
-extern bool
-xen_cpu_pool_get_resident_on(xen_session *session, xen_host *result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get sched_policy field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_sched_policy(xen_session *session, char **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get set of started vms in given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_started_VMs(xen_session *session, xen_vm_set **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- *  Set auto_power_on field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_auto_power_on(xen_session *session, xen_cpu_pool cpu_pool,
-    bool auto_power_on);
-
-
-/**
- * Set proposed_CPUs field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_proposed_CPUs(xen_session *session, xen_cpu_pool cpu_pool,
-    xen_string_set *proposed_cpus);
-
-
-/**
- * Add a proposed cpu to proposed_CPUs field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_add_to_proposed_CPUs(xen_session *session, xen_cpu_pool cpu_pool,
-    char* proposed_cpu);
-
-
-/**
- * Remove a proposed cpu from proposed_CPUs field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_remove_from_proposed_CPUs(xen_session *session, xen_cpu_pool cpu_pool,
-    char* proposed_cpu);
-
-
-/**
- * Set name_label field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_name_label(xen_session *session, xen_cpu_pool cpu_pool,
-    char *label);
-
-
-/**
- * Set name_description field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_name_description(xen_session *session, xen_cpu_pool cpu_pool,
-    char *descr);
-
-
-/**
- * Set ncpu field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_ncpu(xen_session *session, xen_cpu_pool cpu_pool, int64_t ncpu);
-
-
-/**
- * Set the other_config field of the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_other_config(xen_session *session, xen_cpu_pool cpu_pool,
-    xen_string_string_map *other_config);
-
-
-/**
- * Add the given key-value pair to the other_config field of the given
- * cpu_pool.
- */
-extern bool
-xen_cpu_pool_add_to_other_config(xen_session *session, xen_cpu_pool cpu_pool,
-    char *key, char *value);
-
-
-/**
- * Remove the given key and its corresponding value from the
- * other_config field of the given cpu_pool. If the key is not in that Map, then
- * do nothing.
- */
-extern bool
-xen_cpu_pool_remove_from_other_config(xen_session *session, xen_cpu_pool cpu_pool,
-    char *key);
-
-/**
- * Set sched_policy of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_sched_policy(xen_session *session, xen_cpu_pool cpu_pool,
-    char *sched_policy);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_cpu_pool_decl.h b/tools/libxen/include/xen/api/xen_cpu_pool_decl.h
deleted file mode 100644
index 62878dd..0000000
--- a/tools/libxen/include/xen/api/xen_cpu_pool_decl.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CPU_POOL_DECL_H
-#define XEN_CPU_POOL_DECL_H
-
-typedef void *xen_cpu_pool;
-
-struct xen_cpu_pool_set;
-struct xen_cpu_pool_record;
-struct xen_cpu_pool_record_set;
-struct xen_cpu_pool_record_opt;
-struct xen_cpu_pool_record_opt_set;
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_crashdump.h b/tools/libxen/include/xen/api/xen_crashdump.h
deleted file mode 100644
index 145e041..0000000
--- a/tools/libxen/include/xen/api/xen_crashdump.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CRASHDUMP_H
-#define XEN_CRASHDUMP_H
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_crashdump_decl.h>
-#include <xen/api/xen_vdi_decl.h>
-#include <xen/api/xen_vm_decl.h>
-
-
-/*
- * The crashdump class.
- * 
- * A VM crashdump.
- */
-
-
-/**
- * Free the given xen_crashdump.  The given handle must have been
- * allocated by this library.
- */
-extern void
-xen_crashdump_free(xen_crashdump crashdump);
-
-
-typedef struct xen_crashdump_set
-{
-    size_t size;
-    xen_crashdump *contents[];
-} xen_crashdump_set;
-
-/**
- * Allocate a xen_crashdump_set of the given size.
- */
-extern xen_crashdump_set *
-xen_crashdump_set_alloc(size_t size);
-
-/**
- * Free the given xen_crashdump_set.  The given set must have been
- * allocated by this library.
- */
-extern void
-xen_crashdump_set_free(xen_crashdump_set *set);
-
-
-typedef struct xen_crashdump_record
-{
-    xen_crashdump handle;
-    char *uuid;
-    struct xen_vm_record_opt *vm;
-    struct xen_vdi_record_opt *vdi;
-} xen_crashdump_record;
-
-/**
- * Allocate a xen_crashdump_record.
- */
-extern xen_crashdump_record *
-xen_crashdump_record_alloc(void);
-
-/**
- * Free the given xen_crashdump_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_crashdump_record_free(xen_crashdump_record *record);
-
-
-typedef struct xen_crashdump_record_opt
-{
-    bool is_record;
-    union
-    {
-        xen_crashdump handle;
-        xen_crashdump_record *record;
-    } u;
-} xen_crashdump_record_opt;
-
-/**
- * Allocate a xen_crashdump_record_opt.
- */
-extern xen_crashdump_record_opt *
-xen_crashdump_record_opt_alloc(void);
-
-/**
- * Free the given xen_crashdump_record_opt, and all referenced values. 
- * The given record_opt must have been allocated by this library.
- */
-extern void
-xen_crashdump_record_opt_free(xen_crashdump_record_opt *record_opt);
-
-
-typedef struct xen_crashdump_record_set
-{
-    size_t size;
-    xen_crashdump_record *contents[];
-} xen_crashdump_record_set;
-
-/**
- * Allocate a xen_crashdump_record_set of the given size.
- */
-extern xen_crashdump_record_set *
-xen_crashdump_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_crashdump_record_set, and all referenced values. 
- * The given set must have been allocated by this library.
- */
-extern void
-xen_crashdump_record_set_free(xen_crashdump_record_set *set);
-
-
-
-typedef struct xen_crashdump_record_opt_set
-{
-    size_t size;
-    xen_crashdump_record_opt *contents[];
-} xen_crashdump_record_opt_set;
-
-/**
- * Allocate a xen_crashdump_record_opt_set of the given size.
- */
-extern xen_crashdump_record_opt_set *
-xen_crashdump_record_opt_set_alloc(size_t size);
-
-/**
- * Free the given xen_crashdump_record_opt_set, and all referenced
- * values.  The given set must have been allocated by this library.
- */
-extern void
-xen_crashdump_record_opt_set_free(xen_crashdump_record_opt_set *set);
-
-
-/**
- * Get a record containing the current state of the given crashdump.
- */
-extern bool
-xen_crashdump_get_record(xen_session *session, xen_crashdump_record **result, xen_crashdump crashdump);
-
-
-/**
- * Get a reference to the crashdump instance with the specified UUID.
- */
-extern bool
-xen_crashdump_get_by_uuid(xen_session *session, xen_crashdump *result, char *uuid);
-
-
-/**
- * Get the uuid field of the given crashdump.
- */
-extern bool
-xen_crashdump_get_uuid(xen_session *session, char **result, xen_crashdump crashdump);
-
-
-/**
- * Get the VM field of the given crashdump.
- */
-extern bool
-xen_crashdump_get_vm(xen_session *session, xen_vm *result, xen_crashdump crashdump);
-
-
-/**
- * Get the VDI field of the given crashdump.
- */
-extern bool
-xen_crashdump_get_vdi(xen_session *session, xen_vdi *result, xen_crashdump crashdump);
-
-
-/**
- * Destroy the specified crashdump.
- */
-extern bool
-xen_crashdump_destroy(xen_session *session, xen_crashdump self);
-
-
-/**
- * Return a list of all the crashdumps known to the system.
- */
-extern bool
-xen_crashdump_get_all(xen_session *session, struct xen_crashdump_set **result);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_crashdump_decl.h b/tools/libxen/include/xen/api/xen_crashdump_decl.h
deleted file mode 100644
index 4eb6d54..0000000
--- a/tools/libxen/include/xen/api/xen_crashdump_decl.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CRASHDUMP_DECL_H
-#define XEN_CRASHDUMP_DECL_H
-
-typedef void *xen_crashdump;
-
-struct xen_crashdump_set;
-struct xen_crashdump_record;
-struct xen_crashdump_record_set;
-struct xen_crashdump_record_opt;
-struct xen_crashdump_record_opt_set;
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_event.h b/tools/libxen/include/xen/api/xen_event.h
deleted file mode 100644
index 6a2845b..0000000
--- a/tools/libxen/include/xen/api/xen_event.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_EVENT_H
-#define XEN_EVENT_H
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_event_decl.h>
-#include <xen/api/xen_event_operation.h>
-#include <xen/api/xen_string_set.h>
-
-
-/*
- * The event class.
- * 
- * Asynchronous event registration and handling.
- */
-
-
-
-typedef struct xen_event_record
-{
-    int64_t id;
-    time_t timestamp;
-    char *class;
-    enum xen_event_operation operation;
-    char *ref;
-    char *obj_uuid;
-} xen_event_record;
-
-/**
- * Allocate a xen_event_record.
- */
-extern xen_event_record *
-xen_event_record_alloc(void);
-
-/**
- * Free the given xen_event_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_event_record_free(xen_event_record *record);
-
-
-typedef struct xen_event_record_set
-{
-    size_t size;
-    xen_event_record *contents[];
-} xen_event_record_set;
-
-/**
- * Allocate a xen_event_record_set of the given size.
- */
-extern xen_event_record_set *
-xen_event_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_event_record_set, and all referenced values.  The
- * given set must have been allocated by this library.
- */
-extern void
-xen_event_record_set_free(xen_event_record_set *set);
-
-
-/**
- * Registers this session with the event system.  Specifying the empty
- * list will register for all classes.
- */
-extern bool
-xen_event_register(xen_session *session, struct xen_string_set *classes);
-
-
-/**
- * Unregisters this session with the event system.
- */
-extern bool
-xen_event_unregister(xen_session *session, struct xen_string_set *classes);
-
-
-/**
- * Blocking call which returns a (possibly empty) batch of events.
- */
-extern bool
-xen_event_next(xen_session *session, struct xen_event_record_set **result);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_event_decl.h b/tools/libxen/include/xen/api/xen_event_decl.h
deleted file mode 100644
index 856991f..0000000
--- a/tools/libxen/include/xen/api/xen_event_decl.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_EVENT_DECL_H
-#define XEN_EVENT_DECL_H
-
-struct xen_event_record;
-struct xen_event_record_set;
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_event_operation.h b/tools/libxen/include/xen/api/xen_event_operation.h
deleted file mode 100644
index 31cce20..0000000
--- a/tools/libxen/include/xen/api/xen_event_operation.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_EVENT_OPERATION_H
-#define XEN_EVENT_OPERATION_H
-
-
-#include <xen/api/xen_common.h>
-
-
-enum xen_event_operation
-{
-    /**
-     * An object has been created
-     */
-    XEN_EVENT_OPERATION_ADD,
-
-    /**
-     * An object has been deleted
-     */
-    XEN_EVENT_OPERATION_DEL,
-
-    /**
-     * An object has been modified
-     */
-    XEN_EVENT_OPERATION_MOD
-};
-
-
-typedef struct xen_event_operation_set
-{
-    size_t size;
-    enum xen_event_operation contents[];
-} xen_event_operation_set;
-
-/**
- * Allocate a xen_event_operation_set of the given size.
- */
-extern xen_event_operation_set *
-xen_event_operation_set_alloc(size_t size);
-
-/**
- * Free the given xen_event_operation_set.  The given set must have
- * been allocated by this library.
- */
-extern void
-xen_event_operation_set_free(xen_event_operation_set *set);
-
-
-/**
- * Return the name corresponding to the given code.  This string must
- * not be modified or freed.
- */
-extern const char *
-xen_event_operation_to_string(enum xen_event_operation val);
-
-
-/**
- * Return the correct code for the given string, or set the session
- * object to failure and return an undefined value if the given string does
- * not match a known code.
- */
-extern enum xen_event_operation
-xen_event_operation_from_string(xen_session *session, const char *str);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_host.h b/tools/libxen/include/xen/api/xen_host.h
deleted file mode 100644
index f3ca5b9..0000000
--- a/tools/libxen/include/xen/api/xen_host.h
+++ /dev/null
@@ -1,505 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_HOST_H
-#define XEN_HOST_H
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_host_cpu_decl.h>
-#include <xen/api/xen_host_decl.h>
-#include <xen/api/xen_host_metrics_decl.h>
-#include <xen/api/xen_pbd_decl.h>
-#include <xen/api/xen_pif_decl.h>
-#include <xen/api/xen_sr_decl.h>
-#include <xen/api/xen_string_set.h>
-#include <xen/api/xen_string_string_map.h>
-#include <xen/api/xen_vm_decl.h>
-#include <xen/api/xen_cpu_pool_decl.h>
-
-/*
- * The host class.
- * 
- * A physical host.
- */
-
-
-/**
- * Free the given xen_host.  The given handle must have been allocated
- * by this library.
- */
-extern void
-xen_host_free(xen_host host);
-
-
-typedef struct xen_host_set
-{
-    size_t size;
-    xen_host *contents[];
-} xen_host_set;
-
-/**
- * Allocate a xen_host_set of the given size.
- */
-extern xen_host_set *
-xen_host_set_alloc(size_t size);
-
-/**
- * Free the given xen_host_set.  The given set must have been allocated
- * by this library.
- */
-extern void
-xen_host_set_free(xen_host_set *set);
-
-
-typedef struct xen_host_record
-{
-    xen_host handle;
-    char *uuid;
-    char *name_label;
-    char *name_description;
-    int64_t api_version_major;
-    int64_t api_version_minor;
-    char *api_version_vendor;
-    xen_string_string_map *api_version_vendor_implementation;
-    bool enabled;
-    xen_string_string_map *software_version;
-    xen_string_string_map *other_config;
-    struct xen_string_set *capabilities;
-    xen_string_string_map *cpu_configuration;
-    char *sched_policy;
-    struct xen_string_set *supported_bootloaders;
-    struct xen_vm_record_opt_set *resident_vms;
-    xen_string_string_map *logging;
-    struct xen_pif_record_opt_set *pifs;
-    struct xen_sr_record_opt *suspend_image_sr;
-    struct xen_sr_record_opt *crash_dump_sr;
-    struct xen_pbd_record_opt_set *pbds;
-    struct xen_host_cpu_record_opt_set *host_cpus;
-    struct xen_host_metrics_record_opt *metrics;
-    struct xen_cpu_pool_record_opt_set *resident_cpu_pools;
-} xen_host_record;
-
-/**
- * Allocate a xen_host_record.
- */
-extern xen_host_record *
-xen_host_record_alloc(void);
-
-/**
- * Free the given xen_host_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_host_record_free(xen_host_record *record);
-
-
-typedef struct xen_host_record_opt
-{
-    bool is_record;
-    union
-    {
-        xen_host handle;
-        xen_host_record *record;
-    } u;
-} xen_host_record_opt;
-
-/**
- * Allocate a xen_host_record_opt.
- */
-extern xen_host_record_opt *
-xen_host_record_opt_alloc(void);
-
-/**
- * Free the given xen_host_record_opt, and all referenced values.  The
- * given record_opt must have been allocated by this library.
- */
-extern void
-xen_host_record_opt_free(xen_host_record_opt *record_opt);
-
-
-typedef struct xen_host_record_set
-{
-    size_t size;
-    xen_host_record *contents[];
-} xen_host_record_set;
-
-/**
- * Allocate a xen_host_record_set of the given size.
- */
-extern xen_host_record_set *
-xen_host_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_host_record_set, and all referenced values.  The
- * given set must have been allocated by this library.
- */
-extern void
-xen_host_record_set_free(xen_host_record_set *set);
-
-
-
-typedef struct xen_host_record_opt_set
-{
-    size_t size;
-    xen_host_record_opt *contents[];
-} xen_host_record_opt_set;
-
-/**
- * Allocate a xen_host_record_opt_set of the given size.
- */
-extern xen_host_record_opt_set *
-xen_host_record_opt_set_alloc(size_t size);
-
-/**
- * Free the given xen_host_record_opt_set, and all referenced values. 
- * The given set must have been allocated by this library.
- */
-extern void
-xen_host_record_opt_set_free(xen_host_record_opt_set *set);
-
-
-/**
- * Get a record containing the current state of the given host.
- */
-extern bool
-xen_host_get_record(xen_session *session, xen_host_record **result, xen_host host);
-
-
-/**
- * Get a reference to the host instance with the specified UUID.
- */
-extern bool
-xen_host_get_by_uuid(xen_session *session, xen_host *result, char *uuid);
-
-
-/**
- * Get all the host instances with the given label.
- */
-extern bool
-xen_host_get_by_name_label(xen_session *session, struct xen_host_set **result, char *label);
-
-
-/**
- * Get the uuid field of the given host.
- */
-extern bool
-xen_host_get_uuid(xen_session *session, char **result, xen_host host);
-
-
-/**
- * Get the name/label field of the given host.
- */
-extern bool
-xen_host_get_name_label(xen_session *session, char **result, xen_host host);
-
-
-/**
- * Get the name/description field of the given host.
- */
-extern bool
-xen_host_get_name_description(xen_session *session, char **result, xen_host host);
-
-
-/**
- * Get the API_version/major field of the given host.
- */
-extern bool
-xen_host_get_api_version_major(xen_session *session, int64_t *result, xen_host host);
-
-
-/**
- * Get the API_version/minor field of the given host.
- */
-extern bool
-xen_host_get_api_version_minor(xen_session *session, int64_t *result, xen_host host);
-
-
-/**
- * Get the API_version/vendor field of the given host.
- */
-extern bool
-xen_host_get_api_version_vendor(xen_session *session, char **result, xen_host host);
-
-
-/**
- * Get the API_version/vendor_implementation field of the given host.
- */
-extern bool
-xen_host_get_api_version_vendor_implementation(xen_session *session, xen_string_string_map **result, xen_host host);
-
-
-/**
- * Get the enabled field of the given host.
- */
-extern bool
-xen_host_get_enabled(xen_session *session, bool *result, xen_host host);
-
-
-/**
- * Get the software_version field of the given host.
- */
-extern bool
-xen_host_get_software_version(xen_session *session, xen_string_string_map **result, xen_host host);
-
-
-/**
- * Get the other_config field of the given host.
- */
-extern bool
-xen_host_get_other_config(xen_session *session, xen_string_string_map **result, xen_host host);
-
-
-/**
- * Get the capabilities field of the given host.

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:45:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:45:13 +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 1WXq0H-0006Ke-Le; Wed, 09 Apr 2014 10:45:13 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq0F-0006K4-LD
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:12 +0000
Received: from [193.109.254.147:16026] by server-9.bemta-14.messagelabs.com id
	90/B8-03644-7B425435; Wed, 09 Apr 2014 10:45:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-27.messagelabs.com!1397040304!7195463!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8999 invoked from network); 9 Apr 2014 10:45:05 -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 Apr 2014 10:45:05 -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 1WXq08-0003IM-LB
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq08-0004fW-9C
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:04 +0000
Date: Wed, 09 Apr 2014 10:45:04 +0000
Message-Id: <E1WXq08-0004fW-9C@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: drop libxen
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 185bb58be30e5aeb690125f0320626797f9b14df
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Thu Mar 27 11:01:50 2014 +0000
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 3 17:39:09 2014 +0100

    tools: drop libxen
    
    This was a C interface to a very early version of the XenAPI, it has not kept
    up with developments to the API e.g. in xapi.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 .gitignore                                         |    3 -
 .hgignore                                          |    3 -
 config/Tools.mk.in                                 |    1 -
 tools/Makefile                                     |    1 -
 tools/configure                                    |  120 --
 tools/configure.ac                                 |    5 -
 tools/libxen/COPYING                               |  510 ------
 tools/libxen/Makefile                              |   77 -
 tools/libxen/Makefile.dist                         |  115 --
 tools/libxen/README                                |   55 -
 tools/libxen/include/xen/api/xen_all.h             |   40 -
 tools/libxen/include/xen/api/xen_common.h          |  211 ---
 tools/libxen/include/xen/api/xen_console.h         |  247 ---
 tools/libxen/include/xen/api/xen_console_decl.h    |   30 -
 .../libxen/include/xen/api/xen_console_protocol.h  |   82 -
 tools/libxen/include/xen/api/xen_cpu_pool.h        |  424 -----
 tools/libxen/include/xen/api/xen_cpu_pool_decl.h   |   30 -
 tools/libxen/include/xen/api/xen_crashdump.h       |  199 ---
 tools/libxen/include/xen/api/xen_crashdump_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_event.h           |  102 --
 tools/libxen/include/xen/api/xen_event_decl.h      |   25 -
 tools/libxen/include/xen/api/xen_event_operation.h |   82 -
 tools/libxen/include/xen/api/xen_host.h            |  505 ------
 tools/libxen/include/xen/api/xen_host_cpu.h        |  263 ---
 tools/libxen/include/xen/api/xen_host_cpu_decl.h   |   30 -
 tools/libxen/include/xen/api/xen_host_decl.h       |   30 -
 tools/libxen/include/xen/api/xen_host_metrics.h    |  199 ---
 .../libxen/include/xen/api/xen_host_metrics_decl.h |   30 -
 tools/libxen/include/xen/api/xen_int_float_map.h   |   53 -
 tools/libxen/include/xen/api/xen_int_int_map.h     |   53 -
 .../include/xen/api/xen_int_string_set_map.h       |   53 -
 tools/libxen/include/xen/api/xen_network.h         |  276 ---
 tools/libxen/include/xen/api/xen_network_decl.h    |   30 -
 .../include/xen/api/xen_on_crash_behaviour.h       |   97 -
 tools/libxen/include/xen/api/xen_on_normal_exit.h  |   77 -
 tools/libxen/include/xen/api/xen_pbd.h             |  223 ---
 tools/libxen/include/xen/api/xen_pbd_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_pif.h             |  277 ---
 tools/libxen/include/xen/api/xen_pif_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_pif_metrics.h     |  198 ---
 .../libxen/include/xen/api/xen_pif_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_sr.h              |  277 ---
 tools/libxen/include/xen/api/xen_sr_decl.h         |   30 -
 tools/libxen/include/xen/api/xen_string_set.h      |   47 -
 .../libxen/include/xen/api/xen_string_string_map.h |   53 -
 tools/libxen/include/xen/api/xen_user.h            |  204 ---
 tools/libxen/include/xen/api/xen_user_decl.h       |   30 -
 tools/libxen/include/xen/api/xen_vbd.h             |  390 -----
 tools/libxen/include/xen/api/xen_vbd_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vbd_metrics.h     |  198 ---
 .../libxen/include/xen/api/xen_vbd_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_vbd_mode.h        |   77 -
 tools/libxen/include/xen/api/xen_vbd_type.h        |   77 -
 tools/libxen/include/xen/api/xen_vdi.h             |  360 ----
 tools/libxen/include/xen/api/xen_vdi_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vdi_type.h        |   92 -
 tools/libxen/include/xen/api/xen_vif.h             |  379 ----
 tools/libxen/include/xen/api/xen_vif_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vif_metrics.h     |  198 ---
 .../libxen/include/xen/api/xen_vif_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_vm.h              |  931 ----------
 tools/libxen/include/xen/api/xen_vm_decl.h         |   30 -
 .../libxen/include/xen/api/xen_vm_guest_metrics.h  |  234 ---
 .../include/xen/api/xen_vm_guest_metrics_decl.h    |   30 -
 tools/libxen/include/xen/api/xen_vm_metrics.h      |  251 ---
 tools/libxen/include/xen/api/xen_vm_metrics_decl.h |   30 -
 tools/libxen/include/xen/api/xen_vm_power_state.h  |   97 -
 tools/libxen/include/xen/api/xen_xspolicy.h        |  293 ----
 tools/libxen/include/xen/api/xen_xspolicy_decl.h   |   31 -
 .../libxen/include/xen_console_protocol_internal.h |   37 -
 .../libxen/include/xen_event_operation_internal.h  |   37 -
 tools/libxen/include/xen_internal.h                |  188 --
 .../include/xen_on_crash_behaviour_internal.h      |   38 -
 tools/libxen/include/xen_on_normal_exit_internal.h |   37 -
 tools/libxen/include/xen_vbd_mode_internal.h       |   37 -
 tools/libxen/include/xen_vbd_type_internal.h       |   37 -
 tools/libxen/include/xen_vdi_type_internal.h       |   37 -
 tools/libxen/include/xen_vm_power_state_internal.h |   37 -
 tools/libxen/src/xen_common.c                      | 1784 -------------------
 tools/libxen/src/xen_console.c                     |  298 ----
 tools/libxen/src/xen_console_protocol.c            |   82 -
 tools/libxen/src/xen_cpu_pool.c                    |  671 -------
 tools/libxen/src/xen_crashdump.c                   |  191 --
 tools/libxen/src/xen_event.c                       |  123 --
 tools/libxen/src/xen_event_operation.c             |   75 -
 tools/libxen/src/xen_host.c                        |  915 ----------
 tools/libxen/src/xen_host_cpu.c                    |  353 ----
 tools/libxen/src/xen_host_metrics.c                |  190 --
 tools/libxen/src/xen_int_float_map.c               |   39 -
 tools/libxen/src/xen_int_int_map.c                 |   39 -
 tools/libxen/src/xen_int_string_set_map.c          |   54 -
 tools/libxen/src/xen_network.c                     |  371 ----
 tools/libxen/src/xen_on_crash_behaviour.c          |   85 -
 tools/libxen/src/xen_on_normal_exit.c              |   81 -
 tools/libxen/src/xen_pbd.c                         |  249 ---
 tools/libxen/src/xen_pif.c                         |  380 ----
 tools/libxen/src/xen_pif_metrics.c                 |  190 --
 tools/libxen/src/xen_sr.c                          |  379 ----
 tools/libxen/src/xen_string_set.c                  |   48 -
 tools/libxen/src/xen_string_set.h                  |   47 -
 tools/libxen/src/xen_string_string_map.c           |   52 -
 tools/libxen/src/xen_user.c                        |  210 ---
 tools/libxen/src/xen_vbd.c                         |  626 -------
 tools/libxen/src/xen_vbd_metrics.c                 |  190 --
 tools/libxen/src/xen_vbd_mode.c                    |   81 -
 tools/libxen/src/xen_vbd_type.c                    |   81 -
 tools/libxen/src/xen_vdi.c                         |  575 ------
 tools/libxen/src/xen_vdi_type.c                    |   84 -
 tools/libxen/src/xen_vif.c                         |  616 -------
 tools/libxen/src/xen_vif_metrics.c                 |  190 --
 tools/libxen/src/xen_vm.c                          | 1837 --------------------
 tools/libxen/src/xen_vm_guest_metrics.c            |  279 ---
 tools/libxen/src/xen_vm_metrics.c                  |  318 ----
 tools/libxen/src/xen_vm_power_state.c              |   85 -
 tools/libxen/src/xen_xspolicy.c                    |  363 ----
 tools/libxen/test/test_bindings.c                  | 1453 ----------------
 tools/libxen/test/test_event_handling.c            |  210 ---
 117 files changed, 0 insertions(+), 23744 deletions(-)

diff --git a/.gitignore b/.gitignore
index af1d826..e8442c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -198,9 +198,6 @@ tools/hotplug/common/hotplugpath.sh
 tools/include/xen/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
-tools/libxen/libxenapi-
-tools/libxen/test/test_bindings
-tools/libxen/test/test_event_handling
 tools/libxl/libxlu_cfg_y.output
 tools/libxl/xl
 tools/libxl/testenum
diff --git a/.hgignore b/.hgignore
index 6d09b09..da27f80 100644
--- a/.hgignore
+++ b/.hgignore
@@ -186,9 +186,6 @@
 ^tools/include/xen/.*$
 ^tools/include/xen-foreign/.*\.(c|h|size)$
 ^tools/include/xen-foreign/checker$
-^tools/libxen/libxenapi-
-^tools/libxen/test/test_bindings$
-^tools/libxen/test/test_event_handling$
 ^tools/libxl/_.*\.h$
 ^tools/libxl/_.*\.c$
 ^tools/libxl/libxlu_cfg_y\.output$
diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 85379b2..0bdf37a 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -46,7 +46,6 @@ GIT_HTTP            := @githttp@
 
 # Optional components
 XENSTAT_XENTOP      := @monitors@
-LIBXENAPI_BINDINGS  := @xenapi@
 OCAML_TOOLS         := @ocamltools@
 FLASK_POLICY        := @xsmpolicy@
 CONFIG_OVMF         := @ovmf@
diff --git a/tools/Makefile b/tools/Makefile
index 00c69ee..c3cfb38 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -23,7 +23,6 @@ SUBDIRS-$(CONFIG_Linux) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
-SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
 SUBDIRS-$(CONFIG_Linux) += libvchan
 
 # do not recurse in to a dir we are about to delete
diff --git a/tools/configure b/tools/configure
index 7a44505..e1eeff4 100755
--- a/tools/configure
+++ b/tools/configure
@@ -694,7 +694,6 @@ rombios
 ovmf
 xsmpolicy
 ocamltools
-xenapi
 monitors
 githttp
 FILE_OFFSET_BITS
@@ -757,7 +756,6 @@ enable_option_checking
 enable_largefile
 enable_githttp
 enable_monitors
-enable_xenapi
 enable_ocamltools
 enable_xsmpolicy
 enable_ovmf
@@ -1418,7 +1416,6 @@ Optional Features:
                           DISABLED)
   --disable-monitors      Disable xenstat and xentop monitoring tools (default
                           is ENABLED)
-  --enable-xenapi         Enable Xen API Bindings (default is DISABLED)
   --disable-ocamltools    Disable Ocaml tools (default is ENABLED)
   --disable-xsmpolicy     Disable XSM policy compilation (default is ENABLED)
   --enable-ovmf           Enable OVMF (default is DISABLED)
@@ -3583,29 +3580,6 @@ monitors=$ax_cv_monitors
 
 
 
-# Check whether --enable-xenapi was given.
-if test "${enable_xenapi+set}" = set; then :
-  enableval=$enable_xenapi;
-fi
-
-
-if test "x$enable_xenapi" = "xno"; then :
-
-    ax_cv_xenapi="n"
-
-elif test "x$enable_xenapi" = "xyes"; then :
-
-    ax_cv_xenapi="y"
-
-elif test -z $ax_cv_xenapi; then :
-
-    ax_cv_xenapi="n"
-
-fi
-xenapi=$ax_cv_xenapi
-
-
-
 # Check whether --enable-ocamltools was given.
 if test "${enable_ocamltools+set}" = set; then :
   enableval=$enable_ocamltools;
@@ -4676,100 +4650,6 @@ if test x"${PERL}" = x"no"
 then
     as_fn_error $? "Unable to find perl, please install perl" "$LINENO" 5
 fi
-if test "x$xenapi" = "xy"; then :
-
-    # Extract the first word of "curl-config", so it can be a program name with args.
-set dummy curl-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CURL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $CURL in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CURL="$CURL" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_CURL" && ac_cv_path_CURL="no"
-  ;;
-esac
-fi
-CURL=$ac_cv_path_CURL
-if test -n "$CURL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL" >&5
-$as_echo "$CURL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x"${CURL}" = x"no"
-then
-    as_fn_error $? "Unable to find curl-config, please install curl-config" "$LINENO" 5
-fi
-    # Extract the first word of "xml2-config", so it can be a program name with args.
-set dummy xml2-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_XML+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $XML in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_XML="$XML" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_XML="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_XML" && ac_cv_path_XML="no"
-  ;;
-esac
-fi
-XML=$ac_cv_path_XML
-if test -n "$XML"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML" >&5
-$as_echo "$XML" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x"${XML}" = x"no"
-then
-    as_fn_error $? "Unable to find xml2-config, please install xml2-config" "$LINENO" 5
-fi
-
-fi
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
diff --git a/tools/configure.ac b/tools/configure.ac
index e1f7527..00fb47b 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -51,7 +51,6 @@ m4_include([../m4/ax_compare_version.m4])
 # Enable/disable options
 AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
 AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
-AX_ARG_DEFAULT_DISABLE([xenapi], [Enable Xen API Bindings])
 AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
 AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation])
 AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
@@ -150,10 +149,6 @@ AC_PROG_INSTALL
 AC_PATH_PROG([BISON], [bison])
 AC_PATH_PROG([FLEX], [flex])
 AX_PATH_PROG_OR_FAIL([PERL], [perl])
-AS_IF([test "x$xenapi" = "xy"], [
-    AX_PATH_PROG_OR_FAIL([CURL], [curl-config])
-    AX_PATH_PROG_OR_FAIL([XML], [xml2-config])
-])
 AS_IF([test "x$ocamltools" = "xy"], [
     AC_PROG_OCAML
     AC_PROG_FINDLIB
diff --git a/tools/libxen/COPYING b/tools/libxen/COPYING
deleted file mode 100644
index b124cf5..0000000
--- a/tools/libxen/COPYING
+++ /dev/null
@@ -1,510 +0,0 @@
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes a de-facto standard.  To achieve this, non-free programs must
-be allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at least
-    three years, to give the same user the materials specified in
-    Subsection 6a, above, for a charge no more than the cost of
-    performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should
-have at least the "copyright" line and a pointer to where the full
-notice is found.
-
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library 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
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or
-your school, if any, to sign a "copyright disclaimer" for the library,
-if necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James
-  Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/tools/libxen/Makefile b/tools/libxen/Makefile
deleted file mode 100644
index 262412d..0000000
--- a/tools/libxen/Makefile
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Copyright (c) 2006-2007, XenSource Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
-#
-XEN_ROOT=$(CURDIR)/../..
-include $(XEN_ROOT)/tools/Rules.mk
-
-MAJOR = 1.0
-MINOR = 0
-
-CFLAGS += -Iinclude                     \
-          -fPIC
-
-ifeq ($(LIBXENAPI_BINDINGS),y)
-CFLAGS += $(shell $(XML2_CONFIG) --cflags) \
-          $(shell $(CURL_CONFIG) --cflags)
-
-LDFLAGS += $(shell $(XML2_CONFIG) --libs) \
-           $(shell $(CURL_CONFIG) --libs)
-endif
-
-LIBXENAPI_HDRS = $(wildcard include/xen/api/*.h) include/xen/api/xen_all.h
-LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c))
-
-TEST_PROGRAMS = test/test_bindings test/test_event_handling
-
-.PHONY: all
-all: libxenapi.so libxenapi.a
-
-libxenapi.so: libxenapi.so.$(MAJOR)
-	ln -sf $< $@
-
-libxenapi.so.$(MAJOR): libxenapi.so.$(MAJOR).$(MINOR)
-	ln -sf $< $@
-
-libxenapi.so.$(MAJOR).$(MINOR): $(LIBXENAPI_OBJS)
-	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenapi.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(APPEND_LDFLAGS)
-
-libxenapi.a: $(LIBXENAPI_OBJS)
-	$(AR) rcs libxenapi.a $^
-
-$(TEST_PROGRAMS): test/%: test/%.o libxenapi.so
-	$(CC) $(LDFLAGS) -o $@ $< -L . -lxenapi $(APPEND_LDFLAGS)
-
-
-.PHONY: install
-install: all
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/api
-	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_PROG) libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	ln -sf libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenapi.so.$(MAJOR)
-	ln -sf libxenapi.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenapi.so
-	$(INSTALL_DATA) libxenapi.a $(DESTDIR)$(LIBDIR)
-	set -e; for i in $(LIBXENAPI_HDRS); do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEDIR)/xen/api; \
-	done
-
-
-.PHONY: clean
-clean:
-	rm -f `find -name *.o`
-	rm -f libxenapi.so*
-	rm -f libxenapi.a
-	rm -f $(TEST_PROGRAMS)
diff --git a/tools/libxen/Makefile.dist b/tools/libxen/Makefile.dist
deleted file mode 100644
index 7088362..0000000
--- a/tools/libxen/Makefile.dist
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# Copyright (c) 2006-2007, XenSource Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
-#
-
-MAJOR = 1.0
-MINOR = 0
-
-CFLAGS = -Iinclude                     \
-         $(shell xml2-config --cflags) \
-         $(shell curl-config --cflags) \
-         -W -Wall -Wmissing-prototypes -Werror -std=c99 -O2 -fPIC
-
-LDFLAGS = $(shell xml2-config --libs) \
-          $(shell curl-config --libs)
-
-# -h for Solaris
-SONAME_LDFLAG ?= -soname
-# -R /usr/sfw/$(LIBDIR) -shared for Solaris
-SHLIB_LDFLAGS ?= -shared
-
-# ginstall for Solaris
-INSTALL      = install
-INSTALL_DIR  = $(INSTALL) -d -m0755 -p
-INSTALL_DATA = $(INSTALL) -m0644 -p
-
-LIBXENAPI_HDRS = $(wildcard include/*.h)
-LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c))
-
-TEST_PROGRAMS = test/test_bindings test/test_event_handling
-
-TARBALL_DEST = libxenapi-$(MAJOR).$(MINOR)
-
-.PHONY: all
-all: $(TEST_PROGRAMS)
-
-libxenapi.so: libxenapi.so.$(MAJOR)
-	ln -sf $< $@
-
-libxenapi.so.$(MAJOR): libxenapi.so.$(MAJOR).$(MINOR)
-	ln -sf $< $@
-
-libxenapi.so.$(MAJOR).$(MINOR): $(LIBXENAPI_OBJS)
-	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenapi.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^
-
-libxenapi.a: $(LIBXENAPI_OBJS)
-	$(AR) rcs libxenapi.a $^
-
-$(TEST_PROGRAMS): test/%: test/%.o libxenapi.so
-	$(CC) $(LDFLAGS) -o $@ $< -L . -lxenapi
-
-
-.PHONY: install
-install: all
-	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/api
-	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-	$(INSTALL_PROG) libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-	ln -sf libxenapi.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenapi.so.$(MAJOR)
-	ln -sf libxenapi.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenapi.so
-	$(INSTALL_DATA) libxenapi.a $(DESTDIR)$(LIBDIR)
-	set -e; for i in $(LIBXENAPI_HDRS); do \
-	    $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEDIR)/xen/api; \
-	done
-
-
-.PHONY: tarball
-tarball: $(TARBALL_DEST).tar.bz2
-
-$(TARBALL_DEST).tar.bz2: all
-	rm -Rf $(TARBALL_DEST)
-	mkdir -p $(TARBALL_DEST)/include/xen/api
-	mkdir -p $(TARBALL_DEST)/src
-	mkdir -p $(TARBALL_DEST)/test
-	cp COPYING $(TARBALL_DEST)
-	cp Makefile.dist $(TARBALL_DEST)/Makefile
-	cp Makefile.dist $(TARBALL_DEST)/Makefile.dist
-	cp README $(TARBALL_DEST)
-	cp include/*.h $(TARBALL_DEST)/include
-	cp include/xen/api/*.h $(TARBALL_DEST)/include/xen/api
-	cp src/*.c $(TARBALL_DEST)/src
-	cp test/*.c $(TARBALL_DEST)/test
-	fakeroot chown root:root -R $(TARBALL_DEST)
-	fakeroot tar cjf $(TARBALL_DEST).tar.bz2 $(TARBALL_DEST)
-
-
-.PHONY: clean
-clean:
-	rm -f `find -name *.o`
-	rm -f libxenapi.so*
-	rm -f libxenapi.a
-	rm -f $(TEST_PROGRAMS)
-
-
-.PHONY: uberheader
-uberheader: include/xen/api/xen_all.h
-include/xen/api/xen_all.h::
-	echo "/* This file is autogenerated */" >$@
-	echo "#ifndef XEN_API_XEN_ALL_H" >>$@
-	echo "#define XEN_API_XEN_ALL_H" >>$@
-	ls include/xen/api/*.h | grep -v xen_all.h | grep -v _decl.h | \
-          sed 's,^include/\(.*\)$$,#include <\1>,g' >>$@
-	echo "#endif" >>$@
diff --git a/tools/libxen/README b/tools/libxen/README
deleted file mode 100644
index 2dd79f4..0000000
--- a/tools/libxen/README
+++ /dev/null
@@ -1,55 +0,0 @@
-Xen API C Bindings
-==================
-
-This distribution is the source code to the proposed Xen API C bindings.
-
-The Xen API project will define an XML-RPC protocol for remote and local
-management of Xen-based systems, and a set of bindings for these XML-RPC calls
-into a number of languages (this package contains those to the C language).
-
-The intention is to standardise these XML-RPC calls, and then the Xen project
-will guarantee that that wire protocol will be supported for the long term.
-The bindings will also be supported in the Xen tree, giving a stable
-foundation for Xen management tools and middlewares, in particular the Xen CIM
-providers and libvirt.
-
-THIS IS A WORK IN PROGRESS.  The API and bindings are under active design and
-development, and this is a snapshot release for developers only.  Both the API
-and the C bindings are scheduled to be stabilised by the Xen 3.0.4 release
-i.e. October 2006 at the earliest.
-
-These bindings are open-source (LGPL), and will be committed as libraries to
-the Xen trees for all to use after the Xen 3.0.3 release.
-
-We welcome any discussion about this library and the API in general.  Please
-join the Xen-API mailing list if you are interested in this project. I (Ewan
-Mellor) will collate all the feedback from that list and push out new versions
-of the document and the bindings as and when.
-
-
-URLs
-----
-
-Xen-API wiki page:
-http://wiki.xensource.com/xenwiki/XenApi
-
-Xen-API mailing list:
-  http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
-
-
-Usage
------
-
-The bindings depend upon libxml2, the XML toolkit from the GNOME project; the
-test program depends upon libcurl3 also.  On Debian, you need the packages
-libxml2-dev and libcurl3-dev.
-
-To compile, type make.  To compile the test also, type make
-test/test_bindings, remembering the additional dependency.
-
-To run the test, do
-
-LD_LIBRARY_PATH=. ./test/test_bindings <url> <username> <password>
-
-where <url> is the fragment of the server URL that follows the http://, for
-example "localhost:8005/RPC2".
diff --git a/tools/libxen/include/xen/api/xen_all.h b/tools/libxen/include/xen/api/xen_all.h
deleted file mode 100644
index 45ac171..0000000
--- a/tools/libxen/include/xen/api/xen_all.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* This file is autogenerated */
-#ifndef XEN_API_XEN_ALL_H
-#define XEN_API_XEN_ALL_H
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_console.h>
-#include <xen/api/xen_console_protocol.h>
-#include <xen/api/xen_crashdump.h>
-#include <xen/api/xen_event.h>
-#include <xen/api/xen_event_operation.h>
-#include <xen/api/xen_host_cpu.h>
-#include <xen/api/xen_host.h>
-#include <xen/api/xen_host_metrics.h>
-#include <xen/api/xen_int_float_map.h>
-#include <xen/api/xen_int_int_map.h>
-#include <xen/api/xen_int_string_set_map.h>
-#include <xen/api/xen_network.h>
-#include <xen/api/xen_on_crash_behaviour.h>
-#include <xen/api/xen_on_normal_exit.h>
-#include <xen/api/xen_pbd.h>
-#include <xen/api/xen_pif.h>
-#include <xen/api/xen_pif_metrics.h>
-#include <xen/api/xen_sr.h>
-#include <xen/api/xen_string_set.h>
-#include <xen/api/xen_string_string_map.h>
-#include <xen/api/xen_user.h>
-#include <xen/api/xen_vbd.h>
-#include <xen/api/xen_vbd_metrics.h>
-#include <xen/api/xen_vbd_mode.h>
-#include <xen/api/xen_vbd_type.h>
-#include <xen/api/xen_vdi.h>
-#include <xen/api/xen_vdi_type.h>
-#include <xen/api/xen_vif.h>
-#include <xen/api/xen_vif_metrics.h>
-#include <xen/api/xen_vm_guest_metrics.h>
-#include <xen/api/xen_vm.h>
-#include <xen/api/xen_vm_metrics.h>
-#include <xen/api/xen_vm_power_state.h>
-#include <xen/api/xen_xspolicy.h>
-#include <xen/api/xen_cpu_pool.h>
-#endif
diff --git a/tools/libxen/include/xen/api/xen_common.h b/tools/libxen/include/xen/api/xen_common.h
deleted file mode 100644
index ebcebd9..0000000
--- a/tools/libxen/include/xen/api/xen_common.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2006 XenSource, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_COMMON_H
-#define XEN_COMMON_H
-
-
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <time.h>
-
-#include "xen/api/xen_host_decl.h"
-
-
-typedef bool (*xen_result_func)(const void *data, size_t len,
-                                void *result_handle);
-
-
-/**
- * len does not include a terminating \0.
- */
-typedef int (*xen_call_func)(const void *, size_t len, void *user_handle,
-                             void *result_handle,
-                             xen_result_func result_func);
-
-
-typedef struct
-{
-    xen_call_func call_func;
-    void *handle;
-    const char *session_id;
-    bool ok;
-    char **error_description;
-    int error_description_count;
-} xen_session;
-
-
-typedef struct xen_session_record
-{
-    char *uuid;
-    struct xen_host_record_opt *this_host;
-    char *this_user;
-    time_t last_active;
-} xen_session_record;
-
-
-/**
- * Allocate a xen_session_record.
- */
-extern xen_session_record *
-xen_session_record_alloc(void);
-
-
-/**
- * Free the given xen_session_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_session_record_free(xen_session_record *record);
-
-
-struct xen_task_;
-typedef struct xen_task_ * xen_task_id;
-
-
-typedef struct
-{
-    int progress;
-    long eta;
-    /* !!! RESULT */
-}  xen_task_status;
-
-
-typedef struct
-{
-    int major;
-    int minor;
-    int patch;
-    char *extraversion;
-} xen_version;
-
-
-/**
- * Free the given xen_version, and all referenced values.
- */
-extern void xen_version_free(xen_version *version);
-
-
-/**
- * Return the version of this client-side library.  This will be the major,
- * minor, and extraversion of the Xen release with which it was released,
- * plus the library's own version as the patch.
- */
-extern xen_version *xen_get_client_side_version(void);
-
-
-extern bool
-xen_uuid_string_to_bytes(char *uuid, char **bytes);
-
-
-extern bool
-xen_uuid_bytes_to_string(char *bytes, char **uuid);
-
-
-extern void
-xen_uuid_free(char *uuid);
-
-
-extern void
-xen_uuid_bytes_free(char *bytes);
-
-
-/**
- * Initialise this library.  Call this before starting to use this library.
- * Note that since this library depends upon libxml2, you should also call
- * xmlInitParser as appropriate for your program.
- */
-extern
-void xen_init(void);
-
-
-/**
- * Clear up this library.  Call when you have finished using this library.
- * Note that since this library depends upon libxml2, you should also call
- * xmlCleanupParser as appropriate for your program.
- */
-extern
-void xen_fini(void);
-
-
-/**
- * Log in at the server, and allocate a xen_session to represent this session.
- */
-extern xen_session *
-xen_session_login_with_password(xen_call_func call_func, void *handle,
-                                const char *uname, const char *pwd);
-
-
-/**
- * Log out at the server, and free the xen_session.
- */
-extern void
-xen_session_logout(xen_session *session);
-
-
-/**
- * Clear any error condition recorded on this session.
- */
-void
-xen_session_clear_error(xen_session *session);
-
-
-/**
- * Get the UUID of the second given session.  Set *result to point at a
- * string, yours to free.
- */
-extern bool
-xen_session_get_uuid(xen_session *session, char **result,
-                     xen_session *self_session);
-
-
-/**
- * Get the this_host field of the second given session.  Set *result to be a
- * handle to that host.
- */
-extern bool
-xen_session_get_this_host(xen_session *session, xen_host *result,
-                          xen_session *self_session);
-
-
-/**
- * Get the this_user field of the second given session.  Set *result to point
- * at a string, yours to free.
- */
-extern bool
-xen_session_get_this_user(xen_session *session, char **result,
-                          xen_session *self_session);
-
-
-/**
- * Get the last_active field of the given session, and place it in *result.
- */
-extern bool
-xen_session_get_last_active(xen_session *session, time_t *result,
-                            xen_session *self_session);
-
-/**
- * Get a record containing the current state of the second given session.
- */
-extern bool
-xen_session_get_record(xen_session *session, xen_session_record **result,
-                       xen_session *self_session);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_console.h b/tools/libxen/include/xen/api/xen_console.h
deleted file mode 100644
index 19bfdeb..0000000
--- a/tools/libxen/include/xen/api/xen_console.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CONSOLE_H
-#define XEN_CONSOLE_H
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_console_decl.h>
-#include <xen/api/xen_console_protocol.h>
-#include <xen/api/xen_string_string_map.h>
-#include <xen/api/xen_vm_decl.h>
-
-
-/*
- * The console class.
- * 
- * A console.
- */
-
-
-/**
- * Free the given xen_console.  The given handle must have been
- * allocated by this library.
- */
-extern void
-xen_console_free(xen_console console);
-
-
-typedef struct xen_console_set
-{
-    size_t size;
-    xen_console *contents[];
-} xen_console_set;
-
-/**
- * Allocate a xen_console_set of the given size.
- */
-extern xen_console_set *
-xen_console_set_alloc(size_t size);
-
-/**
- * Free the given xen_console_set.  The given set must have been
- * allocated by this library.
- */
-extern void
-xen_console_set_free(xen_console_set *set);
-
-
-typedef struct xen_console_record
-{
-    xen_console handle;
-    char *uuid;
-    enum xen_console_protocol protocol;
-    char *location;
-    struct xen_vm_record_opt *vm;
-    xen_string_string_map *other_config;
-} xen_console_record;
-
-/**
- * Allocate a xen_console_record.
- */
-extern xen_console_record *
-xen_console_record_alloc(void);
-
-/**
- * Free the given xen_console_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_console_record_free(xen_console_record *record);
-
-
-typedef struct xen_console_record_opt
-{
-    bool is_record;
-    union
-    {
-        xen_console handle;
-        xen_console_record *record;
-    } u;
-} xen_console_record_opt;
-
-/**
- * Allocate a xen_console_record_opt.
- */
-extern xen_console_record_opt *
-xen_console_record_opt_alloc(void);
-
-/**
- * Free the given xen_console_record_opt, and all referenced values. 
- * The given record_opt must have been allocated by this library.
- */
-extern void
-xen_console_record_opt_free(xen_console_record_opt *record_opt);
-
-
-typedef struct xen_console_record_set
-{
-    size_t size;
-    xen_console_record *contents[];
-} xen_console_record_set;
-
-/**
- * Allocate a xen_console_record_set of the given size.
- */
-extern xen_console_record_set *
-xen_console_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_console_record_set, and all referenced values. 
- * The given set must have been allocated by this library.
- */
-extern void
-xen_console_record_set_free(xen_console_record_set *set);
-
-
-
-typedef struct xen_console_record_opt_set
-{
-    size_t size;
-    xen_console_record_opt *contents[];
-} xen_console_record_opt_set;
-
-/**
- * Allocate a xen_console_record_opt_set of the given size.
- */
-extern xen_console_record_opt_set *
-xen_console_record_opt_set_alloc(size_t size);
-
-/**
- * Free the given xen_console_record_opt_set, and all referenced
- * values.  The given set must have been allocated by this library.
- */
-extern void
-xen_console_record_opt_set_free(xen_console_record_opt_set *set);
-
-
-/**
- * Get a record containing the current state of the given console.
- */
-extern bool
-xen_console_get_record(xen_session *session, xen_console_record **result, xen_console console);
-
-
-/**
- * Get a reference to the console instance with the specified UUID.
- */
-extern bool
-xen_console_get_by_uuid(xen_session *session, xen_console *result, char *uuid);
-
-
-/**
- * Create a new console instance, and return its handle.
- */
-extern bool
-xen_console_create(xen_session *session, xen_console *result, xen_console_record *record);
-
-
-/**
- * Destroy the specified console instance.
- */
-extern bool
-xen_console_destroy(xen_session *session, xen_console console);
-
-
-/**
- * Get the uuid field of the given console.
- */
-extern bool
-xen_console_get_uuid(xen_session *session, char **result, xen_console console);
-
-
-/**
- * Get the protocol field of the given console.
- */
-extern bool
-xen_console_get_protocol(xen_session *session, enum xen_console_protocol *result, xen_console console);
-
-
-/**
- * Get the location field of the given console.
- */
-extern bool
-xen_console_get_location(xen_session *session, char **result, xen_console console);
-
-
-/**
- * Get the VM field of the given console.
- */
-extern bool
-xen_console_get_vm(xen_session *session, xen_vm *result, xen_console console);
-
-
-/**
- * Get the other_config field of the given console.
- */
-extern bool
-xen_console_get_other_config(xen_session *session, xen_string_string_map **result, xen_console console);
-
-
-/**
- * Set the other_config field of the given console.
- */
-extern bool
-xen_console_set_other_config(xen_session *session, xen_console console, xen_string_string_map *other_config);
-
-
-/**
- * Add the given key-value pair to the other_config field of the given
- * console.
- */
-extern bool
-xen_console_add_to_other_config(xen_session *session, xen_console console, char *key, char *value);
-
-
-/**
- * Remove the given key and its corresponding value from the
- * other_config field of the given console.  If the key is not in that Map,
- * then do nothing.
- */
-extern bool
-xen_console_remove_from_other_config(xen_session *session, xen_console console, char *key);
-
-
-/**
- * Return a list of all the consoles known to the system.
- */
-extern bool
-xen_console_get_all(xen_session *session, struct xen_console_set **result);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_console_decl.h b/tools/libxen/include/xen/api/xen_console_decl.h
deleted file mode 100644
index 432ff76..0000000
--- a/tools/libxen/include/xen/api/xen_console_decl.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CONSOLE_DECL_H
-#define XEN_CONSOLE_DECL_H
-
-typedef void *xen_console;
-
-struct xen_console_set;
-struct xen_console_record;
-struct xen_console_record_set;
-struct xen_console_record_opt;
-struct xen_console_record_opt_set;
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_console_protocol.h b/tools/libxen/include/xen/api/xen_console_protocol.h
deleted file mode 100644
index 413ad7a..0000000
--- a/tools/libxen/include/xen/api/xen_console_protocol.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CONSOLE_PROTOCOL_H
-#define XEN_CONSOLE_PROTOCOL_H
-
-
-#include <xen/api/xen_common.h>
-
-
-enum xen_console_protocol
-{
-    /**
-     * VT100 terminal
-     */
-    XEN_CONSOLE_PROTOCOL_VT100,
-
-    /**
-     * Remote FrameBuffer protocol (as used in VNC)
-     */
-    XEN_CONSOLE_PROTOCOL_RFB,
-
-    /**
-     * Remote Desktop Protocol
-     */
-    XEN_CONSOLE_PROTOCOL_RDP
-};
-
-
-typedef struct xen_console_protocol_set
-{
-    size_t size;
-    enum xen_console_protocol contents[];
-} xen_console_protocol_set;
-
-/**
- * Allocate a xen_console_protocol_set of the given size.
- */
-extern xen_console_protocol_set *
-xen_console_protocol_set_alloc(size_t size);
-
-/**
- * Free the given xen_console_protocol_set.  The given set must have
- * been allocated by this library.
- */
-extern void
-xen_console_protocol_set_free(xen_console_protocol_set *set);
-
-
-/**
- * Return the name corresponding to the given code.  This string must
- * not be modified or freed.
- */
-extern const char *
-xen_console_protocol_to_string(enum xen_console_protocol val);
-
-
-/**
- * Return the correct code for the given string, or set the session
- * object to failure and return an undefined value if the given string does
- * not match a known code.
- */
-extern enum xen_console_protocol
-xen_console_protocol_from_string(xen_session *session, const char *str);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_cpu_pool.h b/tools/libxen/include/xen/api/xen_cpu_pool.h
deleted file mode 100644
index 423c076..0000000
--- a/tools/libxen/include/xen/api/xen_cpu_pool.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CPU_POOL_H
-#define XEN_CPU_POOL_H
-
-#include <stddef.h>
-#include <stdlib.h>
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_string_set.h>
-#include <xen/api/xen_string_string_map.h>
-#include <xen/api/xen_host_cpu_decl.h>
-#include <xen/api/xen_host.h>
-#include <xen/api/xen_vm_decl.h>
-#include <xen/api/xen_vm.h>
-#include <xen/api/xen_cpu_pool_decl.h>
-
-/*
- * The cpu_pool class.
- *
- * Management of CPU pools.
- */
-
-
-/**
- * Free the given xen_cpu_pool.  The given handle must have been allocated
- * by this library.
- */
-extern void
-xen_cpu_pool_free(xen_cpu_pool cpu_pool);
-
-
-typedef struct xen_cpu_pool_set
-{
-    size_t size;
-    xen_cpu_pool *contents[];
-} xen_cpu_pool_set;
-
-/**
- * Allocate a xen_cpu_pool_set of the given size.
- */
-extern xen_cpu_pool_set *
-xen_cpu_pool_set_alloc(size_t size);
-
-/**
- * Free the given xen_cpu_pool_set.  The given set must have been allocated
- * by this library.
- */
-extern void
-xen_cpu_pool_set_free(xen_cpu_pool_set *set);
-
-
-typedef struct xen_cpu_pool_record
-{
-    xen_cpu_pool handle;
-    char *uuid;
-    char *name_label;
-    char *name_description;
-    struct xen_host_record_opt *resident_on;
-    bool auto_power_on;
-    struct xen_vm_record_opt_set *started_vms;
-    int64_t ncpu;
-    char *sched_policy;
-    struct xen_string_set *proposed_cpus;
-    struct xen_host_cpu_record_opt_set *host_cpus;
-    bool activated;
-    xen_string_string_map *other_config;
-} xen_cpu_pool_record;
-
-/**
- * Allocate a xen_cpu_pool_record.
- */
-extern xen_cpu_pool_record *
-xen_cpu_pool_record_alloc(void);
-
-/**
- * Free the given xen_cpu_pool_record, and all referenced values.  The given
- * record must have been allocated by this library.
- */
-extern void
-xen_cpu_pool_record_free(xen_cpu_pool_record *record);
-
-
-typedef struct xen_cpu_pool_record_opt
-{
-    bool is_record;
-    union
-    {
-        xen_cpu_pool handle;
-        xen_cpu_pool_record *record;
-    } u;
-} xen_cpu_pool_record_opt;
-
-/**
- * Allocate a xen_cpu_pool_record_opt.
- */
-extern xen_cpu_pool_record_opt *
-xen_cpu_pool_record_opt_alloc(void);
-
-/**
- * Free the given xen_cpu_pool_record_opt, and all referenced values.  The
- * given record_opt must have been allocated by this library.
- */
-extern void
-xen_cpu_pool_record_opt_free(xen_cpu_pool_record_opt *record_opt);
-
-
-typedef struct xen_cpu_pool_record_set
-{
-    size_t size;
-    xen_cpu_pool_record *contents[];
-} xen_cpu_pool_record_set;
-
-/**
- * Allocate a xen_cpu_pool_record_set of the given size.
- */
-extern xen_cpu_pool_record_set *
-xen_cpu_pool_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_cpu_pool_record_set, and all referenced values.  The
- * given set must have been allocated by this library.
- */
-extern void
-xen_cpu_pool_record_set_free(xen_cpu_pool_record_set *set);
-
-
-
-typedef struct xen_cpu_pool_record_opt_set
-{
-    size_t size;
-    xen_cpu_pool_record_opt *contents[];
-} xen_cpu_pool_record_opt_set;
-
-/**
- * Allocate a xen_cpu_pool_record_opt_set of the given size.
- */
-extern xen_cpu_pool_record_opt_set *
-xen_cpu_pool_record_opt_set_alloc(size_t size);
-
-/**
- * Free the given xen_cpu_pool_record_opt_set, and all referenced values.
- * The given set must have been allocated by this library.
- */
-extern void
-xen_cpu_pool_record_opt_set_free(xen_cpu_pool_record_opt_set *set);
-
-
-/**
- * Get a record containing the current state of the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_record(xen_session *session, xen_cpu_pool_record **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get a reference to the cpu_pool instance with the specified UUID.
- */
-extern bool
-xen_cpu_pool_get_by_uuid(xen_session *session, xen_cpu_pool *result, char *uuid);
-
-
-/**
- * Create a new cpu_pool instance, and return its handle.
- */
-extern bool
-xen_cpu_pool_create(xen_session *session, xen_cpu_pool *result,
-    xen_cpu_pool_record *record);
-
-
-/**
- * Destroy the specified VBD instance.
- */
-extern bool
-xen_cpu_pool_destroy(xen_session *session, xen_cpu_pool cpu_pool);
-
-
-/**
- * Get the uuid field of the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_uuid(xen_session *session, char **result, xen_cpu_pool cpu_pool);
-
-
-/**
- * Deactivate the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_deactivate(xen_session *session, xen_cpu_pool cpu_pool);
-
-
-/**
- * Activate the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_activate(xen_session *session, xen_cpu_pool cpu_pool);
-
-
-/**
- * Add a physical cpu to the active pool.
- */
-extern bool
-xen_cpu_pool_add_host_CPU_live(xen_session *session, xen_cpu_pool cpu_pool,
-    xen_host_cpu host_cpu);
-
-
-/**
- * Remove a physical cpu from the active pool.
- */
-extern bool
-xen_cpu_pool_remove_host_CPU_live(xen_session *session, xen_cpu_pool cpu_pool,
-    xen_host_cpu host_cpu);
-
-
-/**
- * Return a list of all the cpu_pools known to the system.
- */
-extern bool
-xen_cpu_pool_get_all(xen_session *session, struct xen_cpu_pool_set **result);
-
-
-/**
- * Get the uuid field of the cpu_pool with given name.
- */
-extern bool
-xen_cpu_pool_get_by_name_label(xen_session *session,
-    struct xen_cpu_pool_set **result, char *label);
-
-
-/**
- * Get activation state of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_activated(xen_session *session, bool *result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get auto_power_on option of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_auto_power_on(xen_session *session, bool *result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get host_cpu refs of all physical cpus of cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_host_CPUs(xen_session *session, struct xen_host_cpu_set **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get name description field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_name_description(xen_session *session, char **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get name label field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_name_label(xen_session *session, char **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get count of physical cpus to attach to cpu_pool on activation.
- */
-extern bool
-xen_cpu_pool_get_ncpu(xen_session *session, int64_t *result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get proposed_CPUs field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_proposed_CPUs(xen_session *session, struct xen_string_set **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get the other_config field of the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_other_config(xen_session *session, xen_string_string_map **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get host the cpu_pool is resident on.
- */
-extern bool
-xen_cpu_pool_get_resident_on(xen_session *session, xen_host *result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get sched_policy field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_sched_policy(xen_session *session, char **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- * Get set of started vms in given cpu_pool.
- */
-extern bool
-xen_cpu_pool_get_started_VMs(xen_session *session, xen_vm_set **result,
-    xen_cpu_pool cpu_pool);
-
-
-/**
- *  Set auto_power_on field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_auto_power_on(xen_session *session, xen_cpu_pool cpu_pool,
-    bool auto_power_on);
-
-
-/**
- * Set proposed_CPUs field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_proposed_CPUs(xen_session *session, xen_cpu_pool cpu_pool,
-    xen_string_set *proposed_cpus);
-
-
-/**
- * Add a proposed cpu to proposed_CPUs field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_add_to_proposed_CPUs(xen_session *session, xen_cpu_pool cpu_pool,
-    char* proposed_cpu);
-
-
-/**
- * Remove a proposed cpu from proposed_CPUs field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_remove_from_proposed_CPUs(xen_session *session, xen_cpu_pool cpu_pool,
-    char* proposed_cpu);
-
-
-/**
- * Set name_label field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_name_label(xen_session *session, xen_cpu_pool cpu_pool,
-    char *label);
-
-
-/**
- * Set name_description field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_name_description(xen_session *session, xen_cpu_pool cpu_pool,
-    char *descr);
-
-
-/**
- * Set ncpu field of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_ncpu(xen_session *session, xen_cpu_pool cpu_pool, int64_t ncpu);
-
-
-/**
- * Set the other_config field of the given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_other_config(xen_session *session, xen_cpu_pool cpu_pool,
-    xen_string_string_map *other_config);
-
-
-/**
- * Add the given key-value pair to the other_config field of the given
- * cpu_pool.
- */
-extern bool
-xen_cpu_pool_add_to_other_config(xen_session *session, xen_cpu_pool cpu_pool,
-    char *key, char *value);
-
-
-/**
- * Remove the given key and its corresponding value from the
- * other_config field of the given cpu_pool. If the key is not in that Map, then
- * do nothing.
- */
-extern bool
-xen_cpu_pool_remove_from_other_config(xen_session *session, xen_cpu_pool cpu_pool,
-    char *key);
-
-/**
- * Set sched_policy of given cpu_pool.
- */
-extern bool
-xen_cpu_pool_set_sched_policy(xen_session *session, xen_cpu_pool cpu_pool,
-    char *sched_policy);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_cpu_pool_decl.h b/tools/libxen/include/xen/api/xen_cpu_pool_decl.h
deleted file mode 100644
index 62878dd..0000000
--- a/tools/libxen/include/xen/api/xen_cpu_pool_decl.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CPU_POOL_DECL_H
-#define XEN_CPU_POOL_DECL_H
-
-typedef void *xen_cpu_pool;
-
-struct xen_cpu_pool_set;
-struct xen_cpu_pool_record;
-struct xen_cpu_pool_record_set;
-struct xen_cpu_pool_record_opt;
-struct xen_cpu_pool_record_opt_set;
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_crashdump.h b/tools/libxen/include/xen/api/xen_crashdump.h
deleted file mode 100644
index 145e041..0000000
--- a/tools/libxen/include/xen/api/xen_crashdump.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CRASHDUMP_H
-#define XEN_CRASHDUMP_H
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_crashdump_decl.h>
-#include <xen/api/xen_vdi_decl.h>
-#include <xen/api/xen_vm_decl.h>
-
-
-/*
- * The crashdump class.
- * 
- * A VM crashdump.
- */
-
-
-/**
- * Free the given xen_crashdump.  The given handle must have been
- * allocated by this library.
- */
-extern void
-xen_crashdump_free(xen_crashdump crashdump);
-
-
-typedef struct xen_crashdump_set
-{
-    size_t size;
-    xen_crashdump *contents[];
-} xen_crashdump_set;
-
-/**
- * Allocate a xen_crashdump_set of the given size.
- */
-extern xen_crashdump_set *
-xen_crashdump_set_alloc(size_t size);
-
-/**
- * Free the given xen_crashdump_set.  The given set must have been
- * allocated by this library.
- */
-extern void
-xen_crashdump_set_free(xen_crashdump_set *set);
-
-
-typedef struct xen_crashdump_record
-{
-    xen_crashdump handle;
-    char *uuid;
-    struct xen_vm_record_opt *vm;
-    struct xen_vdi_record_opt *vdi;
-} xen_crashdump_record;
-
-/**
- * Allocate a xen_crashdump_record.
- */
-extern xen_crashdump_record *
-xen_crashdump_record_alloc(void);
-
-/**
- * Free the given xen_crashdump_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_crashdump_record_free(xen_crashdump_record *record);
-
-
-typedef struct xen_crashdump_record_opt
-{
-    bool is_record;
-    union
-    {
-        xen_crashdump handle;
-        xen_crashdump_record *record;
-    } u;
-} xen_crashdump_record_opt;
-
-/**
- * Allocate a xen_crashdump_record_opt.
- */
-extern xen_crashdump_record_opt *
-xen_crashdump_record_opt_alloc(void);
-
-/**
- * Free the given xen_crashdump_record_opt, and all referenced values. 
- * The given record_opt must have been allocated by this library.
- */
-extern void
-xen_crashdump_record_opt_free(xen_crashdump_record_opt *record_opt);
-
-
-typedef struct xen_crashdump_record_set
-{
-    size_t size;
-    xen_crashdump_record *contents[];
-} xen_crashdump_record_set;
-
-/**
- * Allocate a xen_crashdump_record_set of the given size.
- */
-extern xen_crashdump_record_set *
-xen_crashdump_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_crashdump_record_set, and all referenced values. 
- * The given set must have been allocated by this library.
- */
-extern void
-xen_crashdump_record_set_free(xen_crashdump_record_set *set);
-
-
-
-typedef struct xen_crashdump_record_opt_set
-{
-    size_t size;
-    xen_crashdump_record_opt *contents[];
-} xen_crashdump_record_opt_set;
-
-/**
- * Allocate a xen_crashdump_record_opt_set of the given size.
- */
-extern xen_crashdump_record_opt_set *
-xen_crashdump_record_opt_set_alloc(size_t size);
-
-/**
- * Free the given xen_crashdump_record_opt_set, and all referenced
- * values.  The given set must have been allocated by this library.
- */
-extern void
-xen_crashdump_record_opt_set_free(xen_crashdump_record_opt_set *set);
-
-
-/**
- * Get a record containing the current state of the given crashdump.
- */
-extern bool
-xen_crashdump_get_record(xen_session *session, xen_crashdump_record **result, xen_crashdump crashdump);
-
-
-/**
- * Get a reference to the crashdump instance with the specified UUID.
- */
-extern bool
-xen_crashdump_get_by_uuid(xen_session *session, xen_crashdump *result, char *uuid);
-
-
-/**
- * Get the uuid field of the given crashdump.
- */
-extern bool
-xen_crashdump_get_uuid(xen_session *session, char **result, xen_crashdump crashdump);
-
-
-/**
- * Get the VM field of the given crashdump.
- */
-extern bool
-xen_crashdump_get_vm(xen_session *session, xen_vm *result, xen_crashdump crashdump);
-
-
-/**
- * Get the VDI field of the given crashdump.
- */
-extern bool
-xen_crashdump_get_vdi(xen_session *session, xen_vdi *result, xen_crashdump crashdump);
-
-
-/**
- * Destroy the specified crashdump.
- */
-extern bool
-xen_crashdump_destroy(xen_session *session, xen_crashdump self);
-
-
-/**
- * Return a list of all the crashdumps known to the system.
- */
-extern bool
-xen_crashdump_get_all(xen_session *session, struct xen_crashdump_set **result);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_crashdump_decl.h b/tools/libxen/include/xen/api/xen_crashdump_decl.h
deleted file mode 100644
index 4eb6d54..0000000
--- a/tools/libxen/include/xen/api/xen_crashdump_decl.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_CRASHDUMP_DECL_H
-#define XEN_CRASHDUMP_DECL_H
-
-typedef void *xen_crashdump;
-
-struct xen_crashdump_set;
-struct xen_crashdump_record;
-struct xen_crashdump_record_set;
-struct xen_crashdump_record_opt;
-struct xen_crashdump_record_opt_set;
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_event.h b/tools/libxen/include/xen/api/xen_event.h
deleted file mode 100644
index 6a2845b..0000000
--- a/tools/libxen/include/xen/api/xen_event.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_EVENT_H
-#define XEN_EVENT_H
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_event_decl.h>
-#include <xen/api/xen_event_operation.h>
-#include <xen/api/xen_string_set.h>
-
-
-/*
- * The event class.
- * 
- * Asynchronous event registration and handling.
- */
-
-
-
-typedef struct xen_event_record
-{
-    int64_t id;
-    time_t timestamp;
-    char *class;
-    enum xen_event_operation operation;
-    char *ref;
-    char *obj_uuid;
-} xen_event_record;
-
-/**
- * Allocate a xen_event_record.
- */
-extern xen_event_record *
-xen_event_record_alloc(void);
-
-/**
- * Free the given xen_event_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_event_record_free(xen_event_record *record);
-
-
-typedef struct xen_event_record_set
-{
-    size_t size;
-    xen_event_record *contents[];
-} xen_event_record_set;
-
-/**
- * Allocate a xen_event_record_set of the given size.
- */
-extern xen_event_record_set *
-xen_event_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_event_record_set, and all referenced values.  The
- * given set must have been allocated by this library.
- */
-extern void
-xen_event_record_set_free(xen_event_record_set *set);
-
-
-/**
- * Registers this session with the event system.  Specifying the empty
- * list will register for all classes.
- */
-extern bool
-xen_event_register(xen_session *session, struct xen_string_set *classes);
-
-
-/**
- * Unregisters this session with the event system.
- */
-extern bool
-xen_event_unregister(xen_session *session, struct xen_string_set *classes);
-
-
-/**
- * Blocking call which returns a (possibly empty) batch of events.
- */
-extern bool
-xen_event_next(xen_session *session, struct xen_event_record_set **result);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_event_decl.h b/tools/libxen/include/xen/api/xen_event_decl.h
deleted file mode 100644
index 856991f..0000000
--- a/tools/libxen/include/xen/api/xen_event_decl.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_EVENT_DECL_H
-#define XEN_EVENT_DECL_H
-
-struct xen_event_record;
-struct xen_event_record_set;
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_event_operation.h b/tools/libxen/include/xen/api/xen_event_operation.h
deleted file mode 100644
index 31cce20..0000000
--- a/tools/libxen/include/xen/api/xen_event_operation.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_EVENT_OPERATION_H
-#define XEN_EVENT_OPERATION_H
-
-
-#include <xen/api/xen_common.h>
-
-
-enum xen_event_operation
-{
-    /**
-     * An object has been created
-     */
-    XEN_EVENT_OPERATION_ADD,
-
-    /**
-     * An object has been deleted
-     */
-    XEN_EVENT_OPERATION_DEL,
-
-    /**
-     * An object has been modified
-     */
-    XEN_EVENT_OPERATION_MOD
-};
-
-
-typedef struct xen_event_operation_set
-{
-    size_t size;
-    enum xen_event_operation contents[];
-} xen_event_operation_set;
-
-/**
- * Allocate a xen_event_operation_set of the given size.
- */
-extern xen_event_operation_set *
-xen_event_operation_set_alloc(size_t size);
-
-/**
- * Free the given xen_event_operation_set.  The given set must have
- * been allocated by this library.
- */
-extern void
-xen_event_operation_set_free(xen_event_operation_set *set);
-
-
-/**
- * Return the name corresponding to the given code.  This string must
- * not be modified or freed.
- */
-extern const char *
-xen_event_operation_to_string(enum xen_event_operation val);
-
-
-/**
- * Return the correct code for the given string, or set the session
- * object to failure and return an undefined value if the given string does
- * not match a known code.
- */
-extern enum xen_event_operation
-xen_event_operation_from_string(xen_session *session, const char *str);
-
-
-#endif
diff --git a/tools/libxen/include/xen/api/xen_host.h b/tools/libxen/include/xen/api/xen_host.h
deleted file mode 100644
index f3ca5b9..0000000
--- a/tools/libxen/include/xen/api/xen_host.h
+++ /dev/null
@@ -1,505 +0,0 @@
-/*
- * Copyright (c) 2006-2007, XenSource Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef XEN_HOST_H
-#define XEN_HOST_H
-
-#include <xen/api/xen_common.h>
-#include <xen/api/xen_host_cpu_decl.h>
-#include <xen/api/xen_host_decl.h>
-#include <xen/api/xen_host_metrics_decl.h>
-#include <xen/api/xen_pbd_decl.h>
-#include <xen/api/xen_pif_decl.h>
-#include <xen/api/xen_sr_decl.h>
-#include <xen/api/xen_string_set.h>
-#include <xen/api/xen_string_string_map.h>
-#include <xen/api/xen_vm_decl.h>
-#include <xen/api/xen_cpu_pool_decl.h>
-
-/*
- * The host class.
- * 
- * A physical host.
- */
-
-
-/**
- * Free the given xen_host.  The given handle must have been allocated
- * by this library.
- */
-extern void
-xen_host_free(xen_host host);
-
-
-typedef struct xen_host_set
-{
-    size_t size;
-    xen_host *contents[];
-} xen_host_set;
-
-/**
- * Allocate a xen_host_set of the given size.
- */
-extern xen_host_set *
-xen_host_set_alloc(size_t size);
-
-/**
- * Free the given xen_host_set.  The given set must have been allocated
- * by this library.
- */
-extern void
-xen_host_set_free(xen_host_set *set);
-
-
-typedef struct xen_host_record
-{
-    xen_host handle;
-    char *uuid;
-    char *name_label;
-    char *name_description;
-    int64_t api_version_major;
-    int64_t api_version_minor;
-    char *api_version_vendor;
-    xen_string_string_map *api_version_vendor_implementation;
-    bool enabled;
-    xen_string_string_map *software_version;
-    xen_string_string_map *other_config;
-    struct xen_string_set *capabilities;
-    xen_string_string_map *cpu_configuration;
-    char *sched_policy;
-    struct xen_string_set *supported_bootloaders;
-    struct xen_vm_record_opt_set *resident_vms;
-    xen_string_string_map *logging;
-    struct xen_pif_record_opt_set *pifs;
-    struct xen_sr_record_opt *suspend_image_sr;
-    struct xen_sr_record_opt *crash_dump_sr;
-    struct xen_pbd_record_opt_set *pbds;
-    struct xen_host_cpu_record_opt_set *host_cpus;
-    struct xen_host_metrics_record_opt *metrics;
-    struct xen_cpu_pool_record_opt_set *resident_cpu_pools;
-} xen_host_record;
-
-/**
- * Allocate a xen_host_record.
- */
-extern xen_host_record *
-xen_host_record_alloc(void);
-
-/**
- * Free the given xen_host_record, and all referenced values.  The
- * given record must have been allocated by this library.
- */
-extern void
-xen_host_record_free(xen_host_record *record);
-
-
-typedef struct xen_host_record_opt
-{
-    bool is_record;
-    union
-    {
-        xen_host handle;
-        xen_host_record *record;
-    } u;
-} xen_host_record_opt;
-
-/**
- * Allocate a xen_host_record_opt.
- */
-extern xen_host_record_opt *
-xen_host_record_opt_alloc(void);
-
-/**
- * Free the given xen_host_record_opt, and all referenced values.  The
- * given record_opt must have been allocated by this library.
- */
-extern void
-xen_host_record_opt_free(xen_host_record_opt *record_opt);
-
-
-typedef struct xen_host_record_set
-{
-    size_t size;
-    xen_host_record *contents[];
-} xen_host_record_set;
-
-/**
- * Allocate a xen_host_record_set of the given size.
- */
-extern xen_host_record_set *
-xen_host_record_set_alloc(size_t size);
-
-/**
- * Free the given xen_host_record_set, and all referenced values.  The
- * given set must have been allocated by this library.
- */
-extern void
-xen_host_record_set_free(xen_host_record_set *set);
-
-
-
-typedef struct xen_host_record_opt_set
-{
-    size_t size;
-    xen_host_record_opt *contents[];
-} xen_host_record_opt_set;
-
-/**
- * Allocate a xen_host_record_opt_set of the given size.
- */
-extern xen_host_record_opt_set *
-xen_host_record_opt_set_alloc(size_t size);
-
-/**
- * Free the given xen_host_record_opt_set, and all referenced values. 
- * The given set must have been allocated by this library.
- */
-extern void
-xen_host_record_opt_set_free(xen_host_record_opt_set *set);
-
-
-/**
- * Get a record containing the current state of the given host.
- */
-extern bool
-xen_host_get_record(xen_session *session, xen_host_record **result, xen_host host);
-
-
-/**
- * Get a reference to the host instance with the specified UUID.
- */
-extern bool
-xen_host_get_by_uuid(xen_session *session, xen_host *result, char *uuid);
-
-
-/**
- * Get all the host instances with the given label.
- */
-extern bool
-xen_host_get_by_name_label(xen_session *session, struct xen_host_set **result, char *label);
-
-
-/**
- * Get the uuid field of the given host.
- */
-extern bool
-xen_host_get_uuid(xen_session *session, char **result, xen_host host);
-
-
-/**
- * Get the name/label field of the given host.
- */
-extern bool
-xen_host_get_name_label(xen_session *session, char **result, xen_host host);
-
-
-/**
- * Get the name/description field of the given host.
- */
-extern bool
-xen_host_get_name_description(xen_session *session, char **result, xen_host host);
-
-
-/**
- * Get the API_version/major field of the given host.
- */
-extern bool
-xen_host_get_api_version_major(xen_session *session, int64_t *result, xen_host host);
-
-
-/**
- * Get the API_version/minor field of the given host.
- */
-extern bool
-xen_host_get_api_version_minor(xen_session *session, int64_t *result, xen_host host);
-
-
-/**
- * Get the API_version/vendor field of the given host.
- */
-extern bool
-xen_host_get_api_version_vendor(xen_session *session, char **result, xen_host host);
-
-
-/**
- * Get the API_version/vendor_implementation field of the given host.
- */
-extern bool
-xen_host_get_api_version_vendor_implementation(xen_session *session, xen_string_string_map **result, xen_host host);
-
-
-/**
- * Get the enabled field of the given host.
- */
-extern bool
-xen_host_get_enabled(xen_session *session, bool *result, xen_host host);
-
-
-/**
- * Get the software_version field of the given host.
- */
-extern bool
-xen_host_get_software_version(xen_session *session, xen_string_string_map **result, xen_host host);
-
-
-/**
- * Get the other_config field of the given host.
- */
-extern bool
-xen_host_get_other_config(xen_session *session, xen_string_string_map **result, xen_host host);
-
-
-/**
- * Get the capabilities field of the given host.

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:45:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:45: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 1WXq0R-0006Mt-W8; Wed, 09 Apr 2014 10:45:24 +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 1WXq0Q-0006MH-38
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:22 +0000
Received: from [85.158.143.35:16046] by server-1.bemta-4.messagelabs.com id
	CF/B0-09853-FB425435; Wed, 09 Apr 2014 10:45:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1397040315!7976385!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20320 invoked from network); 9 Apr 2014 10:45:16 -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;
	9 Apr 2014 10:45:16 -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 1WXq0I-0003IR-TY
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq0I-0004g6-RS
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:14 +0000
Date: Wed, 09 Apr 2014 10:45:14 +0000
Message-Id: <E1WXq0I-0004g6-RS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Merge branch 'xend-delete-v2' of
	git://xenbits.xen.org/people/ianc/xen into staging
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 7d5352558907d2c4ed8e0ac5135e63f545ea230b
Merge: 314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96b 185bb58be30e5aeb690125f0320626797f9b14df
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Apr 8 15:49:52 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:49:52 2014 +0100

    Merge branch 'xend-delete-v2' of git://xenbits.xen.org/people/ianc/xen into staging
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

 .gitignore                                         |   17 -
 .hgignore                                          |   15 -
 MAINTAINERS                                        |    2 -
 config/Tools.mk.in                                 |    2 -
 docs/man/xend-config.sxp.pod.5                     |  158 -
 docs/man/xl.pod.1                                  |    1 -
 docs/man/xm.pod.1                                  | 1004 -----
 docs/man/xmdomain.cfg.pod.5                        |  358 --
 tools/Makefile                                     |    1 -
 tools/configure                                    |  168 -
 tools/configure.ac                                 |   18 -
 tools/examples/Makefile                            |   12 -
 tools/examples/xend-config.sxp                     |  304 --
 tools/examples/xend-pci-permissive.sxp             |   27 -
 tools/examples/xend-pci-quirks.sxp                 |   96 -
 tools/examples/xm-config.xml                       |   45 -
 tools/examples/xmexample.hvm                       |  373 --
 tools/examples/xmexample.hvm-stubdom               |  317 --
 tools/examples/xmexample.nbd                       |   26 -
 tools/examples/xmexample.pv-grub                   |  172 -
 tools/examples/xmexample1                          |  197 -
 tools/examples/xmexample2                          |  232 -
 tools/examples/xmexample3                          |  218 -
 tools/hotplug/Linux/Makefile                       |    5 -
 tools/hotplug/Linux/init.d/xend                    |   82 -
 tools/hotplug/Linux/xend.rules                     |    4 -
 tools/hotplug/NetBSD/Makefile                      |    3 +-
 tools/hotplug/NetBSD/rc.d/xend                     |   71 -
 tools/libxen/COPYING                               |  510 ---
 tools/libxen/Makefile                              |   77 -
 tools/libxen/Makefile.dist                         |  115 -
 tools/libxen/README                                |   55 -
 tools/libxen/include/xen/api/xen_all.h             |   40 -
 tools/libxen/include/xen/api/xen_common.h          |  211 -
 tools/libxen/include/xen/api/xen_console.h         |  247 --
 tools/libxen/include/xen/api/xen_console_decl.h    |   30 -
 .../libxen/include/xen/api/xen_console_protocol.h  |   82 -
 tools/libxen/include/xen/api/xen_cpu_pool.h        |  424 --
 tools/libxen/include/xen/api/xen_cpu_pool_decl.h   |   30 -
 tools/libxen/include/xen/api/xen_crashdump.h       |  199 -
 tools/libxen/include/xen/api/xen_crashdump_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_event.h           |  102 -
 tools/libxen/include/xen/api/xen_event_decl.h      |   25 -
 tools/libxen/include/xen/api/xen_event_operation.h |   82 -
 tools/libxen/include/xen/api/xen_host.h            |  505 ---
 tools/libxen/include/xen/api/xen_host_cpu.h        |  263 --
 tools/libxen/include/xen/api/xen_host_cpu_decl.h   |   30 -
 tools/libxen/include/xen/api/xen_host_decl.h       |   30 -
 tools/libxen/include/xen/api/xen_host_metrics.h    |  199 -
 .../libxen/include/xen/api/xen_host_metrics_decl.h |   30 -
 tools/libxen/include/xen/api/xen_int_float_map.h   |   53 -
 tools/libxen/include/xen/api/xen_int_int_map.h     |   53 -
 .../include/xen/api/xen_int_string_set_map.h       |   53 -
 tools/libxen/include/xen/api/xen_network.h         |  276 --
 tools/libxen/include/xen/api/xen_network_decl.h    |   30 -
 .../include/xen/api/xen_on_crash_behaviour.h       |   97 -
 tools/libxen/include/xen/api/xen_on_normal_exit.h  |   77 -
 tools/libxen/include/xen/api/xen_pbd.h             |  223 -
 tools/libxen/include/xen/api/xen_pbd_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_pif.h             |  277 --
 tools/libxen/include/xen/api/xen_pif_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_pif_metrics.h     |  198 -
 .../libxen/include/xen/api/xen_pif_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_sr.h              |  277 --
 tools/libxen/include/xen/api/xen_sr_decl.h         |   30 -
 tools/libxen/include/xen/api/xen_string_set.h      |   47 -
 .../libxen/include/xen/api/xen_string_string_map.h |   53 -
 tools/libxen/include/xen/api/xen_user.h            |  204 -
 tools/libxen/include/xen/api/xen_user_decl.h       |   30 -
 tools/libxen/include/xen/api/xen_vbd.h             |  390 --
 tools/libxen/include/xen/api/xen_vbd_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vbd_metrics.h     |  198 -
 .../libxen/include/xen/api/xen_vbd_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_vbd_mode.h        |   77 -
 tools/libxen/include/xen/api/xen_vbd_type.h        |   77 -
 tools/libxen/include/xen/api/xen_vdi.h             |  360 --
 tools/libxen/include/xen/api/xen_vdi_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vdi_type.h        |   92 -
 tools/libxen/include/xen/api/xen_vif.h             |  379 --
 tools/libxen/include/xen/api/xen_vif_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vif_metrics.h     |  198 -
 .../libxen/include/xen/api/xen_vif_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_vm.h              |  931 ----
 tools/libxen/include/xen/api/xen_vm_decl.h         |   30 -
 .../libxen/include/xen/api/xen_vm_guest_metrics.h  |  234 -
 .../include/xen/api/xen_vm_guest_metrics_decl.h    |   30 -
 tools/libxen/include/xen/api/xen_vm_metrics.h      |  251 --
 tools/libxen/include/xen/api/xen_vm_metrics_decl.h |   30 -
 tools/libxen/include/xen/api/xen_vm_power_state.h  |   97 -
 tools/libxen/include/xen/api/xen_xspolicy.h        |  293 --
 tools/libxen/include/xen/api/xen_xspolicy_decl.h   |   31 -
 .../libxen/include/xen_console_protocol_internal.h |   37 -
 .../libxen/include/xen_event_operation_internal.h  |   37 -
 tools/libxen/include/xen_internal.h                |  188 -
 .../include/xen_on_crash_behaviour_internal.h      |   38 -
 tools/libxen/include/xen_on_normal_exit_internal.h |   37 -
 tools/libxen/include/xen_vbd_mode_internal.h       |   37 -
 tools/libxen/include/xen_vbd_type_internal.h       |   37 -
 tools/libxen/include/xen_vdi_type_internal.h       |   37 -
 tools/libxen/include/xen_vm_power_state_internal.h |   37 -
 tools/libxen/src/xen_common.c                      | 1784 --------
 tools/libxen/src/xen_console.c                     |  298 --
 tools/libxen/src/xen_console_protocol.c            |   82 -
 tools/libxen/src/xen_cpu_pool.c                    |  671 ---
 tools/libxen/src/xen_crashdump.c                   |  191 -
 tools/libxen/src/xen_event.c                       |  123 -
 tools/libxen/src/xen_event_operation.c             |   75 -
 tools/libxen/src/xen_host.c                        |  915 ----
 tools/libxen/src/xen_host_cpu.c                    |  353 --
 tools/libxen/src/xen_host_metrics.c                |  190 -
 tools/libxen/src/xen_int_float_map.c               |   39 -
 tools/libxen/src/xen_int_int_map.c                 |   39 -
 tools/libxen/src/xen_int_string_set_map.c          |   54 -
 tools/libxen/src/xen_network.c                     |  371 --
 tools/libxen/src/xen_on_crash_behaviour.c          |   85 -
 tools/libxen/src/xen_on_normal_exit.c              |   81 -
 tools/libxen/src/xen_pbd.c                         |  249 --
 tools/libxen/src/xen_pif.c                         |  380 --
 tools/libxen/src/xen_pif_metrics.c                 |  190 -
 tools/libxen/src/xen_sr.c                          |  379 --
 tools/libxen/src/xen_string_set.c                  |   48 -
 tools/libxen/src/xen_string_set.h                  |   47 -
 tools/libxen/src/xen_string_string_map.c           |   52 -
 tools/libxen/src/xen_user.c                        |  210 -
 tools/libxen/src/xen_vbd.c                         |  626 ---
 tools/libxen/src/xen_vbd_metrics.c                 |  190 -
 tools/libxen/src/xen_vbd_mode.c                    |   81 -
 tools/libxen/src/xen_vbd_type.c                    |   81 -
 tools/libxen/src/xen_vdi.c                         |  575 ---
 tools/libxen/src/xen_vdi_type.c                    |   84 -
 tools/libxen/src/xen_vif.c                         |  616 ---
 tools/libxen/src/xen_vif_metrics.c                 |  190 -
 tools/libxen/src/xen_vm.c                          | 1837 --------
 tools/libxen/src/xen_vm_guest_metrics.c            |  279 --
 tools/libxen/src/xen_vm_metrics.c                  |  318 --
 tools/libxen/src/xen_vm_power_state.c              |   85 -
 tools/libxen/src/xen_xspolicy.c                    |  363 --
 tools/libxen/test/test_bindings.c                  | 1453 -------
 tools/libxen/test/test_event_handling.c            |  210 -
 tools/libxl/xl.c                                   |   16 -
 tools/python/Makefile                              |   18 +-
 tools/python/logging/logging-0.4.9.2/PKG-INFO      |   25 -
 tools/python/logging/logging-0.4.9.2/README.txt    |  311 --
 tools/python/logging/logging-0.4.9.2/default.css   |   32 -
 .../python/logging/logging-0.4.9.2/liblogging.tex  | 1281 ------
 .../logging/logging-0.4.9.2/logging/__init__.py    | 1225 ------
 .../logging/logging-0.4.9.2/logging/config.py      |  301 --
 .../logging/logging-0.4.9.2/logging/handlers.py    |  787 ----
 .../logging/logging-0.4.9.2/python_logging.html    | 1183 ------
 tools/python/logging/logging-0.4.9.2/setup.py      |   29 -
 tools/python/logging/logging-0.4.9.2/test/app.py   |    5 -
 .../logging/logging-0.4.9.2/test/critical.ini      |   60 -
 .../python/logging/logging-0.4.9.2/test/debug.ini  |   60 -
 .../python/logging/logging-0.4.9.2/test/error.ini  |   60 -
 .../python/logging/logging-0.4.9.2/test/events.xml |   31 -
 .../logging/logging-0.4.9.2/test/log_test.py       |  158 -
 .../logging/logging-0.4.9.2/test/log_test0.py      |  118 -
 .../logging/logging-0.4.9.2/test/log_test1.py      |   85 -
 .../logging/logging-0.4.9.2/test/log_test10.py     |   87 -
 .../logging/logging-0.4.9.2/test/log_test11.py     |   72 -
 .../logging/logging-0.4.9.2/test/log_test12.py     |   47 -
 .../logging/logging-0.4.9.2/test/log_test13.py     |  106 -
 .../logging/logging-0.4.9.2/test/log_test14.py     |  108 -
 .../logging/logging-0.4.9.2/test/log_test15.py     |   70 -
 .../logging/logging-0.4.9.2/test/log_test16.py     |   73 -
 .../logging/logging-0.4.9.2/test/log_test17.py     |  111 -
 .../logging/logging-0.4.9.2/test/log_test18.py     |  102 -
 .../logging/logging-0.4.9.2/test/log_test19.py     |   57 -
 .../logging/logging-0.4.9.2/test/log_test2.py      |  119 -
 .../logging/logging-0.4.9.2/test/log_test20.py     |   84 -
 .../logging/logging-0.4.9.2/test/log_test21.py     |  141 -
 .../logging/logging-0.4.9.2/test/log_test22.py     |   50 -
 .../logging/logging-0.4.9.2/test/log_test3.ini     |   95 -
 .../logging/logging-0.4.9.2/test/log_test3.py      |   70 -
 .../logging/logging-0.4.9.2/test/log_test4.py      |  168 -
 .../logging/logging-0.4.9.2/test/log_test5.py      |   44 -
 .../logging/logging-0.4.9.2/test/log_test6.py      |   47 -
 .../logging/logging-0.4.9.2/test/log_test7.py      |   48 -
 .../logging/logging-0.4.9.2/test/log_test8.py      |   69 -
 .../logging/logging-0.4.9.2/test/log_test9.py      |   71 -
 .../logging/logging-0.4.9.2/test/logconf.ini       |  180 -
 .../python/logging/logging-0.4.9.2/test/logconf.py | 1738 --------
 .../logging/logging-0.4.9.2/test/logging.dtd       |   19 -
 .../logging/logging-0.4.9.2/test/logging.xml       |    5 -
 .../logging/logging-0.4.9.2/test/logrecv.ini       |   36 -
 .../python/logging/logging-0.4.9.2/test/logrecv.py |  443 --
 tools/python/logging/logging-0.4.9.2/test/myapp.py |   13 -
 .../logging/logging-0.4.9.2/test/mymodule.py       |    8 -
 .../python/logging/logging-0.4.9.2/test/stderr.exp |  566 ---
 .../python/logging/logging-0.4.9.2/test/stdout.exp |   24 -
 tools/python/logging/logging-0.4.9.2/test/warn.ini |   60 -
 tools/python/logging/setup.py                      |   11 -
 tools/python/ptsname/ptsname.c                     |   44 -
 tools/python/setup.py                              |   95 +-
 tools/python/xen/lowlevel/checkpoint/checkpoint.c  |  371 --
 tools/python/xen/lowlevel/checkpoint/checkpoint.h  |   61 -
 .../python/xen/lowlevel/checkpoint/libcheckpoint.c |  850 ----
 tools/python/xen/lowlevel/flask/flask.c            |  292 --
 tools/python/xen/lowlevel/netlink/libnetlink.c     |  585 ---
 tools/python/xen/lowlevel/netlink/libnetlink.h     |   58 -
 tools/python/xen/lowlevel/netlink/netlink.c        |  215 -
 tools/python/xen/lowlevel/process/process.c        |  164 -
 tools/python/xen/lowlevel/scf/scf.c                |  156 -
 tools/python/xen/remus/blkdev.py                   |   31 -
 tools/python/xen/remus/device.py                   |  397 --
 tools/python/xen/remus/image.py                    |  227 -
 tools/python/xen/remus/netlink.py                  |  318 --
 tools/python/xen/remus/profile.py                  |   56 -
 tools/python/xen/remus/qdisc.py                    |  189 -
 tools/python/xen/remus/save.py                     |  186 -
 tools/python/xen/remus/tapdisk.py                  |    4 -
 tools/python/xen/remus/util.py                     |   82 -
 tools/python/xen/remus/vbd.py                      |    9 -
 tools/python/xen/remus/vdi.py                      |  121 -
 tools/python/xen/remus/vif.py                      |   18 -
 tools/python/xen/remus/vm.py                       |  168 -
 tools/python/xen/util/Brctl.py                     |  186 -
 tools/python/xen/util/SSHTransport.py              |  102 -
 tools/python/xen/util/__init__.py                  |    1 -
 tools/python/xen/util/acmpolicy.py                 | 1622 -------
 tools/python/xen/util/asserts.py                   |   27 -
 tools/python/xen/util/auxbin.py                    |   47 -
 tools/python/xen/util/blkif.py                     |  107 -
 tools/python/xen/util/bootloader.py                |  626 ---
 tools/python/xen/util/bugtool.py                   |  234 -
 tools/python/xen/util/diagnose.py                  |  185 -
 tools/python/xen/util/dictio.py                    |   50 -
 tools/python/xen/util/fileuri.py                   |  156 -
 tools/python/xen/util/ip.py                        |  121 -
 tools/python/xen/util/mac.py                       |   11 -
 tools/python/xen/util/mkdir.py                     |   44 -
 tools/python/xen/util/oshelp.py                    |   33 -
 tools/python/xen/util/pci.py                       | 1416 -------
 tools/python/xen/util/rwlock.py                    |  137 -
 tools/python/xen/util/sxputils.py                  |   64 -
 tools/python/xen/util/utils.py                     |   78 -
 tools/python/xen/util/vscsi_util.py                |  307 --
 tools/python/xen/util/vusb_util.py                 |  338 --
 tools/python/xen/util/xmlrpcclient.py              |  129 -
 tools/python/xen/util/xmlrpclib2.py                |  220 -
 tools/python/xen/util/xpopen.py                    |  182 -
 tools/python/xen/util/xsconstants.py               |  115 -
 tools/python/xen/util/xsm/__init__.py              |    2 -
 tools/python/xen/util/xsm/acm/__init__.py          |    1 -
 tools/python/xen/util/xsm/acm/acm.py               | 1627 -------
 tools/python/xen/util/xsm/dummy/__init__.py        |    1 -
 tools/python/xen/util/xsm/dummy/dummy.py           |  136 -
 tools/python/xen/util/xsm/flask/__init__.py        |    1 -
 tools/python/xen/util/xsm/flask/flask.py           |   65 -
 tools/python/xen/util/xsm/xsm.py                   |   20 -
 tools/python/xen/util/xsm/xsm_core.py              |    7 -
 tools/python/xen/util/xspolicy.py                  |   66 -
 tools/python/xen/web/SrvBase.py                    |   98 -
 tools/python/xen/web/SrvDir.py                     |  126 -
 tools/python/xen/web/__init__.py                   |   17 -
 tools/python/xen/web/connection.py                 |  333 --
 tools/python/xen/web/http.py                       |  518 ---
 tools/python/xen/web/httpserver.py                 |  367 --
 tools/python/xen/web/protocol.py                   |   40 -
 tools/python/xen/web/resource.py                   |  108 -
 tools/python/xen/web/static.py                     |   61 -
 tools/python/xen/web/tcp.py                        |  212 -
 tools/python/xen/web/unix.py                       |   69 -
 tools/python/xen/xend/Args.py                      |  166 -
 tools/python/xen/xend/MemoryPool.py                |  118 -
 tools/python/xen/xend/PrettyPrint.py               |  323 --
 tools/python/xen/xend/Vifctl.py                    |   35 -
 tools/python/xen/xend/XendAPI.py                   | 2812 -------------
 tools/python/xen/xend/XendAPIConstants.py          |   82 -
 tools/python/xen/xend/XendAPIStore.py              |   83 -
 tools/python/xen/xend/XendAPIVersion.py            |   22 -
 tools/python/xen/xend/XendAuthSessions.py          |  131 -
 tools/python/xen/xend/XendBase.py                  |  126 -
 tools/python/xen/xend/XendBootloader.py            |  230 -
 tools/python/xen/xend/XendCPUPool.py               |  910 ----
 tools/python/xen/xend/XendCheckpoint.py            |  425 --
 tools/python/xen/xend/XendClient.py                |   40 -
 tools/python/xen/xend/XendConfig.py                | 2265 ----------
 tools/python/xen/xend/XendConstants.py             |  164 -
 tools/python/xen/xend/XendDPCI.py                  |  165 -
 tools/python/xen/xend/XendDSCSI.py                 |  299 --
 tools/python/xen/xend/XendDevices.py               |   85 -
 tools/python/xen/xend/XendDmesg.py                 |   41 -
 tools/python/xen/xend/XendDomain.py                | 1958 ---------
 tools/python/xen/xend/XendDomainInfo.py            | 4429 --------------------
 tools/python/xen/xend/XendError.py                 |  252 --
 tools/python/xen/xend/XendLocalStorageRepo.py      |   93 -
 tools/python/xen/xend/XendLogging.py               |  149 -
 tools/python/xen/xend/XendMonitor.py               |  340 --
 tools/python/xen/xend/XendNetwork.py               |  238 --
 tools/python/xen/xend/XendNode.py                  | 1173 ------
 tools/python/xen/xend/XendOptions.py               |  567 ---
 tools/python/xen/xend/XendPBD.py                   |   99 -
 tools/python/xen/xend/XendPIF.py                   |  390 --
 tools/python/xen/xend/XendPIFMetrics.py            |   59 -
 tools/python/xen/xend/XendPPCI.py                  |  160 -
 tools/python/xen/xend/XendPSCSI.py                 |  211 -
 tools/python/xen/xend/XendProtocol.py              |  225 -
 tools/python/xen/xend/XendQCoWStorageRepo.py       |  340 --
 tools/python/xen/xend/XendSXPDev.py                |   13 -
 tools/python/xen/xend/XendStateStore.py            |  234 -
 tools/python/xen/xend/XendStorageRepository.py     |  118 -
 tools/python/xen/xend/XendTask.py                  |  224 -
 tools/python/xen/xend/XendTaskManager.py           |  110 -
 tools/python/xen/xend/XendVDI.py                   |  214 -
 tools/python/xen/xend/XendVMMetrics.py             |  146 -
 tools/python/xen/xend/XendVnet.py                  |  181 -
 tools/python/xen/xend/XendXSPolicy.py              |  305 --
 tools/python/xen/xend/XendXSPolicyAdmin.py         |  386 --
 tools/python/xen/xend/__init__.py                  |    1 -
 tools/python/xen/xend/arch.py                      |   31 -
 tools/python/xen/xend/balloon.py                   |  244 --
 tools/python/xen/xend/encode.py                    |  180 -
 tools/python/xen/xend/image.py                     | 1047 -----
 tools/python/xen/xend/osdep.py                     |  268 --
 tools/python/xen/xend/server/BlktapController.py   |  313 --
 tools/python/xen/xend/server/ConsoleController.py  |   38 -
 tools/python/xen/xend/server/DevConstants.py       |   49 -
 tools/python/xen/xend/server/DevController.py      |  677 ---
 tools/python/xen/xend/server/SSLXMLRPCServer.py    |  103 -
 tools/python/xen/xend/server/SrvDaemon.py          |  420 --
 tools/python/xen/xend/server/SrvDmesg.py           |   52 -
 tools/python/xen/xend/server/SrvDomain.py          |  329 --
 tools/python/xen/xend/server/SrvDomainDir.py       |  222 -
 tools/python/xen/xend/server/SrvNode.py            |   64 -
 tools/python/xen/xend/server/SrvRoot.py            |   43 -
 tools/python/xen/xend/server/SrvServer.py          |  261 --
 tools/python/xen/xend/server/SrvVnetDir.py         |  128 -
 tools/python/xen/xend/server/SrvXendLog.py         |   37 -
 tools/python/xen/xend/server/XMLRPCServer.py       |  273 --
 tools/python/xen/xend/server/__init__.py           |    1 -
 tools/python/xen/xend/server/blkif.py              |  221 -
 tools/python/xen/xend/server/iopif.py              |  102 -
 tools/python/xen/xend/server/irqif.py              |   95 -
 tools/python/xen/xend/server/netif.py              |  218 -
 tools/python/xen/xend/server/netif2.py             |  163 -
 tools/python/xen/xend/server/params.py             |   46 -
 tools/python/xen/xend/server/pciif.py              |  596 ---
 tools/python/xen/xend/server/pciquirk.py           |  149 -
 tools/python/xen/xend/server/relocate.py           |  173 -
 tools/python/xen/xend/server/tests/__init__.py     |    1 -
 .../xen/xend/server/tests/test_controllers.py      |   81 -
 tools/python/xen/xend/server/udevevent.py          |   92 -
 tools/python/xen/xend/server/vfbif.py              |   91 -
 tools/python/xen/xend/server/vscsiif.py            |  246 --
 tools/python/xen/xend/server/vusbif.py             |  126 -
 tools/python/xen/xend/sxp.py                       |  765 ----
 tools/python/xen/xend/tests/__init__.py            |    1 -
 tools/python/xen/xend/tests/test_XendConfig.py     |   42 -
 tools/python/xen/xend/tests/test_sxp.py            |   39 -
 tools/python/xen/xend/tests/test_uuid.py           |   30 -
 tools/python/xen/xend/tests/xend-config.sxp        |  131 -
 tools/python/xen/xend/uuid.py                      |   69 -
 tools/python/xen/xend/xend                         |  110 -
 tools/python/xen/xend/xenstore/__init__.py         |   16 -
 tools/python/xen/xend/xenstore/tests/__init__.py   |    2 -
 tools/python/xen/xend/xenstore/tests/stress_xs.py  |  121 -
 tools/python/xen/xend/xenstore/xstransact.py       |  368 --
 tools/python/xen/xend/xenstore/xsutil.py           |   32 -
 tools/python/xen/xend/xenstore/xswatch.py          |   80 -
 tools/python/xen/xm/XenAPI.py                      |  206 -
 tools/python/xen/xm/addlabel.py                    |  274 --
 tools/python/xen/xm/console.py                     |   88 -
 tools/python/xen/xm/cpupool-create.py              |   51 -
 tools/python/xen/xm/cpupool-new.py                 |   50 -
 tools/python/xen/xm/cpupool.py                     |  236 --
 tools/python/xen/xm/create.dtd                     |  154 -
 tools/python/xen/xm/create.py                      | 1529 -------
 tools/python/xen/xm/dry-run.py                     |  161 -
 tools/python/xen/xm/dumppolicy.py                  |   69 -
 tools/python/xen/xm/getenforce.py                  |   66 -
 tools/python/xen/xm/getlabel.py                    |  157 -
 tools/python/xen/xm/getpolicy.py                   |  135 -
 tools/python/xen/xm/help.py                        |  100 -
 tools/python/xen/xm/labels.py                      |   89 -
 tools/python/xen/xm/main.py                        | 4030 ------------------
 tools/python/xen/xm/migrate.py                     |   87 -
 tools/python/xen/xm/new.py                         |   79 -
 tools/python/xen/xm/opts.py                        |  627 ---
 tools/python/xen/xm/resetpolicy.py                 |  106 -
 tools/python/xen/xm/resources.py                   |   65 -
 tools/python/xen/xm/rmlabel.py                     |  216 -
 tools/python/xen/xm/setenforce.py                  |   74 -
 tools/python/xen/xm/setpolicy.py                   |  181 -
 tools/python/xen/xm/shutdown.py                    |  164 -
 tools/python/xen/xm/tests/__init__.py              |    2 -
 tools/python/xen/xm/tests/test_create.py           |  206 -
 tools/python/xen/xm/xenapi_create.py               | 1129 -----
 tools/python/xen/xm/xm                             |   20 -
 tools/xcutils/Makefile                             |   10 +-
 tools/xcutils/xc_restore.c                         |   73 -
 tools/xcutils/xc_save.c                            |  227 -
 tools/xm-test/COPYING                              |  340 --
 tools/xm-test/ChangeLog                            |   11 -
 tools/xm-test/Makefile.am                          |   18 -
 tools/xm-test/README                               |  310 --
 tools/xm-test/TODO                                 |    3 -
 tools/xm-test/Writing_Tests_HOWTO                  |  136 -
 tools/xm-test/autogen                              |    9 -
 tools/xm-test/configure.ac                         |  155 -
 tools/xm-test/grouptest/cpupool                    |    1 -
 tools/xm-test/grouptest/create                     |    1 -
 tools/xm-test/grouptest/default                    |   30 -
 tools/xm-test/grouptest/medium                     |   24 -
 tools/xm-test/grouptest/quick                      |    4 -
 tools/xm-test/grouptest/xapi                       |    1 -
 tools/xm-test/lib/XmTestLib/Console.py             |  302 --
 tools/xm-test/lib/XmTestLib/DomainTracking.py      |   61 -
 tools/xm-test/lib/XmTestLib/NetConfig.py           |  268 --
 tools/xm-test/lib/XmTestLib/Test.py                |  203 -
 tools/xm-test/lib/XmTestLib/XenAPIDomain.py        |  183 -
 tools/xm-test/lib/XmTestLib/XenDevice.py           |  275 --
 tools/xm-test/lib/XmTestLib/XenDomain.py           |  385 --
 tools/xm-test/lib/XmTestLib/XenMemory.py           |   68 -
 tools/xm-test/lib/XmTestLib/Xm.py                  |  245 --
 tools/xm-test/lib/XmTestLib/__init__.py            |   27 -
 tools/xm-test/lib/XmTestLib/arch.py                |  118 -
 tools/xm-test/lib/XmTestLib/block_utils.py         |   53 -
 tools/xm-test/lib/XmTestLib/config.py.in           |    7 -
 tools/xm-test/lib/XmTestLib/network_utils.py       |   60 -
 tools/xm-test/lib/XmTestLib/xapi.py                |   54 -
 tools/xm-test/lib/XmTestReport/OSReport.py         |  248 --
 tools/xm-test/lib/XmTestReport/ProgReport.py       |  119 -
 tools/xm-test/lib/XmTestReport/Report.py           |  156 -
 tools/xm-test/lib/XmTestReport/ResultReport.py     |  157 -
 tools/xm-test/lib/XmTestReport/arch.py             |   42 -
 tools/xm-test/lib/XmTestReport/utils.py            |   31 -
 tools/xm-test/lib/XmTestReport/xmtest.py.in        |   15 -
 tools/xm-test/mergereport                          |   25 -
 tools/xm-test/mkreport                             |   71 -
 tools/xm-test/ramdisk/Makefile.am                  |  126 -
 .../ramdisk/README-XenSource-initrd-0.7-img        |   42 -
 .../ramdisk/README-XenSource-initrd-0.8-img        |   42 -
 .../ramdisk/README-XenSource-initrd-1.0-img        |   46 -
 .../ramdisk/README-XenSource-initrd-1.1-img        |   45 -
 tools/xm-test/ramdisk/bin/create_disk_image        |  384 --
 tools/xm-test/ramdisk/configs/buildroot-i386       |  346 --
 tools/xm-test/ramdisk/configs/busybox              |  465 --
 tools/xm-test/ramdisk/configs/uClibc               |  172 -
 tools/xm-test/ramdisk/make-release.sh              |   44 -
 .../patches/buildroot/add_xvd_devices.patch        |   13 -
 .../xm-test/ramdisk/patches/buildroot/hping.patch  |   67 -
 tools/xm-test/ramdisk/skel/.profile                |    3 -
 tools/xm-test/ramdisk/skel/etc/init.d/rcS          |   19 -
 tools/xm-test/ramdisk/skel/etc/inittab             |    5 -
 tools/xm-test/ramdisk/skel/root/.profile           |    3 -
 tools/xm-test/runtest.sh                           |  337 --
 tools/xm-test/tests/Makefile.am                    |   43 -
 tools/xm-test/tests/Makefile.am.template           |   21 -
 tools/xm-test/tests/_sanity/01_domu_proc.py        |   32 -
 tools/xm-test/tests/_sanity/Makefile.am            |   21 -
 .../block-create/01_block_attach_device_pos.py     |   49 -
 .../02_block_attach_file_device_pos.py             |   49 -
 .../04_block_attach_device_repeatedly_pos.py       |   46 -
 ...ock_attach_and_dettach_device_repeatedly_pos.py |   49 -
 .../block-create/06_block_attach_baddomain_neg.py  |   18 -
 .../block-create/07_block_attach_baddevice_neg.py  |   53 -
 .../08_block_attach_bad_filedevice_neg.py          |   52 -
 ...ock_attach_and_dettach_device_check_data_pos.py |   66 -
 .../10_block_attach_dettach_multiple_devices.py    |  100 -
 .../block-create/11_block_attach_shared_dom0.py    |   38 -
 .../block-create/12_block_attach_shared_domU.py    |   30 -
 tools/xm-test/tests/block-create/Makefile.am       |   29 -
 .../block-destroy/01_block-destroy_btblock_pos.py  |   44 -
 .../block-destroy/02_block-destroy_rtblock_pos.py  |   41 -
 .../block-destroy/03_block-destroy_nonexist_neg.py |   17 -
 .../04_block-destroy_nonattached_neg.py            |   33 -
 .../block-destroy/05_block-destroy_byname_pos.py   |   43 -
 .../06_block-destroy_check_list_pos.py             |   42 -
 tools/xm-test/tests/block-destroy/Makefile.am      |   26 -
 .../block-integrity/01_block_device_read_verify.py |   62 -
 .../02_block_device_write_verify.py                |   63 -
 tools/xm-test/tests/block-integrity/Makefile.am    |   22 -
 .../xm-test/tests/block-list/01_block-list_pos.py  |   42 -
 .../tests/block-list/02_block-list_attachbd_pos.py |   46 -
 .../block-list/03_block-list_anotherbd_pos.py      |   54 -
 .../tests/block-list/04_block-list_nodb_pos.py     |   28 -
 .../tests/block-list/05_block-list_nonexist_neg.py |   18 -
 .../block-list/06_block-list_checkremove_pos.py    |   61 -
 tools/xm-test/tests/block-list/Makefile.am         |   26 -
 .../xm-test/tests/console/01_console_badopt_neg.py |   21 -
 .../xm-test/tests/console/02_console_baddom_neg.py |   27 -
 tools/xm-test/tests/console/Makefile.am            |   22 -
 .../xm-test/tests/cpupool/01_cpupool_basic_pos.py  |   72 -
 .../xm-test/tests/cpupool/02_cpupool_manage_pos.py |  152 -
 tools/xm-test/tests/cpupool/03_cpupool_domain.py   |  126 -
 tools/xm-test/tests/cpupool/04_cpupool_migrate.py  |   84 -
 tools/xm-test/tests/cpupool/Makefile.am            |   22 -
 tools/xm-test/tests/cpupool/pool1.cfg              |    1 -
 tools/xm-test/tests/cpupool/pools.py               |   78 -
 tools/xm-test/tests/create/01_create_basic_pos.py  |   49 -
 tools/xm-test/tests/create/02_create_noparm_neg.py |   17 -
 .../xm-test/tests/create/03_create_badparm_neg.py  |   19 -
 .../tests/create/04_create_conflictname_neg.py     |   41 -
 tools/xm-test/tests/create/06_create_mem_neg.py    |   53 -
 tools/xm-test/tests/create/07_create_mem64_pos.py  |   49 -
 tools/xm-test/tests/create/08_create_mem128_pos.py |   49 -
 tools/xm-test/tests/create/09_create_mem256_pos.py |   49 -
 .../xm-test/tests/create/10_create_fastdestroy.py  |   43 -
 .../tests/create/11_create_concurrent_pos.py       |   78 -
 .../create/12_create_concurrent_stress_pos.py      |   59 -
 .../xm-test/tests/create/13_create_multinic_pos.py |   27 -
 .../tests/create/14_create_blockroot_pos.py        |   44 -
 .../xm-test/tests/create/15_create_smallmem_pos.py |   27 -
 .../xm-test/tests/create/16_create_smallmem_neg.py |   30 -
 tools/xm-test/tests/create/Makefile.am             |   33 -
 .../xm-test/tests/destroy/01_destroy_basic_pos.py  |   40 -
 .../xm-test/tests/destroy/02_destroy_noparm_neg.py |   16 -
 .../tests/destroy/03_destroy_nonexist_neg.py       |   16 -
 .../tests/destroy/04_destroy_badparm_neg.py        |   16 -
 tools/xm-test/tests/destroy/05_destroy_byid_pos.py |   33 -
 tools/xm-test/tests/destroy/06_destroy_dom0_neg.py |   14 -
 .../xm-test/tests/destroy/07_destroy_stale_pos.py  |  133 -
 tools/xm-test/tests/destroy/Makefile.am            |   27 -
 tools/xm-test/tests/dmesg/01_dmesg_basic_pos.py    |   15 -
 tools/xm-test/tests/dmesg/02_dmesg_basic_neg.py    |   17 -
 tools/xm-test/tests/dmesg/Makefile.am              |   21 -
 tools/xm-test/tests/domid/01_domid_basic_pos.py    |   16 -
 tools/xm-test/tests/domid/02_domid_basic_neg.py    |   15 -
 tools/xm-test/tests/domid/Makefile.am              |   21 -
 .../xm-test/tests/domname/01_domname_basic_pos.py  |   17 -
 .../xm-test/tests/domname/02_domname_basic_neg.py  |   15 -
 tools/xm-test/tests/domname/Makefile.am            |   21 -
 .../01_enforce_dom0_cpus_basic_pos.py              |  126 -
 tools/xm-test/tests/enforce_dom0_cpus/Makefile.am  |   21 -
 tools/xm-test/tests/help/01_help_basic_pos.py      |   14 -
 tools/xm-test/tests/help/02_help_basic_neg.py      |   14 -
 tools/xm-test/tests/help/03_help_badparm_neg.py    |   14 -
 tools/xm-test/tests/help/04_help_long_pos.py       |   16 -
 tools/xm-test/tests/help/05_help_nonroot_pos.py    |   17 -
 tools/xm-test/tests/help/06_help_allcmds.py        |   44 -
 tools/xm-test/tests/help/Makefile.am               |   26 -
 tools/xm-test/tests/info/01_info_basic_pos.py      |   11 -
 .../xm-test/tests/info/02_info_compiledata_pos.py  |   42 -
 tools/xm-test/tests/info/Makefile.am               |   22 -
 tools/xm-test/tests/list/01_list_basic_pos.py      |   14 -
 tools/xm-test/tests/list/02_list_badparm_neg.py    |   16 -
 tools/xm-test/tests/list/03_list_nonexist_neg.py   |   17 -
 tools/xm-test/tests/list/04_list_goodparm_pos.py   |   28 -
 tools/xm-test/tests/list/05_list_long_pos.py       |   22 -
 tools/xm-test/tests/list/06_list_nonroot.py        |   15 -
 tools/xm-test/tests/list/Makefile.am               |   27 -
 .../xm-test/tests/memmax/01_memmax_badparm_neg.py  |   29 -
 tools/xm-test/tests/memmax/Makefile.am             |   21 -
 tools/xm-test/tests/memset/01_memset_basic_pos.py  |   82 -
 .../xm-test/tests/memset/02_memset_badparm_neg.py  |   56 -
 tools/xm-test/tests/memset/03_memset_random_pos.py |   64 -
 .../xm-test/tests/memset/04_memset_smallmem_pos.py |   55 -
 tools/xm-test/tests/memset/Makefile.am             |   24 -
 .../tests/migrate/01_migrate_localhost_pos.py      |   86 -
 tools/xm-test/tests/migrate/Makefile.am            |   20 -
 .../tests/network-attach/01_network_attach_pos.py  |   43 -
 .../network-attach/02_network_attach_detach_pos.py |   49 -
 .../03_network_attach_detach_multiple_pos.py       |   51 -
 .../04_network_attach_baddomain_neg.py             |   15 -
 tools/xm-test/tests/network-attach/Makefile.am     |   24 -
 .../tests/network/02_network_local_ping_pos.py     |   71 -
 .../tests/network/03_network_local_tcp_pos.py      |   75 -
 .../tests/network/04_network_local_udp_pos.py      |   76 -
 .../tests/network/05_network_dom0_ping_pos.py      |   54 -
 .../tests/network/06_network_dom0_tcp_pos.py       |   57 -
 .../tests/network/07_network_dom0_udp_pos.py       |   56 -
 .../tests/network/11_network_domU_ping_pos.py      |   62 -
 .../tests/network/12_network_domU_tcp_pos.py       |   64 -
 .../tests/network/13_network_domU_udp_pos.py       |   76 -
 tools/xm-test/tests/network/Makefile.am            |   34 -
 tools/xm-test/tests/pause/01_pause_basic_pos.py    |   63 -
 tools/xm-test/tests/pause/02_pause_badopt_neg.py   |   32 -
 tools/xm-test/tests/pause/03_pause_badname_neg.py  |   18 -
 tools/xm-test/tests/pause/04_pause_badid_neg.py    |   18 -
 tools/xm-test/tests/pause/Makefile.am              |   22 -
 tools/xm-test/tests/reboot/01_reboot_basic_pos.py  |   52 -
 tools/xm-test/tests/reboot/02_reboot_badopt_neg.py |   32 -
 .../xm-test/tests/reboot/03_reboot_badname_neg.py  |   18 -
 tools/xm-test/tests/reboot/Makefile.am             |   23 -
 .../xm-test/tests/restore/01_restore_basic_pos.py  |   82 -
 .../tests/restore/02_restore_badparm_neg.py        |   28 -
 .../tests/restore/03_restore_badfilename_neg.py    |   28 -
 .../tests/restore/04_restore_withdevices_pos.py    |  130 -
 tools/xm-test/tests/restore/Makefile.am            |   24 -
 tools/xm-test/tests/save/01_save_basic_pos.py      |   37 -
 tools/xm-test/tests/save/02_save_badparm_neg.py    |   28 -
 tools/xm-test/tests/save/03_save_bogusfile_neg.py  |   39 -
 tools/xm-test/tests/save/Makefile.am               |   24 -
 .../sched-credit/01_sched_credit_weight_cap_pos.py |   72 -
 tools/xm-test/tests/sched-credit/Makefile.am       |   20 -
 .../xm-test/tests/sedf/01_sedf_period_slice_pos.py |   62 -
 .../xm-test/tests/sedf/02_sedf_period_lower_neg.py |   44 -
 .../xm-test/tests/sedf/03_sedf_slice_lower_neg.py  |   40 -
 .../xm-test/tests/sedf/04_sedf_slice_upper_neg.py  |   48 -
 tools/xm-test/tests/sedf/05_sedf_extratime_pos.py  |   63 -
 .../tests/sedf/06_sedf_extratime_disable_neg.py    |   71 -
 tools/xm-test/tests/sedf/Makefile.am               |   25 -
 .../tests/shutdown/01_shutdown_basic_pos.py        |   54 -
 .../tests/shutdown/02_shutdown_badparm_neg.py      |   39 -
 .../tests/shutdown/03_shutdown_nonexist_neg.py     |   22 -
 tools/xm-test/tests/shutdown/Makefile.am           |   21 -
 tools/xm-test/tests/sysrq/01_sysrq_basic_neg.py    |   20 -
 tools/xm-test/tests/sysrq/02_sysrq_sync_pos.py     |   52 -
 .../xm-test/tests/sysrq/03_sysrq_withreboot_pos.py |   40 -
 tools/xm-test/tests/sysrq/Makefile.am              |   23 -
 .../xm-test/tests/unpause/01_unpause_basic_pos.py  |   76 -
 tools/xm-test/tests/unpause/Makefile.am            |   20 -
 .../vcpu-disable/01_vcpu-disable_basic_pos.py      |   82 -
 tools/xm-test/tests/vcpu-disable/Makefile.am       |   21 -
 .../tests/vcpu-pin/01_vcpu-pin_basic_pos.py        |   50 -
 tools/xm-test/tests/vcpu-pin/Makefile.am           |   21 -
 tools/xm-test/tests/xapi/01_xapi-vm_basic.py       |   61 -
 tools/xm-test/tests/xapi/02_xapi-vbd_basic.py      |  122 -
 tools/xm-test/tests/xapi/03_xapi-network_pos.py    |  123 -
 .../tests/xapi/04_xapi-data_uri_handling.py        |   65 -
 tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py |  157 -
 tools/xm-test/tests/xapi/Makefile.am               |   23 -
 613 files changed, 7 insertions(+), 107602 deletions(-)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:45:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:45: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 1WXq0R-0006Mt-W8; Wed, 09 Apr 2014 10:45:24 +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 1WXq0Q-0006MH-38
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:22 +0000
Received: from [85.158.143.35:16046] by server-1.bemta-4.messagelabs.com id
	CF/B0-09853-FB425435; Wed, 09 Apr 2014 10:45:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1397040315!7976385!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20320 invoked from network); 9 Apr 2014 10:45:16 -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;
	9 Apr 2014 10:45:16 -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 1WXq0I-0003IR-TY
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq0I-0004g6-RS
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:14 +0000
Date: Wed, 09 Apr 2014 10:45:14 +0000
Message-Id: <E1WXq0I-0004g6-RS@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Merge branch 'xend-delete-v2' of
	git://xenbits.xen.org/people/ianc/xen into staging
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 7d5352558907d2c4ed8e0ac5135e63f545ea230b
Merge: 314c9815e2f5dc8a9fec11e0cf9b49b16ed0e96b 185bb58be30e5aeb690125f0320626797f9b14df
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Apr 8 15:49:52 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:49:52 2014 +0100

    Merge branch 'xend-delete-v2' of git://xenbits.xen.org/people/ianc/xen into staging
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

 .gitignore                                         |   17 -
 .hgignore                                          |   15 -
 MAINTAINERS                                        |    2 -
 config/Tools.mk.in                                 |    2 -
 docs/man/xend-config.sxp.pod.5                     |  158 -
 docs/man/xl.pod.1                                  |    1 -
 docs/man/xm.pod.1                                  | 1004 -----
 docs/man/xmdomain.cfg.pod.5                        |  358 --
 tools/Makefile                                     |    1 -
 tools/configure                                    |  168 -
 tools/configure.ac                                 |   18 -
 tools/examples/Makefile                            |   12 -
 tools/examples/xend-config.sxp                     |  304 --
 tools/examples/xend-pci-permissive.sxp             |   27 -
 tools/examples/xend-pci-quirks.sxp                 |   96 -
 tools/examples/xm-config.xml                       |   45 -
 tools/examples/xmexample.hvm                       |  373 --
 tools/examples/xmexample.hvm-stubdom               |  317 --
 tools/examples/xmexample.nbd                       |   26 -
 tools/examples/xmexample.pv-grub                   |  172 -
 tools/examples/xmexample1                          |  197 -
 tools/examples/xmexample2                          |  232 -
 tools/examples/xmexample3                          |  218 -
 tools/hotplug/Linux/Makefile                       |    5 -
 tools/hotplug/Linux/init.d/xend                    |   82 -
 tools/hotplug/Linux/xend.rules                     |    4 -
 tools/hotplug/NetBSD/Makefile                      |    3 +-
 tools/hotplug/NetBSD/rc.d/xend                     |   71 -
 tools/libxen/COPYING                               |  510 ---
 tools/libxen/Makefile                              |   77 -
 tools/libxen/Makefile.dist                         |  115 -
 tools/libxen/README                                |   55 -
 tools/libxen/include/xen/api/xen_all.h             |   40 -
 tools/libxen/include/xen/api/xen_common.h          |  211 -
 tools/libxen/include/xen/api/xen_console.h         |  247 --
 tools/libxen/include/xen/api/xen_console_decl.h    |   30 -
 .../libxen/include/xen/api/xen_console_protocol.h  |   82 -
 tools/libxen/include/xen/api/xen_cpu_pool.h        |  424 --
 tools/libxen/include/xen/api/xen_cpu_pool_decl.h   |   30 -
 tools/libxen/include/xen/api/xen_crashdump.h       |  199 -
 tools/libxen/include/xen/api/xen_crashdump_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_event.h           |  102 -
 tools/libxen/include/xen/api/xen_event_decl.h      |   25 -
 tools/libxen/include/xen/api/xen_event_operation.h |   82 -
 tools/libxen/include/xen/api/xen_host.h            |  505 ---
 tools/libxen/include/xen/api/xen_host_cpu.h        |  263 --
 tools/libxen/include/xen/api/xen_host_cpu_decl.h   |   30 -
 tools/libxen/include/xen/api/xen_host_decl.h       |   30 -
 tools/libxen/include/xen/api/xen_host_metrics.h    |  199 -
 .../libxen/include/xen/api/xen_host_metrics_decl.h |   30 -
 tools/libxen/include/xen/api/xen_int_float_map.h   |   53 -
 tools/libxen/include/xen/api/xen_int_int_map.h     |   53 -
 .../include/xen/api/xen_int_string_set_map.h       |   53 -
 tools/libxen/include/xen/api/xen_network.h         |  276 --
 tools/libxen/include/xen/api/xen_network_decl.h    |   30 -
 .../include/xen/api/xen_on_crash_behaviour.h       |   97 -
 tools/libxen/include/xen/api/xen_on_normal_exit.h  |   77 -
 tools/libxen/include/xen/api/xen_pbd.h             |  223 -
 tools/libxen/include/xen/api/xen_pbd_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_pif.h             |  277 --
 tools/libxen/include/xen/api/xen_pif_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_pif_metrics.h     |  198 -
 .../libxen/include/xen/api/xen_pif_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_sr.h              |  277 --
 tools/libxen/include/xen/api/xen_sr_decl.h         |   30 -
 tools/libxen/include/xen/api/xen_string_set.h      |   47 -
 .../libxen/include/xen/api/xen_string_string_map.h |   53 -
 tools/libxen/include/xen/api/xen_user.h            |  204 -
 tools/libxen/include/xen/api/xen_user_decl.h       |   30 -
 tools/libxen/include/xen/api/xen_vbd.h             |  390 --
 tools/libxen/include/xen/api/xen_vbd_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vbd_metrics.h     |  198 -
 .../libxen/include/xen/api/xen_vbd_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_vbd_mode.h        |   77 -
 tools/libxen/include/xen/api/xen_vbd_type.h        |   77 -
 tools/libxen/include/xen/api/xen_vdi.h             |  360 --
 tools/libxen/include/xen/api/xen_vdi_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vdi_type.h        |   92 -
 tools/libxen/include/xen/api/xen_vif.h             |  379 --
 tools/libxen/include/xen/api/xen_vif_decl.h        |   30 -
 tools/libxen/include/xen/api/xen_vif_metrics.h     |  198 -
 .../libxen/include/xen/api/xen_vif_metrics_decl.h  |   30 -
 tools/libxen/include/xen/api/xen_vm.h              |  931 ----
 tools/libxen/include/xen/api/xen_vm_decl.h         |   30 -
 .../libxen/include/xen/api/xen_vm_guest_metrics.h  |  234 -
 .../include/xen/api/xen_vm_guest_metrics_decl.h    |   30 -
 tools/libxen/include/xen/api/xen_vm_metrics.h      |  251 --
 tools/libxen/include/xen/api/xen_vm_metrics_decl.h |   30 -
 tools/libxen/include/xen/api/xen_vm_power_state.h  |   97 -
 tools/libxen/include/xen/api/xen_xspolicy.h        |  293 --
 tools/libxen/include/xen/api/xen_xspolicy_decl.h   |   31 -
 .../libxen/include/xen_console_protocol_internal.h |   37 -
 .../libxen/include/xen_event_operation_internal.h  |   37 -
 tools/libxen/include/xen_internal.h                |  188 -
 .../include/xen_on_crash_behaviour_internal.h      |   38 -
 tools/libxen/include/xen_on_normal_exit_internal.h |   37 -
 tools/libxen/include/xen_vbd_mode_internal.h       |   37 -
 tools/libxen/include/xen_vbd_type_internal.h       |   37 -
 tools/libxen/include/xen_vdi_type_internal.h       |   37 -
 tools/libxen/include/xen_vm_power_state_internal.h |   37 -
 tools/libxen/src/xen_common.c                      | 1784 --------
 tools/libxen/src/xen_console.c                     |  298 --
 tools/libxen/src/xen_console_protocol.c            |   82 -
 tools/libxen/src/xen_cpu_pool.c                    |  671 ---
 tools/libxen/src/xen_crashdump.c                   |  191 -
 tools/libxen/src/xen_event.c                       |  123 -
 tools/libxen/src/xen_event_operation.c             |   75 -
 tools/libxen/src/xen_host.c                        |  915 ----
 tools/libxen/src/xen_host_cpu.c                    |  353 --
 tools/libxen/src/xen_host_metrics.c                |  190 -
 tools/libxen/src/xen_int_float_map.c               |   39 -
 tools/libxen/src/xen_int_int_map.c                 |   39 -
 tools/libxen/src/xen_int_string_set_map.c          |   54 -
 tools/libxen/src/xen_network.c                     |  371 --
 tools/libxen/src/xen_on_crash_behaviour.c          |   85 -
 tools/libxen/src/xen_on_normal_exit.c              |   81 -
 tools/libxen/src/xen_pbd.c                         |  249 --
 tools/libxen/src/xen_pif.c                         |  380 --
 tools/libxen/src/xen_pif_metrics.c                 |  190 -
 tools/libxen/src/xen_sr.c                          |  379 --
 tools/libxen/src/xen_string_set.c                  |   48 -
 tools/libxen/src/xen_string_set.h                  |   47 -
 tools/libxen/src/xen_string_string_map.c           |   52 -
 tools/libxen/src/xen_user.c                        |  210 -
 tools/libxen/src/xen_vbd.c                         |  626 ---
 tools/libxen/src/xen_vbd_metrics.c                 |  190 -
 tools/libxen/src/xen_vbd_mode.c                    |   81 -
 tools/libxen/src/xen_vbd_type.c                    |   81 -
 tools/libxen/src/xen_vdi.c                         |  575 ---
 tools/libxen/src/xen_vdi_type.c                    |   84 -
 tools/libxen/src/xen_vif.c                         |  616 ---
 tools/libxen/src/xen_vif_metrics.c                 |  190 -
 tools/libxen/src/xen_vm.c                          | 1837 --------
 tools/libxen/src/xen_vm_guest_metrics.c            |  279 --
 tools/libxen/src/xen_vm_metrics.c                  |  318 --
 tools/libxen/src/xen_vm_power_state.c              |   85 -
 tools/libxen/src/xen_xspolicy.c                    |  363 --
 tools/libxen/test/test_bindings.c                  | 1453 -------
 tools/libxen/test/test_event_handling.c            |  210 -
 tools/libxl/xl.c                                   |   16 -
 tools/python/Makefile                              |   18 +-
 tools/python/logging/logging-0.4.9.2/PKG-INFO      |   25 -
 tools/python/logging/logging-0.4.9.2/README.txt    |  311 --
 tools/python/logging/logging-0.4.9.2/default.css   |   32 -
 .../python/logging/logging-0.4.9.2/liblogging.tex  | 1281 ------
 .../logging/logging-0.4.9.2/logging/__init__.py    | 1225 ------
 .../logging/logging-0.4.9.2/logging/config.py      |  301 --
 .../logging/logging-0.4.9.2/logging/handlers.py    |  787 ----
 .../logging/logging-0.4.9.2/python_logging.html    | 1183 ------
 tools/python/logging/logging-0.4.9.2/setup.py      |   29 -
 tools/python/logging/logging-0.4.9.2/test/app.py   |    5 -
 .../logging/logging-0.4.9.2/test/critical.ini      |   60 -
 .../python/logging/logging-0.4.9.2/test/debug.ini  |   60 -
 .../python/logging/logging-0.4.9.2/test/error.ini  |   60 -
 .../python/logging/logging-0.4.9.2/test/events.xml |   31 -
 .../logging/logging-0.4.9.2/test/log_test.py       |  158 -
 .../logging/logging-0.4.9.2/test/log_test0.py      |  118 -
 .../logging/logging-0.4.9.2/test/log_test1.py      |   85 -
 .../logging/logging-0.4.9.2/test/log_test10.py     |   87 -
 .../logging/logging-0.4.9.2/test/log_test11.py     |   72 -
 .../logging/logging-0.4.9.2/test/log_test12.py     |   47 -
 .../logging/logging-0.4.9.2/test/log_test13.py     |  106 -
 .../logging/logging-0.4.9.2/test/log_test14.py     |  108 -
 .../logging/logging-0.4.9.2/test/log_test15.py     |   70 -
 .../logging/logging-0.4.9.2/test/log_test16.py     |   73 -
 .../logging/logging-0.4.9.2/test/log_test17.py     |  111 -
 .../logging/logging-0.4.9.2/test/log_test18.py     |  102 -
 .../logging/logging-0.4.9.2/test/log_test19.py     |   57 -
 .../logging/logging-0.4.9.2/test/log_test2.py      |  119 -
 .../logging/logging-0.4.9.2/test/log_test20.py     |   84 -
 .../logging/logging-0.4.9.2/test/log_test21.py     |  141 -
 .../logging/logging-0.4.9.2/test/log_test22.py     |   50 -
 .../logging/logging-0.4.9.2/test/log_test3.ini     |   95 -
 .../logging/logging-0.4.9.2/test/log_test3.py      |   70 -
 .../logging/logging-0.4.9.2/test/log_test4.py      |  168 -
 .../logging/logging-0.4.9.2/test/log_test5.py      |   44 -
 .../logging/logging-0.4.9.2/test/log_test6.py      |   47 -
 .../logging/logging-0.4.9.2/test/log_test7.py      |   48 -
 .../logging/logging-0.4.9.2/test/log_test8.py      |   69 -
 .../logging/logging-0.4.9.2/test/log_test9.py      |   71 -
 .../logging/logging-0.4.9.2/test/logconf.ini       |  180 -
 .../python/logging/logging-0.4.9.2/test/logconf.py | 1738 --------
 .../logging/logging-0.4.9.2/test/logging.dtd       |   19 -
 .../logging/logging-0.4.9.2/test/logging.xml       |    5 -
 .../logging/logging-0.4.9.2/test/logrecv.ini       |   36 -
 .../python/logging/logging-0.4.9.2/test/logrecv.py |  443 --
 tools/python/logging/logging-0.4.9.2/test/myapp.py |   13 -
 .../logging/logging-0.4.9.2/test/mymodule.py       |    8 -
 .../python/logging/logging-0.4.9.2/test/stderr.exp |  566 ---
 .../python/logging/logging-0.4.9.2/test/stdout.exp |   24 -
 tools/python/logging/logging-0.4.9.2/test/warn.ini |   60 -
 tools/python/logging/setup.py                      |   11 -
 tools/python/ptsname/ptsname.c                     |   44 -
 tools/python/setup.py                              |   95 +-
 tools/python/xen/lowlevel/checkpoint/checkpoint.c  |  371 --
 tools/python/xen/lowlevel/checkpoint/checkpoint.h  |   61 -
 .../python/xen/lowlevel/checkpoint/libcheckpoint.c |  850 ----
 tools/python/xen/lowlevel/flask/flask.c            |  292 --
 tools/python/xen/lowlevel/netlink/libnetlink.c     |  585 ---
 tools/python/xen/lowlevel/netlink/libnetlink.h     |   58 -
 tools/python/xen/lowlevel/netlink/netlink.c        |  215 -
 tools/python/xen/lowlevel/process/process.c        |  164 -
 tools/python/xen/lowlevel/scf/scf.c                |  156 -
 tools/python/xen/remus/blkdev.py                   |   31 -
 tools/python/xen/remus/device.py                   |  397 --
 tools/python/xen/remus/image.py                    |  227 -
 tools/python/xen/remus/netlink.py                  |  318 --
 tools/python/xen/remus/profile.py                  |   56 -
 tools/python/xen/remus/qdisc.py                    |  189 -
 tools/python/xen/remus/save.py                     |  186 -
 tools/python/xen/remus/tapdisk.py                  |    4 -
 tools/python/xen/remus/util.py                     |   82 -
 tools/python/xen/remus/vbd.py                      |    9 -
 tools/python/xen/remus/vdi.py                      |  121 -
 tools/python/xen/remus/vif.py                      |   18 -
 tools/python/xen/remus/vm.py                       |  168 -
 tools/python/xen/util/Brctl.py                     |  186 -
 tools/python/xen/util/SSHTransport.py              |  102 -
 tools/python/xen/util/__init__.py                  |    1 -
 tools/python/xen/util/acmpolicy.py                 | 1622 -------
 tools/python/xen/util/asserts.py                   |   27 -
 tools/python/xen/util/auxbin.py                    |   47 -
 tools/python/xen/util/blkif.py                     |  107 -
 tools/python/xen/util/bootloader.py                |  626 ---
 tools/python/xen/util/bugtool.py                   |  234 -
 tools/python/xen/util/diagnose.py                  |  185 -
 tools/python/xen/util/dictio.py                    |   50 -
 tools/python/xen/util/fileuri.py                   |  156 -
 tools/python/xen/util/ip.py                        |  121 -
 tools/python/xen/util/mac.py                       |   11 -
 tools/python/xen/util/mkdir.py                     |   44 -
 tools/python/xen/util/oshelp.py                    |   33 -
 tools/python/xen/util/pci.py                       | 1416 -------
 tools/python/xen/util/rwlock.py                    |  137 -
 tools/python/xen/util/sxputils.py                  |   64 -
 tools/python/xen/util/utils.py                     |   78 -
 tools/python/xen/util/vscsi_util.py                |  307 --
 tools/python/xen/util/vusb_util.py                 |  338 --
 tools/python/xen/util/xmlrpcclient.py              |  129 -
 tools/python/xen/util/xmlrpclib2.py                |  220 -
 tools/python/xen/util/xpopen.py                    |  182 -
 tools/python/xen/util/xsconstants.py               |  115 -
 tools/python/xen/util/xsm/__init__.py              |    2 -
 tools/python/xen/util/xsm/acm/__init__.py          |    1 -
 tools/python/xen/util/xsm/acm/acm.py               | 1627 -------
 tools/python/xen/util/xsm/dummy/__init__.py        |    1 -
 tools/python/xen/util/xsm/dummy/dummy.py           |  136 -
 tools/python/xen/util/xsm/flask/__init__.py        |    1 -
 tools/python/xen/util/xsm/flask/flask.py           |   65 -
 tools/python/xen/util/xsm/xsm.py                   |   20 -
 tools/python/xen/util/xsm/xsm_core.py              |    7 -
 tools/python/xen/util/xspolicy.py                  |   66 -
 tools/python/xen/web/SrvBase.py                    |   98 -
 tools/python/xen/web/SrvDir.py                     |  126 -
 tools/python/xen/web/__init__.py                   |   17 -
 tools/python/xen/web/connection.py                 |  333 --
 tools/python/xen/web/http.py                       |  518 ---
 tools/python/xen/web/httpserver.py                 |  367 --
 tools/python/xen/web/protocol.py                   |   40 -
 tools/python/xen/web/resource.py                   |  108 -
 tools/python/xen/web/static.py                     |   61 -
 tools/python/xen/web/tcp.py                        |  212 -
 tools/python/xen/web/unix.py                       |   69 -
 tools/python/xen/xend/Args.py                      |  166 -
 tools/python/xen/xend/MemoryPool.py                |  118 -
 tools/python/xen/xend/PrettyPrint.py               |  323 --
 tools/python/xen/xend/Vifctl.py                    |   35 -
 tools/python/xen/xend/XendAPI.py                   | 2812 -------------
 tools/python/xen/xend/XendAPIConstants.py          |   82 -
 tools/python/xen/xend/XendAPIStore.py              |   83 -
 tools/python/xen/xend/XendAPIVersion.py            |   22 -
 tools/python/xen/xend/XendAuthSessions.py          |  131 -
 tools/python/xen/xend/XendBase.py                  |  126 -
 tools/python/xen/xend/XendBootloader.py            |  230 -
 tools/python/xen/xend/XendCPUPool.py               |  910 ----
 tools/python/xen/xend/XendCheckpoint.py            |  425 --
 tools/python/xen/xend/XendClient.py                |   40 -
 tools/python/xen/xend/XendConfig.py                | 2265 ----------
 tools/python/xen/xend/XendConstants.py             |  164 -
 tools/python/xen/xend/XendDPCI.py                  |  165 -
 tools/python/xen/xend/XendDSCSI.py                 |  299 --
 tools/python/xen/xend/XendDevices.py               |   85 -
 tools/python/xen/xend/XendDmesg.py                 |   41 -
 tools/python/xen/xend/XendDomain.py                | 1958 ---------
 tools/python/xen/xend/XendDomainInfo.py            | 4429 --------------------
 tools/python/xen/xend/XendError.py                 |  252 --
 tools/python/xen/xend/XendLocalStorageRepo.py      |   93 -
 tools/python/xen/xend/XendLogging.py               |  149 -
 tools/python/xen/xend/XendMonitor.py               |  340 --
 tools/python/xen/xend/XendNetwork.py               |  238 --
 tools/python/xen/xend/XendNode.py                  | 1173 ------
 tools/python/xen/xend/XendOptions.py               |  567 ---
 tools/python/xen/xend/XendPBD.py                   |   99 -
 tools/python/xen/xend/XendPIF.py                   |  390 --
 tools/python/xen/xend/XendPIFMetrics.py            |   59 -
 tools/python/xen/xend/XendPPCI.py                  |  160 -
 tools/python/xen/xend/XendPSCSI.py                 |  211 -
 tools/python/xen/xend/XendProtocol.py              |  225 -
 tools/python/xen/xend/XendQCoWStorageRepo.py       |  340 --
 tools/python/xen/xend/XendSXPDev.py                |   13 -
 tools/python/xen/xend/XendStateStore.py            |  234 -
 tools/python/xen/xend/XendStorageRepository.py     |  118 -
 tools/python/xen/xend/XendTask.py                  |  224 -
 tools/python/xen/xend/XendTaskManager.py           |  110 -
 tools/python/xen/xend/XendVDI.py                   |  214 -
 tools/python/xen/xend/XendVMMetrics.py             |  146 -
 tools/python/xen/xend/XendVnet.py                  |  181 -
 tools/python/xen/xend/XendXSPolicy.py              |  305 --
 tools/python/xen/xend/XendXSPolicyAdmin.py         |  386 --
 tools/python/xen/xend/__init__.py                  |    1 -
 tools/python/xen/xend/arch.py                      |   31 -
 tools/python/xen/xend/balloon.py                   |  244 --
 tools/python/xen/xend/encode.py                    |  180 -
 tools/python/xen/xend/image.py                     | 1047 -----
 tools/python/xen/xend/osdep.py                     |  268 --
 tools/python/xen/xend/server/BlktapController.py   |  313 --
 tools/python/xen/xend/server/ConsoleController.py  |   38 -
 tools/python/xen/xend/server/DevConstants.py       |   49 -
 tools/python/xen/xend/server/DevController.py      |  677 ---
 tools/python/xen/xend/server/SSLXMLRPCServer.py    |  103 -
 tools/python/xen/xend/server/SrvDaemon.py          |  420 --
 tools/python/xen/xend/server/SrvDmesg.py           |   52 -
 tools/python/xen/xend/server/SrvDomain.py          |  329 --
 tools/python/xen/xend/server/SrvDomainDir.py       |  222 -
 tools/python/xen/xend/server/SrvNode.py            |   64 -
 tools/python/xen/xend/server/SrvRoot.py            |   43 -
 tools/python/xen/xend/server/SrvServer.py          |  261 --
 tools/python/xen/xend/server/SrvVnetDir.py         |  128 -
 tools/python/xen/xend/server/SrvXendLog.py         |   37 -
 tools/python/xen/xend/server/XMLRPCServer.py       |  273 --
 tools/python/xen/xend/server/__init__.py           |    1 -
 tools/python/xen/xend/server/blkif.py              |  221 -
 tools/python/xen/xend/server/iopif.py              |  102 -
 tools/python/xen/xend/server/irqif.py              |   95 -
 tools/python/xen/xend/server/netif.py              |  218 -
 tools/python/xen/xend/server/netif2.py             |  163 -
 tools/python/xen/xend/server/params.py             |   46 -
 tools/python/xen/xend/server/pciif.py              |  596 ---
 tools/python/xen/xend/server/pciquirk.py           |  149 -
 tools/python/xen/xend/server/relocate.py           |  173 -
 tools/python/xen/xend/server/tests/__init__.py     |    1 -
 .../xen/xend/server/tests/test_controllers.py      |   81 -
 tools/python/xen/xend/server/udevevent.py          |   92 -
 tools/python/xen/xend/server/vfbif.py              |   91 -
 tools/python/xen/xend/server/vscsiif.py            |  246 --
 tools/python/xen/xend/server/vusbif.py             |  126 -
 tools/python/xen/xend/sxp.py                       |  765 ----
 tools/python/xen/xend/tests/__init__.py            |    1 -
 tools/python/xen/xend/tests/test_XendConfig.py     |   42 -
 tools/python/xen/xend/tests/test_sxp.py            |   39 -
 tools/python/xen/xend/tests/test_uuid.py           |   30 -
 tools/python/xen/xend/tests/xend-config.sxp        |  131 -
 tools/python/xen/xend/uuid.py                      |   69 -
 tools/python/xen/xend/xend                         |  110 -
 tools/python/xen/xend/xenstore/__init__.py         |   16 -
 tools/python/xen/xend/xenstore/tests/__init__.py   |    2 -
 tools/python/xen/xend/xenstore/tests/stress_xs.py  |  121 -
 tools/python/xen/xend/xenstore/xstransact.py       |  368 --
 tools/python/xen/xend/xenstore/xsutil.py           |   32 -
 tools/python/xen/xend/xenstore/xswatch.py          |   80 -
 tools/python/xen/xm/XenAPI.py                      |  206 -
 tools/python/xen/xm/addlabel.py                    |  274 --
 tools/python/xen/xm/console.py                     |   88 -
 tools/python/xen/xm/cpupool-create.py              |   51 -
 tools/python/xen/xm/cpupool-new.py                 |   50 -
 tools/python/xen/xm/cpupool.py                     |  236 --
 tools/python/xen/xm/create.dtd                     |  154 -
 tools/python/xen/xm/create.py                      | 1529 -------
 tools/python/xen/xm/dry-run.py                     |  161 -
 tools/python/xen/xm/dumppolicy.py                  |   69 -
 tools/python/xen/xm/getenforce.py                  |   66 -
 tools/python/xen/xm/getlabel.py                    |  157 -
 tools/python/xen/xm/getpolicy.py                   |  135 -
 tools/python/xen/xm/help.py                        |  100 -
 tools/python/xen/xm/labels.py                      |   89 -
 tools/python/xen/xm/main.py                        | 4030 ------------------
 tools/python/xen/xm/migrate.py                     |   87 -
 tools/python/xen/xm/new.py                         |   79 -
 tools/python/xen/xm/opts.py                        |  627 ---
 tools/python/xen/xm/resetpolicy.py                 |  106 -
 tools/python/xen/xm/resources.py                   |   65 -
 tools/python/xen/xm/rmlabel.py                     |  216 -
 tools/python/xen/xm/setenforce.py                  |   74 -
 tools/python/xen/xm/setpolicy.py                   |  181 -
 tools/python/xen/xm/shutdown.py                    |  164 -
 tools/python/xen/xm/tests/__init__.py              |    2 -
 tools/python/xen/xm/tests/test_create.py           |  206 -
 tools/python/xen/xm/xenapi_create.py               | 1129 -----
 tools/python/xen/xm/xm                             |   20 -
 tools/xcutils/Makefile                             |   10 +-
 tools/xcutils/xc_restore.c                         |   73 -
 tools/xcutils/xc_save.c                            |  227 -
 tools/xm-test/COPYING                              |  340 --
 tools/xm-test/ChangeLog                            |   11 -
 tools/xm-test/Makefile.am                          |   18 -
 tools/xm-test/README                               |  310 --
 tools/xm-test/TODO                                 |    3 -
 tools/xm-test/Writing_Tests_HOWTO                  |  136 -
 tools/xm-test/autogen                              |    9 -
 tools/xm-test/configure.ac                         |  155 -
 tools/xm-test/grouptest/cpupool                    |    1 -
 tools/xm-test/grouptest/create                     |    1 -
 tools/xm-test/grouptest/default                    |   30 -
 tools/xm-test/grouptest/medium                     |   24 -
 tools/xm-test/grouptest/quick                      |    4 -
 tools/xm-test/grouptest/xapi                       |    1 -
 tools/xm-test/lib/XmTestLib/Console.py             |  302 --
 tools/xm-test/lib/XmTestLib/DomainTracking.py      |   61 -
 tools/xm-test/lib/XmTestLib/NetConfig.py           |  268 --
 tools/xm-test/lib/XmTestLib/Test.py                |  203 -
 tools/xm-test/lib/XmTestLib/XenAPIDomain.py        |  183 -
 tools/xm-test/lib/XmTestLib/XenDevice.py           |  275 --
 tools/xm-test/lib/XmTestLib/XenDomain.py           |  385 --
 tools/xm-test/lib/XmTestLib/XenMemory.py           |   68 -
 tools/xm-test/lib/XmTestLib/Xm.py                  |  245 --
 tools/xm-test/lib/XmTestLib/__init__.py            |   27 -
 tools/xm-test/lib/XmTestLib/arch.py                |  118 -
 tools/xm-test/lib/XmTestLib/block_utils.py         |   53 -
 tools/xm-test/lib/XmTestLib/config.py.in           |    7 -
 tools/xm-test/lib/XmTestLib/network_utils.py       |   60 -
 tools/xm-test/lib/XmTestLib/xapi.py                |   54 -
 tools/xm-test/lib/XmTestReport/OSReport.py         |  248 --
 tools/xm-test/lib/XmTestReport/ProgReport.py       |  119 -
 tools/xm-test/lib/XmTestReport/Report.py           |  156 -
 tools/xm-test/lib/XmTestReport/ResultReport.py     |  157 -
 tools/xm-test/lib/XmTestReport/arch.py             |   42 -
 tools/xm-test/lib/XmTestReport/utils.py            |   31 -
 tools/xm-test/lib/XmTestReport/xmtest.py.in        |   15 -
 tools/xm-test/mergereport                          |   25 -
 tools/xm-test/mkreport                             |   71 -
 tools/xm-test/ramdisk/Makefile.am                  |  126 -
 .../ramdisk/README-XenSource-initrd-0.7-img        |   42 -
 .../ramdisk/README-XenSource-initrd-0.8-img        |   42 -
 .../ramdisk/README-XenSource-initrd-1.0-img        |   46 -
 .../ramdisk/README-XenSource-initrd-1.1-img        |   45 -
 tools/xm-test/ramdisk/bin/create_disk_image        |  384 --
 tools/xm-test/ramdisk/configs/buildroot-i386       |  346 --
 tools/xm-test/ramdisk/configs/busybox              |  465 --
 tools/xm-test/ramdisk/configs/uClibc               |  172 -
 tools/xm-test/ramdisk/make-release.sh              |   44 -
 .../patches/buildroot/add_xvd_devices.patch        |   13 -
 .../xm-test/ramdisk/patches/buildroot/hping.patch  |   67 -
 tools/xm-test/ramdisk/skel/.profile                |    3 -
 tools/xm-test/ramdisk/skel/etc/init.d/rcS          |   19 -
 tools/xm-test/ramdisk/skel/etc/inittab             |    5 -
 tools/xm-test/ramdisk/skel/root/.profile           |    3 -
 tools/xm-test/runtest.sh                           |  337 --
 tools/xm-test/tests/Makefile.am                    |   43 -
 tools/xm-test/tests/Makefile.am.template           |   21 -
 tools/xm-test/tests/_sanity/01_domu_proc.py        |   32 -
 tools/xm-test/tests/_sanity/Makefile.am            |   21 -
 .../block-create/01_block_attach_device_pos.py     |   49 -
 .../02_block_attach_file_device_pos.py             |   49 -
 .../04_block_attach_device_repeatedly_pos.py       |   46 -
 ...ock_attach_and_dettach_device_repeatedly_pos.py |   49 -
 .../block-create/06_block_attach_baddomain_neg.py  |   18 -
 .../block-create/07_block_attach_baddevice_neg.py  |   53 -
 .../08_block_attach_bad_filedevice_neg.py          |   52 -
 ...ock_attach_and_dettach_device_check_data_pos.py |   66 -
 .../10_block_attach_dettach_multiple_devices.py    |  100 -
 .../block-create/11_block_attach_shared_dom0.py    |   38 -
 .../block-create/12_block_attach_shared_domU.py    |   30 -
 tools/xm-test/tests/block-create/Makefile.am       |   29 -
 .../block-destroy/01_block-destroy_btblock_pos.py  |   44 -
 .../block-destroy/02_block-destroy_rtblock_pos.py  |   41 -
 .../block-destroy/03_block-destroy_nonexist_neg.py |   17 -
 .../04_block-destroy_nonattached_neg.py            |   33 -
 .../block-destroy/05_block-destroy_byname_pos.py   |   43 -
 .../06_block-destroy_check_list_pos.py             |   42 -
 tools/xm-test/tests/block-destroy/Makefile.am      |   26 -
 .../block-integrity/01_block_device_read_verify.py |   62 -
 .../02_block_device_write_verify.py                |   63 -
 tools/xm-test/tests/block-integrity/Makefile.am    |   22 -
 .../xm-test/tests/block-list/01_block-list_pos.py  |   42 -
 .../tests/block-list/02_block-list_attachbd_pos.py |   46 -
 .../block-list/03_block-list_anotherbd_pos.py      |   54 -
 .../tests/block-list/04_block-list_nodb_pos.py     |   28 -
 .../tests/block-list/05_block-list_nonexist_neg.py |   18 -
 .../block-list/06_block-list_checkremove_pos.py    |   61 -
 tools/xm-test/tests/block-list/Makefile.am         |   26 -
 .../xm-test/tests/console/01_console_badopt_neg.py |   21 -
 .../xm-test/tests/console/02_console_baddom_neg.py |   27 -
 tools/xm-test/tests/console/Makefile.am            |   22 -
 .../xm-test/tests/cpupool/01_cpupool_basic_pos.py  |   72 -
 .../xm-test/tests/cpupool/02_cpupool_manage_pos.py |  152 -
 tools/xm-test/tests/cpupool/03_cpupool_domain.py   |  126 -
 tools/xm-test/tests/cpupool/04_cpupool_migrate.py  |   84 -
 tools/xm-test/tests/cpupool/Makefile.am            |   22 -
 tools/xm-test/tests/cpupool/pool1.cfg              |    1 -
 tools/xm-test/tests/cpupool/pools.py               |   78 -
 tools/xm-test/tests/create/01_create_basic_pos.py  |   49 -
 tools/xm-test/tests/create/02_create_noparm_neg.py |   17 -
 .../xm-test/tests/create/03_create_badparm_neg.py  |   19 -
 .../tests/create/04_create_conflictname_neg.py     |   41 -
 tools/xm-test/tests/create/06_create_mem_neg.py    |   53 -
 tools/xm-test/tests/create/07_create_mem64_pos.py  |   49 -
 tools/xm-test/tests/create/08_create_mem128_pos.py |   49 -
 tools/xm-test/tests/create/09_create_mem256_pos.py |   49 -
 .../xm-test/tests/create/10_create_fastdestroy.py  |   43 -
 .../tests/create/11_create_concurrent_pos.py       |   78 -
 .../create/12_create_concurrent_stress_pos.py      |   59 -
 .../xm-test/tests/create/13_create_multinic_pos.py |   27 -
 .../tests/create/14_create_blockroot_pos.py        |   44 -
 .../xm-test/tests/create/15_create_smallmem_pos.py |   27 -
 .../xm-test/tests/create/16_create_smallmem_neg.py |   30 -
 tools/xm-test/tests/create/Makefile.am             |   33 -
 .../xm-test/tests/destroy/01_destroy_basic_pos.py  |   40 -
 .../xm-test/tests/destroy/02_destroy_noparm_neg.py |   16 -
 .../tests/destroy/03_destroy_nonexist_neg.py       |   16 -
 .../tests/destroy/04_destroy_badparm_neg.py        |   16 -
 tools/xm-test/tests/destroy/05_destroy_byid_pos.py |   33 -
 tools/xm-test/tests/destroy/06_destroy_dom0_neg.py |   14 -
 .../xm-test/tests/destroy/07_destroy_stale_pos.py  |  133 -
 tools/xm-test/tests/destroy/Makefile.am            |   27 -
 tools/xm-test/tests/dmesg/01_dmesg_basic_pos.py    |   15 -
 tools/xm-test/tests/dmesg/02_dmesg_basic_neg.py    |   17 -
 tools/xm-test/tests/dmesg/Makefile.am              |   21 -
 tools/xm-test/tests/domid/01_domid_basic_pos.py    |   16 -
 tools/xm-test/tests/domid/02_domid_basic_neg.py    |   15 -
 tools/xm-test/tests/domid/Makefile.am              |   21 -
 .../xm-test/tests/domname/01_domname_basic_pos.py  |   17 -
 .../xm-test/tests/domname/02_domname_basic_neg.py  |   15 -
 tools/xm-test/tests/domname/Makefile.am            |   21 -
 .../01_enforce_dom0_cpus_basic_pos.py              |  126 -
 tools/xm-test/tests/enforce_dom0_cpus/Makefile.am  |   21 -
 tools/xm-test/tests/help/01_help_basic_pos.py      |   14 -
 tools/xm-test/tests/help/02_help_basic_neg.py      |   14 -
 tools/xm-test/tests/help/03_help_badparm_neg.py    |   14 -
 tools/xm-test/tests/help/04_help_long_pos.py       |   16 -
 tools/xm-test/tests/help/05_help_nonroot_pos.py    |   17 -
 tools/xm-test/tests/help/06_help_allcmds.py        |   44 -
 tools/xm-test/tests/help/Makefile.am               |   26 -
 tools/xm-test/tests/info/01_info_basic_pos.py      |   11 -
 .../xm-test/tests/info/02_info_compiledata_pos.py  |   42 -
 tools/xm-test/tests/info/Makefile.am               |   22 -
 tools/xm-test/tests/list/01_list_basic_pos.py      |   14 -
 tools/xm-test/tests/list/02_list_badparm_neg.py    |   16 -
 tools/xm-test/tests/list/03_list_nonexist_neg.py   |   17 -
 tools/xm-test/tests/list/04_list_goodparm_pos.py   |   28 -
 tools/xm-test/tests/list/05_list_long_pos.py       |   22 -
 tools/xm-test/tests/list/06_list_nonroot.py        |   15 -
 tools/xm-test/tests/list/Makefile.am               |   27 -
 .../xm-test/tests/memmax/01_memmax_badparm_neg.py  |   29 -
 tools/xm-test/tests/memmax/Makefile.am             |   21 -
 tools/xm-test/tests/memset/01_memset_basic_pos.py  |   82 -
 .../xm-test/tests/memset/02_memset_badparm_neg.py  |   56 -
 tools/xm-test/tests/memset/03_memset_random_pos.py |   64 -
 .../xm-test/tests/memset/04_memset_smallmem_pos.py |   55 -
 tools/xm-test/tests/memset/Makefile.am             |   24 -
 .../tests/migrate/01_migrate_localhost_pos.py      |   86 -
 tools/xm-test/tests/migrate/Makefile.am            |   20 -
 .../tests/network-attach/01_network_attach_pos.py  |   43 -
 .../network-attach/02_network_attach_detach_pos.py |   49 -
 .../03_network_attach_detach_multiple_pos.py       |   51 -
 .../04_network_attach_baddomain_neg.py             |   15 -
 tools/xm-test/tests/network-attach/Makefile.am     |   24 -
 .../tests/network/02_network_local_ping_pos.py     |   71 -
 .../tests/network/03_network_local_tcp_pos.py      |   75 -
 .../tests/network/04_network_local_udp_pos.py      |   76 -
 .../tests/network/05_network_dom0_ping_pos.py      |   54 -
 .../tests/network/06_network_dom0_tcp_pos.py       |   57 -
 .../tests/network/07_network_dom0_udp_pos.py       |   56 -
 .../tests/network/11_network_domU_ping_pos.py      |   62 -
 .../tests/network/12_network_domU_tcp_pos.py       |   64 -
 .../tests/network/13_network_domU_udp_pos.py       |   76 -
 tools/xm-test/tests/network/Makefile.am            |   34 -
 tools/xm-test/tests/pause/01_pause_basic_pos.py    |   63 -
 tools/xm-test/tests/pause/02_pause_badopt_neg.py   |   32 -
 tools/xm-test/tests/pause/03_pause_badname_neg.py  |   18 -
 tools/xm-test/tests/pause/04_pause_badid_neg.py    |   18 -
 tools/xm-test/tests/pause/Makefile.am              |   22 -
 tools/xm-test/tests/reboot/01_reboot_basic_pos.py  |   52 -
 tools/xm-test/tests/reboot/02_reboot_badopt_neg.py |   32 -
 .../xm-test/tests/reboot/03_reboot_badname_neg.py  |   18 -
 tools/xm-test/tests/reboot/Makefile.am             |   23 -
 .../xm-test/tests/restore/01_restore_basic_pos.py  |   82 -
 .../tests/restore/02_restore_badparm_neg.py        |   28 -
 .../tests/restore/03_restore_badfilename_neg.py    |   28 -
 .../tests/restore/04_restore_withdevices_pos.py    |  130 -
 tools/xm-test/tests/restore/Makefile.am            |   24 -
 tools/xm-test/tests/save/01_save_basic_pos.py      |   37 -
 tools/xm-test/tests/save/02_save_badparm_neg.py    |   28 -
 tools/xm-test/tests/save/03_save_bogusfile_neg.py  |   39 -
 tools/xm-test/tests/save/Makefile.am               |   24 -
 .../sched-credit/01_sched_credit_weight_cap_pos.py |   72 -
 tools/xm-test/tests/sched-credit/Makefile.am       |   20 -
 .../xm-test/tests/sedf/01_sedf_period_slice_pos.py |   62 -
 .../xm-test/tests/sedf/02_sedf_period_lower_neg.py |   44 -
 .../xm-test/tests/sedf/03_sedf_slice_lower_neg.py  |   40 -
 .../xm-test/tests/sedf/04_sedf_slice_upper_neg.py  |   48 -
 tools/xm-test/tests/sedf/05_sedf_extratime_pos.py  |   63 -
 .../tests/sedf/06_sedf_extratime_disable_neg.py    |   71 -
 tools/xm-test/tests/sedf/Makefile.am               |   25 -
 .../tests/shutdown/01_shutdown_basic_pos.py        |   54 -
 .../tests/shutdown/02_shutdown_badparm_neg.py      |   39 -
 .../tests/shutdown/03_shutdown_nonexist_neg.py     |   22 -
 tools/xm-test/tests/shutdown/Makefile.am           |   21 -
 tools/xm-test/tests/sysrq/01_sysrq_basic_neg.py    |   20 -
 tools/xm-test/tests/sysrq/02_sysrq_sync_pos.py     |   52 -
 .../xm-test/tests/sysrq/03_sysrq_withreboot_pos.py |   40 -
 tools/xm-test/tests/sysrq/Makefile.am              |   23 -
 .../xm-test/tests/unpause/01_unpause_basic_pos.py  |   76 -
 tools/xm-test/tests/unpause/Makefile.am            |   20 -
 .../vcpu-disable/01_vcpu-disable_basic_pos.py      |   82 -
 tools/xm-test/tests/vcpu-disable/Makefile.am       |   21 -
 .../tests/vcpu-pin/01_vcpu-pin_basic_pos.py        |   50 -
 tools/xm-test/tests/vcpu-pin/Makefile.am           |   21 -
 tools/xm-test/tests/xapi/01_xapi-vm_basic.py       |   61 -
 tools/xm-test/tests/xapi/02_xapi-vbd_basic.py      |  122 -
 tools/xm-test/tests/xapi/03_xapi-network_pos.py    |  123 -
 .../tests/xapi/04_xapi-data_uri_handling.py        |   65 -
 tools/xm-test/tests/xapi/20_xapi-cpu_pool_basic.py |  157 -
 tools/xm-test/tests/xapi/Makefile.am               |   23 -
 613 files changed, 7 insertions(+), 107602 deletions(-)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:45:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:45: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 1WXq0W-0006OM-Ea; Wed, 09 Apr 2014 10:45:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq0V-0006O3-MI
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:27 +0000
Received: from [193.109.254.147:10933] by server-3.bemta-14.messagelabs.com id
	2C/3E-22179-7C425435; Wed, 09 Apr 2014 10:45:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397040325!7176253!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4320 invoked from network); 9 Apr 2014 10:45:26 -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;
	9 Apr 2014 10:45:26 -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 1WXq0T-0003Ia-34
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq0T-0004gS-0t
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:25 +0000
Date: Wed, 09 Apr 2014 10:45:25 +0000
Message-Id: <E1WXq0T-0004gS-0t@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm32: __cmpxchg_mb should be
	marked always_inline
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 d2b4c27c0718f27deba00a16317a8ba04c1a2cb7
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Apr 3 18:09:10 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:52:44 2014 +0100

    xen/arm32: __cmpxchg_mb should be marked always_inline
    
    Currently __cmpxchg_mb is only marked inline. The compiler can decide to not
    inline this function. In this case, the call to __cmpxchg will be inlined
    but not optimised. This will result linking failure because of __bad_cmpxchg.
    
    Caught by clang 3.5.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/asm-arm/arm32/cmpxchg.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/include/asm-arm/arm32/cmpxchg.h b/xen/include/asm-arm/arm32/cmpxchg.h
index 70c6090..3f4e7a1 100644
--- a/xen/include/asm-arm/arm32/cmpxchg.h
+++ b/xen/include/asm-arm/arm32/cmpxchg.h
@@ -112,8 +112,9 @@ static always_inline unsigned long __cmpxchg(
 	return oldval;
 }
 
-static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
-					 unsigned long new, int size)
+static always_inline unsigned long __cmpxchg_mb(volatile void *ptr,
+                                                unsigned long old,
+                                                unsigned long new, int size)
 {
 	unsigned long ret;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 09 10:45:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 09 Apr 2014 10:45: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 1WXq0W-0006OM-Ea; Wed, 09 Apr 2014 10:45:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq0V-0006O3-MI
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:27 +0000
Received: from [193.109.254.147:10933] by server-3.bemta-14.messagelabs.com id
	2C/3E-22179-7C425435; Wed, 09 Apr 2014 10:45:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397040325!7176253!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4320 invoked from network); 9 Apr 2014 10:45:26 -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;
	9 Apr 2014 10:45:26 -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 1WXq0T-0003Ia-34
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WXq0T-0004gS-0t
	for xen-changelog@lists.xensource.com; Wed, 09 Apr 2014 10:45:25 +0000
Date: Wed, 09 Apr 2014 10:45:25 +0000
Message-Id: <E1WXq0T-0004gS-0t@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm32: __cmpxchg_mb should be
	marked always_inline
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 d2b4c27c0718f27deba00a16317a8ba04c1a2cb7
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Apr 3 18:09:10 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Tue Apr 8 15:52:44 2014 +0100

    xen/arm32: __cmpxchg_mb should be marked always_inline
    
    Currently __cmpxchg_mb is only marked inline. The compiler can decide to not
    inline this function. In this case, the call to __cmpxchg will be inlined
    but not optimised. This will result linking failure because of __bad_cmpxchg.
    
    Caught by clang 3.5.
    
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/asm-arm/arm32/cmpxchg.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/include/asm-arm/arm32/cmpxchg.h b/xen/include/asm-arm/arm32/cmpxchg.h
index 70c6090..3f4e7a1 100644
--- a/xen/include/asm-arm/arm32/cmpxchg.h
+++ b/xen/include/asm-arm/arm32/cmpxchg.h
@@ -112,8 +112,9 @@ static always_inline unsigned long __cmpxchg(
 	return oldval;
 }
 
-static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
-					 unsigned long new, int size)
+static always_inline unsigned long __cmpxchg_mb(volatile void *ptr,
+                                                unsigned long old,
+                                                unsigned long new, int size)
 {
 	unsigned long ret;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55: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 1WYsmJ-0001ny-GF; Sat, 12 Apr 2014 07:55:07 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmI-0001nn-Bw
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:06 +0000
Received: from [193.109.254.147:23862] by server-12.bemta-14.messagelabs.com
	id BF/21-27473-951F8435; Sat, 12 Apr 2014 07:55:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1397289304!7889536!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11156 invoked from network); 12 Apr 2014 07:55:05 -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;
	12 Apr 2014 07:55:05 -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 1WYsmF-0004nF-Q0
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmF-0005Jp-6w
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:03 +0000
Date: Sat, 12 Apr 2014 07:55:03 +0000
Message-Id: <E1WYsmF-0005Jp-6w@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] common: make hypercall preemption
	checks consistent
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 584eb273dbd8f4325f419c0d1e160f1579c9efa4
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:28:46 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:28:46 2014 +0200

    common: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - do cheap checks first
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 8c0eed2cc8d8a2ccccdffe4c386b625b672dc12a
    master date: 2014-03-13 14:26:35 +0100
---
 xen/common/memory.c        |    9 +++++----
 xen/common/multicall.c     |    2 +-
 xen/drivers/char/console.c |    4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index a515d1d..40f3e3e 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -59,7 +59,7 @@ static void increase_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -104,7 +104,7 @@ static void populate_physmap(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -242,7 +242,7 @@ static void decrease_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -355,7 +355,8 @@ static long memory_exchange(XEN_GUEST_HANDLE(xen_memory_exchange_t) arg)
           i < (exch.in.nr_extents >> in_chunk_order);
           i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != (exch.nr_exchanged >> in_chunk_order) &&
+             hypercall_preempt_check() )
         {
             exch.nr_exchanged = i << in_chunk_order;
             rcu_unlock_domain(d);
diff --git a/xen/common/multicall.c b/xen/common/multicall.c
index 6c1a9d7..697a3f3 100644
--- a/xen/common/multicall.c
+++ b/xen/common/multicall.c
@@ -38,7 +38,7 @@ do_multicall(
 
     for ( i = 0; !rc && i < nr_calls; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i && hypercall_preempt_check() )
             goto preempted;
 
         if ( unlikely(__copy_from_guest(&mcs->call, call_list, 1)) )
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index ef24f63..8579711 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -323,11 +323,11 @@ static DECLARE_SOFTIRQ_TASKLET(notify_dom0_con_ring_tasklet,
 static long guest_console_write(XEN_GUEST_HANDLE(char) buffer, int count)
 {
     char kbuf[128], *kptr;
-    int kcount;
+    int kcount = 0;
 
     while ( count > 0 )
     {
-        if ( hypercall_preempt_check() )
+        if ( kcount && hypercall_preempt_check() )
             return hypercall_create_continuation(
                 __HYPERVISOR_console_io, "iih",
                 CONSOLEIO_write, count, buffer);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55: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 1WYsmW-0001oi-J0; Sat, 12 Apr 2014 07:55:20 +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 1WYsmV-0001oT-B9
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:19 +0000
Received: from [85.158.143.35:24115] by server-2.bemta-4.messagelabs.com id
	F0/A5-06539-661F8435; Sat, 12 Apr 2014 07:55:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-21.messagelabs.com!1397289314!8686016!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8487 invoked from network); 12 Apr 2014 07:55:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	12 Apr 2014 07:55:15 -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 1WYsmQ-0004nI-2s
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmP-0005KD-To
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:13 +0000
Date: Sat, 12 Apr 2014 07:55:13 +0000
Message-Id: <E1WYsmP-0005KD-To@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86: make hypercall preemption
	checks consistent
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 839b603e672c06481e38db2d3bb6c0eb67a23570
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:30:12 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:30:12 2014 +0200

    x86: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - never preempt on the last iteration (pointless/wasteful)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: fd7bfce0395ace266159760e35dc49f7af3b90ce
    master date: 2014-03-13 14:27:51 +0100
---
 xen/arch/x86/mm.c                  |    4 ++--
 xen/arch/x86/mm/hap/hap.c          |    4 +++-
 xen/arch/x86/mm/p2m-pod.c          |    6 ++++--
 xen/arch/x86/mm/shadow/common.c    |    4 +++-
 xen/arch/x86/traps.c               |   14 +++++++-------
 xen/arch/x86/x86_64/compat/traps.c |   14 +++++++-------
 6 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 01f3002..9ec617b 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -3199,7 +3199,7 @@ long do_mmuext_op(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
@@ -3767,7 +3767,7 @@ long do_mmu_update(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index 30cc10e..b150fc7 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -362,7 +362,7 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
     else
         pages -= d->arch.paging.hap.p2m_pages;
 
-    while ( d->arch.paging.hap.total_pages != pages )
+    for ( ; ; )
     {
         if ( d->arch.paging.hap.total_pages < pages )
         {
@@ -391,6 +391,8 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
             d->arch.paging.hap.total_pages--;
             free_domheap_page(pg);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index cdbd8d2..3d3e989 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -242,7 +242,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
         p2m_pod_cache_add(p2m, page, order);
 
-        if ( hypercall_preempt_check() && preemptible )
+        if ( preemptible && pod_target != p2m->pod.count &&
+             hypercall_preempt_check() )
         {
             ret = -EAGAIN;
             goto out;
@@ -286,7 +287,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
             put_page(page+i);
 
-            if ( hypercall_preempt_check() && preemptible )
+            if ( preemptible && pod_target != p2m->pod.count &&
+                 hypercall_preempt_check() )
             {
                 ret = -EAGAIN;
                 goto out;
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index ef06a03..1805018 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1735,7 +1735,7 @@ static unsigned int sh_set_allocation(struct domain *d,
     SHADOW_PRINTK("current %i target %i\n", 
                    d->arch.paging.shadow.total_pages, pages);
 
-    while ( d->arch.paging.shadow.total_pages != pages ) 
+    for ( ; ; )
     {
         if ( d->arch.paging.shadow.total_pages < pages ) 
         {
@@ -1770,6 +1770,8 @@ static unsigned int sh_set_allocation(struct domain *d,
             d->arch.paging.shadow.total_pages--;
             free_domheap_page(sp);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index fd8bd8c..3d395a6 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3756,13 +3756,6 @@ long do_set_trap_table(XEN_GUEST_HANDLE(const_trap_info_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -3783,6 +3776,13 @@ long do_set_trap_table(XEN_GUEST_HANDLE(const_trap_info_t) traps)
             init_int80_direct_trap(curr);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c
index 6e0ff11..25f4d70 100644
--- a/xen/arch/x86/x86_64/compat/traps.c
+++ b/xen/arch/x86/x86_64/compat/traps.c
@@ -324,13 +324,6 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -348,6 +341,13 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
             init_int80_direct_trap(current);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55: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 1WYsmW-0001oi-J0; Sat, 12 Apr 2014 07:55:20 +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 1WYsmV-0001oT-B9
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:19 +0000
Received: from [85.158.143.35:24115] by server-2.bemta-4.messagelabs.com id
	F0/A5-06539-661F8435; Sat, 12 Apr 2014 07:55:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-21.messagelabs.com!1397289314!8686016!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8487 invoked from network); 12 Apr 2014 07:55:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	12 Apr 2014 07:55:15 -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 1WYsmQ-0004nI-2s
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmP-0005KD-To
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:13 +0000
Date: Sat, 12 Apr 2014 07:55:13 +0000
Message-Id: <E1WYsmP-0005KD-To@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86: make hypercall preemption
	checks consistent
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 839b603e672c06481e38db2d3bb6c0eb67a23570
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:30:12 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:30:12 2014 +0200

    x86: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - never preempt on the last iteration (pointless/wasteful)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: fd7bfce0395ace266159760e35dc49f7af3b90ce
    master date: 2014-03-13 14:27:51 +0100
---
 xen/arch/x86/mm.c                  |    4 ++--
 xen/arch/x86/mm/hap/hap.c          |    4 +++-
 xen/arch/x86/mm/p2m-pod.c          |    6 ++++--
 xen/arch/x86/mm/shadow/common.c    |    4 +++-
 xen/arch/x86/traps.c               |   14 +++++++-------
 xen/arch/x86/x86_64/compat/traps.c |   14 +++++++-------
 6 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 01f3002..9ec617b 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -3199,7 +3199,7 @@ long do_mmuext_op(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
@@ -3767,7 +3767,7 @@ long do_mmu_update(
 
     for ( i = 0; i < count; i++ )
     {
-        if ( curr->arch.old_guest_table || hypercall_preempt_check() )
+        if ( curr->arch.old_guest_table || (i && hypercall_preempt_check()) )
         {
             rc = -EAGAIN;
             break;
diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index 30cc10e..b150fc7 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -362,7 +362,7 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
     else
         pages -= d->arch.paging.hap.p2m_pages;
 
-    while ( d->arch.paging.hap.total_pages != pages )
+    for ( ; ; )
     {
         if ( d->arch.paging.hap.total_pages < pages )
         {
@@ -391,6 +391,8 @@ hap_set_allocation(struct domain *d, unsigned int pages, int *preempted)
             d->arch.paging.hap.total_pages--;
             free_domheap_page(pg);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index cdbd8d2..3d3e989 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -242,7 +242,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
         p2m_pod_cache_add(p2m, page, order);
 
-        if ( hypercall_preempt_check() && preemptible )
+        if ( preemptible && pod_target != p2m->pod.count &&
+             hypercall_preempt_check() )
         {
             ret = -EAGAIN;
             goto out;
@@ -286,7 +287,8 @@ p2m_pod_set_cache_target(struct p2m_domain *p2m, unsigned long pod_target, int p
 
             put_page(page+i);
 
-            if ( hypercall_preempt_check() && preemptible )
+            if ( preemptible && pod_target != p2m->pod.count &&
+                 hypercall_preempt_check() )
             {
                 ret = -EAGAIN;
                 goto out;
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index ef06a03..1805018 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1735,7 +1735,7 @@ static unsigned int sh_set_allocation(struct domain *d,
     SHADOW_PRINTK("current %i target %i\n", 
                    d->arch.paging.shadow.total_pages, pages);
 
-    while ( d->arch.paging.shadow.total_pages != pages ) 
+    for ( ; ; )
     {
         if ( d->arch.paging.shadow.total_pages < pages ) 
         {
@@ -1770,6 +1770,8 @@ static unsigned int sh_set_allocation(struct domain *d,
             d->arch.paging.shadow.total_pages--;
             free_domheap_page(sp);
         }
+        else
+            break;
 
         /* Check to see if we need to yield and try again */
         if ( preempted && hypercall_preempt_check() )
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index fd8bd8c..3d395a6 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3756,13 +3756,6 @@ long do_set_trap_table(XEN_GUEST_HANDLE(const_trap_info_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -3783,6 +3776,13 @@ long do_set_trap_table(XEN_GUEST_HANDLE(const_trap_info_t) traps)
             init_int80_direct_trap(curr);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c
index 6e0ff11..25f4d70 100644
--- a/xen/arch/x86/x86_64/compat/traps.c
+++ b/xen/arch/x86/x86_64/compat/traps.c
@@ -324,13 +324,6 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
 
     for ( ; ; )
     {
-        if ( hypercall_preempt_check() )
-        {
-            rc = hypercall_create_continuation(
-                __HYPERVISOR_set_trap_table, "h", traps);
-            break;
-        }
-
         if ( copy_from_guest(&cur, traps, 1) )
         {
             rc = -EFAULT;
@@ -348,6 +341,13 @@ int compat_set_trap_table(XEN_GUEST_HANDLE(trap_info_compat_t) traps)
             init_int80_direct_trap(current);
 
         guest_handle_add_offset(traps, 1);
+
+        if ( hypercall_preempt_check() )
+        {
+            rc = hypercall_create_continuation(
+                __HYPERVISOR_set_trap_table, "h", traps);
+            break;
+        }
     }
 
     return rc;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55: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 1WYsmJ-0001ny-GF; Sat, 12 Apr 2014 07:55:07 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmI-0001nn-Bw
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:06 +0000
Received: from [193.109.254.147:23862] by server-12.bemta-14.messagelabs.com
	id BF/21-27473-951F8435; Sat, 12 Apr 2014 07:55:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1397289304!7889536!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11156 invoked from network); 12 Apr 2014 07:55:05 -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;
	12 Apr 2014 07:55:05 -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 1WYsmF-0004nF-Q0
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmF-0005Jp-6w
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:03 +0000
Date: Sat, 12 Apr 2014 07:55:03 +0000
Message-Id: <E1WYsmF-0005Jp-6w@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] common: make hypercall preemption
	checks consistent
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 584eb273dbd8f4325f419c0d1e160f1579c9efa4
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:28:46 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:28:46 2014 +0200

    common: make hypercall preemption checks consistent
    
    - never preempt on the first iteration (ensure forward progress)
    - do cheap checks first
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: 8c0eed2cc8d8a2ccccdffe4c386b625b672dc12a
    master date: 2014-03-13 14:26:35 +0100
---
 xen/common/memory.c        |    9 +++++----
 xen/common/multicall.c     |    2 +-
 xen/drivers/char/console.c |    4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index a515d1d..40f3e3e 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -59,7 +59,7 @@ static void increase_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -104,7 +104,7 @@ static void populate_physmap(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -242,7 +242,7 @@ static void decrease_reservation(struct memop_args *a)
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != a->nr_done && hypercall_preempt_check() )
         {
             a->preempted = 1;
             goto out;
@@ -355,7 +355,8 @@ static long memory_exchange(XEN_GUEST_HANDLE(xen_memory_exchange_t) arg)
           i < (exch.in.nr_extents >> in_chunk_order);
           i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i != (exch.nr_exchanged >> in_chunk_order) &&
+             hypercall_preempt_check() )
         {
             exch.nr_exchanged = i << in_chunk_order;
             rcu_unlock_domain(d);
diff --git a/xen/common/multicall.c b/xen/common/multicall.c
index 6c1a9d7..697a3f3 100644
--- a/xen/common/multicall.c
+++ b/xen/common/multicall.c
@@ -38,7 +38,7 @@ do_multicall(
 
     for ( i = 0; !rc && i < nr_calls; i++ )
     {
-        if ( hypercall_preempt_check() )
+        if ( i && hypercall_preempt_check() )
             goto preempted;
 
         if ( unlikely(__copy_from_guest(&mcs->call, call_list, 1)) )
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index ef24f63..8579711 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -323,11 +323,11 @@ static DECLARE_SOFTIRQ_TASKLET(notify_dom0_con_ring_tasklet,
 static long guest_console_write(XEN_GUEST_HANDLE(char) buffer, int count)
 {
     char kbuf[128], *kptr;
-    int kcount;
+    int kcount = 0;
 
     while ( count > 0 )
     {
-        if ( hypercall_preempt_check() )
+        if ( kcount && hypercall_preempt_check() )
             return hypercall_create_continuation(
                 __HYPERVISOR_console_io, "iih",
                 CONSOLEIO_write, count, buffer);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55: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 1WYsme-0001q3-Ld; Sat, 12 Apr 2014 07:55:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmc-0001pR-V6
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:27 +0000
Received: from [193.109.254.147:24534] by server-10.bemta-14.messagelabs.com
	id 62/C4-04546-E61F8435; Sat, 12 Apr 2014 07:55:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1397289324!7895575!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27632 invoked from network); 12 Apr 2014 07:55:25 -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;
	12 Apr 2014 07:55:25 -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 1WYsma-0004nL-8B
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsma-0005KZ-5l
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:24 +0000
Date: Sat, 12 Apr 2014 07:55:24 +0000
Message-Id: <E1WYsma-0005KZ-5l@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] VT-d: fix RMRR handling
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 c4fa33f7d4e90f86c14cc9eb56ddff7cc323ec5a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:37:15 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:37:15 2014 +0200

    VT-d: fix RMRR handling
    
    Removing mapped RMRR tracking structures in dma_pte_clear_one() is
    wrong for two reasons: First, these regions may cover more than a
    single page. And second, multiple devices (and hence multiple devices
    assigned to any particular guest) may share a single RMRR (whether
    assigning such devices to distinct guests is a safe thing to do is
    another question).
    
    Therefore move the removal of the tracking structures into the
    counterpart function to the one doing the insertion -
    intel_iommu_remove_device(), and add a reference count to the tracking
    structure.
    
    Further, for the handling of the mappings of the respective memory
    regions to be correct, RMRRs must not overlap. Add a respective check
    to acpi_parse_one_rmrr().
    
    And finally, with all of this being VT-d specific, move the cleanup
    of the list as well as the structure type definition where it belongs -
    in VT-d specific rather than IOMMU generic code.
    
    Note that this doesn't address yet another issue associated with RMRR
    handling: The purpose of the RMRRs as well as the way the respective
    IOMMU page table mappings get inserted both suggest that these regions
    would need to be marked E820_RESERVED in all (HVM?) guests' memory
    maps, yet nothing like this is being done in hvmloader. (For PV guests
    this would also seem to be necessary, but may conflict with PV guests
    possibly assuming there to be just a single E820 entry representing all
    of its RAM.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
    master commit: dd527061770789d8152b1dea68056987b202d87a
    master date: 2014-03-17 16:45:04 +0100
---
 xen/drivers/passthrough/iommu.c     |   10 +---
 xen/drivers/passthrough/vtd/dmar.c  |   10 ++++
 xen/drivers/passthrough/vtd/iommu.c |   92 ++++++++++++++++++++++++-----------
 xen/include/xen/hvm/iommu.h         |    6 --
 4 files changed, 74 insertions(+), 44 deletions(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index ddd0a38..16c0959 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -284,9 +284,8 @@ static int iommu_populate_page_table(struct domain *d)
 void iommu_domain_destroy(struct domain *d)
 {
     struct hvm_iommu *hd  = domain_hvm_iommu(d);
-    struct list_head *ioport_list, *rmrr_list, *tmp;
+    struct list_head *ioport_list, *tmp;
     struct g2m_ioport *ioport;
-    struct mapped_rmrr *mrmrr;
 
     if ( !iommu_enabled || !hd->platform_ops )
         return;
@@ -303,13 +302,6 @@ void iommu_domain_destroy(struct domain *d)
         list_del(&ioport->list);
         xfree(ioport);
     }
-
-    list_for_each_safe ( rmrr_list, tmp, &hd->mapped_rmrrs )
-    {
-        mrmrr = list_entry(rmrr_list, struct mapped_rmrr, list);
-        list_del(&mrmrr->list);
-        xfree(mrmrr);
-    }
 }
 
 int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn,
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 0c52bd6..d551b0c 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -537,6 +537,16 @@ acpi_parse_one_rmrr(struct acpi_dmar_header *header)
     if ( (ret = acpi_dmar_check_length(header, sizeof(*rmrr))) != 0 )
         return ret;
 
+    list_for_each_entry(rmrru, &acpi_rmrr_units, list)
+       if ( base_addr <= rmrru->end_address && rmrru->base_address <= end_addr )
+       {
+           printk(XENLOG_ERR VTDPREFIX
+                  "Overlapping RMRRs [%"PRIx64",%"PRIx64"] and [%"PRIx64",%"PRIx64"]\n",
+                  rmrru->base_address, rmrru->end_address,
+                  base_addr, end_addr);
+           return -EEXIST;
+       }
+
 #ifdef CONFIG_X86
     /* This check is here simply to detect when RMRR values are
      * not properly represented in the system memory map and
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index 8052a25..f9a565d 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -44,6 +44,12 @@
 #include "vtd.h"
 #include "../ats.h"
 
+struct mapped_rmrr {
+    struct list_head list;
+    u64 base, end;
+    unsigned int count;
+};
+
 /* Possible unfiltered LAPIC/MSI messages from untrusted sources? */
 bool_t __read_mostly untrusted_msi;
 
@@ -636,7 +642,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
     struct hvm_iommu *hd = domain_hvm_iommu(domain);
     struct dma_pte *page = NULL, *pte = NULL;
     u64 pg_maddr;
-    struct mapped_rmrr *mrmrr;
 
     spin_lock(&hd->mapping_lock);
     /* get last level pte */
@@ -665,21 +670,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
         __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K, 1, 1);
 
     unmap_vtd_domain_page(page);
-
-    /* if the cleared address is between mapped RMRR region,
-     * remove the mapped RMRR
-     */
-    spin_lock(&hd->mapping_lock);
-    list_for_each_entry ( mrmrr, &hd->mapped_rmrrs, list )
-    {
-        if ( addr >= mrmrr->base && addr <= mrmrr->end )
-        {
-            list_del(&mrmrr->list);
-            xfree(mrmrr);
-            break;
-        }
-    }
-    spin_unlock(&hd->mapping_lock);
 }
 
 static void iommu_free_pagetable(u64 pt_maddr, int level)
@@ -1730,10 +1720,17 @@ static int reassign_device_ownership(
 void iommu_domain_teardown(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
+    struct mapped_rmrr *mrmrr, *tmp;
 
     if ( list_empty(&acpi_drhd_units) )
         return;
 
+    list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
+    {
+        list_del(&mrmrr->list);
+        xfree(mrmrr);
+    }
+
     if ( iommu_use_hap_pt(d) )
         return;
 
@@ -1878,14 +1875,17 @@ static int rmrr_identity_mapping(struct domain *d,
     ASSERT(rmrr->base_address < rmrr->end_address);
 
     /*
-     * No need to acquire hd->mapping_lock, as the only theoretical race is
-     * with the insertion below (impossible due to holding pcidevs_lock).
+     * No need to acquire hd->mapping_lock: Both insertion and removal
+     * get done while holding pcidevs_lock.
      */
     list_for_each_entry( mrmrr, &hd->mapped_rmrrs, list )
     {
         if ( mrmrr->base == rmrr->base_address &&
              mrmrr->end == rmrr->end_address )
+        {
+            ++mrmrr->count;
             return 0;
+        }
     }
 
     base = rmrr->base_address & PAGE_MASK_4K;
@@ -1906,9 +1906,8 @@ static int rmrr_identity_mapping(struct domain *d,
         return -ENOMEM;
     mrmrr->base = rmrr->base_address;
     mrmrr->end = rmrr->end_address;
-    spin_lock(&hd->mapping_lock);
+    mrmrr->count = 1;
     list_add_tail(&mrmrr->list, &hd->mapped_rmrrs);
-    spin_unlock(&hd->mapping_lock);
 
     return 0;
 }
@@ -1971,17 +1970,52 @@ static int intel_iommu_remove_device(struct pci_dev *pdev)
     if ( !pdev->domain )
         return -EINVAL;
 
-    /* If the device belongs to dom0, and it has RMRR, don't remove it
-     * from dom0, because BIOS may use RMRR at booting time.
-     */
-    if ( pdev->domain->domain_id == 0 )
+    for_each_rmrr_device ( rmrr, bdf, i )
     {
-        for_each_rmrr_device ( rmrr, bdf, i )
+        struct hvm_iommu *hd;
+        struct mapped_rmrr *mrmrr, *tmp;
+
+        if ( rmrr->segment != pdev->seg ||
+             PCI_BUS(bdf) != pdev->bus ||
+             PCI_DEVFN2(bdf) != pdev->devfn )
+            continue;
+
+        /*
+         * If the device belongs to dom0, and it has RMRR, don't remove
+         * it from dom0, because BIOS may use RMRR at booting time.
+         */
+        if ( pdev->domain->domain_id == 0 )
+            return 0;
+
+        hd = domain_hvm_iommu(pdev->domain);
+
+        /*
+         * No need to acquire hd->mapping_lock: Both insertion and removal
+         * get done while holding pcidevs_lock.
+         */
+        ASSERT(spin_is_locked(&pcidevs_lock));
+        list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
         {
-            if ( rmrr->segment == pdev->seg &&
-                 PCI_BUS(bdf) == pdev->bus &&
-                 PCI_DEVFN2(bdf) == pdev->devfn )
-                return 0;
+            unsigned long base_pfn, end_pfn;
+
+            if ( rmrr->base_address != mrmrr->base ||
+                 rmrr->end_address != mrmrr->end )
+                continue;
+
+            if ( --mrmrr->count )
+                break;
+
+            base_pfn = (mrmrr->base & PAGE_MASK_4K) >> PAGE_SHIFT_4K;
+            end_pfn = PAGE_ALIGN_4K(mrmrr->end) >> PAGE_SHIFT_4K;
+            while ( base_pfn < end_pfn )
+            {
+                if ( intel_iommu_unmap_page(pdev->domain, base_pfn) )
+                    return -ENXIO;
+                base_pfn++;
+            }
+
+            list_del(&mrmrr->list);
+            xfree(mrmrr);
         }
     }
 
diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h
index 26539e0..8c98274 100644
--- a/xen/include/xen/hvm/iommu.h
+++ b/xen/include/xen/hvm/iommu.h
@@ -29,12 +29,6 @@ struct g2m_ioport {
     unsigned int np;
 };
 
-struct mapped_rmrr {
-    struct list_head list;
-    u64 base;
-    u64 end;
-};
-
 struct hvm_iommu {
     u64 pgd_maddr;                 /* io page directory machine address */
     spinlock_t mapping_lock;       /* io page table lock */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55: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 1WYsme-0001q3-Ld; Sat, 12 Apr 2014 07:55:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmc-0001pR-V6
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:27 +0000
Received: from [193.109.254.147:24534] by server-10.bemta-14.messagelabs.com
	id 62/C4-04546-E61F8435; Sat, 12 Apr 2014 07:55:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1397289324!7895575!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27632 invoked from network); 12 Apr 2014 07:55:25 -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;
	12 Apr 2014 07:55:25 -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 1WYsma-0004nL-8B
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsma-0005KZ-5l
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:24 +0000
Date: Sat, 12 Apr 2014 07:55:24 +0000
Message-Id: <E1WYsma-0005KZ-5l@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] VT-d: fix RMRR handling
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 c4fa33f7d4e90f86c14cc9eb56ddff7cc323ec5a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:37:15 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:37:15 2014 +0200

    VT-d: fix RMRR handling
    
    Removing mapped RMRR tracking structures in dma_pte_clear_one() is
    wrong for two reasons: First, these regions may cover more than a
    single page. And second, multiple devices (and hence multiple devices
    assigned to any particular guest) may share a single RMRR (whether
    assigning such devices to distinct guests is a safe thing to do is
    another question).
    
    Therefore move the removal of the tracking structures into the
    counterpart function to the one doing the insertion -
    intel_iommu_remove_device(), and add a reference count to the tracking
    structure.
    
    Further, for the handling of the mappings of the respective memory
    regions to be correct, RMRRs must not overlap. Add a respective check
    to acpi_parse_one_rmrr().
    
    And finally, with all of this being VT-d specific, move the cleanup
    of the list as well as the structure type definition where it belongs -
    in VT-d specific rather than IOMMU generic code.
    
    Note that this doesn't address yet another issue associated with RMRR
    handling: The purpose of the RMRRs as well as the way the respective
    IOMMU page table mappings get inserted both suggest that these regions
    would need to be marked E820_RESERVED in all (HVM?) guests' memory
    maps, yet nothing like this is being done in hvmloader. (For PV guests
    this would also seem to be necessary, but may conflict with PV guests
    possibly assuming there to be just a single E820 entry representing all
    of its RAM.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
    master commit: dd527061770789d8152b1dea68056987b202d87a
    master date: 2014-03-17 16:45:04 +0100
---
 xen/drivers/passthrough/iommu.c     |   10 +---
 xen/drivers/passthrough/vtd/dmar.c  |   10 ++++
 xen/drivers/passthrough/vtd/iommu.c |   92 ++++++++++++++++++++++++-----------
 xen/include/xen/hvm/iommu.h         |    6 --
 4 files changed, 74 insertions(+), 44 deletions(-)

diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index ddd0a38..16c0959 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -284,9 +284,8 @@ static int iommu_populate_page_table(struct domain *d)
 void iommu_domain_destroy(struct domain *d)
 {
     struct hvm_iommu *hd  = domain_hvm_iommu(d);
-    struct list_head *ioport_list, *rmrr_list, *tmp;
+    struct list_head *ioport_list, *tmp;
     struct g2m_ioport *ioport;
-    struct mapped_rmrr *mrmrr;
 
     if ( !iommu_enabled || !hd->platform_ops )
         return;
@@ -303,13 +302,6 @@ void iommu_domain_destroy(struct domain *d)
         list_del(&ioport->list);
         xfree(ioport);
     }
-
-    list_for_each_safe ( rmrr_list, tmp, &hd->mapped_rmrrs )
-    {
-        mrmrr = list_entry(rmrr_list, struct mapped_rmrr, list);
-        list_del(&mrmrr->list);
-        xfree(mrmrr);
-    }
 }
 
 int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn,
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 0c52bd6..d551b0c 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -537,6 +537,16 @@ acpi_parse_one_rmrr(struct acpi_dmar_header *header)
     if ( (ret = acpi_dmar_check_length(header, sizeof(*rmrr))) != 0 )
         return ret;
 
+    list_for_each_entry(rmrru, &acpi_rmrr_units, list)
+       if ( base_addr <= rmrru->end_address && rmrru->base_address <= end_addr )
+       {
+           printk(XENLOG_ERR VTDPREFIX
+                  "Overlapping RMRRs [%"PRIx64",%"PRIx64"] and [%"PRIx64",%"PRIx64"]\n",
+                  rmrru->base_address, rmrru->end_address,
+                  base_addr, end_addr);
+           return -EEXIST;
+       }
+
 #ifdef CONFIG_X86
     /* This check is here simply to detect when RMRR values are
      * not properly represented in the system memory map and
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index 8052a25..f9a565d 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -44,6 +44,12 @@
 #include "vtd.h"
 #include "../ats.h"
 
+struct mapped_rmrr {
+    struct list_head list;
+    u64 base, end;
+    unsigned int count;
+};
+
 /* Possible unfiltered LAPIC/MSI messages from untrusted sources? */
 bool_t __read_mostly untrusted_msi;
 
@@ -636,7 +642,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
     struct hvm_iommu *hd = domain_hvm_iommu(domain);
     struct dma_pte *page = NULL, *pte = NULL;
     u64 pg_maddr;
-    struct mapped_rmrr *mrmrr;
 
     spin_lock(&hd->mapping_lock);
     /* get last level pte */
@@ -665,21 +670,6 @@ static void dma_pte_clear_one(struct domain *domain, u64 addr)
         __intel_iommu_iotlb_flush(domain, addr >> PAGE_SHIFT_4K, 1, 1);
 
     unmap_vtd_domain_page(page);
-
-    /* if the cleared address is between mapped RMRR region,
-     * remove the mapped RMRR
-     */
-    spin_lock(&hd->mapping_lock);
-    list_for_each_entry ( mrmrr, &hd->mapped_rmrrs, list )
-    {
-        if ( addr >= mrmrr->base && addr <= mrmrr->end )
-        {
-            list_del(&mrmrr->list);
-            xfree(mrmrr);
-            break;
-        }
-    }
-    spin_unlock(&hd->mapping_lock);
 }
 
 static void iommu_free_pagetable(u64 pt_maddr, int level)
@@ -1730,10 +1720,17 @@ static int reassign_device_ownership(
 void iommu_domain_teardown(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
+    struct mapped_rmrr *mrmrr, *tmp;
 
     if ( list_empty(&acpi_drhd_units) )
         return;
 
+    list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
+    {
+        list_del(&mrmrr->list);
+        xfree(mrmrr);
+    }
+
     if ( iommu_use_hap_pt(d) )
         return;
 
@@ -1878,14 +1875,17 @@ static int rmrr_identity_mapping(struct domain *d,
     ASSERT(rmrr->base_address < rmrr->end_address);
 
     /*
-     * No need to acquire hd->mapping_lock, as the only theoretical race is
-     * with the insertion below (impossible due to holding pcidevs_lock).
+     * No need to acquire hd->mapping_lock: Both insertion and removal
+     * get done while holding pcidevs_lock.
      */
     list_for_each_entry( mrmrr, &hd->mapped_rmrrs, list )
     {
         if ( mrmrr->base == rmrr->base_address &&
              mrmrr->end == rmrr->end_address )
+        {
+            ++mrmrr->count;
             return 0;
+        }
     }
 
     base = rmrr->base_address & PAGE_MASK_4K;
@@ -1906,9 +1906,8 @@ static int rmrr_identity_mapping(struct domain *d,
         return -ENOMEM;
     mrmrr->base = rmrr->base_address;
     mrmrr->end = rmrr->end_address;
-    spin_lock(&hd->mapping_lock);
+    mrmrr->count = 1;
     list_add_tail(&mrmrr->list, &hd->mapped_rmrrs);
-    spin_unlock(&hd->mapping_lock);
 
     return 0;
 }
@@ -1971,17 +1970,52 @@ static int intel_iommu_remove_device(struct pci_dev *pdev)
     if ( !pdev->domain )
         return -EINVAL;
 
-    /* If the device belongs to dom0, and it has RMRR, don't remove it
-     * from dom0, because BIOS may use RMRR at booting time.
-     */
-    if ( pdev->domain->domain_id == 0 )
+    for_each_rmrr_device ( rmrr, bdf, i )
     {
-        for_each_rmrr_device ( rmrr, bdf, i )
+        struct hvm_iommu *hd;
+        struct mapped_rmrr *mrmrr, *tmp;
+
+        if ( rmrr->segment != pdev->seg ||
+             PCI_BUS(bdf) != pdev->bus ||
+             PCI_DEVFN2(bdf) != pdev->devfn )
+            continue;
+
+        /*
+         * If the device belongs to dom0, and it has RMRR, don't remove
+         * it from dom0, because BIOS may use RMRR at booting time.
+         */
+        if ( pdev->domain->domain_id == 0 )
+            return 0;
+
+        hd = domain_hvm_iommu(pdev->domain);
+
+        /*
+         * No need to acquire hd->mapping_lock: Both insertion and removal
+         * get done while holding pcidevs_lock.
+         */
+        ASSERT(spin_is_locked(&pcidevs_lock));
+        list_for_each_entry_safe ( mrmrr, tmp, &hd->mapped_rmrrs, list )
         {
-            if ( rmrr->segment == pdev->seg &&
-                 PCI_BUS(bdf) == pdev->bus &&
-                 PCI_DEVFN2(bdf) == pdev->devfn )
-                return 0;
+            unsigned long base_pfn, end_pfn;
+
+            if ( rmrr->base_address != mrmrr->base ||
+                 rmrr->end_address != mrmrr->end )
+                continue;
+
+            if ( --mrmrr->count )
+                break;
+
+            base_pfn = (mrmrr->base & PAGE_MASK_4K) >> PAGE_SHIFT_4K;
+            end_pfn = PAGE_ALIGN_4K(mrmrr->end) >> PAGE_SHIFT_4K;
+            while ( base_pfn < end_pfn )
+            {
+                if ( intel_iommu_unmap_page(pdev->domain, base_pfn) )
+                    return -ENXIO;
+                base_pfn++;
+            }
+
+            list_del(&mrmrr->list);
+            xfree(mrmrr);
         }
     }
 
diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h
index 26539e0..8c98274 100644
--- a/xen/include/xen/hvm/iommu.h
+++ b/xen/include/xen/hvm/iommu.h
@@ -29,12 +29,6 @@ struct g2m_ioport {
     unsigned int np;
 };
 
-struct mapped_rmrr {
-    struct list_head list;
-    u64 base;
-    u64 end;
-};
-
 struct hvm_iommu {
     u64 pgd_maddr;                 /* io page directory machine address */
     spinlock_t mapping_lock;       /* io page table lock */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55: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 1WYsmo-0001rm-OZ; Sat, 12 Apr 2014 07:55: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 1WYsmn-0001ra-7c
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:37 +0000
Received: from [85.158.143.35:50517] by server-2.bemta-4.messagelabs.com id
	07/B5-06539-871F8435; Sat, 12 Apr 2014 07:55:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1397289334!7964823!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25085 invoked from network); 12 Apr 2014 07:55:35 -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;
	12 Apr 2014 07:55:35 -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 1WYsmk-0004nZ-G7
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmk-0005Kz-As
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:34 +0000
Date: Sat, 12 Apr 2014 07:55:34 +0000
Message-Id: <E1WYsmk-0005Kz-As@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/Intel: work around Xeon 7400
	series erratum AAI65
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 3327c530101c877f303931ba44487bc48b9f0646
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:38:20 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:38:20 2014 +0200

    x86/Intel: work around Xeon 7400 series erratum AAI65
    
    Linux commit 40e2d7f9b5dae048789c64672bf3027fbb663ffa ("x86 idle:
    Repair large-server 50-watt idle-power regression") tells us that this
    applies not just to the named Xeon 7400 series, but also NHM-EX and
    WSM-EX; sadly Intel's documentation is so badly searchable that I
    wasn't able to locate the respective errata (and hence can't quote
    their numbers here).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
    master commit: 96d1b237ae9b2f2718bb1c59820701f17d3d86e0
    master date: 2014-03-17 16:47:22 +0100
---
 xen/arch/x86/acpi/cpu_idle.c     |    3 +++
 xen/arch/x86/cpu/intel.c         |    7 +++++++
 xen/include/asm-x86/cpufeature.h |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 989d034..f956929 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -276,6 +276,9 @@ static void mwait_idle_with_hints(unsigned long eax, unsigned long ecx)
     unsigned int cpu = smp_processor_id();
     s_time_t expires = per_cpu(timer_deadline, cpu);
 
+    if ( boot_cpu_has(X86_FEATURE_CLFLUSH_MONITOR) )
+        clflush((void *)&mwait_wakeup(cpu));
+
     __monitor((void *)&mwait_wakeup(cpu), 0, 0);
     smp_mb();
 
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 0d5f25f..348d36f 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -154,6 +154,9 @@ void __devinit early_intel_workaround(struct cpuinfo_x86 *c)
 /*
  * P4 Xeon errata 037 workaround.
  * Hardware prefetcher may cause stale data to be loaded into the cache.
+ *
+ * Xeon 7400 erratum AAI65 (and further newer Xeons)
+ * MONITOR/MWAIT may have excessive false wakeups
  */
 static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 {
@@ -168,6 +171,10 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 			wrmsr (MSR_IA32_MISC_ENABLE, lo, hi);
 		}
 	}
+
+	if (c->x86 == 6 && cpu_has_clflush &&
+	    (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47))
+		set_bit(X86_FEATURE_CLFLUSH_MONITOR, c->x86_capability);
 }
 
 
diff --git a/xen/include/asm-x86/cpufeature.h b/xen/include/asm-x86/cpufeature.h
index 4f43b2e..3837b11 100644
--- a/xen/include/asm-x86/cpufeature.h
+++ b/xen/include/asm-x86/cpufeature.h
@@ -80,6 +80,7 @@
 #define X86_FEATURE_TSC_RELIABLE (3*32+12) /* TSC is known to be reliable */
 #define X86_FEATURE_XTOPOLOGY    (3*32+13) /* cpu topology enum extensions */
 #define X86_FEATURE_CPUID_FAULTING (3*32+14) /* cpuid faulting */
+#define X86_FEATURE_CLFLUSH_MONITOR (3*32+15) /* clflush reqd with monitor */
 
 /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
 #define X86_FEATURE_XMM3	(4*32+ 0) /* Streaming SIMD Extensions-3 */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55: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 1WYsmo-0001rm-OZ; Sat, 12 Apr 2014 07:55: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 1WYsmn-0001ra-7c
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:37 +0000
Received: from [85.158.143.35:50517] by server-2.bemta-4.messagelabs.com id
	07/B5-06539-871F8435; Sat, 12 Apr 2014 07:55:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-21.messagelabs.com!1397289334!7964823!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25085 invoked from network); 12 Apr 2014 07:55:35 -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;
	12 Apr 2014 07:55:35 -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 1WYsmk-0004nZ-G7
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmk-0005Kz-As
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:34 +0000
Date: Sat, 12 Apr 2014 07:55:34 +0000
Message-Id: <E1WYsmk-0005Kz-As@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/Intel: work around Xeon 7400
	series erratum AAI65
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 3327c530101c877f303931ba44487bc48b9f0646
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:38:20 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:38:20 2014 +0200

    x86/Intel: work around Xeon 7400 series erratum AAI65
    
    Linux commit 40e2d7f9b5dae048789c64672bf3027fbb663ffa ("x86 idle:
    Repair large-server 50-watt idle-power regression") tells us that this
    applies not just to the named Xeon 7400 series, but also NHM-EX and
    WSM-EX; sadly Intel's documentation is so badly searchable that I
    wasn't able to locate the respective errata (and hence can't quote
    their numbers here).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
    master commit: 96d1b237ae9b2f2718bb1c59820701f17d3d86e0
    master date: 2014-03-17 16:47:22 +0100
---
 xen/arch/x86/acpi/cpu_idle.c     |    3 +++
 xen/arch/x86/cpu/intel.c         |    7 +++++++
 xen/include/asm-x86/cpufeature.h |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 989d034..f956929 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -276,6 +276,9 @@ static void mwait_idle_with_hints(unsigned long eax, unsigned long ecx)
     unsigned int cpu = smp_processor_id();
     s_time_t expires = per_cpu(timer_deadline, cpu);
 
+    if ( boot_cpu_has(X86_FEATURE_CLFLUSH_MONITOR) )
+        clflush((void *)&mwait_wakeup(cpu));
+
     __monitor((void *)&mwait_wakeup(cpu), 0, 0);
     smp_mb();
 
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 0d5f25f..348d36f 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -154,6 +154,9 @@ void __devinit early_intel_workaround(struct cpuinfo_x86 *c)
 /*
  * P4 Xeon errata 037 workaround.
  * Hardware prefetcher may cause stale data to be loaded into the cache.
+ *
+ * Xeon 7400 erratum AAI65 (and further newer Xeons)
+ * MONITOR/MWAIT may have excessive false wakeups
  */
 static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 {
@@ -168,6 +171,10 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c)
 			wrmsr (MSR_IA32_MISC_ENABLE, lo, hi);
 		}
 	}
+
+	if (c->x86 == 6 && cpu_has_clflush &&
+	    (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47))
+		set_bit(X86_FEATURE_CLFLUSH_MONITOR, c->x86_capability);
 }
 
 
diff --git a/xen/include/asm-x86/cpufeature.h b/xen/include/asm-x86/cpufeature.h
index 4f43b2e..3837b11 100644
--- a/xen/include/asm-x86/cpufeature.h
+++ b/xen/include/asm-x86/cpufeature.h
@@ -80,6 +80,7 @@
 #define X86_FEATURE_TSC_RELIABLE (3*32+12) /* TSC is known to be reliable */
 #define X86_FEATURE_XTOPOLOGY    (3*32+13) /* cpu topology enum extensions */
 #define X86_FEATURE_CPUID_FAULTING (3*32+14) /* cpuid faulting */
+#define X86_FEATURE_CLFLUSH_MONITOR (3*32+15) /* clflush reqd with monitor */
 
 /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
 #define X86_FEATURE_XMM3	(4*32+ 0) /* Streaming SIMD Extensions-3 */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55:48 +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 1WYsmy-0001tX-Sw; Sat, 12 Apr 2014 07:55:48 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmx-0001tF-Bc
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:47 +0000
Received: from [85.158.137.68:59417] by server-14.bemta-3.messagelabs.com id
	A1/D4-30903-281F8435; Sat, 12 Apr 2014 07:55:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1397289344!6539546!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27275 invoked from network); 12 Apr 2014 07:55:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	12 Apr 2014 07:55:45 -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 1WYsmu-0004nf-Kn
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmu-0005LL-Io
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:44 +0000
Date: Sat, 12 Apr 2014 07:55:44 +0000
Message-Id: <E1WYsmu-0005LL-Io@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86: fix determination of bit
	count for struct domain allocations
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 2bd02cd208f9e644409fb5a1041efc14f09426b0
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:39:08 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:39:08 2014 +0200

    x86: fix determination of bit count for struct domain allocations
    
    We can't just add in the hole shift value, as the hole may be at or
    above the 44-bit boundary. Instead we need to determine the total bit
    count until reaching 32 significant (not squashed out) bits in PFN
    representations.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: b3d2f8b2cba9fce5bc8995612d0d13fcefec7769
    master date: 2014-03-24 10:48:03 +0100
---
 xen/arch/x86/domain.c |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 2dfea87..fdf550f 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -181,6 +181,30 @@ void dump_pageframe_info(struct domain *d)
     spin_unlock(&d->page_alloc_lock);
 }
 
+/*
+ * The hole may be at or above the 44-bit boundary, so we need to determine
+ * the total bit count until reaching 32 significant (not squashed out) bits
+ * in PFN representations.
+ * Note that the way "bits" gets initialized/updated/bounds-checked guarantees
+ * that the function will never return zero, and hence will never be called
+ * more than once (which is important due to it being deliberately placed in
+ * .init.text).
+ */
+static unsigned int __init noinline _domain_struct_bits(void)
+{
+    unsigned int bits = 32 + PAGE_SHIFT;
+#ifdef __x86_64__
+    unsigned int sig = hweight32(~pfn_hole_mask);
+    unsigned int mask = pfn_hole_mask >> 32;
+
+    for ( ; bits < BITS_PER_LONG && sig < 32; ++bits, mask >>= 1 )
+        if ( !(mask & 1) )
+            ++sig;
+#endif
+
+    return bits;
+}
+
 struct domain *alloc_domain_struct(void)
 {
     struct domain *d;
@@ -188,11 +212,11 @@ struct domain *alloc_domain_struct(void)
      * We pack the PDX of the domain structure into a 32-bit field within
      * the page_info structure. Hence the MEMF_bits() restriction.
      */
-    unsigned int bits = 32 + PAGE_SHIFT;
+    static unsigned int __read_mostly bits;
+
+    if ( unlikely(!bits) )
+         bits = _domain_struct_bits();
 
-#ifdef __x86_64__
-    bits += pfn_pdx_hole_shift;
-#endif
     BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
     d = alloc_xenheap_pages(0, MEMF_bits(bits));
     if ( d != NULL )
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:55:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:55:48 +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 1WYsmy-0001tX-Sw; Sat, 12 Apr 2014 07:55:48 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmx-0001tF-Bc
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:47 +0000
Received: from [85.158.137.68:59417] by server-14.bemta-3.messagelabs.com id
	A1/D4-30903-281F8435; Sat, 12 Apr 2014 07:55:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-31.messagelabs.com!1397289344!6539546!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27275 invoked from network); 12 Apr 2014 07:55:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	12 Apr 2014 07:55:45 -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 1WYsmu-0004nf-Kn
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsmu-0005LL-Io
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:44 +0000
Date: Sat, 12 Apr 2014 07:55:44 +0000
Message-Id: <E1WYsmu-0005LL-Io@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86: fix determination of bit
	count for struct domain allocations
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 2bd02cd208f9e644409fb5a1041efc14f09426b0
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:39:08 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:39:08 2014 +0200

    x86: fix determination of bit count for struct domain allocations
    
    We can't just add in the hole shift value, as the hole may be at or
    above the 44-bit boundary. Instead we need to determine the total bit
    count until reaching 32 significant (not squashed out) bits in PFN
    representations.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    master commit: b3d2f8b2cba9fce5bc8995612d0d13fcefec7769
    master date: 2014-03-24 10:48:03 +0100
---
 xen/arch/x86/domain.c |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 2dfea87..fdf550f 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -181,6 +181,30 @@ void dump_pageframe_info(struct domain *d)
     spin_unlock(&d->page_alloc_lock);
 }
 
+/*
+ * The hole may be at or above the 44-bit boundary, so we need to determine
+ * the total bit count until reaching 32 significant (not squashed out) bits
+ * in PFN representations.
+ * Note that the way "bits" gets initialized/updated/bounds-checked guarantees
+ * that the function will never return zero, and hence will never be called
+ * more than once (which is important due to it being deliberately placed in
+ * .init.text).
+ */
+static unsigned int __init noinline _domain_struct_bits(void)
+{
+    unsigned int bits = 32 + PAGE_SHIFT;
+#ifdef __x86_64__
+    unsigned int sig = hweight32(~pfn_hole_mask);
+    unsigned int mask = pfn_hole_mask >> 32;
+
+    for ( ; bits < BITS_PER_LONG && sig < 32; ++bits, mask >>= 1 )
+        if ( !(mask & 1) )
+            ++sig;
+#endif
+
+    return bits;
+}
+
 struct domain *alloc_domain_struct(void)
 {
     struct domain *d;
@@ -188,11 +212,11 @@ struct domain *alloc_domain_struct(void)
      * We pack the PDX of the domain structure into a 32-bit field within
      * the page_info structure. Hence the MEMF_bits() restriction.
      */
-    unsigned int bits = 32 + PAGE_SHIFT;
+    static unsigned int __read_mostly bits;
+
+    if ( unlikely(!bits) )
+         bits = _domain_struct_bits();
 
-#ifdef __x86_64__
-    bits += pfn_pdx_hole_shift;
-#endif
     BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
     d = alloc_xenheap_pages(0, MEMF_bits(bits));
     if ( d != NULL )
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:56:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:56:00 +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 1WYsn9-0001vw-Vm; Sat, 12 Apr 2014 07:55:59 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsn8-0001vP-4V
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:58 +0000
Received: from [85.158.137.68:31571] by server-8.bemta-3.messagelabs.com id
	82/6A-21547-D81F8435; Sat, 12 Apr 2014 07:55:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397289355!6556726!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19775 invoked from network); 12 Apr 2014 07:55:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	12 Apr 2014 07:55:56 -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 1WYsn5-0004no-5E
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsn4-0005Lh-Nm
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:55 +0000
Date: Sat, 12 Apr 2014 07:55:54 +0000
Message-Id: <E1WYsn4-0005Lh-Nm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/HVM: correct CPUID leaf
	80000008 handling
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 83ed5a882495de9cee915614e30cbb22362061b4
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:40:09 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:40:09 2014 +0200

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: ef437690af8b75e6758dce77af75a22b63982883
    master date: 2014-03-28 13:33:34 +0100
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   25 +++++++++++++------------
 2 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index d2f8015..ed8ef64 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2748,6 +2748,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2781,8 +2783,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2799,7 +2799,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2813,6 +2813,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, &_eax, &_ebx, &_ecx, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, &_eax, &_ebx, &_ecx, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 1e84e35..a896a5d 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,11 +172,7 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -468,16 +464,21 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:56:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:56:00 +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 1WYsn9-0001vw-Vm; Sat, 12 Apr 2014 07:55:59 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsn8-0001vP-4V
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:58 +0000
Received: from [85.158.137.68:31571] by server-8.bemta-3.messagelabs.com id
	82/6A-21547-D81F8435; Sat, 12 Apr 2014 07:55:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397289355!6556726!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19775 invoked from network); 12 Apr 2014 07:55:56 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	12 Apr 2014 07:55:56 -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 1WYsn5-0004no-5E
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsn4-0005Lh-Nm
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:55:55 +0000
Date: Sat, 12 Apr 2014 07:55:54 +0000
Message-Id: <E1WYsn4-0005Lh-Nm@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/HVM: correct CPUID leaf
	80000008 handling
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 83ed5a882495de9cee915614e30cbb22362061b4
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:40:09 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:40:09 2014 +0200

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: ef437690af8b75e6758dce77af75a22b63982883
    master date: 2014-03-28 13:33:34 +0100
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   25 +++++++++++++------------
 2 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index d2f8015..ed8ef64 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2748,6 +2748,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2781,8 +2783,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2799,7 +2799,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2813,6 +2813,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, &_eax, &_ebx, &_ecx, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, &_eax, &_ebx, &_ecx, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 1e84e35..a896a5d 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,11 +172,7 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -468,16 +464,21 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:56:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:56:09 +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 1WYsnJ-0001xr-2P; Sat, 12 Apr 2014 07:56:09 +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 1WYsnH-0001xW-KP
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:07 +0000
Received: from [85.158.143.35:51286] by server-3.bemta-4.messagelabs.com id
	CE/03-13602-791F8435; Sat, 12 Apr 2014 07:56:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1397289365!8658031!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27642 invoked from network); 12 Apr 2014 07:56:06 -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;
	12 Apr 2014 07:56: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 1WYsnF-0004oN-B6
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsnF-0005Mw-8q
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:05 +0000
Date: Sat, 12 Apr 2014 07:56:05 +0000
Message-Id: <E1WYsnF-0005Mw-8q@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/EPT: relax treatment of APIC
	MFN
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 83b912e1e6e4fccf5dc3f576742b68a9412edd29
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:40:50 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:40:50 2014 +0200

    x86/EPT: relax treatment of APIC MFN
    
    There's no point in this being mapped UC by the guest due to using a
    respective PAT index - set the ignore-PAT flag to true.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: 1f8b57779785bf9f55c16312bb1ec679929c314b
    master date: 2014-03-28 13:43:25 +0100
---
 xen/arch/x86/hvm/mtrr.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index a896a5d..897ee05 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -711,8 +711,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     if ( direct_mmio )
-        return mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn
-               ? MTRR_TYPE_UNCACHABLE : MTRR_TYPE_WRBACK;
+    {
+        if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+            return MTRR_TYPE_UNCACHABLE;
+        *ipat = 1;
+        return MTRR_TYPE_WRBACK;
+    }
 
     if ( iommu_snoop )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:56:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:56:09 +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 1WYsnJ-0001xr-2P; Sat, 12 Apr 2014 07:56:09 +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 1WYsnH-0001xW-KP
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:07 +0000
Received: from [85.158.143.35:51286] by server-3.bemta-4.messagelabs.com id
	CE/03-13602-791F8435; Sat, 12 Apr 2014 07:56:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1397289365!8658031!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27642 invoked from network); 12 Apr 2014 07:56:06 -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;
	12 Apr 2014 07:56: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 1WYsnF-0004oN-B6
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsnF-0005Mw-8q
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:05 +0000
Date: Sat, 12 Apr 2014 07:56:05 +0000
Message-Id: <E1WYsnF-0005Mw-8q@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] x86/EPT: relax treatment of APIC
	MFN
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 83b912e1e6e4fccf5dc3f576742b68a9412edd29
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:40:50 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:40:50 2014 +0200

    x86/EPT: relax treatment of APIC MFN
    
    There's no point in this being mapped UC by the guest due to using a
    respective PAT index - set the ignore-PAT flag to true.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: 1f8b57779785bf9f55c16312bb1ec679929c314b
    master date: 2014-03-28 13:43:25 +0100
---
 xen/arch/x86/hvm/mtrr.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index a896a5d..897ee05 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -711,8 +711,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     if ( direct_mmio )
-        return mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn
-               ? MTRR_TYPE_UNCACHABLE : MTRR_TYPE_WRBACK;
+    {
+        if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+            return MTRR_TYPE_UNCACHABLE;
+        *ipat = 1;
+        return MTRR_TYPE_WRBACK;
+    }
 
     if ( iommu_snoop )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:56:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:56: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 1WYsnT-0001zU-58; Sat, 12 Apr 2014 07:56:19 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsnS-0001zI-2i
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:18 +0000
Received: from [193.109.254.147:31939] by server-2.bemta-14.messagelabs.com id
	9B/0E-21684-1A1F8435; Sat, 12 Apr 2014 07:56:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1397289375!7889625!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14089 invoked from network); 12 Apr 2014 07:56:16 -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;
	12 Apr 2014 07:56:16 -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 1WYsnP-0004oR-G9
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsnP-0005NK-Dy
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:15 +0000
Date: Sat, 12 Apr 2014 07:56:15 +0000
Message-Id: <E1WYsnP-0005NK-Dy@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] VMX: fix PAT value seen by guest
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 9811c9bc85e648859f3a48478640ce2c696c9d06
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:52:21 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:52:21 2014 +0200

    VMX: fix PAT value seen by guest
    
    The XSA-60 fixes introduced a window during which the guest PAT gets
    forced to all zeros. This shouldn't be visible to the guest. Therefore
    we need to intercept PAT MSR accesses during that time period.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: fce79f8ce91dc45f3a4d699ee67c49e6cbeb1197
    master date: 2014-04-01 16:49:18 +0200
---
 xen/arch/x86/hvm/vmx/vmcs.c        |   26 ++++++++++++++++++++++++++
 xen/arch/x86/hvm/vmx/vmx.c         |    3 +++
 xen/include/asm-x86/hvm/vmx/vmcs.h |    1 +
 3 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 6042dd1..b09e8d7 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -682,6 +682,32 @@ void vmx_disable_intercept_for_msr(struct vcpu *v, u32 msr)
     }
 }
 
+void vmx_enable_intercept_for_msr(struct vcpu *v, u32 msr)
+{
+    unsigned long *msr_bitmap = v->arch.hvm_vmx.msr_bitmap;
+
+    /* VMX MSR bitmap supported? */
+    if ( msr_bitmap == NULL )
+        return;
+
+    /*
+     * See Intel PRM Vol. 3, 20.6.9 (MSR-Bitmap Address). Early manuals
+     * have the write-low and read-high bitmap offsets the wrong way round.
+     * We can control MSRs 0x00000000-0x00001fff and 0xc0000000-0xc0001fff.
+     */
+    if ( msr <= 0x1fff )
+    {
+        set_bit(msr, msr_bitmap + 0x000/BYTES_PER_LONG); /* read-low */
+        set_bit(msr, msr_bitmap + 0x800/BYTES_PER_LONG); /* write-low */
+    }
+    else if ( (msr >= 0xc0000000) && (msr <= 0xc0001fff) )
+    {
+        msr &= 0x1fff;
+        set_bit(msr, msr_bitmap + 0x400/BYTES_PER_LONG); /* read-high */
+        set_bit(msr, msr_bitmap + 0xc00/BYTES_PER_LONG); /* write-high */
+    }
+}
+
 /*
  * Switch VMCS between layer 1 & 2 guest
  */
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 1bf0297..ec85b8d 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1033,6 +1033,7 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
 
             vmx_get_guest_pat(v, pat);
             vmx_set_guest_pat(v, uc_pat);
+            vmx_enable_intercept_for_msr(v, MSR_IA32_CR_PAT);
 
             wbinvd();               /* flush possibly polluted cache */
             hvm_asid_flush_vcpu(v); /* invalidate memory type cached in TLB */
@@ -1042,6 +1043,8 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
         {
             v->arch.hvm_vcpu.cache_mode = NORMAL_CACHE_MODE;
             vmx_set_guest_pat(v, *pat);
+            if ( !iommu_enabled || iommu_snoop )
+                vmx_disable_intercept_for_msr(v, MSR_IA32_CR_PAT);
             hvm_asid_flush_vcpu(v); /* no need to flush cache */
         }
     }
diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h
index 7c51b49..ad11057 100644
--- a/xen/include/asm-x86/hvm/vmx/vmcs.h
+++ b/xen/include/asm-x86/hvm/vmx/vmcs.h
@@ -391,6 +391,7 @@ enum vmcs_field {
 #define VMCS_VPID_WIDTH 16
 
 void vmx_disable_intercept_for_msr(struct vcpu *v, u32 msr);
+void vmx_enable_intercept_for_msr(struct vcpu *v, u32 msr);
 int vmx_read_guest_msr(u32 msr, u64 *val);
 int vmx_write_guest_msr(u32 msr, u64 val);
 int vmx_add_guest_msr(u32 msr);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 07:56:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 07:56: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 1WYsnT-0001zU-58; Sat, 12 Apr 2014 07:56:19 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsnS-0001zI-2i
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:18 +0000
Received: from [193.109.254.147:31939] by server-2.bemta-14.messagelabs.com id
	9B/0E-21684-1A1F8435; Sat, 12 Apr 2014 07:56:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1397289375!7889625!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14089 invoked from network); 12 Apr 2014 07:56:16 -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;
	12 Apr 2014 07:56:16 -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 1WYsnP-0004oR-G9
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYsnP-0005NK-Dy
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 07:56:15 +0000
Date: Sat, 12 Apr 2014 07:56:15 +0000
Message-Id: <E1WYsnP-0005NK-Dy@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.2] VMX: fix PAT value seen by guest
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 9811c9bc85e648859f3a48478640ce2c696c9d06
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:52:21 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:52:21 2014 +0200

    VMX: fix PAT value seen by guest
    
    The XSA-60 fixes introduced a window during which the guest PAT gets
    forced to all zeros. This shouldn't be visible to the guest. Therefore
    we need to intercept PAT MSR accesses during that time period.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Liu Jinsong <jinsong.liu@intel.com>
    master commit: fce79f8ce91dc45f3a4d699ee67c49e6cbeb1197
    master date: 2014-04-01 16:49:18 +0200
---
 xen/arch/x86/hvm/vmx/vmcs.c        |   26 ++++++++++++++++++++++++++
 xen/arch/x86/hvm/vmx/vmx.c         |    3 +++
 xen/include/asm-x86/hvm/vmx/vmcs.h |    1 +
 3 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
index 6042dd1..b09e8d7 100644
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -682,6 +682,32 @@ void vmx_disable_intercept_for_msr(struct vcpu *v, u32 msr)
     }
 }
 
+void vmx_enable_intercept_for_msr(struct vcpu *v, u32 msr)
+{
+    unsigned long *msr_bitmap = v->arch.hvm_vmx.msr_bitmap;
+
+    /* VMX MSR bitmap supported? */
+    if ( msr_bitmap == NULL )
+        return;
+
+    /*
+     * See Intel PRM Vol. 3, 20.6.9 (MSR-Bitmap Address). Early manuals
+     * have the write-low and read-high bitmap offsets the wrong way round.
+     * We can control MSRs 0x00000000-0x00001fff and 0xc0000000-0xc0001fff.
+     */
+    if ( msr <= 0x1fff )
+    {
+        set_bit(msr, msr_bitmap + 0x000/BYTES_PER_LONG); /* read-low */
+        set_bit(msr, msr_bitmap + 0x800/BYTES_PER_LONG); /* write-low */
+    }
+    else if ( (msr >= 0xc0000000) && (msr <= 0xc0001fff) )
+    {
+        msr &= 0x1fff;
+        set_bit(msr, msr_bitmap + 0x400/BYTES_PER_LONG); /* read-high */
+        set_bit(msr, msr_bitmap + 0xc00/BYTES_PER_LONG); /* write-high */
+    }
+}
+
 /*
  * Switch VMCS between layer 1 & 2 guest
  */
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 1bf0297..ec85b8d 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1033,6 +1033,7 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
 
             vmx_get_guest_pat(v, pat);
             vmx_set_guest_pat(v, uc_pat);
+            vmx_enable_intercept_for_msr(v, MSR_IA32_CR_PAT);
 
             wbinvd();               /* flush possibly polluted cache */
             hvm_asid_flush_vcpu(v); /* invalidate memory type cached in TLB */
@@ -1042,6 +1043,8 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
         {
             v->arch.hvm_vcpu.cache_mode = NORMAL_CACHE_MODE;
             vmx_set_guest_pat(v, *pat);
+            if ( !iommu_enabled || iommu_snoop )
+                vmx_disable_intercept_for_msr(v, MSR_IA32_CR_PAT);
             hvm_asid_flush_vcpu(v); /* no need to flush cache */
         }
     }
diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h
index 7c51b49..ad11057 100644
--- a/xen/include/asm-x86/hvm/vmx/vmcs.h
+++ b/xen/include/asm-x86/hvm/vmx/vmcs.h
@@ -391,6 +391,7 @@ enum vmcs_field {
 #define VMCS_VPID_WIDTH 16
 
 void vmx_disable_intercept_for_msr(struct vcpu *v, u32 msr);
+void vmx_enable_intercept_for_msr(struct vcpu *v, u32 msr);
 int vmx_read_guest_msr(u32 msr, u64 *val);
 int vmx_write_guest_msr(u32 msr, u64 val);
 int vmx_add_guest_msr(u32 msr);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 11:22:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 11: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 1WYw0d-0004Bh-9P; Sat, 12 Apr 2014 11:22:07 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYw0c-0004BZ-C0
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 11:22:06 +0000
Received: from [85.158.139.211:33602] by server-2.bemta-5.messagelabs.com id
	9C/12-12074-DD129435; Sat, 12 Apr 2014 11:22:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1397301723!7125304!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2197 invoked from network); 12 Apr 2014 11:22:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	12 Apr 2014 11:22: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 1WYw0Z-0007MC-Ak
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 11:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYw0Y-0002ue-Rg
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 11:22:02 +0000
Date: Sat, 12 Apr 2014 11:22:02 +0000
Message-Id: <E1WYw0Y-0002ue-Rg@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/HVM: correct CPUID leaf
	80000008 handling
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 6c733e549889a9b8c4e03140348b8e00241d4ce9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:24:43 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:24:43 2014 +0200

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: ef437690af8b75e6758dce77af75a22b63982883
    master date: 2014-03-28 13:33:34 +0100
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   25 +++++++++++++------------
 2 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index a3a2c32..ac3df56 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2810,6 +2810,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2843,8 +2845,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2861,7 +2861,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2875,6 +2875,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, &_eax, &_ebx, &_ecx, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, &_eax, &_ebx, &_ecx, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index aac80cc..243fa8b 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,11 +172,7 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -468,16 +464,21 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Sat Apr 12 11:22:19 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Sat, 12 Apr 2014 11: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 1WYw0d-0004Bh-9P; Sat, 12 Apr 2014 11:22:07 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYw0c-0004BZ-C0
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 11:22:06 +0000
Received: from [85.158.139.211:33602] by server-2.bemta-5.messagelabs.com id
	9C/12-12074-DD129435; Sat, 12 Apr 2014 11:22:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1397301723!7125304!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2197 invoked from network); 12 Apr 2014 11:22:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	12 Apr 2014 11:22: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 1WYw0Z-0007MC-Ak
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 11:22:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WYw0Y-0002ue-Rg
	for xen-changelog@lists.xensource.com; Sat, 12 Apr 2014 11:22:02 +0000
Date: Sat, 12 Apr 2014 11:22:02 +0000
Message-Id: <E1WYw0Y-0002ue-Rg@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen stable-4.3] x86/HVM: correct CPUID leaf
	80000008 handling
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 6c733e549889a9b8c4e03140348b8e00241d4ce9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 11:24:43 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 11:24:43 2014 +0200

    x86/HVM: correct CPUID leaf 80000008 handling
    
    CPUID[80000008].EAX[23:16] have been given the meaning of the guest
    physical address restriction (in case it needs to be smaller than the
    host's), hence we need to mirror that into vCPUID[80000008].EAX[7:0].
    
    Enforce a lower limit at the same time, as well as a fixed value for
    the virtual address bits, and zero for the guest physical address ones.
    
    In order for the vMTRR code to see these overrides we need to make it
    call hvm_cpuid() instead of domain_cpuid(), which in turn requires
    special casing (and relaxing) the controlling domain.
    
    This additionally should hide an ordering problem in the tools: Both
    xend and xl appear to be restoring a guest from its image before
    setting up the CPUID policy in the hypervisor, resulting in
    domain_cpuid() returning all zeros and hence the check in
    mtrr_var_range_msr_set() failing if the guest previously had more than
    the minimum 36 physical address bits.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    master commit: ef437690af8b75e6758dce77af75a22b63982883
    master date: 2014-03-28 13:33:34 +0100
---
 xen/arch/x86/hvm/hvm.c  |   23 ++++++++++++++++++++---
 xen/arch/x86/hvm/mtrr.c |   25 +++++++++++++------------
 2 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index a3a2c32..ac3df56 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2810,6 +2810,8 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
 
     switch ( input )
     {
+        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
+
     case 0x1:
         /* Fix up VLAPIC details. */
         *ebx &= 0x00FFFFFFu;
@@ -2843,8 +2845,6 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         *edx = v->vcpu_id * 2;
         break;
     case 0xd:
-    {
-        unsigned int sub_leaf, _eax, _ebx, _ecx, _edx;
         /* EBX value of main leaf 0 depends on enabled xsave features */
         if ( count == 0 && v->arch.xcr0 ) 
         {
@@ -2861,7 +2861,7 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
             }
         }
         break;
-    }
+
     case 0x80000001:
         /* We expose RDTSCP feature to guest only when
            tsc_mode == TSC_MODE_DEFAULT and host_tsc_is_safe() returns 1 */
@@ -2875,6 +2875,23 @@ void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
         if ( !(hvm_pae_enabled(v) || hvm_long_mode_enabled(v)) )
             *edx &= ~cpufeat_mask(X86_FEATURE_PSE36);
         break;
+
+    case 0x80000008:
+        count = cpuid_eax(0x80000008);
+        count = (count >> 16) & 0xff ?: count & 0xff;
+        if ( (*eax & 0xff) > count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(1, &_eax, &_ebx, &_ecx, &_edx);
+        count = _edx & (cpufeat_mask(X86_FEATURE_PAE) |
+                        cpufeat_mask(X86_FEATURE_PSE36)) ? 36 : 32;
+        if ( (*eax & 0xff) < count )
+            *eax = (*eax & ~0xff) | count;
+
+        hvm_cpuid(0x80000001, &_eax, &_ebx, &_ecx, &_edx);
+        *eax = (*eax & ~0xffff00) | (_edx & cpufeat_mask(X86_FEATURE_LM)
+                                     ? 0x3000 : 0x2000);
+        break;
     }
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index aac80cc..243fa8b 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -145,7 +145,7 @@ bool_t is_var_mtrr_overlapped(struct mtrr_state *m)
 
 static int hvm_mtrr_pat_init(void)
 {
-    unsigned int i, j, phys_addr;
+    unsigned int i, j;
 
     memset(&mtrr_epat_tbl, INVALID_MEM_TYPE, sizeof(mtrr_epat_tbl));
     for ( i = 0; i < MTRR_NUM_TYPES; i++ )
@@ -172,11 +172,7 @@ static int hvm_mtrr_pat_init(void)
         }
     }
 
-    phys_addr = 36;
-    if ( cpuid_eax(0x80000000) >= 0x80000008 )
-        phys_addr = (uint8_t)cpuid_eax(0x80000008);
-
-    size_or_mask = ~((1 << (phys_addr - PAGE_SHIFT)) - 1);
+    size_or_mask = ~((1 << (paddr_bits - PAGE_SHIFT)) - 1);
 
     return 0;
 }
@@ -468,16 +464,21 @@ bool_t mtrr_var_range_msr_set(
                     type == 4 || type == 5 || type == 6)) )
         return 0;
 
-    phys_addr = 36;
-    domain_cpuid(d, 0x80000000, 0, &eax, &ebx, &ecx, &edx);
-    if ( eax >= 0x80000008 )
+    if ( d == current->domain )
     {
-        domain_cpuid(d, 0x80000008, 0, &eax, &ebx, &ecx, &edx);
-        phys_addr = (uint8_t)eax;
+        phys_addr = 36;
+        hvm_cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
+        if ( eax >= 0x80000008 )
+        {
+            hvm_cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
+            phys_addr = (uint8_t)eax;
+        }
     }
+    else
+        phys_addr = paddr_bits;
     msr_mask = ~((((uint64_t)1) << phys_addr) - 1);
     msr_mask |= (index & 1) ? 0x7ffUL : 0xf00UL;
-    if ( unlikely(msr_content && (msr_content & msr_mask)) )
+    if ( unlikely(msr_content & msr_mask) )
     {
         HVM_DBG_LOG(DBG_LEVEL_MSR, "invalid msr content:%"PRIx64"\n",
                     msr_content);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:55:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:55:56 +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 1WaNVJ-00063K-Nb; Wed, 16 Apr 2014 10:55:45 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNV7-00062K-4v
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:39 +0000
Received: from [193.109.254.147:27369] by server-5.bemta-14.messagelabs.com id
	BC/62-26413-4A16E435; Wed, 16 Apr 2014 10:55:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-27.messagelabs.com!1397645730!8654495!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32744 invoked from network); 16 Apr 2014 10:55:31 -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;
	16 Apr 2014 10:55:31 -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 1WaNV4-0000bH-6f
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:30 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNV4-0000Ft-1X
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:30 +0000
Date: Wed, 16 Apr 2014 10:55:30 +0000
Message-Id: <E1WaNV4-0000Ft-1X@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: move PIRQ EOI map fields to
	arch_domain
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="===============2969945882595223728=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============2969945882595223728==
Content-Type: text/plain

commit bd04059b1179df29c431e7cba17000052ea8e15c
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Wed Apr 9 12:18:10 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 12:18:10 2014 +0200

    x86: move PIRQ EOI map fields to arch_domain
    
    This is done so PVH guests can use PHYSDEVOP_pirq_eoi_gmfn_v{1/2}.
    Update users of this fields, to reflect that this has been moved and
    it is now also available to other kind of guests.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    
    Move auto_unmask ahead of the other two fields, to reduce padding.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/domain.c        |   15 +++++++--------
 xen/arch/x86/hvm/hvm.c       |    6 ------
 xen/arch/x86/irq.c           |    8 ++++----
 xen/arch/x86/physdev.c       |   13 ++++++-------
 xen/include/asm-x86/domain.h |   14 +++++++-------
 5 files changed, 24 insertions(+), 32 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 796b775..8d9c883 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1934,15 +1934,14 @@ int domain_relinquish_resources(struct domain *d)
                  */
                 destroy_gdt(v);
             }
+        }
 
-            if ( d->arch.pv_domain.pirq_eoi_map != NULL )
-            {
-                unmap_domain_page_global(d->arch.pv_domain.pirq_eoi_map);
-                put_page_and_type(
-                    mfn_to_page(d->arch.pv_domain.pirq_eoi_map_mfn));
-                d->arch.pv_domain.pirq_eoi_map = NULL;
-                d->arch.pv_domain.auto_unmask = 0;
-            }
+        if ( d->arch.pirq_eoi_map != NULL )
+        {
+            unmap_domain_page_global(d->arch.pirq_eoi_map);
+            put_page_and_type(mfn_to_page(d->arch.pirq_eoi_map_mfn));
+            d->arch.pirq_eoi_map = NULL;
+            d->arch.auto_unmask = 0;
         }
 
         d->arch.relmem = RELMEM_shared;
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 38c491e..8c3797e 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3446,12 +3446,6 @@ static long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case PHYSDEVOP_irq_status_query:
     case PHYSDEVOP_get_free_pirq:
         return do_physdev_op(cmd, arg);
-
-    /* pvh fixme: coming soon */
-    case PHYSDEVOP_pirq_eoi_gmfn_v1:
-    case PHYSDEVOP_pirq_eoi_gmfn_v2:
-        return -ENOSYS;
-
     }
 }
 
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 88444be..60b1a506 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1068,14 +1068,14 @@ bool_t cpu_has_pending_apic_eoi(void)
 
 static inline void set_pirq_eoi(struct domain *d, unsigned int irq)
 {
-    if ( is_pv_domain(d) && d->arch.pv_domain.pirq_eoi_map )
-        set_bit(irq, d->arch.pv_domain.pirq_eoi_map);
+    if ( d->arch.pirq_eoi_map )
+        set_bit(irq, d->arch.pirq_eoi_map);
 }
 
 static inline void clear_pirq_eoi(struct domain *d, unsigned int irq)
 {
-    if ( is_pv_domain(d) && d->arch.pv_domain.pirq_eoi_map )
-        clear_bit(irq, d->arch.pv_domain.pirq_eoi_map);
+    if ( d->arch.pirq_eoi_map )
+        clear_bit(irq, d->arch.pirq_eoi_map);
 }
 
 static void set_eoi_ready(void *data);
diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index bc0634c..f178315 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -310,8 +310,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             spin_unlock(&v->domain->event_lock);
             break;
         }
-        if ( is_pv_domain(v->domain) &&
-             v->domain->arch.pv_domain.auto_unmask )
+        if ( v->domain->arch.auto_unmask )
             evtchn_unmask(pirq->evtchn);
         if ( is_pv_domain(v->domain) ||
              domain_pirq_to_irq(v->domain, eoi.irq) > 0 )
@@ -354,7 +353,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         }
         mfn = page_to_mfn(page);
 
-        if ( cmpxchg(&v->domain->arch.pv_domain.pirq_eoi_map_mfn,
+        if ( cmpxchg(&v->domain->arch.pirq_eoi_map_mfn,
                      0, mfn) != 0 )
         {
             put_page_and_type(mfn_to_page(mfn));
@@ -362,16 +361,16 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             break;
         }
 
-        v->domain->arch.pv_domain.pirq_eoi_map = map_domain_page_global(mfn);
-        if ( v->domain->arch.pv_domain.pirq_eoi_map == NULL )
+        v->domain->arch.pirq_eoi_map = map_domain_page_global(mfn);
+        if ( v->domain->arch.pirq_eoi_map == NULL )
         {
-            v->domain->arch.pv_domain.pirq_eoi_map_mfn = 0;
+            v->domain->arch.pirq_eoi_map_mfn = 0;
             put_page_and_type(mfn_to_page(mfn));
             ret = -ENOSPC;
             break;
         }
         if ( cmd == PHYSDEVOP_pirq_eoi_gmfn_v1 )
-            v->domain->arch.pv_domain.auto_unmask = 1;
+            v->domain->arch.auto_unmask = 1;
 
         ret = 0;
         break;
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 4ff89f0..bb28fc4 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -225,13 +225,6 @@ struct pv_domain
 {
     l1_pgentry_t **gdt_ldt_l1tab;
 
-    /* Shared page for notifying that explicit PIRQ EOI is required. */
-    unsigned long *pirq_eoi_map;
-    unsigned long pirq_eoi_map_mfn;
-    /* set auto_unmask to 1 if you want PHYSDEVOP_eoi to automatically
-     * unmask the event channel */
-    bool_t auto_unmask;
-
     /* map_domain_page() mapping cache. */
     struct mapcache_domain mapcache;
 };
@@ -313,6 +306,13 @@ struct arch_domain
     spinlock_t e820_lock;
     struct e820entry *e820;
     unsigned int nr_e820;
+
+    /* set auto_unmask to 1 if you want PHYSDEVOP_eoi to automatically
+     * unmask the event channel */
+    bool_t auto_unmask;
+    /* Shared page for notifying that explicit PIRQ EOI is required. */
+    unsigned long *pirq_eoi_map;
+    unsigned long pirq_eoi_map_mfn;
 } __cacheline_aligned;
 
 #define has_arch_pdevs(d)    (!list_empty(&(d)->arch.pdev_list))
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============2969945882595223728==
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
--===============2969945882595223728==--

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:55:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:55:56 +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 1WaNVI-00063B-9l; Wed, 16 Apr 2014 10:55:44 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNUm-00062H-UH
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:39 +0000
Received: from [85.158.139.211:45028] by server-4.bemta-5.messagelabs.com id
	80/BA-30750-0916E435; Wed, 16 Apr 2014 10:55:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1397645710!6008251!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18321 invoked from network); 16 Apr 2014 10:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:55:11 -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 1WaNUj-0000b9-Mh
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNUe-0000EO-51
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:04 +0000
Date: Wed, 16 Apr 2014 10:55:04 +0000
Message-Id: <E1WaNUe-0000EO-51@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: add emacs local variables to
	a couple of 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

commit 464451e3b2184c755d0c68543873ffa410b1e874
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Wed Apr 9 12:15:35 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 12:15:35 2014 +0200

    x86/HVM: add emacs local variables to a couple of files
    
    This is per CODING_STYLE.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
---
 xen/arch/x86/hvm/hpet.c   |    9 +++++++++
 xen/arch/x86/hvm/i8254.c  |    9 +++++++++
 xen/arch/x86/hvm/rtc.c    |    9 +++++++++
 xen/arch/x86/hvm/vlapic.c |    9 +++++++++
 xen/arch/x86/hvm/vpic.c   |    9 +++++++++
 5 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/hpet.c b/xen/arch/x86/hvm/hpet.c
index 4324b52..e1e769a 100644
--- a/xen/arch/x86/hvm/hpet.c
+++ b/xen/arch/x86/hvm/hpet.c
@@ -622,3 +622,12 @@ void hpet_reset(struct domain *d)
     hpet_deinit(d);
     hpet_init(d->vcpu[0]);
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index f7493b8..6e66b49 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -556,3 +556,12 @@ int pv_pit_handler(int port, int data, int write)
 
     return !write ? ioreq.data : 0;
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 639b4c5..7cd0cf4 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -827,3 +827,12 @@ void rtc_update_clock(struct domain *d)
     s->current_tm = gmtime(get_localtime(d));
     spin_unlock(&s->lock);
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index bc06010..fc307c0 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -1279,3 +1279,12 @@ void vlapic_destroy(struct vcpu *v)
     unmap_domain_page_global(vlapic->regs);
     free_domheap_page(vlapic->regs_page);
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index fea3f68..5ca513c 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -473,3 +473,12 @@ int vpic_ack_pending_irq(struct vcpu *v)
     vector = vpic[irq >> 3].irq_base + (irq & 7);
     return vector;
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:55:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:55:56 +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 1WaNVI-00063B-9l; Wed, 16 Apr 2014 10:55:44 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNUm-00062H-UH
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:39 +0000
Received: from [85.158.139.211:45028] by server-4.bemta-5.messagelabs.com id
	80/BA-30750-0916E435; Wed, 16 Apr 2014 10:55:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1397645710!6008251!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18321 invoked from network); 16 Apr 2014 10:55:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:55:11 -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 1WaNUj-0000b9-Mh
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNUe-0000EO-51
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:04 +0000
Date: Wed, 16 Apr 2014 10:55:04 +0000
Message-Id: <E1WaNUe-0000EO-51@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: add emacs local variables to
	a couple of 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

commit 464451e3b2184c755d0c68543873ffa410b1e874
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Wed Apr 9 12:15:35 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 12:15:35 2014 +0200

    x86/HVM: add emacs local variables to a couple of files
    
    This is per CODING_STYLE.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
---
 xen/arch/x86/hvm/hpet.c   |    9 +++++++++
 xen/arch/x86/hvm/i8254.c  |    9 +++++++++
 xen/arch/x86/hvm/rtc.c    |    9 +++++++++
 xen/arch/x86/hvm/vlapic.c |    9 +++++++++
 xen/arch/x86/hvm/vpic.c   |    9 +++++++++
 5 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/hpet.c b/xen/arch/x86/hvm/hpet.c
index 4324b52..e1e769a 100644
--- a/xen/arch/x86/hvm/hpet.c
+++ b/xen/arch/x86/hvm/hpet.c
@@ -622,3 +622,12 @@ void hpet_reset(struct domain *d)
     hpet_deinit(d);
     hpet_init(d->vcpu[0]);
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index f7493b8..6e66b49 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -556,3 +556,12 @@ int pv_pit_handler(int port, int data, int write)
 
     return !write ? ioreq.data : 0;
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 639b4c5..7cd0cf4 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -827,3 +827,12 @@ void rtc_update_clock(struct domain *d)
     s->current_tm = gmtime(get_localtime(d));
     spin_unlock(&s->lock);
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index bc06010..fc307c0 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -1279,3 +1279,12 @@ void vlapic_destroy(struct vcpu *v)
     unmap_domain_page_global(vlapic->regs);
     free_domheap_page(vlapic->regs_page);
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index fea3f68..5ca513c 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -473,3 +473,12 @@ int vpic_ack_pending_irq(struct vcpu *v)
     vector = vpic[irq >> 3].irq_base + (irq & 7);
     return vector;
 }
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:55:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:55:56 +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 1WaNVJ-00063K-Nb; Wed, 16 Apr 2014 10:55:45 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNV7-00062K-4v
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:39 +0000
Received: from [193.109.254.147:27369] by server-5.bemta-14.messagelabs.com id
	BC/62-26413-4A16E435; Wed, 16 Apr 2014 10:55:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-27.messagelabs.com!1397645730!8654495!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 32744 invoked from network); 16 Apr 2014 10:55:31 -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;
	16 Apr 2014 10:55:31 -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 1WaNV4-0000bH-6f
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:30 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNV4-0000Ft-1X
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:30 +0000
Date: Wed, 16 Apr 2014 10:55:30 +0000
Message-Id: <E1WaNV4-0000Ft-1X@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: move PIRQ EOI map fields to
	arch_domain
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="===============2969945882595223728=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============2969945882595223728==
Content-Type: text/plain

commit bd04059b1179df29c431e7cba17000052ea8e15c
Author:     Roger Pau Monné <roger.pau@citrix.com>
AuthorDate: Wed Apr 9 12:18:10 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 12:18:10 2014 +0200

    x86: move PIRQ EOI map fields to arch_domain
    
    This is done so PVH guests can use PHYSDEVOP_pirq_eoi_gmfn_v{1/2}.
    Update users of this fields, to reflect that this has been moved and
    it is now also available to other kind of guests.
    
    Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
    
    Move auto_unmask ahead of the other two fields, to reduce padding.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/domain.c        |   15 +++++++--------
 xen/arch/x86/hvm/hvm.c       |    6 ------
 xen/arch/x86/irq.c           |    8 ++++----
 xen/arch/x86/physdev.c       |   13 ++++++-------
 xen/include/asm-x86/domain.h |   14 +++++++-------
 5 files changed, 24 insertions(+), 32 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 796b775..8d9c883 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1934,15 +1934,14 @@ int domain_relinquish_resources(struct domain *d)
                  */
                 destroy_gdt(v);
             }
+        }
 
-            if ( d->arch.pv_domain.pirq_eoi_map != NULL )
-            {
-                unmap_domain_page_global(d->arch.pv_domain.pirq_eoi_map);
-                put_page_and_type(
-                    mfn_to_page(d->arch.pv_domain.pirq_eoi_map_mfn));
-                d->arch.pv_domain.pirq_eoi_map = NULL;
-                d->arch.pv_domain.auto_unmask = 0;
-            }
+        if ( d->arch.pirq_eoi_map != NULL )
+        {
+            unmap_domain_page_global(d->arch.pirq_eoi_map);
+            put_page_and_type(mfn_to_page(d->arch.pirq_eoi_map_mfn));
+            d->arch.pirq_eoi_map = NULL;
+            d->arch.auto_unmask = 0;
         }
 
         d->arch.relmem = RELMEM_shared;
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 38c491e..8c3797e 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3446,12 +3446,6 @@ static long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case PHYSDEVOP_irq_status_query:
     case PHYSDEVOP_get_free_pirq:
         return do_physdev_op(cmd, arg);
-
-    /* pvh fixme: coming soon */
-    case PHYSDEVOP_pirq_eoi_gmfn_v1:
-    case PHYSDEVOP_pirq_eoi_gmfn_v2:
-        return -ENOSYS;
-
     }
 }
 
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 88444be..60b1a506 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -1068,14 +1068,14 @@ bool_t cpu_has_pending_apic_eoi(void)
 
 static inline void set_pirq_eoi(struct domain *d, unsigned int irq)
 {
-    if ( is_pv_domain(d) && d->arch.pv_domain.pirq_eoi_map )
-        set_bit(irq, d->arch.pv_domain.pirq_eoi_map);
+    if ( d->arch.pirq_eoi_map )
+        set_bit(irq, d->arch.pirq_eoi_map);
 }
 
 static inline void clear_pirq_eoi(struct domain *d, unsigned int irq)
 {
-    if ( is_pv_domain(d) && d->arch.pv_domain.pirq_eoi_map )
-        clear_bit(irq, d->arch.pv_domain.pirq_eoi_map);
+    if ( d->arch.pirq_eoi_map )
+        clear_bit(irq, d->arch.pirq_eoi_map);
 }
 
 static void set_eoi_ready(void *data);
diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index bc0634c..f178315 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -310,8 +310,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             spin_unlock(&v->domain->event_lock);
             break;
         }
-        if ( is_pv_domain(v->domain) &&
-             v->domain->arch.pv_domain.auto_unmask )
+        if ( v->domain->arch.auto_unmask )
             evtchn_unmask(pirq->evtchn);
         if ( is_pv_domain(v->domain) ||
              domain_pirq_to_irq(v->domain, eoi.irq) > 0 )
@@ -354,7 +353,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         }
         mfn = page_to_mfn(page);
 
-        if ( cmpxchg(&v->domain->arch.pv_domain.pirq_eoi_map_mfn,
+        if ( cmpxchg(&v->domain->arch.pirq_eoi_map_mfn,
                      0, mfn) != 0 )
         {
             put_page_and_type(mfn_to_page(mfn));
@@ -362,16 +361,16 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
             break;
         }
 
-        v->domain->arch.pv_domain.pirq_eoi_map = map_domain_page_global(mfn);
-        if ( v->domain->arch.pv_domain.pirq_eoi_map == NULL )
+        v->domain->arch.pirq_eoi_map = map_domain_page_global(mfn);
+        if ( v->domain->arch.pirq_eoi_map == NULL )
         {
-            v->domain->arch.pv_domain.pirq_eoi_map_mfn = 0;
+            v->domain->arch.pirq_eoi_map_mfn = 0;
             put_page_and_type(mfn_to_page(mfn));
             ret = -ENOSPC;
             break;
         }
         if ( cmd == PHYSDEVOP_pirq_eoi_gmfn_v1 )
-            v->domain->arch.pv_domain.auto_unmask = 1;
+            v->domain->arch.auto_unmask = 1;
 
         ret = 0;
         break;
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 4ff89f0..bb28fc4 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -225,13 +225,6 @@ struct pv_domain
 {
     l1_pgentry_t **gdt_ldt_l1tab;
 
-    /* Shared page for notifying that explicit PIRQ EOI is required. */
-    unsigned long *pirq_eoi_map;
-    unsigned long pirq_eoi_map_mfn;
-    /* set auto_unmask to 1 if you want PHYSDEVOP_eoi to automatically
-     * unmask the event channel */
-    bool_t auto_unmask;
-
     /* map_domain_page() mapping cache. */
     struct mapcache_domain mapcache;
 };
@@ -313,6 +306,13 @@ struct arch_domain
     spinlock_t e820_lock;
     struct e820entry *e820;
     unsigned int nr_e820;
+
+    /* set auto_unmask to 1 if you want PHYSDEVOP_eoi to automatically
+     * unmask the event channel */
+    bool_t auto_unmask;
+    /* Shared page for notifying that explicit PIRQ EOI is required. */
+    unsigned long *pirq_eoi_map;
+    unsigned long pirq_eoi_map_mfn;
 } __cacheline_aligned;
 
 #define has_arch_pdevs(d)    (!list_empty(&(d)->arch.pdev_list))
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============2969945882595223728==
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
--===============2969945882595223728==--

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:55:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:55:58 +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 1WaNVM-00063w-5u; Wed, 16 Apr 2014 10:55:48 +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 1WaNV0-00062I-9b
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:39 +0000
Received: from [85.158.143.35:21314] by server-3.bemta-4.messagelabs.com id
	C9/1C-13602-D916E435; Wed, 16 Apr 2014 10:55:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1397645720!9464073!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13305 invoked from network); 16 Apr 2014 10:55:21 -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;
	16 Apr 2014 10:55:21 -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 1WaNUt-0000bC-SB
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNUt-0000Em-QR
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:19 +0000
Date: Wed, 16 Apr 2014 10:55:19 +0000
Message-Id: <E1WaNUt-0000Em-QR@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xentrace: add TRC_HVM_EMUL
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 55ee5dea32dfdf121bf11620ffe7e523b948135a
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Wed Apr 9 12:16:00 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 12:16:00 2014 +0200

    xentrace: add TRC_HVM_EMUL
    
    This add a set of trace events that track the setup of various
    emulated devices related to timers in domU.
    
    This set is hpet, pit (i8253, i8254), rtc (MC146818), apic (lapic),
    and pic (i8259).  The pmtimer is not traced since it does not have a
    changeable rate.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 tools/xentrace/formats          |   18 ++++++++++++++++++
 xen/arch/x86/hvm/hpet.c         |    7 +++++++
 xen/arch/x86/hvm/i8254.c        |    9 +++++++++
 xen/arch/x86/hvm/rtc.c          |    9 +++++++++
 xen/arch/x86/hvm/vlapic.c       |   19 +++++++++++++++++++
 xen/arch/x86/hvm/vpic.c         |   11 +++++++++++
 xen/include/asm-x86/hvm/trace.h |    7 +++++++
 xen/include/public/trace.h      |   24 ++++++++++++++++++++++--
 8 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/formats b/tools/xentrace/formats
index 67fd42d..da658bf 100644
--- a/tools/xentrace/formats
+++ b/tools/xentrace/formats
@@ -152,3 +152,21 @@
 0x00802006  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  assign_vector [ irq = %(1)d = vector 0x%(2)x, CPU mask: 0x%(3)08x ]
 0x00802007  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  bogus_vector [ 0x%(1)x ]
 0x00802008  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  do_irq [ irq = %(1)d, began = %(2)dus, ended = %(3)dus ]
+
+0x00084001  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  hpet create [ tn = %(1)d, irq = %(2)d, delta = 0x%(4)08x%(3)08x, period = 0x%(6)08x%(5)08x ]
+0x00084002  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  pit create [ delta = 0x%(1)016x, period = 0x%(2)016x ]
+0x00084003  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  rtc create [ delta = 0x%(1)016x , period = 0x%(2)016x ]
+0x00084004  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vlapic create [ delta = 0x%(2)08x%(1)08x , period = 0x%(4)08x%(3)08x, irq = %(5)d ]
+0x00084005  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  hpet destroy [ tn = %(1)d ]
+0x00084006  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  pit destroy  [ ]
+0x00084007  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  rtc destroy [ ]
+0x00084008  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vlapic destroy [ ]
+0x00084009  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  pit callback [ ]
+0x0008400a  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vlapic callback [ ]
+0x0008400b  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic_update_int_output [ int_output = %(1)d, is_master = %(2)d, irq = %(3)d ]
+0x0008400c  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic vcpu_kick [ irq = %(1)d ]
+0x0008400d  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  __vpic_intack [ is_master = %(1)d, irq = %(2)d ]
+0x0008400e  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic_irq_positive_edge [ irq = %(1)d ]
+0x0008400f  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic_irq_negative_edge [ irq = %(1)d ]
+0x00084010  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic_ack_pending_irq [ accept_pic_intr = %(1)d, int_output = %(2)d ]
+0x00084011  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vlapic_accept_pic_intr [ i8259_target = %(1)d, accept_pic_int = %(2)d ]
diff --git a/xen/arch/x86/hvm/hpet.c b/xen/arch/x86/hvm/hpet.c
index e1e769a..42c93f3 100644
--- a/xen/arch/x86/hvm/hpet.c
+++ b/xen/arch/x86/hvm/hpet.c
@@ -20,10 +20,12 @@
 #include <asm/hvm/vpt.h>
 #include <asm/hvm/io.h>
 #include <asm/hvm/support.h>
+#include <asm/hvm/trace.h>
 #include <asm/current.h>
 #include <asm/hpet.h>
 #include <xen/sched.h>
 #include <xen/event.h>
+#include <xen/trace.h>
 
 #define domain_vhpet(x) (&(x)->arch.hvm_domain.pl_time.vhpet)
 #define vcpu_vhpet(x)   (domain_vhpet((x)->domain))
@@ -191,6 +193,7 @@ static void hpet_stop_timer(HPETState *h, unsigned int tn)
 {
     ASSERT(tn < HPET_TIMER_NUM);
     ASSERT(spin_is_locked(&h->lock));
+    TRACE_1D(TRC_HVM_EMUL_HPET_STOP_TIMER, tn);
     destroy_periodic_time(&h->pt[tn]);
     /* read the comparator to get it updated so a read while stopped will
      * return the expected value. */
@@ -255,6 +258,10 @@ static void hpet_set_timer(HPETState *h, unsigned int tn)
      * being enabled (now).
      */
     oneshot = !timer_is_periodic(h, tn);
+    TRACE_2_LONG_4D(TRC_HVM_EMUL_HPET_START_TIMER, tn, irq,
+                    TRC_PAR_LONG(hpet_tick_to_ns(h, diff)),
+                    TRC_PAR_LONG(oneshot ? 0LL :
+                                 hpet_tick_to_ns(h, h->hpet.period[tn])));
     create_periodic_time(vhpet_vcpu(h), &h->pt[tn],
                          hpet_tick_to_ns(h, diff),
                          oneshot ? 0 : hpet_tick_to_ns(h, h->hpet.period[tn]),
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index 6e66b49..c4f7527 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -31,6 +31,7 @@
 #include <xen/lib.h>
 #include <xen/errno.h>
 #include <xen/sched.h>
+#include <xen/trace.h>
 #include <asm/time.h>
 #include <asm/hvm/hvm.h>
 #include <asm/hvm/io.h>
@@ -159,6 +160,7 @@ static int pit_get_gate(PITState *pit, int channel)
 static void pit_time_fired(struct vcpu *v, void *priv)
 {
     uint64_t *count_load_time = priv;
+    TRACE_0D(TRC_HVM_EMUL_PIT_TIMER_CB);
     *count_load_time = get_guest_time(v);
 }
 
@@ -188,16 +190,19 @@ static void pit_load_count(PITState *pit, int channel, int val)
     case 2:
     case 3:
         /* Periodic timer. */
+        TRACE_2D(TRC_HVM_EMUL_PIT_START_TIMER, period, period);
         create_periodic_time(v, &pit->pt0, period, period, 0, pit_time_fired, 
                              &pit->count_load_time[channel]);
         break;
     case 1:
     case 4:
         /* One-shot timer. */
+        TRACE_2D(TRC_HVM_EMUL_PIT_START_TIMER, period, 0);
         create_periodic_time(v, &pit->pt0, period, 0, 0, pit_time_fired,
                              &pit->count_load_time[channel]);
         break;
     default:
+        TRACE_0D(TRC_HVM_EMUL_PIT_STOP_TIMER);
         destroy_periodic_time(&pit->pt0);
         break;
     }
@@ -377,6 +382,7 @@ static uint32_t pit_ioport_read(struct PITState *pit, uint32_t addr)
 
 void pit_stop_channel0_irq(PITState *pit)
 {
+    TRACE_0D(TRC_HVM_EMUL_PIT_STOP_TIMER);
     spin_lock(&pit->lock);
     destroy_periodic_time(&pit->pt0);
     spin_unlock(&pit->lock);
@@ -431,6 +437,7 @@ void pit_reset(struct domain *d)
     struct hvm_hw_pit_channel *s;
     int i;
 
+    TRACE_0D(TRC_HVM_EMUL_PIT_STOP_TIMER);
     destroy_periodic_time(&pit->pt0);
     pit->pt0.source = PTSRC_isa;
 
@@ -465,6 +472,8 @@ void pit_init(struct domain *d, unsigned long cpu_khz)
 void pit_deinit(struct domain *d)
 {
     PITState *pit = domain_vpit(d);
+
+    TRACE_0D(TRC_HVM_EMUL_PIT_STOP_TIMER);
     destroy_periodic_time(&pit->pt0);
 }
 
diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 7cd0cf4..3fab660 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -27,6 +27,7 @@
 #include <asm/hvm/io.h>
 #include <asm/hvm/support.h>
 #include <asm/current.h>
+#include <xen/trace.h>
 
 #define USEC_PER_SEC    1000000UL
 #define NS_PER_USEC     1000UL
@@ -91,6 +92,7 @@ static void rtc_pf_callback(struct vcpu *v, void *opaque)
          && ++(s->pt_dead_ticks) >= 10 )
     {
         /* VM is ignoring its RTC; no point in running the timer */
+        TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
         destroy_periodic_time(&s->pt);
         s->period = 0;
     }
@@ -152,8 +154,11 @@ static void rtc_timer_update(RTCState *s)
                 else
                     delta = period - ((now - s->start_time) % period);
                 if ( s->hw.cmos_data[RTC_REG_B] & RTC_PIE )
+                {
+                    TRACE_2D(TRC_HVM_EMUL_RTC_START_TIMER, delta, period);
                     create_periodic_time(v, &s->pt, delta, period,
                                          RTC_IRQ, rtc_pf_callback, s);
+                }
                 else
                     s->check_ticks_since = now;
             }
@@ -161,6 +166,7 @@ static void rtc_timer_update(RTCState *s)
         }
         /* fall through */
     default:
+        TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
         destroy_periodic_time(&s->pt);
         s->period = 0;
         break;
@@ -513,6 +519,7 @@ static int rtc_ioport_write(void *opaque, uint32_t addr, uint32_t data)
         rtc_update_irq(s);
         if ( (data ^ orig) & RTC_PIE )
         {
+            TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
             destroy_periodic_time(&s->pt);
             s->period = 0;
             rtc_timer_update(s);
@@ -772,6 +779,7 @@ void rtc_reset(struct domain *d)
 {
     RTCState *s = domain_vrtc(d);
 
+    TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
     destroy_periodic_time(&s->pt);
     s->period = 0;
     s->pt.source = PTSRC_isa;
@@ -813,6 +821,7 @@ void rtc_deinit(struct domain *d)
 
     spin_barrier(&s->lock);
 
+    TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
     destroy_periodic_time(&s->pt);
     kill_timer(&s->update_timer);
     kill_timer(&s->update_timer2);
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index fc307c0..cd7e872 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -611,6 +611,7 @@ int hvm_x2apic_msr_read(struct vcpu *v, unsigned int msr, uint64_t *msr_content)
 
 static void vlapic_pt_cb(struct vcpu *v, void *data)
 {
+    TRACE_0D(TRC_HVM_EMUL_LAPIC_TIMER_CB);
     *(s_time_t *)data = hvm_get_guest_time(v);
 }
 
@@ -712,6 +713,7 @@ static int vlapic_reg_write(struct vcpu *v,
         if ( (vlapic_get_reg(vlapic, offset) & APIC_TIMER_MODE_MASK) !=
              (val & APIC_TIMER_MODE_MASK) )
         {
+            TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
             destroy_periodic_time(&vlapic->pt);
             vlapic_set_reg(vlapic, APIC_TMICT, 0);
             vlapic_set_reg(vlapic, APIC_TMCCT, 0);
@@ -746,12 +748,16 @@ static int vlapic_reg_write(struct vcpu *v,
         vlapic_set_reg(vlapic, APIC_TMICT, val);
         if ( val == 0 )
         {
+            TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
             destroy_periodic_time(&vlapic->pt);
             break;
         }
 
         period = ((uint64_t)APIC_BUS_CYCLE_NS *
                   (uint32_t)val * vlapic->hw.timer_divisor);
+        TRACE_2_LONG_3D(TRC_HVM_EMUL_LAPIC_START_TIMER, TRC_PAR_LONG(period),
+                 TRC_PAR_LONG(vlapic_lvtt_period(vlapic) ? period : 0LL),
+                 vlapic->pt.irq);
         create_periodic_time(current, &vlapic->pt, period, 
                              vlapic_lvtt_period(vlapic) ? period : 0,
                              vlapic->pt.irq,
@@ -950,6 +956,8 @@ void vlapic_tdt_msr_set(struct vlapic *vlapic, uint64_t value)
 
         vlapic->hw.tdt_msr = value;
         /* .... reprogram tdt timer */
+        TRACE_2_LONG_3D(TRC_HVM_EMUL_LAPIC_START_TIMER, TRC_PAR_LONG(delta),
+                        TRC_PAR_LONG(0LL), vlapic->pt.irq);
         create_periodic_time(v, &vlapic->pt, delta, 0,
                              vlapic->pt.irq, vlapic_tdt_pt_cb,
                              &vlapic->timer_last_update);
@@ -962,6 +970,8 @@ void vlapic_tdt_msr_set(struct vlapic *vlapic, uint64_t value)
         /* trigger a timer event if needed */
         if ( value > 0 )
         {
+            TRACE_2_LONG_3D(TRC_HVM_EMUL_LAPIC_START_TIMER, TRC_PAR_LONG(0LL),
+                            TRC_PAR_LONG(0LL), vlapic->pt.irq);
             create_periodic_time(v, &vlapic->pt, 0, 0,
                                  vlapic->pt.irq, vlapic_tdt_pt_cb,
                                  &vlapic->timer_last_update);
@@ -970,6 +980,7 @@ void vlapic_tdt_msr_set(struct vlapic *vlapic, uint64_t value)
         else
         {
             /* .... stop tdt timer */
+            TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
             destroy_periodic_time(&vlapic->pt);
         }
 
@@ -1003,6 +1014,10 @@ static int __vlapic_accept_pic_intr(struct vcpu *v)
 
 int vlapic_accept_pic_intr(struct vcpu *v)
 {
+    TRACE_2D(TRC_HVM_EMUL_LAPIC_PIC_INTR,
+             (v == v->domain->arch.hvm_domain.i8259_target),
+             v ? __vlapic_accept_pic_intr(v) : -1);
+
     return ((v == v->domain->arch.hvm_domain.i8259_target) &&
             __vlapic_accept_pic_intr(v));
 }
@@ -1106,6 +1121,7 @@ void vlapic_reset(struct vlapic *vlapic)
     vlapic_set_reg(vlapic, APIC_SPIV, 0xff);
     vlapic->hw.disabled |= VLAPIC_SW_DISABLED;
 
+    TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
     destroy_periodic_time(&vlapic->pt);
 }
 
@@ -1129,6 +1145,8 @@ static void lapic_rearm(struct vlapic *s)
 
     period = ((uint64_t)APIC_BUS_CYCLE_NS *
               (uint32_t)tmict * s->hw.timer_divisor);
+    TRACE_2_LONG_3D(TRC_HVM_EMUL_LAPIC_START_TIMER, TRC_PAR_LONG(period),
+             TRC_PAR_LONG(vlapic_lvtt_period(s) ? period : 0LL), s->pt.irq);
     create_periodic_time(vlapic_vcpu(s), &s->pt, period,
                          vlapic_lvtt_period(s) ? period : 0,
                          s->pt.irq,
@@ -1275,6 +1293,7 @@ void vlapic_destroy(struct vcpu *v)
     struct vlapic *vlapic = vcpu_vlapic(v);
 
     tasklet_kill(&vlapic->init_sipi.tasklet);
+    TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
     destroy_periodic_time(&vlapic->pt);
     unmap_domain_page_global(vlapic->regs);
     free_domheap_page(vlapic->regs_page);
diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index 5ca513c..2c6e6e5 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -30,6 +30,7 @@
 #include <xen/lib.h>
 #include <xen/errno.h>
 #include <xen/sched.h>
+#include <xen/trace.h>
 #include <asm/hvm/hvm.h>
 #include <asm/hvm/io.h>
 #include <asm/hvm/support.h>
@@ -99,6 +100,8 @@ static void vpic_update_int_output(struct hvm_hw_vpic *vpic)
     ASSERT(vpic_is_locked(vpic));
 
     irq = vpic_get_highest_priority_irq(vpic);
+    TRACE_3D(TRC_HVM_EMUL_PIC_INT_OUTPUT, vpic->int_output, vpic->is_master,
+             irq);
     if ( vpic->int_output == (irq >= 0) )
         return;
 
@@ -112,7 +115,10 @@ static void vpic_update_int_output(struct hvm_hw_vpic *vpic)
             /* Master INT line is connected in Virtual Wire Mode. */
             struct vcpu *v = vpic_domain(vpic)->arch.hvm_domain.i8259_target;
             if ( v != NULL )
+            {
+                TRACE_1D(TRC_HVM_EMUL_PIC_KICK, irq);
                 vcpu_kick(v);
+            }
         }
         else
         {
@@ -135,6 +141,7 @@ static void __vpic_intack(struct hvm_hw_vpic *vpic, int irq)
 
     ASSERT(vpic_is_locked(vpic));
 
+    TRACE_2D(TRC_HVM_EMUL_PIC_INTACK, vpic->is_master, irq);
     /* Edge-triggered: clear the IRR (forget the edge). */
     if ( !(vpic->elcr & mask) )
         vpic->irr &= ~mask;
@@ -434,6 +441,7 @@ void vpic_irq_positive_edge(struct domain *d, int irq)
     ASSERT(irq <= 15);
     ASSERT(vpic_is_locked(vpic));
 
+    TRACE_1D(TRC_HVM_EMUL_PIC_POSEDGE, irq);
     if ( irq == 2 )
         return;
 
@@ -450,6 +458,7 @@ void vpic_irq_negative_edge(struct domain *d, int irq)
     ASSERT(irq <= 15);
     ASSERT(vpic_is_locked(vpic));
 
+    TRACE_1D(TRC_HVM_EMUL_PIC_NEGEDGE, irq);
     if ( irq == 2 )
         return;
 
@@ -463,6 +472,8 @@ int vpic_ack_pending_irq(struct vcpu *v)
     int irq, vector;
     struct hvm_hw_vpic *vpic = &v->domain->arch.hvm_domain.vpic[0];
 
+    TRACE_2D(TRC_HVM_EMUL_PIC_PEND_IRQ_CALL, vlapic_accept_pic_intr(v),
+             vpic->int_output);
     if ( !vlapic_accept_pic_intr(v) || !vpic->int_output )
         return -1;
 
diff --git a/xen/include/asm-x86/hvm/trace.h b/xen/include/asm-x86/hvm/trace.h
index 9d7e00b..de802a6 100644
--- a/xen/include/asm-x86/hvm/trace.h
+++ b/xen/include/asm-x86/hvm/trace.h
@@ -58,6 +58,13 @@
 
 #define TRC_PAR_LONG(par) ((par)&0xFFFFFFFF),((par)>>32)
 
+#define TRACE_2_LONG_2D(_e, d1, d2, ...) \
+    TRACE_4D(_e, d1, d2)
+#define TRACE_2_LONG_3D(_e, d1, d2, d3, ...) \
+    TRACE_5D(_e, d1, d2, d3)
+#define TRACE_2_LONG_4D(_e, d1, d2, d3, d4, ...) \
+    TRACE_6D(_e, d1, d2, d3, d4)
+
 #define HVMTRACE_ND(evt, modifier, cycles, count, d1, d2, d3, d4, d5, d6) \
     do {                                                                  \
         if ( unlikely(tb_init_done) && DO_TRC_HVM_ ## evt )               \
diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h
index e2f60a6..cfcf4aa 100644
--- a/xen/include/public/trace.h
+++ b/xen/include/public/trace.h
@@ -50,8 +50,9 @@
 #define TRC_SUBCLS_SHIFT 12
 
 /* trace subclasses for SVM */
-#define TRC_HVM_ENTRYEXIT 0x00081000   /* VMENTRY and #VMEXIT       */
-#define TRC_HVM_HANDLER   0x00082000   /* various HVM handlers      */
+#define TRC_HVM_ENTRYEXIT   0x00081000   /* VMENTRY and #VMEXIT       */
+#define TRC_HVM_HANDLER     0x00082000   /* various HVM handlers      */
+#define TRC_HVM_EMUL        0x00084000   /* emulated devices */
 
 #define TRC_SCHED_MIN       0x00021000   /* Just runstate changes */
 #define TRC_SCHED_CLASS     0x00022000   /* Scheduler-specific    */
@@ -229,6 +230,25 @@
 #define TRC_HVM_IOPORT_WRITE    (TRC_HVM_HANDLER + 0x216)
 #define TRC_HVM_IOMEM_WRITE     (TRC_HVM_HANDLER + 0x217)
 
+/* Trace events for emulated devices */
+#define TRC_HVM_EMUL_HPET_START_TIMER  (TRC_HVM_EMUL + 0x1)
+#define TRC_HVM_EMUL_PIT_START_TIMER   (TRC_HVM_EMUL + 0x2)
+#define TRC_HVM_EMUL_RTC_START_TIMER   (TRC_HVM_EMUL + 0x3)
+#define TRC_HVM_EMUL_LAPIC_START_TIMER (TRC_HVM_EMUL + 0x4)
+#define TRC_HVM_EMUL_HPET_STOP_TIMER   (TRC_HVM_EMUL + 0x5)
+#define TRC_HVM_EMUL_PIT_STOP_TIMER    (TRC_HVM_EMUL + 0x6)
+#define TRC_HVM_EMUL_RTC_STOP_TIMER    (TRC_HVM_EMUL + 0x7)
+#define TRC_HVM_EMUL_LAPIC_STOP_TIMER  (TRC_HVM_EMUL + 0x8)
+#define TRC_HVM_EMUL_PIT_TIMER_CB      (TRC_HVM_EMUL + 0x9)
+#define TRC_HVM_EMUL_LAPIC_TIMER_CB    (TRC_HVM_EMUL + 0xA)
+#define TRC_HVM_EMUL_PIC_INT_OUTPUT    (TRC_HVM_EMUL + 0xB)
+#define TRC_HVM_EMUL_PIC_KICK          (TRC_HVM_EMUL + 0xC)
+#define TRC_HVM_EMUL_PIC_INTACK        (TRC_HVM_EMUL + 0xD)
+#define TRC_HVM_EMUL_PIC_POSEDGE       (TRC_HVM_EMUL + 0xE)
+#define TRC_HVM_EMUL_PIC_NEGEDGE       (TRC_HVM_EMUL + 0xF)
+#define TRC_HVM_EMUL_PIC_PEND_IRQ_CALL (TRC_HVM_EMUL + 0x10)
+#define TRC_HVM_EMUL_LAPIC_PIC_INTR    (TRC_HVM_EMUL + 0x11)
+
 /* trace events for per class */
 #define TRC_PM_FREQ_CHANGE      (TRC_HW_PM + 0x01)
 #define TRC_PM_IDLE_ENTRY       (TRC_HW_PM + 0x02)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:55:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:55:58 +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 1WaNVM-00063w-5u; Wed, 16 Apr 2014 10:55:48 +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 1WaNV0-00062I-9b
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:39 +0000
Received: from [85.158.143.35:21314] by server-3.bemta-4.messagelabs.com id
	C9/1C-13602-D916E435; Wed, 16 Apr 2014 10:55:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-21.messagelabs.com!1397645720!9464073!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 13305 invoked from network); 16 Apr 2014 10:55:21 -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;
	16 Apr 2014 10:55:21 -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 1WaNUt-0000bC-SB
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNUt-0000Em-QR
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:19 +0000
Date: Wed, 16 Apr 2014 10:55:19 +0000
Message-Id: <E1WaNUt-0000Em-QR@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xentrace: add TRC_HVM_EMUL
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 55ee5dea32dfdf121bf11620ffe7e523b948135a
Author:     Don Slutz <dslutz@verizon.com>
AuthorDate: Wed Apr 9 12:16:00 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 12:16:00 2014 +0200

    xentrace: add TRC_HVM_EMUL
    
    This add a set of trace events that track the setup of various
    emulated devices related to timers in domU.
    
    This set is hpet, pit (i8253, i8254), rtc (MC146818), apic (lapic),
    and pic (i8259).  The pmtimer is not traced since it does not have a
    changeable rate.
    
    Signed-off-by: Don Slutz <dslutz@verizon.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 tools/xentrace/formats          |   18 ++++++++++++++++++
 xen/arch/x86/hvm/hpet.c         |    7 +++++++
 xen/arch/x86/hvm/i8254.c        |    9 +++++++++
 xen/arch/x86/hvm/rtc.c          |    9 +++++++++
 xen/arch/x86/hvm/vlapic.c       |   19 +++++++++++++++++++
 xen/arch/x86/hvm/vpic.c         |   11 +++++++++++
 xen/include/asm-x86/hvm/trace.h |    7 +++++++
 xen/include/public/trace.h      |   24 ++++++++++++++++++++++--
 8 files changed, 102 insertions(+), 2 deletions(-)

diff --git a/tools/xentrace/formats b/tools/xentrace/formats
index 67fd42d..da658bf 100644
--- a/tools/xentrace/formats
+++ b/tools/xentrace/formats
@@ -152,3 +152,21 @@
 0x00802006  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  assign_vector [ irq = %(1)d = vector 0x%(2)x, CPU mask: 0x%(3)08x ]
 0x00802007  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  bogus_vector [ 0x%(1)x ]
 0x00802008  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  do_irq [ irq = %(1)d, began = %(2)dus, ended = %(3)dus ]
+
+0x00084001  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  hpet create [ tn = %(1)d, irq = %(2)d, delta = 0x%(4)08x%(3)08x, period = 0x%(6)08x%(5)08x ]
+0x00084002  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  pit create [ delta = 0x%(1)016x, period = 0x%(2)016x ]
+0x00084003  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  rtc create [ delta = 0x%(1)016x , period = 0x%(2)016x ]
+0x00084004  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vlapic create [ delta = 0x%(2)08x%(1)08x , period = 0x%(4)08x%(3)08x, irq = %(5)d ]
+0x00084005  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  hpet destroy [ tn = %(1)d ]
+0x00084006  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  pit destroy  [ ]
+0x00084007  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  rtc destroy [ ]
+0x00084008  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vlapic destroy [ ]
+0x00084009  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  pit callback [ ]
+0x0008400a  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vlapic callback [ ]
+0x0008400b  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic_update_int_output [ int_output = %(1)d, is_master = %(2)d, irq = %(3)d ]
+0x0008400c  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic vcpu_kick [ irq = %(1)d ]
+0x0008400d  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  __vpic_intack [ is_master = %(1)d, irq = %(2)d ]
+0x0008400e  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic_irq_positive_edge [ irq = %(1)d ]
+0x0008400f  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic_irq_negative_edge [ irq = %(1)d ]
+0x00084010  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vpic_ack_pending_irq [ accept_pic_intr = %(1)d, int_output = %(2)d ]
+0x00084011  CPU%(cpu)d  %(tsc)d (+%(reltsc)8d)  vlapic_accept_pic_intr [ i8259_target = %(1)d, accept_pic_int = %(2)d ]
diff --git a/xen/arch/x86/hvm/hpet.c b/xen/arch/x86/hvm/hpet.c
index e1e769a..42c93f3 100644
--- a/xen/arch/x86/hvm/hpet.c
+++ b/xen/arch/x86/hvm/hpet.c
@@ -20,10 +20,12 @@
 #include <asm/hvm/vpt.h>
 #include <asm/hvm/io.h>
 #include <asm/hvm/support.h>
+#include <asm/hvm/trace.h>
 #include <asm/current.h>
 #include <asm/hpet.h>
 #include <xen/sched.h>
 #include <xen/event.h>
+#include <xen/trace.h>
 
 #define domain_vhpet(x) (&(x)->arch.hvm_domain.pl_time.vhpet)
 #define vcpu_vhpet(x)   (domain_vhpet((x)->domain))
@@ -191,6 +193,7 @@ static void hpet_stop_timer(HPETState *h, unsigned int tn)
 {
     ASSERT(tn < HPET_TIMER_NUM);
     ASSERT(spin_is_locked(&h->lock));
+    TRACE_1D(TRC_HVM_EMUL_HPET_STOP_TIMER, tn);
     destroy_periodic_time(&h->pt[tn]);
     /* read the comparator to get it updated so a read while stopped will
      * return the expected value. */
@@ -255,6 +258,10 @@ static void hpet_set_timer(HPETState *h, unsigned int tn)
      * being enabled (now).
      */
     oneshot = !timer_is_periodic(h, tn);
+    TRACE_2_LONG_4D(TRC_HVM_EMUL_HPET_START_TIMER, tn, irq,
+                    TRC_PAR_LONG(hpet_tick_to_ns(h, diff)),
+                    TRC_PAR_LONG(oneshot ? 0LL :
+                                 hpet_tick_to_ns(h, h->hpet.period[tn])));
     create_periodic_time(vhpet_vcpu(h), &h->pt[tn],
                          hpet_tick_to_ns(h, diff),
                          oneshot ? 0 : hpet_tick_to_ns(h, h->hpet.period[tn]),
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index 6e66b49..c4f7527 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -31,6 +31,7 @@
 #include <xen/lib.h>
 #include <xen/errno.h>
 #include <xen/sched.h>
+#include <xen/trace.h>
 #include <asm/time.h>
 #include <asm/hvm/hvm.h>
 #include <asm/hvm/io.h>
@@ -159,6 +160,7 @@ static int pit_get_gate(PITState *pit, int channel)
 static void pit_time_fired(struct vcpu *v, void *priv)
 {
     uint64_t *count_load_time = priv;
+    TRACE_0D(TRC_HVM_EMUL_PIT_TIMER_CB);
     *count_load_time = get_guest_time(v);
 }
 
@@ -188,16 +190,19 @@ static void pit_load_count(PITState *pit, int channel, int val)
     case 2:
     case 3:
         /* Periodic timer. */
+        TRACE_2D(TRC_HVM_EMUL_PIT_START_TIMER, period, period);
         create_periodic_time(v, &pit->pt0, period, period, 0, pit_time_fired, 
                              &pit->count_load_time[channel]);
         break;
     case 1:
     case 4:
         /* One-shot timer. */
+        TRACE_2D(TRC_HVM_EMUL_PIT_START_TIMER, period, 0);
         create_periodic_time(v, &pit->pt0, period, 0, 0, pit_time_fired,
                              &pit->count_load_time[channel]);
         break;
     default:
+        TRACE_0D(TRC_HVM_EMUL_PIT_STOP_TIMER);
         destroy_periodic_time(&pit->pt0);
         break;
     }
@@ -377,6 +382,7 @@ static uint32_t pit_ioport_read(struct PITState *pit, uint32_t addr)
 
 void pit_stop_channel0_irq(PITState *pit)
 {
+    TRACE_0D(TRC_HVM_EMUL_PIT_STOP_TIMER);
     spin_lock(&pit->lock);
     destroy_periodic_time(&pit->pt0);
     spin_unlock(&pit->lock);
@@ -431,6 +437,7 @@ void pit_reset(struct domain *d)
     struct hvm_hw_pit_channel *s;
     int i;
 
+    TRACE_0D(TRC_HVM_EMUL_PIT_STOP_TIMER);
     destroy_periodic_time(&pit->pt0);
     pit->pt0.source = PTSRC_isa;
 
@@ -465,6 +472,8 @@ void pit_init(struct domain *d, unsigned long cpu_khz)
 void pit_deinit(struct domain *d)
 {
     PITState *pit = domain_vpit(d);
+
+    TRACE_0D(TRC_HVM_EMUL_PIT_STOP_TIMER);
     destroy_periodic_time(&pit->pt0);
 }
 
diff --git a/xen/arch/x86/hvm/rtc.c b/xen/arch/x86/hvm/rtc.c
index 7cd0cf4..3fab660 100644
--- a/xen/arch/x86/hvm/rtc.c
+++ b/xen/arch/x86/hvm/rtc.c
@@ -27,6 +27,7 @@
 #include <asm/hvm/io.h>
 #include <asm/hvm/support.h>
 #include <asm/current.h>
+#include <xen/trace.h>
 
 #define USEC_PER_SEC    1000000UL
 #define NS_PER_USEC     1000UL
@@ -91,6 +92,7 @@ static void rtc_pf_callback(struct vcpu *v, void *opaque)
          && ++(s->pt_dead_ticks) >= 10 )
     {
         /* VM is ignoring its RTC; no point in running the timer */
+        TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
         destroy_periodic_time(&s->pt);
         s->period = 0;
     }
@@ -152,8 +154,11 @@ static void rtc_timer_update(RTCState *s)
                 else
                     delta = period - ((now - s->start_time) % period);
                 if ( s->hw.cmos_data[RTC_REG_B] & RTC_PIE )
+                {
+                    TRACE_2D(TRC_HVM_EMUL_RTC_START_TIMER, delta, period);
                     create_periodic_time(v, &s->pt, delta, period,
                                          RTC_IRQ, rtc_pf_callback, s);
+                }
                 else
                     s->check_ticks_since = now;
             }
@@ -161,6 +166,7 @@ static void rtc_timer_update(RTCState *s)
         }
         /* fall through */
     default:
+        TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
         destroy_periodic_time(&s->pt);
         s->period = 0;
         break;
@@ -513,6 +519,7 @@ static int rtc_ioport_write(void *opaque, uint32_t addr, uint32_t data)
         rtc_update_irq(s);
         if ( (data ^ orig) & RTC_PIE )
         {
+            TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
             destroy_periodic_time(&s->pt);
             s->period = 0;
             rtc_timer_update(s);
@@ -772,6 +779,7 @@ void rtc_reset(struct domain *d)
 {
     RTCState *s = domain_vrtc(d);
 
+    TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
     destroy_periodic_time(&s->pt);
     s->period = 0;
     s->pt.source = PTSRC_isa;
@@ -813,6 +821,7 @@ void rtc_deinit(struct domain *d)
 
     spin_barrier(&s->lock);
 
+    TRACE_0D(TRC_HVM_EMUL_RTC_STOP_TIMER);
     destroy_periodic_time(&s->pt);
     kill_timer(&s->update_timer);
     kill_timer(&s->update_timer2);
diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c
index fc307c0..cd7e872 100644
--- a/xen/arch/x86/hvm/vlapic.c
+++ b/xen/arch/x86/hvm/vlapic.c
@@ -611,6 +611,7 @@ int hvm_x2apic_msr_read(struct vcpu *v, unsigned int msr, uint64_t *msr_content)
 
 static void vlapic_pt_cb(struct vcpu *v, void *data)
 {
+    TRACE_0D(TRC_HVM_EMUL_LAPIC_TIMER_CB);
     *(s_time_t *)data = hvm_get_guest_time(v);
 }
 
@@ -712,6 +713,7 @@ static int vlapic_reg_write(struct vcpu *v,
         if ( (vlapic_get_reg(vlapic, offset) & APIC_TIMER_MODE_MASK) !=
              (val & APIC_TIMER_MODE_MASK) )
         {
+            TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
             destroy_periodic_time(&vlapic->pt);
             vlapic_set_reg(vlapic, APIC_TMICT, 0);
             vlapic_set_reg(vlapic, APIC_TMCCT, 0);
@@ -746,12 +748,16 @@ static int vlapic_reg_write(struct vcpu *v,
         vlapic_set_reg(vlapic, APIC_TMICT, val);
         if ( val == 0 )
         {
+            TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
             destroy_periodic_time(&vlapic->pt);
             break;
         }
 
         period = ((uint64_t)APIC_BUS_CYCLE_NS *
                   (uint32_t)val * vlapic->hw.timer_divisor);
+        TRACE_2_LONG_3D(TRC_HVM_EMUL_LAPIC_START_TIMER, TRC_PAR_LONG(period),
+                 TRC_PAR_LONG(vlapic_lvtt_period(vlapic) ? period : 0LL),
+                 vlapic->pt.irq);
         create_periodic_time(current, &vlapic->pt, period, 
                              vlapic_lvtt_period(vlapic) ? period : 0,
                              vlapic->pt.irq,
@@ -950,6 +956,8 @@ void vlapic_tdt_msr_set(struct vlapic *vlapic, uint64_t value)
 
         vlapic->hw.tdt_msr = value;
         /* .... reprogram tdt timer */
+        TRACE_2_LONG_3D(TRC_HVM_EMUL_LAPIC_START_TIMER, TRC_PAR_LONG(delta),
+                        TRC_PAR_LONG(0LL), vlapic->pt.irq);
         create_periodic_time(v, &vlapic->pt, delta, 0,
                              vlapic->pt.irq, vlapic_tdt_pt_cb,
                              &vlapic->timer_last_update);
@@ -962,6 +970,8 @@ void vlapic_tdt_msr_set(struct vlapic *vlapic, uint64_t value)
         /* trigger a timer event if needed */
         if ( value > 0 )
         {
+            TRACE_2_LONG_3D(TRC_HVM_EMUL_LAPIC_START_TIMER, TRC_PAR_LONG(0LL),
+                            TRC_PAR_LONG(0LL), vlapic->pt.irq);
             create_periodic_time(v, &vlapic->pt, 0, 0,
                                  vlapic->pt.irq, vlapic_tdt_pt_cb,
                                  &vlapic->timer_last_update);
@@ -970,6 +980,7 @@ void vlapic_tdt_msr_set(struct vlapic *vlapic, uint64_t value)
         else
         {
             /* .... stop tdt timer */
+            TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
             destroy_periodic_time(&vlapic->pt);
         }
 
@@ -1003,6 +1014,10 @@ static int __vlapic_accept_pic_intr(struct vcpu *v)
 
 int vlapic_accept_pic_intr(struct vcpu *v)
 {
+    TRACE_2D(TRC_HVM_EMUL_LAPIC_PIC_INTR,
+             (v == v->domain->arch.hvm_domain.i8259_target),
+             v ? __vlapic_accept_pic_intr(v) : -1);
+
     return ((v == v->domain->arch.hvm_domain.i8259_target) &&
             __vlapic_accept_pic_intr(v));
 }
@@ -1106,6 +1121,7 @@ void vlapic_reset(struct vlapic *vlapic)
     vlapic_set_reg(vlapic, APIC_SPIV, 0xff);
     vlapic->hw.disabled |= VLAPIC_SW_DISABLED;
 
+    TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
     destroy_periodic_time(&vlapic->pt);
 }
 
@@ -1129,6 +1145,8 @@ static void lapic_rearm(struct vlapic *s)
 
     period = ((uint64_t)APIC_BUS_CYCLE_NS *
               (uint32_t)tmict * s->hw.timer_divisor);
+    TRACE_2_LONG_3D(TRC_HVM_EMUL_LAPIC_START_TIMER, TRC_PAR_LONG(period),
+             TRC_PAR_LONG(vlapic_lvtt_period(s) ? period : 0LL), s->pt.irq);
     create_periodic_time(vlapic_vcpu(s), &s->pt, period,
                          vlapic_lvtt_period(s) ? period : 0,
                          s->pt.irq,
@@ -1275,6 +1293,7 @@ void vlapic_destroy(struct vcpu *v)
     struct vlapic *vlapic = vcpu_vlapic(v);
 
     tasklet_kill(&vlapic->init_sipi.tasklet);
+    TRACE_0D(TRC_HVM_EMUL_LAPIC_STOP_TIMER);
     destroy_periodic_time(&vlapic->pt);
     unmap_domain_page_global(vlapic->regs);
     free_domheap_page(vlapic->regs_page);
diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index 5ca513c..2c6e6e5 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -30,6 +30,7 @@
 #include <xen/lib.h>
 #include <xen/errno.h>
 #include <xen/sched.h>
+#include <xen/trace.h>
 #include <asm/hvm/hvm.h>
 #include <asm/hvm/io.h>
 #include <asm/hvm/support.h>
@@ -99,6 +100,8 @@ static void vpic_update_int_output(struct hvm_hw_vpic *vpic)
     ASSERT(vpic_is_locked(vpic));
 
     irq = vpic_get_highest_priority_irq(vpic);
+    TRACE_3D(TRC_HVM_EMUL_PIC_INT_OUTPUT, vpic->int_output, vpic->is_master,
+             irq);
     if ( vpic->int_output == (irq >= 0) )
         return;
 
@@ -112,7 +115,10 @@ static void vpic_update_int_output(struct hvm_hw_vpic *vpic)
             /* Master INT line is connected in Virtual Wire Mode. */
             struct vcpu *v = vpic_domain(vpic)->arch.hvm_domain.i8259_target;
             if ( v != NULL )
+            {
+                TRACE_1D(TRC_HVM_EMUL_PIC_KICK, irq);
                 vcpu_kick(v);
+            }
         }
         else
         {
@@ -135,6 +141,7 @@ static void __vpic_intack(struct hvm_hw_vpic *vpic, int irq)
 
     ASSERT(vpic_is_locked(vpic));
 
+    TRACE_2D(TRC_HVM_EMUL_PIC_INTACK, vpic->is_master, irq);
     /* Edge-triggered: clear the IRR (forget the edge). */
     if ( !(vpic->elcr & mask) )
         vpic->irr &= ~mask;
@@ -434,6 +441,7 @@ void vpic_irq_positive_edge(struct domain *d, int irq)
     ASSERT(irq <= 15);
     ASSERT(vpic_is_locked(vpic));
 
+    TRACE_1D(TRC_HVM_EMUL_PIC_POSEDGE, irq);
     if ( irq == 2 )
         return;
 
@@ -450,6 +458,7 @@ void vpic_irq_negative_edge(struct domain *d, int irq)
     ASSERT(irq <= 15);
     ASSERT(vpic_is_locked(vpic));
 
+    TRACE_1D(TRC_HVM_EMUL_PIC_NEGEDGE, irq);
     if ( irq == 2 )
         return;
 
@@ -463,6 +472,8 @@ int vpic_ack_pending_irq(struct vcpu *v)
     int irq, vector;
     struct hvm_hw_vpic *vpic = &v->domain->arch.hvm_domain.vpic[0];
 
+    TRACE_2D(TRC_HVM_EMUL_PIC_PEND_IRQ_CALL, vlapic_accept_pic_intr(v),
+             vpic->int_output);
     if ( !vlapic_accept_pic_intr(v) || !vpic->int_output )
         return -1;
 
diff --git a/xen/include/asm-x86/hvm/trace.h b/xen/include/asm-x86/hvm/trace.h
index 9d7e00b..de802a6 100644
--- a/xen/include/asm-x86/hvm/trace.h
+++ b/xen/include/asm-x86/hvm/trace.h
@@ -58,6 +58,13 @@
 
 #define TRC_PAR_LONG(par) ((par)&0xFFFFFFFF),((par)>>32)
 
+#define TRACE_2_LONG_2D(_e, d1, d2, ...) \
+    TRACE_4D(_e, d1, d2)
+#define TRACE_2_LONG_3D(_e, d1, d2, d3, ...) \
+    TRACE_5D(_e, d1, d2, d3)
+#define TRACE_2_LONG_4D(_e, d1, d2, d3, d4, ...) \
+    TRACE_6D(_e, d1, d2, d3, d4)
+
 #define HVMTRACE_ND(evt, modifier, cycles, count, d1, d2, d3, d4, d5, d6) \
     do {                                                                  \
         if ( unlikely(tb_init_done) && DO_TRC_HVM_ ## evt )               \
diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h
index e2f60a6..cfcf4aa 100644
--- a/xen/include/public/trace.h
+++ b/xen/include/public/trace.h
@@ -50,8 +50,9 @@
 #define TRC_SUBCLS_SHIFT 12
 
 /* trace subclasses for SVM */
-#define TRC_HVM_ENTRYEXIT 0x00081000   /* VMENTRY and #VMEXIT       */
-#define TRC_HVM_HANDLER   0x00082000   /* various HVM handlers      */
+#define TRC_HVM_ENTRYEXIT   0x00081000   /* VMENTRY and #VMEXIT       */
+#define TRC_HVM_HANDLER     0x00082000   /* various HVM handlers      */
+#define TRC_HVM_EMUL        0x00084000   /* emulated devices */
 
 #define TRC_SCHED_MIN       0x00021000   /* Just runstate changes */
 #define TRC_SCHED_CLASS     0x00022000   /* Scheduler-specific    */
@@ -229,6 +230,25 @@
 #define TRC_HVM_IOPORT_WRITE    (TRC_HVM_HANDLER + 0x216)
 #define TRC_HVM_IOMEM_WRITE     (TRC_HVM_HANDLER + 0x217)
 
+/* Trace events for emulated devices */
+#define TRC_HVM_EMUL_HPET_START_TIMER  (TRC_HVM_EMUL + 0x1)
+#define TRC_HVM_EMUL_PIT_START_TIMER   (TRC_HVM_EMUL + 0x2)
+#define TRC_HVM_EMUL_RTC_START_TIMER   (TRC_HVM_EMUL + 0x3)
+#define TRC_HVM_EMUL_LAPIC_START_TIMER (TRC_HVM_EMUL + 0x4)
+#define TRC_HVM_EMUL_HPET_STOP_TIMER   (TRC_HVM_EMUL + 0x5)
+#define TRC_HVM_EMUL_PIT_STOP_TIMER    (TRC_HVM_EMUL + 0x6)
+#define TRC_HVM_EMUL_RTC_STOP_TIMER    (TRC_HVM_EMUL + 0x7)
+#define TRC_HVM_EMUL_LAPIC_STOP_TIMER  (TRC_HVM_EMUL + 0x8)
+#define TRC_HVM_EMUL_PIT_TIMER_CB      (TRC_HVM_EMUL + 0x9)
+#define TRC_HVM_EMUL_LAPIC_TIMER_CB    (TRC_HVM_EMUL + 0xA)
+#define TRC_HVM_EMUL_PIC_INT_OUTPUT    (TRC_HVM_EMUL + 0xB)
+#define TRC_HVM_EMUL_PIC_KICK          (TRC_HVM_EMUL + 0xC)
+#define TRC_HVM_EMUL_PIC_INTACK        (TRC_HVM_EMUL + 0xD)
+#define TRC_HVM_EMUL_PIC_POSEDGE       (TRC_HVM_EMUL + 0xE)
+#define TRC_HVM_EMUL_PIC_NEGEDGE       (TRC_HVM_EMUL + 0xF)
+#define TRC_HVM_EMUL_PIC_PEND_IRQ_CALL (TRC_HVM_EMUL + 0x10)
+#define TRC_HVM_EMUL_LAPIC_PIC_INTR    (TRC_HVM_EMUL + 0x11)
+
 /* trace events for per class */
 #define TRC_PM_FREQ_CHANGE      (TRC_HW_PM + 0x01)
 #define TRC_PM_IDLE_ENTRY       (TRC_HW_PM + 0x02)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:55:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:55:58 +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 1WaNVM-000645-9Y; Wed, 16 Apr 2014 10:55:48 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVH-00062g-BX
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:43 +0000
Received: from [85.158.137.68:28956] by server-3.bemta-3.messagelabs.com id
	24/07-05289-EA16E435; Wed, 16 Apr 2014 10:55:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1397645740!7305411!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29055 invoked from network); 16 Apr 2014 10:55:41 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:55:41 -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 1WaNVE-0000bK-DN
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVE-0000GN-Aq
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:40 +0000
Date: Wed, 16 Apr 2014 10:55:40 +0000
Message-Id: <E1WaNVE-0000GN-Aq@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/AMD: feature masking is
	unavailable on Fam11
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 70e79fad6dc6f533ff83ee23b8d13de5a696d896
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 16:13:25 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 16:13:25 2014 +0200

    x86/AMD: feature masking is unavailable on Fam11
    
    Reported-by: Aravind Gopalakrishnan<aravind.gopalakrishnan@amd.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/cpu/amd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 08ec56a..d55c0fd 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -107,6 +107,10 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 	ASSERT((status == not_parsed) && (smp_processor_id() == 0));
 	status = no_mask;
 
+	/* Fam11 doesn't support masking at all. */
+	if (c->x86 == 0x11)
+		return;
+
 	if (~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx &
 	      opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) {
 		feat_ecx = opt_cpuid_mask_ecx;
@@ -176,7 +180,6 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 	       extfeat_ecx, extfeat_edx);
 
  setmask:
-	/* FIXME check if processor supports CPUID masking */
 	/* AMD processors prior to family 10h required a 32-bit password */
 	if (c->x86 >= 0x10) {
 		wrmsr(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:55:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:55:58 +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 1WaNVM-000645-9Y; Wed, 16 Apr 2014 10:55:48 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVH-00062g-BX
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:43 +0000
Received: from [85.158.137.68:28956] by server-3.bemta-3.messagelabs.com id
	24/07-05289-EA16E435; Wed, 16 Apr 2014 10:55:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1397645740!7305411!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29055 invoked from network); 16 Apr 2014 10:55:41 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:55:41 -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 1WaNVE-0000bK-DN
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVE-0000GN-Aq
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:40 +0000
Date: Wed, 16 Apr 2014 10:55:40 +0000
Message-Id: <E1WaNVE-0000GN-Aq@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/AMD: feature masking is
	unavailable on Fam11
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 70e79fad6dc6f533ff83ee23b8d13de5a696d896
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 16:13:25 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 16:13:25 2014 +0200

    x86/AMD: feature masking is unavailable on Fam11
    
    Reported-by: Aravind Gopalakrishnan<aravind.gopalakrishnan@amd.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/cpu/amd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 08ec56a..d55c0fd 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -107,6 +107,10 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 	ASSERT((status == not_parsed) && (smp_processor_id() == 0));
 	status = no_mask;
 
+	/* Fam11 doesn't support masking at all. */
+	if (c->x86 == 0x11)
+		return;
+
 	if (~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx &
 	      opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) {
 		feat_ecx = opt_cpuid_mask_ecx;
@@ -176,7 +180,6 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 	       extfeat_ecx, extfeat_edx);
 
  setmask:
-	/* FIXME check if processor supports CPUID masking */
 	/* AMD processors prior to family 10h required a 32-bit password */
 	if (c->x86 >= 0x10) {
 		wrmsr(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56: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 1WaNVU-00066Z-Ht; Wed, 16 Apr 2014 10:55:56 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVR-00065Q-Td
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:55 +0000
Received: from [193.109.254.147:36964] by server-11.bemta-14.messagelabs.com
	id E0/FC-09902-9B16E435; Wed, 16 Apr 2014 10:55:53 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-27.messagelabs.com!1397645751!8658904!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3091 invoked from network); 16 Apr 2014 10:55:52 -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;
	16 Apr 2014 10:55:52 -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 1WaNVP-0000bN-5n
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:51 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVP-0000IV-3n
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:51 +0000
Date: Wed, 16 Apr 2014 10:55:51 +0000
Message-Id: <E1WaNVP-0000IV-3n@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: refactor function do_tmem_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

commit b214115f09e42f8191f4bb16b41153e46c54fb56
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Wed Feb 12 22:43:19 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Tue Apr 8 10:05:16 2014 -0400

    tmem: refactor function do_tmem_op()
    
    Refactor function do_tmem_op() to make it more readable.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    [v2: Fixed up tab vs spaces, also removed dead code and added gulped code]
---
 xen/common/tmem.c |  168 +++++++++++++++++++++++++----------------------------
 1 files changed, 79 insertions(+), 89 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 602a38b..823f166 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2603,7 +2603,6 @@ long do_tmem_op(tmem_cli_op_t uops)
     bool_t succ_get = 0, succ_put = 0;
     bool_t non_succ_get = 0, non_succ_put = 0;
     bool_t flush = 0, flush_obj = 0;
-    bool_t write_lock_set = 0, read_lock_set = 0;
 
     if ( !tmem_initialized )
         return -ENODEV;
@@ -2626,114 +2625,105 @@ long do_tmem_op(tmem_cli_op_t uops)
         return -EFAULT;
     }
 
+    /* Acquire wirte lock for all command at first */
+    write_lock(&tmem_rwlock);
+
     if ( op.cmd == TMEM_CONTROL )
     {
-        write_lock(&tmem_rwlock);
-        write_lock_set = 1;
         rc = do_tmem_control(&op);
-        goto out;
-    } else if ( op.cmd == TMEM_AUTH ) {
-        write_lock(&tmem_rwlock);
-        write_lock_set = 1;
+    }
+    else if ( op.cmd == TMEM_AUTH )
+    {
         rc = tmemc_shared_pool_auth(op.u.creat.arg1,op.u.creat.uuid[0],
                          op.u.creat.uuid[1],op.u.creat.flags);
-        goto out;
-    } else if ( op.cmd == TMEM_RESTORE_NEW ) {
-        write_lock(&tmem_rwlock);
-        write_lock_set = 1;
+    }
+    else if ( op.cmd == TMEM_RESTORE_NEW )
+    {
         rc = do_tmem_new_pool(op.u.creat.arg1, op.pool_id, op.u.creat.flags,
                          op.u.creat.uuid[0], op.u.creat.uuid[1]);
-        goto out;
     }
-
-    /* create per-client tmem structure dynamically on first use by client */
-    if ( client == NULL )
-    {
-        write_lock(&tmem_rwlock);
-        write_lock_set = 1;
-        if ( (client = client_create(current->domain->domain_id)) == NULL )
+    else {
+    /*
+	 * For other commands, create per-client tmem structure dynamically on
+	 * first use by client.
+	 */
+        if ( client == NULL )
         {
-            tmem_client_err("tmem: can't create tmem structure for %s\n",
-                           tmem_client_str);
-            rc = -ENOMEM;
-            goto out;
+            if ( (client = client_create(current->domain->domain_id)) == NULL )
+            {
+                tmem_client_err("tmem: can't create tmem structure for %s\n",
+                               tmem_client_str);
+                rc = -ENOMEM;
+                goto out;
+            }
         }
-    }
 
-    if ( op.cmd == TMEM_NEW_POOL || op.cmd == TMEM_DESTROY_POOL )
-    {
-        if ( !write_lock_set )
+        if ( op.cmd == TMEM_NEW_POOL || op.cmd == TMEM_DESTROY_POOL )
         {
-            write_lock(&tmem_rwlock);
-            write_lock_set = 1;
+            if ( op.cmd == TMEM_NEW_POOL )
+                rc = do_tmem_new_pool(TMEM_CLI_ID_NULL, 0, op.u.creat.flags,
+                                op.u.creat.uuid[0], op.u.creat.uuid[1]);
+	        else
+                rc = do_tmem_destroy_pool(op.pool_id);
         }
-    }
-    else
-    {
-        if ( !write_lock_set )
+        else
         {
+            if ( ((uint32_t)op.pool_id >= MAX_POOLS_PER_DOMAIN) ||
+                 ((pool = client->pools[op.pool_id]) == NULL) )
+            {
+                tmem_client_err("tmem: operation requested on uncreated pool\n");
+                rc = -ENODEV;
+                goto out;
+            }
+            /* Commands only need read lock */
+            write_unlock(&tmem_rwlock);
             read_lock(&tmem_rwlock);
-            read_lock_set = 1;
-        }
-        if ( ((uint32_t)op.pool_id >= MAX_POOLS_PER_DOMAIN) ||
-             ((pool = client->pools[op.pool_id]) == NULL) )
-        {
-            tmem_client_err("tmem: operation requested on uncreated pool\n");
-            rc = -ENODEV;
-            goto out;
-        }
-    }
 
-    oidp = (struct oid *)&op.u.gen.oid[0];
-    switch ( op.cmd )
-    {
-    case TMEM_NEW_POOL:
-        rc = do_tmem_new_pool(TMEM_CLI_ID_NULL, 0, op.u.creat.flags,
-                              op.u.creat.uuid[0], op.u.creat.uuid[1]);
-        break;
-    case TMEM_PUT_PAGE:
-        if (tmem_ensure_avail_pages())
-            rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
-                        tmem_cli_buf_null);
-        else
-            rc = -ENOMEM;
-        if (rc == 1) succ_put = 1;
-        else non_succ_put = 1;
-        break;
-    case TMEM_GET_PAGE:
-        rc = do_tmem_get(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
-                        tmem_cli_buf_null);
-        if (rc == 1) succ_get = 1;
-        else non_succ_get = 1;
-        break;
-    case TMEM_FLUSH_PAGE:
-        flush = 1;
-        rc = do_tmem_flush_page(pool, oidp, op.u.gen.index);
-        break;
-    case TMEM_FLUSH_OBJECT:
-        rc = do_tmem_flush_object(pool, oidp);
-        flush_obj = 1;
-        break;
-    case TMEM_DESTROY_POOL:
-        flush = 1;
-        rc = do_tmem_destroy_pool(op.pool_id);
-        break;
-    default:
-        tmem_client_warn("tmem: op %d not implemented\n", op.cmd);
-        rc = -ENOSYS;
-        break;
+            oidp = (struct oid *)&op.u.gen.oid[0];
+            switch ( op.cmd )
+            {
+            case TMEM_NEW_POOL:
+            case TMEM_DESTROY_POOL:
+                BUG(); /* Done earlier. */
+                break;
+            case TMEM_PUT_PAGE:
+                if (tmem_ensure_avail_pages())
+                    rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
+                                tmem_cli_buf_null);
+                else
+                    rc = -ENOMEM;
+                if (rc == 1) succ_put = 1;
+                else non_succ_put = 1;
+                break;
+            case TMEM_GET_PAGE:
+                rc = do_tmem_get(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
+                                tmem_cli_buf_null);
+                if (rc == 1) succ_get = 1;
+                else non_succ_get = 1;
+                break;
+            case TMEM_FLUSH_PAGE:
+                flush = 1;
+                rc = do_tmem_flush_page(pool, oidp, op.u.gen.index);
+                break;
+            case TMEM_FLUSH_OBJECT:
+                rc = do_tmem_flush_object(pool, oidp);
+                flush_obj = 1;
+                break;
+            default:
+                tmem_client_warn("tmem: op %d not implemented\n", op.cmd);
+                rc = -ENOSYS;
+                break;
+            }
+            read_unlock(&tmem_rwlock);
+            if ( rc < 0 )
+                errored_tmem_ops++;
+            return rc;
+        }
     }
-
 out:
+    write_unlock(&tmem_rwlock);
     if ( rc < 0 )
         errored_tmem_ops++;
-    if ( write_lock_set )
-        write_unlock(&tmem_rwlock);
-    else if ( read_lock_set )
-        read_unlock(&tmem_rwlock);
-    else 
-        ASSERT(0);
-
     return rc;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56: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 1WaNVU-00066Z-Ht; Wed, 16 Apr 2014 10:55:56 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVR-00065Q-Td
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:55 +0000
Received: from [193.109.254.147:36964] by server-11.bemta-14.messagelabs.com
	id E0/FC-09902-9B16E435; Wed, 16 Apr 2014 10:55:53 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-27.messagelabs.com!1397645751!8658904!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3091 invoked from network); 16 Apr 2014 10:55:52 -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;
	16 Apr 2014 10:55:52 -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 1WaNVP-0000bN-5n
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:51 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVP-0000IV-3n
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:55:51 +0000
Date: Wed, 16 Apr 2014 10:55:51 +0000
Message-Id: <E1WaNVP-0000IV-3n@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: refactor function do_tmem_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

commit b214115f09e42f8191f4bb16b41153e46c54fb56
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Wed Feb 12 22:43:19 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Tue Apr 8 10:05:16 2014 -0400

    tmem: refactor function do_tmem_op()
    
    Refactor function do_tmem_op() to make it more readable.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    [v2: Fixed up tab vs spaces, also removed dead code and added gulped code]
---
 xen/common/tmem.c |  168 +++++++++++++++++++++++++----------------------------
 1 files changed, 79 insertions(+), 89 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 602a38b..823f166 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2603,7 +2603,6 @@ long do_tmem_op(tmem_cli_op_t uops)
     bool_t succ_get = 0, succ_put = 0;
     bool_t non_succ_get = 0, non_succ_put = 0;
     bool_t flush = 0, flush_obj = 0;
-    bool_t write_lock_set = 0, read_lock_set = 0;
 
     if ( !tmem_initialized )
         return -ENODEV;
@@ -2626,114 +2625,105 @@ long do_tmem_op(tmem_cli_op_t uops)
         return -EFAULT;
     }
 
+    /* Acquire wirte lock for all command at first */
+    write_lock(&tmem_rwlock);
+
     if ( op.cmd == TMEM_CONTROL )
     {
-        write_lock(&tmem_rwlock);
-        write_lock_set = 1;
         rc = do_tmem_control(&op);
-        goto out;
-    } else if ( op.cmd == TMEM_AUTH ) {
-        write_lock(&tmem_rwlock);
-        write_lock_set = 1;
+    }
+    else if ( op.cmd == TMEM_AUTH )
+    {
         rc = tmemc_shared_pool_auth(op.u.creat.arg1,op.u.creat.uuid[0],
                          op.u.creat.uuid[1],op.u.creat.flags);
-        goto out;
-    } else if ( op.cmd == TMEM_RESTORE_NEW ) {
-        write_lock(&tmem_rwlock);
-        write_lock_set = 1;
+    }
+    else if ( op.cmd == TMEM_RESTORE_NEW )
+    {
         rc = do_tmem_new_pool(op.u.creat.arg1, op.pool_id, op.u.creat.flags,
                          op.u.creat.uuid[0], op.u.creat.uuid[1]);
-        goto out;
     }
-
-    /* create per-client tmem structure dynamically on first use by client */
-    if ( client == NULL )
-    {
-        write_lock(&tmem_rwlock);
-        write_lock_set = 1;
-        if ( (client = client_create(current->domain->domain_id)) == NULL )
+    else {
+    /*
+	 * For other commands, create per-client tmem structure dynamically on
+	 * first use by client.
+	 */
+        if ( client == NULL )
         {
-            tmem_client_err("tmem: can't create tmem structure for %s\n",
-                           tmem_client_str);
-            rc = -ENOMEM;
-            goto out;
+            if ( (client = client_create(current->domain->domain_id)) == NULL )
+            {
+                tmem_client_err("tmem: can't create tmem structure for %s\n",
+                               tmem_client_str);
+                rc = -ENOMEM;
+                goto out;
+            }
         }
-    }
 
-    if ( op.cmd == TMEM_NEW_POOL || op.cmd == TMEM_DESTROY_POOL )
-    {
-        if ( !write_lock_set )
+        if ( op.cmd == TMEM_NEW_POOL || op.cmd == TMEM_DESTROY_POOL )
         {
-            write_lock(&tmem_rwlock);
-            write_lock_set = 1;
+            if ( op.cmd == TMEM_NEW_POOL )
+                rc = do_tmem_new_pool(TMEM_CLI_ID_NULL, 0, op.u.creat.flags,
+                                op.u.creat.uuid[0], op.u.creat.uuid[1]);
+	        else
+                rc = do_tmem_destroy_pool(op.pool_id);
         }
-    }
-    else
-    {
-        if ( !write_lock_set )
+        else
         {
+            if ( ((uint32_t)op.pool_id >= MAX_POOLS_PER_DOMAIN) ||
+                 ((pool = client->pools[op.pool_id]) == NULL) )
+            {
+                tmem_client_err("tmem: operation requested on uncreated pool\n");
+                rc = -ENODEV;
+                goto out;
+            }
+            /* Commands only need read lock */
+            write_unlock(&tmem_rwlock);
             read_lock(&tmem_rwlock);
-            read_lock_set = 1;
-        }
-        if ( ((uint32_t)op.pool_id >= MAX_POOLS_PER_DOMAIN) ||
-             ((pool = client->pools[op.pool_id]) == NULL) )
-        {
-            tmem_client_err("tmem: operation requested on uncreated pool\n");
-            rc = -ENODEV;
-            goto out;
-        }
-    }
 
-    oidp = (struct oid *)&op.u.gen.oid[0];
-    switch ( op.cmd )
-    {
-    case TMEM_NEW_POOL:
-        rc = do_tmem_new_pool(TMEM_CLI_ID_NULL, 0, op.u.creat.flags,
-                              op.u.creat.uuid[0], op.u.creat.uuid[1]);
-        break;
-    case TMEM_PUT_PAGE:
-        if (tmem_ensure_avail_pages())
-            rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
-                        tmem_cli_buf_null);
-        else
-            rc = -ENOMEM;
-        if (rc == 1) succ_put = 1;
-        else non_succ_put = 1;
-        break;
-    case TMEM_GET_PAGE:
-        rc = do_tmem_get(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
-                        tmem_cli_buf_null);
-        if (rc == 1) succ_get = 1;
-        else non_succ_get = 1;
-        break;
-    case TMEM_FLUSH_PAGE:
-        flush = 1;
-        rc = do_tmem_flush_page(pool, oidp, op.u.gen.index);
-        break;
-    case TMEM_FLUSH_OBJECT:
-        rc = do_tmem_flush_object(pool, oidp);
-        flush_obj = 1;
-        break;
-    case TMEM_DESTROY_POOL:
-        flush = 1;
-        rc = do_tmem_destroy_pool(op.pool_id);
-        break;
-    default:
-        tmem_client_warn("tmem: op %d not implemented\n", op.cmd);
-        rc = -ENOSYS;
-        break;
+            oidp = (struct oid *)&op.u.gen.oid[0];
+            switch ( op.cmd )
+            {
+            case TMEM_NEW_POOL:
+            case TMEM_DESTROY_POOL:
+                BUG(); /* Done earlier. */
+                break;
+            case TMEM_PUT_PAGE:
+                if (tmem_ensure_avail_pages())
+                    rc = do_tmem_put(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
+                                tmem_cli_buf_null);
+                else
+                    rc = -ENOMEM;
+                if (rc == 1) succ_put = 1;
+                else non_succ_put = 1;
+                break;
+            case TMEM_GET_PAGE:
+                rc = do_tmem_get(pool, oidp, op.u.gen.index, op.u.gen.cmfn,
+                                tmem_cli_buf_null);
+                if (rc == 1) succ_get = 1;
+                else non_succ_get = 1;
+                break;
+            case TMEM_FLUSH_PAGE:
+                flush = 1;
+                rc = do_tmem_flush_page(pool, oidp, op.u.gen.index);
+                break;
+            case TMEM_FLUSH_OBJECT:
+                rc = do_tmem_flush_object(pool, oidp);
+                flush_obj = 1;
+                break;
+            default:
+                tmem_client_warn("tmem: op %d not implemented\n", op.cmd);
+                rc = -ENOSYS;
+                break;
+            }
+            read_unlock(&tmem_rwlock);
+            if ( rc < 0 )
+                errored_tmem_ops++;
+            return rc;
+        }
     }
-
 out:
+    write_unlock(&tmem_rwlock);
     if ( rc < 0 )
         errored_tmem_ops++;
-    if ( write_lock_set )
-        write_unlock(&tmem_rwlock);
-    else if ( read_lock_set )
-        read_unlock(&tmem_rwlock);
-    else 
-        ASSERT(0);
-
     return rc;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56: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 1WaNW5-0006A0-Rv; Wed, 16 Apr 2014 10:56:33 +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 1WaNVw-00068f-6u
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Received: from [85.158.143.35:34048] by server-2.bemta-4.messagelabs.com id
	3C/F7-06539-7D16E435; Wed, 16 Apr 2014 10:56:23 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1397645781!9497893!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15414 invoked from network); 16 Apr 2014 10:56:22 -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;
	16 Apr 2014 10:56:22 -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 1WaNVt-0000cD-MO
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVt-0000Km-KF
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:21 +0000
Date: Wed, 16 Apr 2014 10:56:21 +0000
Message-Id: <E1WaNVt-0000Km-KF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: bugfix in obj allocate path
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 108c6d26b06f90c5611b4d7c426f21cc010ea114
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:23 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:05:20 2014 -0400

    tmem: bugfix in obj allocate path
    
    There is a potential bug in the obj allocate path. When there are parallel
    callers allocate a obj and insert it to pool->obj_rb_root, an unexpected
    obj might be returned (both callers use the same oid).
    
    Caller A:                            Caller B:
    
    obj_find(oidp) == NULL               obj_find(oidp) == NULL
    
    write_lock(&pool->pool_rwlock)
    obj_new():
        objA = tmem_malloc()
        obj_rb_insert(objA)
    wirte_unlock()
                                         write_lock(&pool->pool_rwlock)
                                         obj_new():
                                            objB = tmem_malloc()
                                            obj_rb_insert(objB)
                                         write_unlock()
    
    Continue write data to objA
    But in future obj_find(), objB
    will always be returned.
    
    The route cause is the allocate path didn't check the return value of
    obj_rb_insert(). This patch fix it and replace obj_new() with better name
    obj_alloc().
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 8c788ac..39ffe17 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -959,12 +959,11 @@ static int obj_rb_insert(struct rb_root *root, struct tmem_object_root *obj)
  * allocate, initialize, and insert an tmem_object_root
  * (should be called only if find failed)
  */
-static struct tmem_object_root * obj_new(struct tmem_pool *pool, struct oid *oidp)
+static struct tmem_object_root * obj_alloc(struct tmem_pool *pool, struct oid *oidp)
 {
     struct tmem_object_root *obj;
 
     ASSERT(pool != NULL);
-    ASSERT_WRITELOCK(&pool->pool_rwlock);
     if ( (obj = tmem_malloc(sizeof(struct tmem_object_root), pool)) == NULL )
         return NULL;
     pool->obj_count++;
@@ -979,9 +978,6 @@ static struct tmem_object_root * obj_new(struct tmem_pool *pool, struct oid *oid
     obj->objnode_count = 0;
     obj->pgp_count = 0;
     obj->last_client = TMEM_CLI_ID_NULL;
-    spin_lock(&obj->obj_spinlock);
-    obj_rb_insert(&pool->obj_rb_root[oid_hash(oidp)], obj);
-    ASSERT_SPINLOCK(&obj->obj_spinlock);
     return obj;
 }
 
@@ -1552,10 +1548,13 @@ static int do_tmem_put(struct tmem_pool *pool,
 
     ASSERT(pool != NULL);
     client = pool->client;
+    ASSERT(client != NULL);
     ret = client->frozen ? -EFROZEN : -ENOMEM;
     pool->puts++;
+
+refind:
     /* does page already exist (dup)?  if so, handle specially */
-    if ( (obj = obj_find(pool,oidp)) != NULL )
+    if ( (obj = obj_find(pool, oidp)) != NULL )
     {
         if ((pgp = pgp_lookup_in_obj(obj, index)) != NULL)
         {
@@ -1573,12 +1572,22 @@ static int do_tmem_put(struct tmem_pool *pool,
         /* no puts allowed into a frozen pool (except dup puts) */
         if ( client->frozen )
             return ret;
+        if ( (obj = obj_alloc(pool, oidp)) == NULL )
+            return -ENOMEM;
+
         write_lock(&pool->pool_rwlock);
-        if ( (obj = obj_new(pool,oidp)) == NULL )
+        /*
+	 * Parallel callers may already allocated obj and inserted to obj_rb_root
+	 * before us.
+	 */
+        if (!obj_rb_insert(&pool->obj_rb_root[oid_hash(oidp)], obj))
         {
+            tmem_free(obj, pool);
             write_unlock(&pool->pool_rwlock);
-            return -ENOMEM;
+            goto refind;
         }
+
+        spin_lock(&obj->obj_spinlock);
         newobj = 1;
         write_unlock(&pool->pool_rwlock);
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56: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 1WaNW5-0006A0-Rv; Wed, 16 Apr 2014 10:56:33 +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 1WaNVw-00068f-6u
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Received: from [85.158.143.35:34048] by server-2.bemta-4.messagelabs.com id
	3C/F7-06539-7D16E435; Wed, 16 Apr 2014 10:56:23 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1397645781!9497893!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 15414 invoked from network); 16 Apr 2014 10:56:22 -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;
	16 Apr 2014 10:56:22 -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 1WaNVt-0000cD-MO
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVt-0000Km-KF
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:21 +0000
Date: Wed, 16 Apr 2014 10:56:21 +0000
Message-Id: <E1WaNVt-0000Km-KF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: bugfix in obj allocate path
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 108c6d26b06f90c5611b4d7c426f21cc010ea114
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:23 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:05:20 2014 -0400

    tmem: bugfix in obj allocate path
    
    There is a potential bug in the obj allocate path. When there are parallel
    callers allocate a obj and insert it to pool->obj_rb_root, an unexpected
    obj might be returned (both callers use the same oid).
    
    Caller A:                            Caller B:
    
    obj_find(oidp) == NULL               obj_find(oidp) == NULL
    
    write_lock(&pool->pool_rwlock)
    obj_new():
        objA = tmem_malloc()
        obj_rb_insert(objA)
    wirte_unlock()
                                         write_lock(&pool->pool_rwlock)
                                         obj_new():
                                            objB = tmem_malloc()
                                            obj_rb_insert(objB)
                                         write_unlock()
    
    Continue write data to objA
    But in future obj_find(), objB
    will always be returned.
    
    The route cause is the allocate path didn't check the return value of
    obj_rb_insert(). This patch fix it and replace obj_new() with better name
    obj_alloc().
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 8c788ac..39ffe17 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -959,12 +959,11 @@ static int obj_rb_insert(struct rb_root *root, struct tmem_object_root *obj)
  * allocate, initialize, and insert an tmem_object_root
  * (should be called only if find failed)
  */
-static struct tmem_object_root * obj_new(struct tmem_pool *pool, struct oid *oidp)
+static struct tmem_object_root * obj_alloc(struct tmem_pool *pool, struct oid *oidp)
 {
     struct tmem_object_root *obj;
 
     ASSERT(pool != NULL);
-    ASSERT_WRITELOCK(&pool->pool_rwlock);
     if ( (obj = tmem_malloc(sizeof(struct tmem_object_root), pool)) == NULL )
         return NULL;
     pool->obj_count++;
@@ -979,9 +978,6 @@ static struct tmem_object_root * obj_new(struct tmem_pool *pool, struct oid *oid
     obj->objnode_count = 0;
     obj->pgp_count = 0;
     obj->last_client = TMEM_CLI_ID_NULL;
-    spin_lock(&obj->obj_spinlock);
-    obj_rb_insert(&pool->obj_rb_root[oid_hash(oidp)], obj);
-    ASSERT_SPINLOCK(&obj->obj_spinlock);
     return obj;
 }
 
@@ -1552,10 +1548,13 @@ static int do_tmem_put(struct tmem_pool *pool,
 
     ASSERT(pool != NULL);
     client = pool->client;
+    ASSERT(client != NULL);
     ret = client->frozen ? -EFROZEN : -ENOMEM;
     pool->puts++;
+
+refind:
     /* does page already exist (dup)?  if so, handle specially */
-    if ( (obj = obj_find(pool,oidp)) != NULL )
+    if ( (obj = obj_find(pool, oidp)) != NULL )
     {
         if ((pgp = pgp_lookup_in_obj(obj, index)) != NULL)
         {
@@ -1573,12 +1572,22 @@ static int do_tmem_put(struct tmem_pool *pool,
         /* no puts allowed into a frozen pool (except dup puts) */
         if ( client->frozen )
             return ret;
+        if ( (obj = obj_alloc(pool, oidp)) == NULL )
+            return -ENOMEM;
+
         write_lock(&pool->pool_rwlock);
-        if ( (obj = obj_new(pool,oidp)) == NULL )
+        /*
+	 * Parallel callers may already allocated obj and inserted to obj_rb_root
+	 * before us.
+	 */
+        if (!obj_rb_insert(&pool->obj_rb_root[oid_hash(oidp)], obj))
         {
+            tmem_free(obj, pool);
             write_unlock(&pool->pool_rwlock);
-            return -ENOMEM;
+            goto refind;
         }
+
+        spin_lock(&obj->obj_spinlock);
         newobj = 1;
         write_unlock(&pool->pool_rwlock);
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56: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 1WaNW6-0006A9-03; Wed, 16 Apr 2014 10:56:34 +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 1WaNVn-00068e-Jk
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Received: from [85.158.143.35:33658] by server-1.bemta-4.messagelabs.com id
	4F/F1-09853-EC16E435; Wed, 16 Apr 2014 10:56:14 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1397645771!9476078!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6569 invoked from network); 16 Apr 2014 10:56: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;
	16 Apr 2014 10:56:12 -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 1WaNVj-0000cA-Go
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVj-0000Jr-Eb
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:11 +0000
Date: Wed, 16 Apr 2014 10:56:11 +0000
Message-Id: <E1WaNVj-0000Jr-Eb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop unneeded
	client/pool initialization
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 3c7b10514ce32fc323be2ae5b3b5014ae1f2a627
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:22 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Tue Apr 8 10:05:17 2014 -0400

    tmem: cleanup: drop unneeded client/pool initialization
    
    Using xzalloc to alloc client and pool, so some extra initialization
    are dropped.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   19 +------------------
 1 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index b8c1265..8c788ac 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1030,24 +1030,13 @@ static struct tmem_pool * pool_alloc(void)
     struct tmem_pool *pool;
     int i;
 
-    if ( (pool = xmalloc(struct tmem_pool)) == NULL )
+    if ( (pool = xzalloc(struct tmem_pool)) == NULL )
         return NULL;
     for (i = 0; i < OBJ_HASH_BUCKETS; i++)
         pool->obj_rb_root[i] = RB_ROOT;
     INIT_LIST_HEAD(&pool->pool_list);
     INIT_LIST_HEAD(&pool->persistent_page_list);
-    pool->cur_pgp = NULL;
     rwlock_init(&pool->pool_rwlock);
-    pool->pgp_count_max = pool->obj_count_max = 0;
-    pool->objnode_count = pool->objnode_count_max = 0;
-    atomic_set(&pool->pgp_count,0);
-    pool->obj_count = 0; pool->shared_count = 0;
-    pool->good_puts = pool->puts = pool->dup_puts_flushed = 0;
-    pool->dup_puts_replaced = pool->no_mem_puts = 0;
-    pool->found_gets = pool->gets = 0;
-    pool->flushs_found = pool->flushs = 0;
-    pool->flush_objs_found = pool->flush_objs = 0;
-    pool->is_dying = 0;
     return pool;
 }
 
@@ -1216,15 +1205,9 @@ static struct client *client_create(domid_t cli_id)
     for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++)
         client->shared_auth_uuid[i][0] =
             client->shared_auth_uuid[i][1] = -1L;
-    client->frozen = 0; client->live_migrating = 0;
-    client->weight = 0; client->cap = 0;
     list_add_tail(&client->client_list, &global_client_list);
     INIT_LIST_HEAD(&client->ephemeral_page_list);
     INIT_LIST_HEAD(&client->persistent_invalidated_list);
-    client->cur_pgp = NULL;
-    client->eph_count = client->eph_count_max = 0;
-    client->total_cycles = 0; client->succ_pers_puts = 0;
-    client->succ_eph_gets = 0; client->succ_pers_gets = 0;
     tmem_client_info("ok\n");
     return client;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56: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 1WaNW6-0006A9-03; Wed, 16 Apr 2014 10:56:34 +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 1WaNVn-00068e-Jk
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Received: from [85.158.143.35:33658] by server-1.bemta-4.messagelabs.com id
	4F/F1-09853-EC16E435; Wed, 16 Apr 2014 10:56:14 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-21.messagelabs.com!1397645771!9476078!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6569 invoked from network); 16 Apr 2014 10:56: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;
	16 Apr 2014 10:56:12 -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 1WaNVj-0000cA-Go
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:11 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVj-0000Jr-Eb
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:11 +0000
Date: Wed, 16 Apr 2014 10:56:11 +0000
Message-Id: <E1WaNVj-0000Jr-Eb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop unneeded
	client/pool initialization
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 3c7b10514ce32fc323be2ae5b3b5014ae1f2a627
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:22 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Tue Apr 8 10:05:17 2014 -0400

    tmem: cleanup: drop unneeded client/pool initialization
    
    Using xzalloc to alloc client and pool, so some extra initialization
    are dropped.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   19 +------------------
 1 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index b8c1265..8c788ac 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1030,24 +1030,13 @@ static struct tmem_pool * pool_alloc(void)
     struct tmem_pool *pool;
     int i;
 
-    if ( (pool = xmalloc(struct tmem_pool)) == NULL )
+    if ( (pool = xzalloc(struct tmem_pool)) == NULL )
         return NULL;
     for (i = 0; i < OBJ_HASH_BUCKETS; i++)
         pool->obj_rb_root[i] = RB_ROOT;
     INIT_LIST_HEAD(&pool->pool_list);
     INIT_LIST_HEAD(&pool->persistent_page_list);
-    pool->cur_pgp = NULL;
     rwlock_init(&pool->pool_rwlock);
-    pool->pgp_count_max = pool->obj_count_max = 0;
-    pool->objnode_count = pool->objnode_count_max = 0;
-    atomic_set(&pool->pgp_count,0);
-    pool->obj_count = 0; pool->shared_count = 0;
-    pool->good_puts = pool->puts = pool->dup_puts_flushed = 0;
-    pool->dup_puts_replaced = pool->no_mem_puts = 0;
-    pool->found_gets = pool->gets = 0;
-    pool->flushs_found = pool->flushs = 0;
-    pool->flush_objs_found = pool->flush_objs = 0;
-    pool->is_dying = 0;
     return pool;
 }
 
@@ -1216,15 +1205,9 @@ static struct client *client_create(domid_t cli_id)
     for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++)
         client->shared_auth_uuid[i][0] =
             client->shared_auth_uuid[i][1] = -1L;
-    client->frozen = 0; client->live_migrating = 0;
-    client->weight = 0; client->cap = 0;
     list_add_tail(&client->client_list, &global_client_list);
     INIT_LIST_HEAD(&client->ephemeral_page_list);
     INIT_LIST_HEAD(&client->persistent_invalidated_list);
-    client->cur_pgp = NULL;
-    client->eph_count = client->eph_count_max = 0;
-    client->total_cycles = 0; client->succ_pers_puts = 0;
-    client->succ_eph_gets = 0; client->succ_pers_gets = 0;
     tmem_client_info("ok\n");
     return client;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:45 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56:45 +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 1WaNW6-0006AO-GR; Wed, 16 Apr 2014 10:56:34 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVc-00068a-8H
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Received: from [85.158.139.211:53866] by server-6.bemta-5.messagelabs.com id
	63/6B-19576-3C16E435; Wed, 16 Apr 2014 10:56:03 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-206.messagelabs.com!1397645761!7584843!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11090 invoked from network); 16 Apr 2014 10:56:02 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:56:02 -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 1WaNVZ-0000bb-An
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:01 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVZ-0000JH-9f
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:01 +0000
Date: Wed, 16 Apr 2014 10:56:01 +0000
Message-Id: <E1WaNVZ-0000JH-9f@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: remove pageshift from struct
	tmem_pool
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 c150ec3fc3c985766bfc669cb298f2a496f4daf6
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:20 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Tue Apr 8 10:05:17 2014 -0400

    tmem: remove pageshift from struct tmem_pool
    
    Pagesize is always the same as PAGE_SIZE in tmem, so remove pageshift from
    struct tmem_pool and use POOL_PAGESHIFT and PAGE_SIZE directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 823f166..b8c1265 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -88,6 +88,7 @@ struct share_list {
     struct client *client;
 };
 
+#define POOL_PAGESHIFT (PAGE_SHIFT - 12)
 #define OBJ_HASH_BUCKETS 256 /* must be power of two */
 #define OBJ_HASH_BUCKETS_MASK (OBJ_HASH_BUCKETS-1)
 
@@ -95,7 +96,6 @@ struct tmem_pool {
     bool_t shared;
     bool_t persistent;
     bool_t is_dying;
-    int pageshift; /* 0 == 2**12 */
     struct list_head pool_list;
     struct client *client;
     uint64_t uuid[2]; /* 0 for private, non-zero for shared */
@@ -1042,7 +1042,6 @@ static struct tmem_pool * pool_alloc(void)
     pool->objnode_count = pool->objnode_count_max = 0;
     atomic_set(&pool->pgp_count,0);
     pool->obj_count = 0; pool->shared_count = 0;
-    pool->pageshift = PAGE_SHIFT - 12;
     pool->good_puts = pool->puts = pool->dup_puts_flushed = 0;
     pool->dup_puts_replaced = pool->no_mem_puts = 0;
     pool->found_gets = pool->gets = 0;
@@ -2356,7 +2355,7 @@ static int tmemc_save_subop(int cli_id, uint32_t pool_id,
              break;
          rc = (pool->persistent ? TMEM_POOL_PERSIST : 0) |
               (pool->shared ? TMEM_POOL_SHARED : 0) |
-              (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT) |
+              (POOL_PAGESHIFT << TMEM_POOL_PAGESIZE_SHIFT) |
               (TMEM_SPEC_VERSION << TMEM_POOL_VERSION_SHIFT);
         break;
     case TMEMC_SAVE_GET_POOL_NPAGES:
@@ -2396,13 +2395,11 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     struct oid oid;
     int ret = 0;
     struct tmem_handle h;
-    unsigned int pagesize;
 
     if ( pool == NULL || !is_persistent(pool) )
         return -1;
 
-    pagesize = 1 << (pool->pageshift + 12);
-    if ( bufsize < pagesize + sizeof(struct tmem_handle) )
+    if ( bufsize < PAGE_SIZE + sizeof(struct tmem_handle) )
         return -ENOMEM;
 
     spin_lock(&pers_lists_spinlock);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:45 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56:45 +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 1WaNW6-0006AO-GR; Wed, 16 Apr 2014 10:56:34 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVc-00068a-8H
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Received: from [85.158.139.211:53866] by server-6.bemta-5.messagelabs.com id
	63/6B-19576-3C16E435; Wed, 16 Apr 2014 10:56:03 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-206.messagelabs.com!1397645761!7584843!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11090 invoked from network); 16 Apr 2014 10:56:02 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:56:02 -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 1WaNVZ-0000bb-An
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:01 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNVZ-0000JH-9f
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:01 +0000
Date: Wed, 16 Apr 2014 10:56:01 +0000
Message-Id: <E1WaNVZ-0000JH-9f@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: remove pageshift from struct
	tmem_pool
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 c150ec3fc3c985766bfc669cb298f2a496f4daf6
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:20 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Tue Apr 8 10:05:17 2014 -0400

    tmem: remove pageshift from struct tmem_pool
    
    Pagesize is always the same as PAGE_SIZE in tmem, so remove pageshift from
    struct tmem_pool and use POOL_PAGESHIFT and PAGE_SIZE directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 823f166..b8c1265 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -88,6 +88,7 @@ struct share_list {
     struct client *client;
 };
 
+#define POOL_PAGESHIFT (PAGE_SHIFT - 12)
 #define OBJ_HASH_BUCKETS 256 /* must be power of two */
 #define OBJ_HASH_BUCKETS_MASK (OBJ_HASH_BUCKETS-1)
 
@@ -95,7 +96,6 @@ struct tmem_pool {
     bool_t shared;
     bool_t persistent;
     bool_t is_dying;
-    int pageshift; /* 0 == 2**12 */
     struct list_head pool_list;
     struct client *client;
     uint64_t uuid[2]; /* 0 for private, non-zero for shared */
@@ -1042,7 +1042,6 @@ static struct tmem_pool * pool_alloc(void)
     pool->objnode_count = pool->objnode_count_max = 0;
     atomic_set(&pool->pgp_count,0);
     pool->obj_count = 0; pool->shared_count = 0;
-    pool->pageshift = PAGE_SHIFT - 12;
     pool->good_puts = pool->puts = pool->dup_puts_flushed = 0;
     pool->dup_puts_replaced = pool->no_mem_puts = 0;
     pool->found_gets = pool->gets = 0;
@@ -2356,7 +2355,7 @@ static int tmemc_save_subop(int cli_id, uint32_t pool_id,
              break;
          rc = (pool->persistent ? TMEM_POOL_PERSIST : 0) |
               (pool->shared ? TMEM_POOL_SHARED : 0) |
-              (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT) |
+              (POOL_PAGESHIFT << TMEM_POOL_PAGESIZE_SHIFT) |
               (TMEM_SPEC_VERSION << TMEM_POOL_VERSION_SHIFT);
         break;
     case TMEMC_SAVE_GET_POOL_NPAGES:
@@ -2396,13 +2395,11 @@ static int tmemc_save_get_next_page(int cli_id, uint32_t pool_id,
     struct oid oid;
     int ret = 0;
     struct tmem_handle h;
-    unsigned int pagesize;
 
     if ( pool == NULL || !is_persistent(pool) )
         return -1;
 
-    pagesize = 1 << (pool->pageshift + 12);
-    if ( bufsize < pagesize + sizeof(struct tmem_handle) )
+    if ( bufsize < PAGE_SIZE + sizeof(struct tmem_handle) )
         return -ENOMEM;
 
     spin_lock(&pers_lists_spinlock);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56:48 +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 1WaNW9-0006Bd-Vc; Wed, 16 Apr 2014 10:56:38 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNW7-0006AM-1G
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:35 +0000
Received: from [85.158.139.211:6324] by server-14.bemta-5.messagelabs.com id
	84/94-15696-2E16E435; Wed, 16 Apr 2014 10:56:34 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1397645792!7827345!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9182 invoked from network); 16 Apr 2014 10:56:33 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:56:33 -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 1WaNW3-0000cI-RJ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNW3-0000LB-QH
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Date: Wed, 16 Apr 2014 10:56:31 +0000
Message-Id: <E1WaNW3-0000LB-QH@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: remove unneed parameter
	from pgp_delist()
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 c85297d097614916bc05dd39f07ba6c09c362860
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:24 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:17:38 2014 -0400

    tmem: cleanup: remove unneed parameter from pgp_delist()
    
    The parameter "eph_lock" is only needed for function tmem_evict(). Embeded the
    delist code into tmem_evict() directly so as to drop the eph_lock parameter. By
    this change, the eph list lock can also be released a bit earier.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    [v2: A fix for an assertion of 'client->eph_count >= 0' was rolled in]
---
 xen/common/tmem.c |   59 ++++++++++++++++++++++++++++++----------------------
 1 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 39ffe17..47728b9 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -694,7 +694,7 @@ static void pgp_free_from_inv_list(struct client *client, struct tmem_page_descr
 }
 
 /* remove the page from appropriate lists but not from parent object */
-static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
+static void pgp_delist(struct tmem_page_descriptor *pgp)
 {
     struct client *client;
 
@@ -705,8 +705,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
     ASSERT(client != NULL);
     if ( !is_persistent(pgp->us.obj->pool) )
     {
-        if ( !no_eph_lock )
-            spin_lock(&eph_lists_spinlock);
+        spin_lock(&eph_lists_spinlock);
         if ( !list_empty(&pgp->us.client_eph_pages) )
             client->eph_count--;
         ASSERT(client->eph_count >= 0);
@@ -715,8 +714,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
             global_eph_count--;
         ASSERT(global_eph_count >= 0);
         list_del_init(&pgp->global_eph_pages);
-        if ( !no_eph_lock )
-            spin_unlock(&eph_lists_spinlock);
+        spin_unlock(&eph_lists_spinlock);
     } else {
         if ( client->live_migrating )
         {
@@ -735,7 +733,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
 }
 
 /* remove page from lists (but not from parent object) and free it */
-static void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
+static void pgp_delete(struct tmem_page_descriptor *pgp)
 {
     uint64_t life;
 
@@ -744,7 +742,7 @@ static void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
     ASSERT(pgp->us.obj->pool != NULL);
     life = get_cycles() - pgp->timestamp;
     pgp->us.obj->pool->sum_life_cycles += life;
-    pgp_delist(pgp, no_eph_lock);
+    pgp_delist(pgp);
     pgp_free(pgp,1);
 }
 
@@ -754,7 +752,7 @@ static void pgp_destroy(void *v)
     struct tmem_page_descriptor *pgp = (struct tmem_page_descriptor *)v;
 
     ASSERT_SPINLOCK(&pgp->us.obj->obj_spinlock);
-    pgp_delist(pgp,0);
+    pgp_delist(pgp);
     ASSERT(pgp->us.obj != NULL);
     pgp->us.obj->pgp_count--;
     ASSERT(pgp->us.obj->pgp_count >= 0);
@@ -1303,7 +1301,7 @@ obj_unlock:
 static int tmem_evict(void)
 {
     struct client *client = current->domain->tmem_client;
-    struct tmem_page_descriptor *pgp = NULL, *pgp2, *pgp_del;
+    struct tmem_page_descriptor *pgp = NULL, *pgp_del;
     struct tmem_object_root *obj;
     struct tmem_pool *pool;
     int ret = 0;
@@ -1314,21 +1312,32 @@ static int tmem_evict(void)
     if ( (client != NULL) && client_over_quota(client) &&
          !list_empty(&client->ephemeral_page_list) )
     {
-        list_for_each_entry_safe(pgp,pgp2,&client->ephemeral_page_list,us.client_eph_pages)
-            if ( tmem_try_to_evict_pgp(pgp,&hold_pool_rwlock) )
+        list_for_each_entry(pgp, &client->ephemeral_page_list, us.client_eph_pages)
+            if ( tmem_try_to_evict_pgp(pgp, &hold_pool_rwlock) )
                 goto found;
-    } else if ( list_empty(&global_ephemeral_page_list) ) {
-        goto out;
-    } else {
-        list_for_each_entry_safe(pgp,pgp2,&global_ephemeral_page_list,global_eph_pages)
-            if ( tmem_try_to_evict_pgp(pgp,&hold_pool_rwlock) )
+    }
+    else if ( !list_empty(&global_ephemeral_page_list) )
+    {
+        list_for_each_entry(pgp, &global_ephemeral_page_list, global_eph_pages)
+            if ( tmem_try_to_evict_pgp(pgp, &hold_pool_rwlock) )
+            {
+                client = pgp->us.obj->pool->client;
                 goto found;
+            }
     }
-
-    ret = 0;
+     /* global_ephemeral_page_list is empty, so we bail out. */
+    spin_unlock(&eph_lists_spinlock);
     goto out;
 
 found:
+    list_del_init(&pgp->us.client_eph_pages);
+    client->eph_count--;
+    list_del_init(&pgp->global_eph_pages);
+    global_eph_count--;
+    ASSERT(global_eph_count >= 0);
+    ASSERT(client->eph_count >= 0);
+    spin_unlock(&eph_lists_spinlock);
+
     ASSERT(pgp != NULL);
     obj = pgp->us.obj;
     ASSERT(obj != NULL);
@@ -1343,7 +1352,9 @@ found:
         ASSERT(pgp->pcd->pgp_ref_count == 1 || pgp->eviction_attempted);
         pcd_disassociate(pgp,pool,1);
     }
-    pgp_delete(pgp,1);
+
+    /* pgp already delist, so call pgp_free directly */
+    pgp_free(pgp, 1);
     if ( obj->pgp_count == 0 )
     {
         ASSERT_WRITELOCK(&pool->pool_rwlock);
@@ -1355,9 +1366,7 @@ found:
         write_unlock(&pool->pool_rwlock);
     evicted_pgs++;
     ret = 1;
-
 out:
-    spin_unlock(&eph_lists_spinlock);
     return ret;
 }
 
@@ -1524,7 +1533,7 @@ failed_dup:
 cleanup:
     pgpfound = pgp_delete_from_obj(obj, pgp->index);
     ASSERT(pgpfound == pgp);
-    pgp_delete(pgpfound,0);
+    pgp_delete(pgpfound);
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
@@ -1687,7 +1696,7 @@ del_pgp_from_obj:
     pgp_delete_from_obj(obj, pgp->index);
 
 free_pgp:
-    pgp_delete(pgp, 0);
+    pgp_delete(pgp);
 unlock_obj:
     if ( newobj )
     {
@@ -1746,7 +1755,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
     {
         if ( !is_shared(pool) )
         {
-            pgp_delete(pgp,0);
+            pgp_delete(pgp);
             if ( obj->pgp_count == 0 )
             {
                 write_lock(&pool->pool_rwlock);
@@ -1796,7 +1805,7 @@ static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t
         spin_unlock(&obj->obj_spinlock);
         goto out;
     }
-    pgp_delete(pgp,0);
+    pgp_delete(pgp);
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:48 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56:48 +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 1WaNW9-0006Bd-Vc; Wed, 16 Apr 2014 10:56:38 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNW7-0006AM-1G
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:35 +0000
Received: from [85.158.139.211:6324] by server-14.bemta-5.messagelabs.com id
	84/94-15696-2E16E435; Wed, 16 Apr 2014 10:56:34 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-206.messagelabs.com!1397645792!7827345!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9182 invoked from network); 16 Apr 2014 10:56:33 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-2.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:56:33 -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 1WaNW3-0000cI-RJ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNW3-0000LB-QH
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:31 +0000
Date: Wed, 16 Apr 2014 10:56:31 +0000
Message-Id: <E1WaNW3-0000LB-QH@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: remove unneed parameter
	from pgp_delist()
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 c85297d097614916bc05dd39f07ba6c09c362860
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:24 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:17:38 2014 -0400

    tmem: cleanup: remove unneed parameter from pgp_delist()
    
    The parameter "eph_lock" is only needed for function tmem_evict(). Embeded the
    delist code into tmem_evict() directly so as to drop the eph_lock parameter. By
    this change, the eph list lock can also be released a bit earier.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    [v2: A fix for an assertion of 'client->eph_count >= 0' was rolled in]
---
 xen/common/tmem.c |   59 ++++++++++++++++++++++++++++++----------------------
 1 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 39ffe17..47728b9 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -694,7 +694,7 @@ static void pgp_free_from_inv_list(struct client *client, struct tmem_page_descr
 }
 
 /* remove the page from appropriate lists but not from parent object */
-static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
+static void pgp_delist(struct tmem_page_descriptor *pgp)
 {
     struct client *client;
 
@@ -705,8 +705,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
     ASSERT(client != NULL);
     if ( !is_persistent(pgp->us.obj->pool) )
     {
-        if ( !no_eph_lock )
-            spin_lock(&eph_lists_spinlock);
+        spin_lock(&eph_lists_spinlock);
         if ( !list_empty(&pgp->us.client_eph_pages) )
             client->eph_count--;
         ASSERT(client->eph_count >= 0);
@@ -715,8 +714,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
             global_eph_count--;
         ASSERT(global_eph_count >= 0);
         list_del_init(&pgp->global_eph_pages);
-        if ( !no_eph_lock )
-            spin_unlock(&eph_lists_spinlock);
+        spin_unlock(&eph_lists_spinlock);
     } else {
         if ( client->live_migrating )
         {
@@ -735,7 +733,7 @@ static void pgp_delist(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
 }
 
 /* remove page from lists (but not from parent object) and free it */
-static void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
+static void pgp_delete(struct tmem_page_descriptor *pgp)
 {
     uint64_t life;
 
@@ -744,7 +742,7 @@ static void pgp_delete(struct tmem_page_descriptor *pgp, bool_t no_eph_lock)
     ASSERT(pgp->us.obj->pool != NULL);
     life = get_cycles() - pgp->timestamp;
     pgp->us.obj->pool->sum_life_cycles += life;
-    pgp_delist(pgp, no_eph_lock);
+    pgp_delist(pgp);
     pgp_free(pgp,1);
 }
 
@@ -754,7 +752,7 @@ static void pgp_destroy(void *v)
     struct tmem_page_descriptor *pgp = (struct tmem_page_descriptor *)v;
 
     ASSERT_SPINLOCK(&pgp->us.obj->obj_spinlock);
-    pgp_delist(pgp,0);
+    pgp_delist(pgp);
     ASSERT(pgp->us.obj != NULL);
     pgp->us.obj->pgp_count--;
     ASSERT(pgp->us.obj->pgp_count >= 0);
@@ -1303,7 +1301,7 @@ obj_unlock:
 static int tmem_evict(void)
 {
     struct client *client = current->domain->tmem_client;
-    struct tmem_page_descriptor *pgp = NULL, *pgp2, *pgp_del;
+    struct tmem_page_descriptor *pgp = NULL, *pgp_del;
     struct tmem_object_root *obj;
     struct tmem_pool *pool;
     int ret = 0;
@@ -1314,21 +1312,32 @@ static int tmem_evict(void)
     if ( (client != NULL) && client_over_quota(client) &&
          !list_empty(&client->ephemeral_page_list) )
     {
-        list_for_each_entry_safe(pgp,pgp2,&client->ephemeral_page_list,us.client_eph_pages)
-            if ( tmem_try_to_evict_pgp(pgp,&hold_pool_rwlock) )
+        list_for_each_entry(pgp, &client->ephemeral_page_list, us.client_eph_pages)
+            if ( tmem_try_to_evict_pgp(pgp, &hold_pool_rwlock) )
                 goto found;
-    } else if ( list_empty(&global_ephemeral_page_list) ) {
-        goto out;
-    } else {
-        list_for_each_entry_safe(pgp,pgp2,&global_ephemeral_page_list,global_eph_pages)
-            if ( tmem_try_to_evict_pgp(pgp,&hold_pool_rwlock) )
+    }
+    else if ( !list_empty(&global_ephemeral_page_list) )
+    {
+        list_for_each_entry(pgp, &global_ephemeral_page_list, global_eph_pages)
+            if ( tmem_try_to_evict_pgp(pgp, &hold_pool_rwlock) )
+            {
+                client = pgp->us.obj->pool->client;
                 goto found;
+            }
     }
-
-    ret = 0;
+     /* global_ephemeral_page_list is empty, so we bail out. */
+    spin_unlock(&eph_lists_spinlock);
     goto out;
 
 found:
+    list_del_init(&pgp->us.client_eph_pages);
+    client->eph_count--;
+    list_del_init(&pgp->global_eph_pages);
+    global_eph_count--;
+    ASSERT(global_eph_count >= 0);
+    ASSERT(client->eph_count >= 0);
+    spin_unlock(&eph_lists_spinlock);
+
     ASSERT(pgp != NULL);
     obj = pgp->us.obj;
     ASSERT(obj != NULL);
@@ -1343,7 +1352,9 @@ found:
         ASSERT(pgp->pcd->pgp_ref_count == 1 || pgp->eviction_attempted);
         pcd_disassociate(pgp,pool,1);
     }
-    pgp_delete(pgp,1);
+
+    /* pgp already delist, so call pgp_free directly */
+    pgp_free(pgp, 1);
     if ( obj->pgp_count == 0 )
     {
         ASSERT_WRITELOCK(&pool->pool_rwlock);
@@ -1355,9 +1366,7 @@ found:
         write_unlock(&pool->pool_rwlock);
     evicted_pgs++;
     ret = 1;
-
 out:
-    spin_unlock(&eph_lists_spinlock);
     return ret;
 }
 
@@ -1524,7 +1533,7 @@ failed_dup:
 cleanup:
     pgpfound = pgp_delete_from_obj(obj, pgp->index);
     ASSERT(pgpfound == pgp);
-    pgp_delete(pgpfound,0);
+    pgp_delete(pgpfound);
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
@@ -1687,7 +1696,7 @@ del_pgp_from_obj:
     pgp_delete_from_obj(obj, pgp->index);
 
 free_pgp:
-    pgp_delete(pgp, 0);
+    pgp_delete(pgp);
 unlock_obj:
     if ( newobj )
     {
@@ -1746,7 +1755,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
     {
         if ( !is_shared(pool) )
         {
-            pgp_delete(pgp,0);
+            pgp_delete(pgp);
             if ( obj->pgp_count == 0 )
             {
                 write_lock(&pool->pool_rwlock);
@@ -1796,7 +1805,7 @@ static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t
         spin_unlock(&obj->obj_spinlock);
         goto out;
     }
-    pgp_delete(pgp,0);
+    pgp_delete(pgp);
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56:56 +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 1WaNWI-0006FY-KC; Wed, 16 Apr 2014 10:56:46 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWH-0006Eh-1h
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:45 +0000
Received: from [85.158.137.68:44396] by server-6.bemta-3.messagelabs.com id
	9F/EA-00470-CE16E435; Wed, 16 Apr 2014 10:56:44 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397645802!7291448!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3793 invoked from network); 16 Apr 2014 10:56:43 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:56:43 -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 1WaNWE-0000cO-1Q
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:42 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWD-0000La-Vw
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:42 +0000
Date: Wed, 16 Apr 2014 10:56:41 +0000
Message-Id: <E1WaNWD-0000La-Vw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: remove unneed parameter
	from pgp_free()
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 2679c716116c386deef899a8fd0bc38654fceeb9
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Wed Feb 12 22:43:23 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:06 2014 -0400

    tmem: cleanup: remove unneed parameter from pgp_free()
    
    The only difference of the "from_delete" parameter in pgp_free() is one line
    ASSERT(), this patch moves it the caller to make code more clean.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 47728b9..96d616d 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -654,15 +654,14 @@ static void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *po
     pgp->size = -1;
 }
 
-static void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
+static void pgp_free(struct tmem_page_descriptor *pgp)
 {
     struct tmem_pool *pool = NULL;
 
     ASSERT(pgp->us.obj != NULL);
-    ASSERT(pgp->us.obj->pool->client != NULL);
-    if ( from_delete )
-        ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
     ASSERT(pgp->us.obj->pool != NULL);
+    ASSERT(pgp->us.obj->pool->client != NULL);
+
     pool = pgp->us.obj->pool;
     if ( !is_persistent(pool) )
     {
@@ -743,7 +742,8 @@ static void pgp_delete(struct tmem_page_descriptor *pgp)
     life = get_cycles() - pgp->timestamp;
     pgp->us.obj->pool->sum_life_cycles += life;
     pgp_delist(pgp);
-    pgp_free(pgp,1);
+    ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
+    pgp_free(pgp);
 }
 
 /* called only indirectly by radix_tree_destroy */
@@ -756,7 +756,7 @@ static void pgp_destroy(void *v)
     ASSERT(pgp->us.obj != NULL);
     pgp->us.obj->pgp_count--;
     ASSERT(pgp->us.obj->pgp_count >= 0);
-    pgp_free(pgp,0);
+    pgp_free(pgp);
 }
 
 static int pgp_add_to_obj(struct tmem_object_root *obj, uint32_t index, struct tmem_page_descriptor *pgp)
@@ -1354,7 +1354,7 @@ found:
     }
 
     /* pgp already delist, so call pgp_free directly */
-    pgp_free(pgp, 1);
+    pgp_free(pgp);
     if ( obj->pgp_count == 0 )
     {
         ASSERT_WRITELOCK(&pool->pool_rwlock);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:56:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:56:56 +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 1WaNWI-0006FY-KC; Wed, 16 Apr 2014 10:56:46 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWH-0006Eh-1h
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:45 +0000
Received: from [85.158.137.68:44396] by server-6.bemta-3.messagelabs.com id
	9F/EA-00470-CE16E435; Wed, 16 Apr 2014 10:56:44 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397645802!7291448!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3793 invoked from network); 16 Apr 2014 10:56:43 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:56:43 -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 1WaNWE-0000cO-1Q
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:42 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWD-0000La-Vw
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:42 +0000
Date: Wed, 16 Apr 2014 10:56:41 +0000
Message-Id: <E1WaNWD-0000La-Vw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: remove unneed parameter
	from pgp_free()
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 2679c716116c386deef899a8fd0bc38654fceeb9
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Wed Feb 12 22:43:23 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:06 2014 -0400

    tmem: cleanup: remove unneed parameter from pgp_free()
    
    The only difference of the "from_delete" parameter in pgp_free() is one line
    ASSERT(), this patch moves it the caller to make code more clean.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 47728b9..96d616d 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -654,15 +654,14 @@ static void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *po
     pgp->size = -1;
 }
 
-static void pgp_free(struct tmem_page_descriptor *pgp, int from_delete)
+static void pgp_free(struct tmem_page_descriptor *pgp)
 {
     struct tmem_pool *pool = NULL;
 
     ASSERT(pgp->us.obj != NULL);
-    ASSERT(pgp->us.obj->pool->client != NULL);
-    if ( from_delete )
-        ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
     ASSERT(pgp->us.obj->pool != NULL);
+    ASSERT(pgp->us.obj->pool->client != NULL);
+
     pool = pgp->us.obj->pool;
     if ( !is_persistent(pool) )
     {
@@ -743,7 +742,8 @@ static void pgp_delete(struct tmem_page_descriptor *pgp)
     life = get_cycles() - pgp->timestamp;
     pgp->us.obj->pool->sum_life_cycles += life;
     pgp_delist(pgp);
-    pgp_free(pgp,1);
+    ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
+    pgp_free(pgp);
 }
 
 /* called only indirectly by radix_tree_destroy */
@@ -756,7 +756,7 @@ static void pgp_destroy(void *v)
     ASSERT(pgp->us.obj != NULL);
     pgp->us.obj->pgp_count--;
     ASSERT(pgp->us.obj->pgp_count >= 0);
-    pgp_free(pgp,0);
+    pgp_free(pgp);
 }
 
 static int pgp_add_to_obj(struct tmem_object_root *obj, uint32_t index, struct tmem_page_descriptor *pgp)
@@ -1354,7 +1354,7 @@ found:
     }
 
     /* pgp already delist, so call pgp_free directly */
-    pgp_free(pgp, 1);
+    pgp_free(pgp);
     if ( obj->pgp_count == 0 )
     {
         ASSERT_WRITELOCK(&pool->pool_rwlock);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:57:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:57: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 1WaNWT-0006Io-8e; Wed, 16 Apr 2014 10:56:57 +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 1WaNWR-0006I3-03
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:55 +0000
Received: from [85.158.143.35:37000] by server-3.bemta-4.messagelabs.com id
	89/9E-13602-6F16E435; Wed, 16 Apr 2014 10:56:54 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1397645812!9444110!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16382 invoked from network); 16 Apr 2014 10:56:53 -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;
	16 Apr 2014 10:56:53 -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 1WaNWO-0000ch-81
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:52 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWO-0000M1-6e
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:52 +0000
Date: Wed, 16 Apr 2014 10:56:52 +0000
Message-Id: <E1WaNWO-0000M1-6e@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup the pgp free path
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 ce8909b22dc5ed7e451536b789c91e6d88c29685
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Wed Feb 12 22:43:24 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:06 2014 -0400

    tmem: cleanup the pgp free path
    
    There are several functions related with pgp free, but their relationships are
    not clear enough for understanding. This patch made some cleanup by remove
    pgp_delist() and pgp_free_from_inv_list().
    
    The call trace is simple now:
    pgp_delist_free()
        > pgp_free()
            > __pgp_free()
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   66 ++++++++++++++++++++++------------------------------
 1 files changed, 28 insertions(+), 38 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 96d616d..58e11ec 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -654,6 +654,13 @@ static void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *po
     pgp->size = -1;
 }
 
+static void __pgp_free(struct tmem_page_descriptor *pgp, struct tmem_pool *pool)
+{
+    pgp->us.obj = NULL;
+    pgp->index = -1;
+    tmem_free(pgp, pool);
+}
+
 static void pgp_free(struct tmem_page_descriptor *pgp)
 {
     struct tmem_pool *pool = NULL;
@@ -678,30 +685,22 @@ static void pgp_free(struct tmem_page_descriptor *pgp)
         pgp->pool_id = pool->pool_id;
         return;
     }
-    pgp->us.obj = NULL;
-    pgp->index = -1;
-    tmem_free(pgp, pool);
-}
-
-static void pgp_free_from_inv_list(struct client *client, struct tmem_page_descriptor *pgp)
-{
-    struct tmem_pool *pool = client->pools[pgp->pool_id];
-
-    pgp->us.obj = NULL;
-    pgp->index = -1;
-    tmem_free(pgp, pool);
+    __pgp_free(pgp, pool);
 }
 
-/* remove the page from appropriate lists but not from parent object */
-static void pgp_delist(struct tmem_page_descriptor *pgp)
+/* remove pgp from global/pool/client lists and free it */
+static void pgp_delist_free(struct tmem_page_descriptor *pgp)
 {
     struct client *client;
+    uint64_t life;
 
     ASSERT(pgp != NULL);
     ASSERT(pgp->us.obj != NULL);
     ASSERT(pgp->us.obj->pool != NULL);
     client = pgp->us.obj->pool->client;
     ASSERT(client != NULL);
+
+    /* Delist pgp */
     if ( !is_persistent(pgp->us.obj->pool) )
     {
         spin_lock(&eph_lists_spinlock);
@@ -714,7 +713,9 @@ static void pgp_delist(struct tmem_page_descriptor *pgp)
         ASSERT(global_eph_count >= 0);
         list_del_init(&pgp->global_eph_pages);
         spin_unlock(&eph_lists_spinlock);
-    } else {
+    }
+    else
+    {
         if ( client->live_migrating )
         {
             spin_lock(&pers_lists_spinlock);
@@ -723,26 +724,18 @@ static void pgp_delist(struct tmem_page_descriptor *pgp)
             if ( pgp != pgp->us.obj->pool->cur_pgp )
                 list_del_init(&pgp->us.pool_pers_pages);
             spin_unlock(&pers_lists_spinlock);
-        } else {
+        }
+        else
+        {
             spin_lock(&pers_lists_spinlock);
             list_del_init(&pgp->us.pool_pers_pages);
             spin_unlock(&pers_lists_spinlock);
         }
     }
-}
-
-/* remove page from lists (but not from parent object) and free it */
-static void pgp_delete(struct tmem_page_descriptor *pgp)
-{
-    uint64_t life;
-
-    ASSERT(pgp != NULL);
-    ASSERT(pgp->us.obj != NULL);
-    ASSERT(pgp->us.obj->pool != NULL);
     life = get_cycles() - pgp->timestamp;
     pgp->us.obj->pool->sum_life_cycles += life;
-    pgp_delist(pgp);
-    ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
+
+    /* free pgp */
     pgp_free(pgp);
 }
 
@@ -751,12 +744,8 @@ static void pgp_destroy(void *v)
 {
     struct tmem_page_descriptor *pgp = (struct tmem_page_descriptor *)v;
 
-    ASSERT_SPINLOCK(&pgp->us.obj->obj_spinlock);
-    pgp_delist(pgp);
-    ASSERT(pgp->us.obj != NULL);
     pgp->us.obj->pgp_count--;
-    ASSERT(pgp->us.obj->pgp_count >= 0);
-    pgp_free(pgp);
+    pgp_delist_free(pgp);
 }
 
 static int pgp_add_to_obj(struct tmem_object_root *obj, uint32_t index, struct tmem_page_descriptor *pgp)
@@ -1330,6 +1319,7 @@ static int tmem_evict(void)
     goto out;
 
 found:
+    /* Delist */
     list_del_init(&pgp->us.client_eph_pages);
     client->eph_count--;
     list_del_init(&pgp->global_eph_pages);
@@ -1533,7 +1523,7 @@ failed_dup:
 cleanup:
     pgpfound = pgp_delete_from_obj(obj, pgp->index);
     ASSERT(pgpfound == pgp);
-    pgp_delete(pgpfound);
+    pgp_delist_free(pgpfound);
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
@@ -1696,7 +1686,7 @@ del_pgp_from_obj:
     pgp_delete_from_obj(obj, pgp->index);
 
 free_pgp:
-    pgp_delete(pgp);
+    pgp_free(pgp);
 unlock_obj:
     if ( newobj )
     {
@@ -1755,7 +1745,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
     {
         if ( !is_shared(pool) )
         {
-            pgp_delete(pgp);
+            pgp_delist_free(pgp);
             if ( obj->pgp_count == 0 )
             {
                 write_lock(&pool->pool_rwlock);
@@ -1805,7 +1795,7 @@ static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t
         spin_unlock(&obj->obj_spinlock);
         goto out;
     }
-    pgp_delete(pgp);
+    pgp_delist_free(pgp);
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
@@ -2378,7 +2368,7 @@ static int tmemc_save_subop(int cli_id, uint32_t pool_id,
         if ( !list_empty(&client->persistent_invalidated_list) )
             list_for_each_entry_safe(pgp,pgp2,
               &client->persistent_invalidated_list, client_inv_pages)
-                pgp_free_from_inv_list(client,pgp);
+                __pgp_free(pgp, client->pools[pgp->pool_id]);
         client->frozen = client->was_frozen;
         rc = 0;
         break;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:57:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:57: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 1WaNWT-0006Io-8e; Wed, 16 Apr 2014 10:56:57 +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 1WaNWR-0006I3-03
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:55 +0000
Received: from [85.158.143.35:37000] by server-3.bemta-4.messagelabs.com id
	89/9E-13602-6F16E435; Wed, 16 Apr 2014 10:56:54 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-21.messagelabs.com!1397645812!9444110!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16382 invoked from network); 16 Apr 2014 10:56:53 -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;
	16 Apr 2014 10:56:53 -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 1WaNWO-0000ch-81
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:52 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWO-0000M1-6e
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:56:52 +0000
Date: Wed, 16 Apr 2014 10:56:52 +0000
Message-Id: <E1WaNWO-0000M1-6e@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup the pgp free path
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 ce8909b22dc5ed7e451536b789c91e6d88c29685
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Wed Feb 12 22:43:24 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:06 2014 -0400

    tmem: cleanup the pgp free path
    
    There are several functions related with pgp free, but their relationships are
    not clear enough for understanding. This patch made some cleanup by remove
    pgp_delist() and pgp_free_from_inv_list().
    
    The call trace is simple now:
    pgp_delist_free()
        > pgp_free()
            > __pgp_free()
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   66 ++++++++++++++++++++++------------------------------
 1 files changed, 28 insertions(+), 38 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 96d616d..58e11ec 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -654,6 +654,13 @@ static void pgp_free_data(struct tmem_page_descriptor *pgp, struct tmem_pool *po
     pgp->size = -1;
 }
 
+static void __pgp_free(struct tmem_page_descriptor *pgp, struct tmem_pool *pool)
+{
+    pgp->us.obj = NULL;
+    pgp->index = -1;
+    tmem_free(pgp, pool);
+}
+
 static void pgp_free(struct tmem_page_descriptor *pgp)
 {
     struct tmem_pool *pool = NULL;
@@ -678,30 +685,22 @@ static void pgp_free(struct tmem_page_descriptor *pgp)
         pgp->pool_id = pool->pool_id;
         return;
     }
-    pgp->us.obj = NULL;
-    pgp->index = -1;
-    tmem_free(pgp, pool);
-}
-
-static void pgp_free_from_inv_list(struct client *client, struct tmem_page_descriptor *pgp)
-{
-    struct tmem_pool *pool = client->pools[pgp->pool_id];
-
-    pgp->us.obj = NULL;
-    pgp->index = -1;
-    tmem_free(pgp, pool);
+    __pgp_free(pgp, pool);
 }
 
-/* remove the page from appropriate lists but not from parent object */
-static void pgp_delist(struct tmem_page_descriptor *pgp)
+/* remove pgp from global/pool/client lists and free it */
+static void pgp_delist_free(struct tmem_page_descriptor *pgp)
 {
     struct client *client;
+    uint64_t life;
 
     ASSERT(pgp != NULL);
     ASSERT(pgp->us.obj != NULL);
     ASSERT(pgp->us.obj->pool != NULL);
     client = pgp->us.obj->pool->client;
     ASSERT(client != NULL);
+
+    /* Delist pgp */
     if ( !is_persistent(pgp->us.obj->pool) )
     {
         spin_lock(&eph_lists_spinlock);
@@ -714,7 +713,9 @@ static void pgp_delist(struct tmem_page_descriptor *pgp)
         ASSERT(global_eph_count >= 0);
         list_del_init(&pgp->global_eph_pages);
         spin_unlock(&eph_lists_spinlock);
-    } else {
+    }
+    else
+    {
         if ( client->live_migrating )
         {
             spin_lock(&pers_lists_spinlock);
@@ -723,26 +724,18 @@ static void pgp_delist(struct tmem_page_descriptor *pgp)
             if ( pgp != pgp->us.obj->pool->cur_pgp )
                 list_del_init(&pgp->us.pool_pers_pages);
             spin_unlock(&pers_lists_spinlock);
-        } else {
+        }
+        else
+        {
             spin_lock(&pers_lists_spinlock);
             list_del_init(&pgp->us.pool_pers_pages);
             spin_unlock(&pers_lists_spinlock);
         }
     }
-}
-
-/* remove page from lists (but not from parent object) and free it */
-static void pgp_delete(struct tmem_page_descriptor *pgp)
-{
-    uint64_t life;
-
-    ASSERT(pgp != NULL);
-    ASSERT(pgp->us.obj != NULL);
-    ASSERT(pgp->us.obj->pool != NULL);
     life = get_cycles() - pgp->timestamp;
     pgp->us.obj->pool->sum_life_cycles += life;
-    pgp_delist(pgp);
-    ASSERT(pgp_lookup_in_obj(pgp->us.obj,pgp->index) == NULL);
+
+    /* free pgp */
     pgp_free(pgp);
 }
 
@@ -751,12 +744,8 @@ static void pgp_destroy(void *v)
 {
     struct tmem_page_descriptor *pgp = (struct tmem_page_descriptor *)v;
 
-    ASSERT_SPINLOCK(&pgp->us.obj->obj_spinlock);
-    pgp_delist(pgp);
-    ASSERT(pgp->us.obj != NULL);
     pgp->us.obj->pgp_count--;
-    ASSERT(pgp->us.obj->pgp_count >= 0);
-    pgp_free(pgp);
+    pgp_delist_free(pgp);
 }
 
 static int pgp_add_to_obj(struct tmem_object_root *obj, uint32_t index, struct tmem_page_descriptor *pgp)
@@ -1330,6 +1319,7 @@ static int tmem_evict(void)
     goto out;
 
 found:
+    /* Delist */
     list_del_init(&pgp->us.client_eph_pages);
     client->eph_count--;
     list_del_init(&pgp->global_eph_pages);
@@ -1533,7 +1523,7 @@ failed_dup:
 cleanup:
     pgpfound = pgp_delete_from_obj(obj, pgp->index);
     ASSERT(pgpfound == pgp);
-    pgp_delete(pgpfound);
+    pgp_delist_free(pgpfound);
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
@@ -1696,7 +1686,7 @@ del_pgp_from_obj:
     pgp_delete_from_obj(obj, pgp->index);
 
 free_pgp:
-    pgp_delete(pgp);
+    pgp_free(pgp);
 unlock_obj:
     if ( newobj )
     {
@@ -1755,7 +1745,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
     {
         if ( !is_shared(pool) )
         {
-            pgp_delete(pgp);
+            pgp_delist_free(pgp);
             if ( obj->pgp_count == 0 )
             {
                 write_lock(&pool->pool_rwlock);
@@ -1805,7 +1795,7 @@ static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t
         spin_unlock(&obj->obj_spinlock);
         goto out;
     }
-    pgp_delete(pgp);
+    pgp_delist_free(pgp);
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
@@ -2378,7 +2368,7 @@ static int tmemc_save_subop(int cli_id, uint32_t pool_id,
         if ( !list_empty(&client->persistent_invalidated_list) )
             list_for_each_entry_safe(pgp,pgp2,
               &client->persistent_invalidated_list, client_inv_pages)
-                pgp_free_from_inv_list(client,pgp);
+                __pgp_free(pgp, client->pools[pgp->pool_id]);
         client->frozen = client->was_frozen;
         rc = 0;
         break;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:57:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:57:40 +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 1WaNX0-0006Lo-P1; Wed, 16 Apr 2014 10:57:30 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWn-0006KJ-II
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:29 +0000
Received: from [85.158.139.211:10169] by server-4.bemta-5.messagelabs.com id
	C3/4E-30750-C026E435; Wed, 16 Apr 2014 10:57:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1397645832!7866180!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28007 invoked from network); 16 Apr 2014 10:57:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:57:13 -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 1WaNWi-0000dP-J1
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWi-0000My-Hb
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:12 +0000
Date: Wed, 16 Apr 2014 10:57:12 +0000
Message-Id: <E1WaNWi-0000My-Hb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop global_pool_list
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 1ff771d5fa9b98e8f3729d99154c7d9c1ebea904
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:29 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:07 2014 -0400

    tmem: cleanup: drop global_pool_list
    
    No need to maintain a global pool list, nobody use it.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index adbb7cd..f91418d 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -96,7 +96,6 @@ struct tmem_pool {
     bool_t shared;
     bool_t persistent;
     bool_t is_dying;
-    struct list_head pool_list;
     struct client *client;
     uint64_t uuid[2]; /* 0 for private, non-zero for shared */
     uint32_t pool_id;
@@ -199,7 +198,6 @@ rwlock_t pcd_tree_rwlocks[256]; /* poor man's concurrency for now */
 static LIST_HEAD(global_ephemeral_page_list); /* all pages in ephemeral pools */
 
 static LIST_HEAD(global_client_list);
-static LIST_HEAD(global_pool_list);
 
 static struct tmem_pool *global_shared_pools[MAX_GLOBAL_SHARED_POOLS] = { 0 };
 static bool_t global_shared_auth = 0;
@@ -1017,7 +1015,6 @@ static struct tmem_pool * pool_alloc(void)
         return NULL;
     for (i = 0; i < OBJ_HASH_BUCKETS; i++)
         pool->obj_rb_root[i] = RB_ROOT;
-    INIT_LIST_HEAD(&pool->pool_list);
     INIT_LIST_HEAD(&pool->persistent_page_list);
     rwlock_init(&pool->pool_rwlock);
     return pool;
@@ -1026,7 +1023,6 @@ static struct tmem_pool * pool_alloc(void)
 static void pool_free(struct tmem_pool *pool)
 {
     pool->client = NULL;
-    list_del(&pool->pool_list);
     xfree(pool);
 }
 
@@ -1962,7 +1958,6 @@ static int do_tmem_new_pool(domid_t this_cli_id,
         }
     }
     client->pools[d_poolid] = pool;
-    list_add_tail(&pool->pool_list, &global_pool_list);
     pool->pool_id = d_poolid;
     pool->persistent = persistent;
     pool->uuid[0] = uuid_lo; pool->uuid[1] = uuid_hi;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:57:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:57:40 +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 1WaNX0-0006Lo-P1; Wed, 16 Apr 2014 10:57:30 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWn-0006KJ-II
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:29 +0000
Received: from [85.158.139.211:10169] by server-4.bemta-5.messagelabs.com id
	C3/4E-30750-C026E435; Wed, 16 Apr 2014 10:57:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1397645832!7866180!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28007 invoked from network); 16 Apr 2014 10:57:13 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:57:13 -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 1WaNWi-0000dP-J1
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWi-0000My-Hb
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:12 +0000
Date: Wed, 16 Apr 2014 10:57:12 +0000
Message-Id: <E1WaNWi-0000My-Hb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: drop global_pool_list
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 1ff771d5fa9b98e8f3729d99154c7d9c1ebea904
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:29 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:07 2014 -0400

    tmem: cleanup: drop global_pool_list
    
    No need to maintain a global pool list, nobody use it.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index adbb7cd..f91418d 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -96,7 +96,6 @@ struct tmem_pool {
     bool_t shared;
     bool_t persistent;
     bool_t is_dying;
-    struct list_head pool_list;
     struct client *client;
     uint64_t uuid[2]; /* 0 for private, non-zero for shared */
     uint32_t pool_id;
@@ -199,7 +198,6 @@ rwlock_t pcd_tree_rwlocks[256]; /* poor man's concurrency for now */
 static LIST_HEAD(global_ephemeral_page_list); /* all pages in ephemeral pools */
 
 static LIST_HEAD(global_client_list);
-static LIST_HEAD(global_pool_list);
 
 static struct tmem_pool *global_shared_pools[MAX_GLOBAL_SHARED_POOLS] = { 0 };
 static bool_t global_shared_auth = 0;
@@ -1017,7 +1015,6 @@ static struct tmem_pool * pool_alloc(void)
         return NULL;
     for (i = 0; i < OBJ_HASH_BUCKETS; i++)
         pool->obj_rb_root[i] = RB_ROOT;
-    INIT_LIST_HEAD(&pool->pool_list);
     INIT_LIST_HEAD(&pool->persistent_page_list);
     rwlock_init(&pool->pool_rwlock);
     return pool;
@@ -1026,7 +1023,6 @@ static struct tmem_pool * pool_alloc(void)
 static void pool_free(struct tmem_pool *pool)
 {
     pool->client = NULL;
-    list_del(&pool->pool_list);
     xfree(pool);
 }
 
@@ -1962,7 +1958,6 @@ static int do_tmem_new_pool(domid_t this_cli_id,
         }
     }
     client->pools[d_poolid] = pool;
-    list_add_tail(&pool->pool_list, &global_pool_list);
     pool->pool_id = d_poolid;
     pool->persistent = persistent;
     pool->uuid[0] = uuid_lo; pool->uuid[1] = uuid_hi;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:57:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:57:41 +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 1WaNX0-0006Lw-Vv; Wed, 16 Apr 2014 10:57:31 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWb-0006KA-79
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:28 +0000
Received: from [85.158.139.211:12752] by server-9.bemta-5.messagelabs.com id
	84/40-04350-0026E435; Wed, 16 Apr 2014 10:57:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-206.messagelabs.com!1397645822!7852239!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31847 invoked from network); 16 Apr 2014 10:57:03 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:57:03 -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 1WaNWY-0000dJ-Dh
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWY-0000MX-Bt
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:02 +0000
Date: Wed, 16 Apr 2014 10:57:02 +0000
Message-Id: <E1WaNWY-0000MX-Bt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: drop oneline function
	client_freeze()
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 dd1f5357e97bebc337163120cb618ea75ebc4f13
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:27 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:07 2014 -0400

    tmem: drop oneline function client_freeze()
    
    Function client_freeze() only set client->frozen = freeze, the caller can do
    this work directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 58e11ec..adbb7cd 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1236,11 +1236,6 @@ static bool_t client_over_quota(struct client *client)
              ((total*100L) / client->weight) );
 }
 
-static void client_freeze(struct client *client, int freeze)
-{
-    client->frozen = freeze;
-}
-
 /************ MEMORY REVOCATION ROUTINES *******************************/
 
 static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *hold_pool_rwlock)
@@ -1993,14 +1988,14 @@ static int tmemc_freeze_pools(domid_t cli_id, int arg)
     if ( cli_id == TMEM_CLI_ID_NULL )
     {
         list_for_each_entry(client,&global_client_list,client_list)
-            client_freeze(client,freeze);
+            client->frozen = freeze;
         tmem_client_info("tmem: all pools %s for all %ss\n", s, tmem_client_str);
     }
     else
     {
         if ( (client = tmem_client_from_cli_id(cli_id)) == NULL)
             return -1;
-        client_freeze(client,freeze);
+        client->frozen = freeze;
         tmem_client_info("tmem: all pools %s for %s=%d\n",
                          s, tmem_cli_id_str, cli_id);
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:57:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:57:41 +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 1WaNX0-0006Lw-Vv; Wed, 16 Apr 2014 10:57:31 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWb-0006KA-79
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:28 +0000
Received: from [85.158.139.211:12752] by server-9.bemta-5.messagelabs.com id
	84/40-04350-0026E435; Wed, 16 Apr 2014 10:57:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-206.messagelabs.com!1397645822!7852239!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31847 invoked from network); 16 Apr 2014 10:57:03 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:57:03 -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 1WaNWY-0000dJ-Dh
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWY-0000MX-Bt
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:02 +0000
Date: Wed, 16 Apr 2014 10:57:02 +0000
Message-Id: <E1WaNWY-0000MX-Bt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: drop oneline function
	client_freeze()
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 dd1f5357e97bebc337163120cb618ea75ebc4f13
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:27 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:07 2014 -0400

    tmem: drop oneline function client_freeze()
    
    Function client_freeze() only set client->frozen = freeze, the caller can do
    this work directly.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 58e11ec..adbb7cd 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1236,11 +1236,6 @@ static bool_t client_over_quota(struct client *client)
              ((total*100L) / client->weight) );
 }
 
-static void client_freeze(struct client *client, int freeze)
-{
-    client->frozen = freeze;
-}
-
 /************ MEMORY REVOCATION ROUTINES *******************************/
 
 static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *hold_pool_rwlock)
@@ -1993,14 +1988,14 @@ static int tmemc_freeze_pools(domid_t cli_id, int arg)
     if ( cli_id == TMEM_CLI_ID_NULL )
     {
         list_for_each_entry(client,&global_client_list,client_list)
-            client_freeze(client,freeze);
+            client->frozen = freeze;
         tmem_client_info("tmem: all pools %s for all %ss\n", s, tmem_client_str);
     }
     else
     {
         if ( (client = tmem_client_from_cli_id(cli_id)) == NULL)
             return -1;
-        client_freeze(client,freeze);
+        client->frozen = freeze;
         tmem_client_info("tmem: all pools %s for %s=%d\n",
                          s, tmem_cli_id_str, cli_id);
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:57:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:57:41 +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 1WaNX1-0006M3-72; Wed, 16 Apr 2014 10:57:31 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWv-0006KO-Hu
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:29 +0000
Received: from [193.109.254.147:5636] by server-16.bemta-14.messagelabs.com id
	05/B7-16986-4126E435; Wed, 16 Apr 2014 10:57:24 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1397645842!8695883!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19975 invoked from network); 16 Apr 2014 10:57:23 -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;
	16 Apr 2014 10:57:23 -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 1WaNWs-0000dS-Ng
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:22 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWs-0000O5-MZ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:22 +0000
Date: Wed, 16 Apr 2014 10:57:22 +0000
Message-Id: <E1WaNWs-0000O5-MZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: fix the return value of
	tmemc_set_var()
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 b4db3b80e04a009ccd04551f5fe351d626796aab
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:30 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:08 2014 -0400

    tmem: fix the return value of tmemc_set_var()
    
    tmemc_set_var() calls tmemc_set_var_one() but without taking its return value,
    this patch fix this issue.
    Also rename tmemc_set_var_one() to __tmemc_set_var().
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index f91418d..544c9bf 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2186,7 +2186,7 @@ static int tmemc_list(domid_t cli_id, tmem_cli_va_param_t buf, uint32_t len,
     return 0;
 }
 
-static int tmemc_set_var_one(struct client *client, uint32_t subop, uint32_t arg1)
+static int __tmemc_set_var(struct client *client, uint32_t subop, uint32_t arg1)
 {
     domid_t cli_id = client->cli_id;
     uint32_t old_weight;
@@ -2228,15 +2228,24 @@ static int tmemc_set_var_one(struct client *client, uint32_t subop, uint32_t arg
 static int tmemc_set_var(domid_t cli_id, uint32_t subop, uint32_t arg1)
 {
     struct client *client;
+    int ret = -1;
 
     if ( cli_id == TMEM_CLI_ID_NULL )
+    {
         list_for_each_entry(client,&global_client_list,client_list)
-            tmemc_set_var_one(client, subop, arg1);
-    else if ( (client = tmem_client_from_cli_id(cli_id)) == NULL)
-        return -1;
+        {
+            ret =  __tmemc_set_var(client, subop, arg1);
+            if (ret)
+                break;
+        }
+    }
     else
-        tmemc_set_var_one(client, subop, arg1);
-    return 0;
+    {
+        client = tmem_client_from_cli_id(cli_id);
+        if ( client )
+            ret = __tmemc_set_var(client, subop, arg1);
+    }
+    return ret;
 }
 
 static int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:57:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:57:41 +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 1WaNX1-0006M3-72; Wed, 16 Apr 2014 10:57:31 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWv-0006KO-Hu
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:29 +0000
Received: from [193.109.254.147:5636] by server-16.bemta-14.messagelabs.com id
	05/B7-16986-4126E435; Wed, 16 Apr 2014 10:57:24 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1397645842!8695883!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19975 invoked from network); 16 Apr 2014 10:57:23 -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;
	16 Apr 2014 10:57:23 -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 1WaNWs-0000dS-Ng
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:22 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNWs-0000O5-MZ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:22 +0000
Date: Wed, 16 Apr 2014 10:57:22 +0000
Message-Id: <E1WaNWs-0000O5-MZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: fix the return value of
	tmemc_set_var()
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 b4db3b80e04a009ccd04551f5fe351d626796aab
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:30 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:08 2014 -0400

    tmem: fix the return value of tmemc_set_var()
    
    tmemc_set_var() calls tmemc_set_var_one() but without taking its return value,
    this patch fix this issue.
    Also rename tmemc_set_var_one() to __tmemc_set_var().
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index f91418d..544c9bf 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2186,7 +2186,7 @@ static int tmemc_list(domid_t cli_id, tmem_cli_va_param_t buf, uint32_t len,
     return 0;
 }
 
-static int tmemc_set_var_one(struct client *client, uint32_t subop, uint32_t arg1)
+static int __tmemc_set_var(struct client *client, uint32_t subop, uint32_t arg1)
 {
     domid_t cli_id = client->cli_id;
     uint32_t old_weight;
@@ -2228,15 +2228,24 @@ static int tmemc_set_var_one(struct client *client, uint32_t subop, uint32_t arg
 static int tmemc_set_var(domid_t cli_id, uint32_t subop, uint32_t arg1)
 {
     struct client *client;
+    int ret = -1;
 
     if ( cli_id == TMEM_CLI_ID_NULL )
+    {
         list_for_each_entry(client,&global_client_list,client_list)
-            tmemc_set_var_one(client, subop, arg1);
-    else if ( (client = tmem_client_from_cli_id(cli_id)) == NULL)
-        return -1;
+        {
+            ret =  __tmemc_set_var(client, subop, arg1);
+            if (ret)
+                break;
+        }
+    }
     else
-        tmemc_set_var_one(client, subop, arg1);
-    return 0;
+    {
+        client = tmem_client_from_cli_id(cli_id);
+        if ( client )
+            ret = __tmemc_set_var(client, subop, arg1);
+    }
+    return ret;
 }
 
 static int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:03 +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 1WaNXH-0006T7-4t; Wed, 16 Apr 2014 10:57:47 +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 1WaNXF-0006SC-NK
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:46 +0000
Received: from [85.158.143.35:43420] by server-2.bemta-4.messagelabs.com id
	44/1A-06539-9226E435; Wed, 16 Apr 2014 10:57:45 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1397645863!9380479!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1032 invoked from network); 16 Apr 2014 10:57:44 -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;
	16 Apr 2014 10:57:44 -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 1WaNXD-0000dd-2u
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXD-0000P2-1o
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:43 +0000
Date: Wed, 16 Apr 2014 10:57:43 +0000
Message-Id: <E1WaNXD-0000P2-1o@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: refactor function
	tmemc_shared_pool_auth()
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 ddaec70bec987969b3a8d4ee6c940fa22a2165e6
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:31 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:09 2014 -0400

    tmem: cleanup: refactor function tmemc_shared_pool_auth()
    
    Make function tmemc_shared_pool_auth() more readable.
    
    Note that the previous check for free being set the first time
    '(free == -1)' in the loop is now removed. That is OK because
    when we set free the first time ('free = i;') we follow it
    immediately with a break to get out of the loop.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   38 +++++++++++++++++++++++++-------------
 1 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index add236e..bad1bb9 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2257,27 +2257,39 @@ static int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
     client = tmem_client_from_cli_id(cli_id);
     if ( client == NULL )
         return -EINVAL;
+
     for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++)
     {
-        if ( (client->shared_auth_uuid[i][0] == uuid_lo) &&
-             (client->shared_auth_uuid[i][1] == uuid_hi) )
+        if ( auth == 0 )
         {
-            if ( auth == 0 )
-                client->shared_auth_uuid[i][0] =
-                    client->shared_auth_uuid[i][1] = -1L;
-            return 1;
+            if ( (client->shared_auth_uuid[i][0] == uuid_lo) &&
+                    (client->shared_auth_uuid[i][1] == uuid_hi) )
+            {
+                client->shared_auth_uuid[i][0] = -1L;
+                client->shared_auth_uuid[i][1] = -1L;
+                return 1;
+            }
         }
-        if ( (auth == 1) && (client->shared_auth_uuid[i][0] == -1L) &&
-                 (client->shared_auth_uuid[i][1] == -1L) && (free == -1) )
-            free = i;
+        else
+        {
+            if ( (client->shared_auth_uuid[i][0] == -1L) &&
+                    (client->shared_auth_uuid[i][1] == -1L) )
+            {
+                free = i;
+                break;
+            }
+	}
     }
     if ( auth == 0 )
         return 0;
-    if ( auth == 1 && free == -1 )
+    else if ( free == -1)
         return -ENOMEM;
-    client->shared_auth_uuid[free][0] = uuid_lo;
-    client->shared_auth_uuid[free][1] = uuid_hi;
-    return 1;
+    else
+    {
+        client->shared_auth_uuid[free][0] = uuid_lo;
+        client->shared_auth_uuid[free][1] = uuid_hi;
+        return 1;
+    }
 }
 
 static int tmemc_save_subop(int cli_id, uint32_t pool_id,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:03 +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 1WaNX9-0006Ow-PU; Wed, 16 Apr 2014 10:57:39 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNX5-0006Ni-JM
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:36 +0000
Received: from [193.109.254.147:6456] by server-16.bemta-14.messagelabs.com id
	EC/F7-16986-E126E435; Wed, 16 Apr 2014 10:57:34 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1397645853!8707148!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1092 invoked from network); 16 Apr 2014 10:57:34 -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;
	16 Apr 2014 10:57:34 -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 1WaNX2-0000da-Ty
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:32 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNX2-0000OT-SV
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:32 +0000
Date: Wed, 16 Apr 2014 10:57:32 +0000
Message-Id: <E1WaNX2-0000OT-SV@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: remove unneeded parameters from
	obj destroy path
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 6e1616dcb8871356d192ff497e410e912edb99be
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:28 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:08 2014 -0400

    tmem: remove unneeded parameters from obj destroy path
    
    Parameters "selective" and "no_rebalance" are meaningless in obj
    destroy path, this patch remove them. No place uses
    no_rebalance=1. In the obj_destroy path we always call it with
    no_balance=0.
    
    Note that this will now free it only if:
    
       obj->last_client == cli_id
    
    Which is OK - even if we allocate a non-shared pool we set by
    default the obj->last_client to TMEM_CLI_ID_NULL so even if
    the pool is never used, the pool_flush will take care of removing
    those.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   35 +++++++++++++++--------------------
 1 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 544c9bf..add236e 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -883,7 +883,7 @@ restart_find:
 }
 
 /* free an object that has no more pgps in it */
-static void obj_free(struct tmem_object_root *obj, int no_rebalance)
+static void obj_free(struct tmem_object_root *obj)
 {
     struct tmem_pool *pool;
     struct oid old_oid;
@@ -906,9 +906,7 @@ static void obj_free(struct tmem_object_root *obj, int no_rebalance)
     oid_set_invalid(&obj->oid);
     obj->last_client = TMEM_CLI_ID_NULL;
     atomic_dec_and_assert(global_obj_count);
-    /* use no_rebalance only if all objects are being destroyed anyway */
-    if ( !no_rebalance )
-        rb_erase(&obj->rb_tree_node,&pool->obj_rb_root[oid_hash(&old_oid)]);
+    rb_erase(&obj->rb_tree_node, &pool->obj_rb_root[oid_hash(&old_oid)]);
     spin_unlock(&obj->obj_spinlock);
     tmem_free(obj, pool);
 }
@@ -967,15 +965,15 @@ static struct tmem_object_root * obj_alloc(struct tmem_pool *pool, struct oid *o
 }
 
 /* free an object after destroying any pgps in it */
-static void obj_destroy(struct tmem_object_root *obj, int no_rebalance)
+static void obj_destroy(struct tmem_object_root *obj)
 {
     ASSERT_WRITELOCK(&obj->pool->pool_rwlock);
     radix_tree_destroy(&obj->tree_root, pgp_destroy);
-    obj_free(obj,no_rebalance);
+    obj_free(obj);
 }
 
 /* destroys all objs in a pool, or only if obj->last_client matches cli_id */
-static void pool_destroy_objs(struct tmem_pool *pool, bool_t selective, domid_t cli_id)
+static void pool_destroy_objs(struct tmem_pool *pool, domid_t cli_id)
 {
     struct rb_node *node;
     struct tmem_object_root *obj;
@@ -991,11 +989,8 @@ static void pool_destroy_objs(struct tmem_pool *pool, bool_t selective, domid_t
             obj = container_of(node, struct tmem_object_root, rb_tree_node);
             spin_lock(&obj->obj_spinlock);
             node = rb_next(node);
-            if ( !selective )
-                /* FIXME: should be obj,1 but walking/erasing rbtree is racy */
-                obj_destroy(obj,0);
-            else if ( obj->last_client == cli_id )
-                obj_destroy(obj,0);
+            if ( obj->last_client == cli_id )
+                obj_destroy(obj);
             else
                 spin_unlock(&obj->obj_spinlock);
         }
@@ -1084,7 +1079,7 @@ static int shared_pool_quit(struct tmem_pool *pool, domid_t cli_id)
     ASSERT(pool->client != NULL);
     
     ASSERT_WRITELOCK(&tmem_rwlock);
-    pool_destroy_objs(pool,1,cli_id);
+    pool_destroy_objs(pool, cli_id);
     list_for_each_entry(sl,&pool->share_list, share_list)
     {
         if (sl->client->cli_id != cli_id)
@@ -1130,7 +1125,7 @@ static void pool_flush(struct tmem_pool *pool, domid_t cli_id, bool_t destroy)
                destroy?"destroy":"flush", tmem_client_str);
         return;
     }
-    pool_destroy_objs(pool,0,TMEM_CLI_ID_NULL);
+    pool_destroy_objs(pool, TMEM_CLI_ID_NULL);
     if ( destroy )
     {
         pool->client->pools[pool->pool_id] = NULL;
@@ -1339,7 +1334,7 @@ found:
     if ( obj->pgp_count == 0 )
     {
         ASSERT_WRITELOCK(&pool->pool_rwlock);
-        obj_free(obj,0);
+        obj_free(obj);
     }
     else
         spin_unlock(&obj->obj_spinlock);
@@ -1518,7 +1513,7 @@ cleanup:
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
-        obj_free(obj,0);
+        obj_free(obj);
         write_unlock(&pool->pool_rwlock);
     } else {
         spin_unlock(&obj->obj_spinlock);
@@ -1682,7 +1677,7 @@ unlock_obj:
     if ( newobj )
     {
         write_lock(&pool->pool_rwlock);
-        obj_free(obj, 0);
+        obj_free(obj);
         write_unlock(&pool->pool_rwlock);
     }
     else
@@ -1740,7 +1735,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
             if ( obj->pgp_count == 0 )
             {
                 write_lock(&pool->pool_rwlock);
-                obj_free(obj,0);
+                obj_free(obj);
                 obj = NULL;
                 write_unlock(&pool->pool_rwlock);
             }
@@ -1790,7 +1785,7 @@ static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
-        obj_free(obj,0);
+        obj_free(obj);
         write_unlock(&pool->pool_rwlock);
     } else {
         spin_unlock(&obj->obj_spinlock);
@@ -1813,7 +1808,7 @@ static int do_tmem_flush_object(struct tmem_pool *pool, struct oid *oidp)
     if ( obj == NULL )
         goto out;
     write_lock(&pool->pool_rwlock);
-    obj_destroy(obj,0);
+    obj_destroy(obj);
     pool->flush_objs_found++;
     write_unlock(&pool->pool_rwlock);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:03 +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 1WaNX9-0006Ow-PU; Wed, 16 Apr 2014 10:57:39 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNX5-0006Ni-JM
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:36 +0000
Received: from [193.109.254.147:6456] by server-16.bemta-14.messagelabs.com id
	EC/F7-16986-E126E435; Wed, 16 Apr 2014 10:57:34 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-27.messagelabs.com!1397645853!8707148!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1092 invoked from network); 16 Apr 2014 10:57:34 -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;
	16 Apr 2014 10:57:34 -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 1WaNX2-0000da-Ty
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:32 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNX2-0000OT-SV
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:32 +0000
Date: Wed, 16 Apr 2014 10:57:32 +0000
Message-Id: <E1WaNX2-0000OT-SV@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: remove unneeded parameters from
	obj destroy path
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 6e1616dcb8871356d192ff497e410e912edb99be
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:28 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:08 2014 -0400

    tmem: remove unneeded parameters from obj destroy path
    
    Parameters "selective" and "no_rebalance" are meaningless in obj
    destroy path, this patch remove them. No place uses
    no_rebalance=1. In the obj_destroy path we always call it with
    no_balance=0.
    
    Note that this will now free it only if:
    
       obj->last_client == cli_id
    
    Which is OK - even if we allocate a non-shared pool we set by
    default the obj->last_client to TMEM_CLI_ID_NULL so even if
    the pool is never used, the pool_flush will take care of removing
    those.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   35 +++++++++++++++--------------------
 1 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 544c9bf..add236e 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -883,7 +883,7 @@ restart_find:
 }
 
 /* free an object that has no more pgps in it */
-static void obj_free(struct tmem_object_root *obj, int no_rebalance)
+static void obj_free(struct tmem_object_root *obj)
 {
     struct tmem_pool *pool;
     struct oid old_oid;
@@ -906,9 +906,7 @@ static void obj_free(struct tmem_object_root *obj, int no_rebalance)
     oid_set_invalid(&obj->oid);
     obj->last_client = TMEM_CLI_ID_NULL;
     atomic_dec_and_assert(global_obj_count);
-    /* use no_rebalance only if all objects are being destroyed anyway */
-    if ( !no_rebalance )
-        rb_erase(&obj->rb_tree_node,&pool->obj_rb_root[oid_hash(&old_oid)]);
+    rb_erase(&obj->rb_tree_node, &pool->obj_rb_root[oid_hash(&old_oid)]);
     spin_unlock(&obj->obj_spinlock);
     tmem_free(obj, pool);
 }
@@ -967,15 +965,15 @@ static struct tmem_object_root * obj_alloc(struct tmem_pool *pool, struct oid *o
 }
 
 /* free an object after destroying any pgps in it */
-static void obj_destroy(struct tmem_object_root *obj, int no_rebalance)
+static void obj_destroy(struct tmem_object_root *obj)
 {
     ASSERT_WRITELOCK(&obj->pool->pool_rwlock);
     radix_tree_destroy(&obj->tree_root, pgp_destroy);
-    obj_free(obj,no_rebalance);
+    obj_free(obj);
 }
 
 /* destroys all objs in a pool, or only if obj->last_client matches cli_id */
-static void pool_destroy_objs(struct tmem_pool *pool, bool_t selective, domid_t cli_id)
+static void pool_destroy_objs(struct tmem_pool *pool, domid_t cli_id)
 {
     struct rb_node *node;
     struct tmem_object_root *obj;
@@ -991,11 +989,8 @@ static void pool_destroy_objs(struct tmem_pool *pool, bool_t selective, domid_t
             obj = container_of(node, struct tmem_object_root, rb_tree_node);
             spin_lock(&obj->obj_spinlock);
             node = rb_next(node);
-            if ( !selective )
-                /* FIXME: should be obj,1 but walking/erasing rbtree is racy */
-                obj_destroy(obj,0);
-            else if ( obj->last_client == cli_id )
-                obj_destroy(obj,0);
+            if ( obj->last_client == cli_id )
+                obj_destroy(obj);
             else
                 spin_unlock(&obj->obj_spinlock);
         }
@@ -1084,7 +1079,7 @@ static int shared_pool_quit(struct tmem_pool *pool, domid_t cli_id)
     ASSERT(pool->client != NULL);
     
     ASSERT_WRITELOCK(&tmem_rwlock);
-    pool_destroy_objs(pool,1,cli_id);
+    pool_destroy_objs(pool, cli_id);
     list_for_each_entry(sl,&pool->share_list, share_list)
     {
         if (sl->client->cli_id != cli_id)
@@ -1130,7 +1125,7 @@ static void pool_flush(struct tmem_pool *pool, domid_t cli_id, bool_t destroy)
                destroy?"destroy":"flush", tmem_client_str);
         return;
     }
-    pool_destroy_objs(pool,0,TMEM_CLI_ID_NULL);
+    pool_destroy_objs(pool, TMEM_CLI_ID_NULL);
     if ( destroy )
     {
         pool->client->pools[pool->pool_id] = NULL;
@@ -1339,7 +1334,7 @@ found:
     if ( obj->pgp_count == 0 )
     {
         ASSERT_WRITELOCK(&pool->pool_rwlock);
-        obj_free(obj,0);
+        obj_free(obj);
     }
     else
         spin_unlock(&obj->obj_spinlock);
@@ -1518,7 +1513,7 @@ cleanup:
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
-        obj_free(obj,0);
+        obj_free(obj);
         write_unlock(&pool->pool_rwlock);
     } else {
         spin_unlock(&obj->obj_spinlock);
@@ -1682,7 +1677,7 @@ unlock_obj:
     if ( newobj )
     {
         write_lock(&pool->pool_rwlock);
-        obj_free(obj, 0);
+        obj_free(obj);
         write_unlock(&pool->pool_rwlock);
     }
     else
@@ -1740,7 +1735,7 @@ static int do_tmem_get(struct tmem_pool *pool, struct oid *oidp, uint32_t index,
             if ( obj->pgp_count == 0 )
             {
                 write_lock(&pool->pool_rwlock);
-                obj_free(obj,0);
+                obj_free(obj);
                 obj = NULL;
                 write_unlock(&pool->pool_rwlock);
             }
@@ -1790,7 +1785,7 @@ static int do_tmem_flush_page(struct tmem_pool *pool, struct oid *oidp, uint32_t
     if ( obj->pgp_count == 0 )
     {
         write_lock(&pool->pool_rwlock);
-        obj_free(obj,0);
+        obj_free(obj);
         write_unlock(&pool->pool_rwlock);
     } else {
         spin_unlock(&obj->obj_spinlock);
@@ -1813,7 +1808,7 @@ static int do_tmem_flush_object(struct tmem_pool *pool, struct oid *oidp)
     if ( obj == NULL )
         goto out;
     write_lock(&pool->pool_rwlock);
-    obj_destroy(obj,0);
+    obj_destroy(obj);
     pool->flush_objs_found++;
     write_unlock(&pool->pool_rwlock);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:03 +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 1WaNXH-0006T7-4t; Wed, 16 Apr 2014 10:57:47 +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 1WaNXF-0006SC-NK
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:46 +0000
Received: from [85.158.143.35:43420] by server-2.bemta-4.messagelabs.com id
	44/1A-06539-9226E435; Wed, 16 Apr 2014 10:57:45 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-21.messagelabs.com!1397645863!9380479!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1032 invoked from network); 16 Apr 2014 10:57:44 -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;
	16 Apr 2014 10:57:44 -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 1WaNXD-0000dd-2u
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXD-0000P2-1o
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:43 +0000
Date: Wed, 16 Apr 2014 10:57:43 +0000
Message-Id: <E1WaNXD-0000P2-1o@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: cleanup: refactor function
	tmemc_shared_pool_auth()
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 ddaec70bec987969b3a8d4ee6c940fa22a2165e6
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:31 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:09 2014 -0400

    tmem: cleanup: refactor function tmemc_shared_pool_auth()
    
    Make function tmemc_shared_pool_auth() more readable.
    
    Note that the previous check for free being set the first time
    '(free == -1)' in the loop is now removed. That is OK because
    when we set free the first time ('free = i;') we follow it
    immediately with a break to get out of the loop.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   38 +++++++++++++++++++++++++-------------
 1 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index add236e..bad1bb9 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -2257,27 +2257,39 @@ static int tmemc_shared_pool_auth(domid_t cli_id, uint64_t uuid_lo,
     client = tmem_client_from_cli_id(cli_id);
     if ( client == NULL )
         return -EINVAL;
+
     for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++)
     {
-        if ( (client->shared_auth_uuid[i][0] == uuid_lo) &&
-             (client->shared_auth_uuid[i][1] == uuid_hi) )
+        if ( auth == 0 )
         {
-            if ( auth == 0 )
-                client->shared_auth_uuid[i][0] =
-                    client->shared_auth_uuid[i][1] = -1L;
-            return 1;
+            if ( (client->shared_auth_uuid[i][0] == uuid_lo) &&
+                    (client->shared_auth_uuid[i][1] == uuid_hi) )
+            {
+                client->shared_auth_uuid[i][0] = -1L;
+                client->shared_auth_uuid[i][1] = -1L;
+                return 1;
+            }
         }
-        if ( (auth == 1) && (client->shared_auth_uuid[i][0] == -1L) &&
-                 (client->shared_auth_uuid[i][1] == -1L) && (free == -1) )
-            free = i;
+        else
+        {
+            if ( (client->shared_auth_uuid[i][0] == -1L) &&
+                    (client->shared_auth_uuid[i][1] == -1L) )
+            {
+                free = i;
+                break;
+            }
+	}
     }
     if ( auth == 0 )
         return 0;
-    if ( auth == 1 && free == -1 )
+    else if ( free == -1)
         return -ENOMEM;
-    client->shared_auth_uuid[free][0] = uuid_lo;
-    client->shared_auth_uuid[free][1] = uuid_hi;
-    return 1;
+    else
+    {
+        client->shared_auth_uuid[free][0] = uuid_lo;
+        client->shared_auth_uuid[free][1] = uuid_hi;
+        return 1;
+    }
 }
 
 static int tmemc_save_subop(int cli_id, uint32_t pool_id,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:03 +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 1WaNXR-0006X6-9R; Wed, 16 Apr 2014 10:57:57 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXQ-0006Wj-CV
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:56 +0000
Received: from [85.158.139.211:9806] by server-7.bemta-5.messagelabs.com id
	AB/9C-20531-3326E435; Wed, 16 Apr 2014 10:57:55 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1397645873!7866364!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 497 invoked from network); 16 Apr 2014 10:57:54 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:57:54 -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 1WaNXN-0000dv-8T
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:53 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXN-0000PP-7T
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:53 +0000
Date: Wed, 16 Apr 2014 10:57:53 +0000
Message-Id: <E1WaNXN-0000PP-7T@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: reorg the shared pool allocate
	path
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 a36590e1b5040838af19d2ca712a516f07a6062b
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:32 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:09 2014 -0400

    tmem: reorg the shared pool allocate path
    
    Reorg the code to make it more readable.
    Check the return value of shared_pool_join() and drop a unneeded call to
    it. Disable creating a shared & persistant pool in an advance place.
    
    Note that one might be tempted to delay the creation of the pool even
    further in the code. That however would break the behavior of the code
    - that is if we ended up creating a shared pool and the
    'uuid_lo == -1L && uuid_hi == -1L' logic stands  we still need to
    create a pool - just not shared type.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |  104 +++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 70 insertions(+), 34 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index bad1bb9..27164cc 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1021,21 +1021,24 @@ static void pool_free(struct tmem_pool *pool)
     xfree(pool);
 }
 
-/* register new_client as a user of this shared pool and return new
-   total number of registered users */
+/*
+ * Register new_client as a user of this shared pool and return 0 on succ.
+ */
 static int shared_pool_join(struct tmem_pool *pool, struct client *new_client)
 {
     struct share_list *sl;
-
     ASSERT(is_shared(pool));
+
     if ( (sl = tmem_malloc(sizeof(struct share_list), NULL)) == NULL )
         return -1;
     sl->client = new_client;
     list_add_tail(&sl->share_list, &pool->share_list);
     if ( new_client->cli_id != pool->client->cli_id )
         tmem_client_info("adding new %s %d to shared pool owned by %s %d\n",
-            tmem_client_str, new_client->cli_id, tmem_client_str, pool->client->cli_id);
-    return ++pool->shared_count;
+                    tmem_client_str, new_client->cli_id, tmem_client_str,
+                    pool->client->cli_id);
+    ++pool->shared_count;
+    return 0;
 }
 
 /* reassign "ownership" of the pool to another client that shares this pool */
@@ -1846,8 +1849,7 @@ static int do_tmem_new_pool(domid_t this_cli_id,
     int specversion = (flags >> TMEM_POOL_VERSION_SHIFT)
          & TMEM_POOL_VERSION_MASK;
     struct tmem_pool *pool, *shpool;
-    int s_poolid, first_unused_s_poolid;
-    int i;
+    int i, first_unused_s_poolid;
 
     if ( this_cli_id == TMEM_CLI_ID_NULL )
         cli_id = current->domain->domain_id;
@@ -1861,6 +1863,11 @@ static int do_tmem_new_pool(domid_t this_cli_id,
         tmem_client_err("failed... unsupported spec version\n");
         return -EPERM;
     }
+    if ( shared && persistent )
+    {
+        tmem_client_err("failed... unable to create a shared-persistant pool\n");
+        return -EPERM;
+    }
     if ( pagebits != (PAGE_SHIFT - 12) )
     {
         tmem_client_err("failed... unsupported pagesize %d\n",
@@ -1877,17 +1884,12 @@ static int do_tmem_new_pool(domid_t this_cli_id,
         tmem_client_err("failed... reserved bits must be zero\n");
         return -EPERM;
     }
-    if ( (pool = pool_alloc()) == NULL )
-    {
-        tmem_client_err("failed... out of memory\n");
-        return -ENOMEM;
-    }
     if ( this_cli_id != TMEM_CLI_ID_NULL )
     {
         if ( (client = tmem_client_from_cli_id(this_cli_id)) == NULL
              || d_poolid >= MAX_POOLS_PER_DOMAIN
              || client->pools[d_poolid] != NULL )
-            goto fail;
+            return -EPERM;
     }
     else
     {
@@ -1900,13 +1902,35 @@ static int do_tmem_new_pool(domid_t this_cli_id,
         {
             tmem_client_err("failed... no more pool slots available for this %s\n",
                    tmem_client_str);
-            goto fail;
+            return -EPERM;
         }
     }
+
+    if ( (pool = pool_alloc()) == NULL )
+    {
+        tmem_client_err("failed... out of memory\n");
+        return -ENOMEM;
+    }
+    client->pools[d_poolid] = pool;
+    pool->client = client;
+    pool->pool_id = d_poolid;
+    pool->shared = shared;
+    pool->persistent = persistent;
+    pool->uuid[0] = uuid_lo;
+    pool->uuid[1] = uuid_hi;
+
+    /*
+     * Already created a pool when arrived here, but need some special process
+     * for shared pool.
+     */
     if ( shared )
     {
         if ( uuid_lo == -1L && uuid_hi == -1L )
-            shared = 0;
+        {
+            tmem_client_info("Invalid uuid, create non shared pool instead!\n");
+            pool->shared = 0;
+            goto out;
+        }
         if ( client->shared_auth_required && !global_shared_auth )
         {
             for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++)
@@ -1914,48 +1938,60 @@ static int do_tmem_new_pool(domid_t this_cli_id,
                      (client->shared_auth_uuid[i][1] == uuid_hi) )
                     break;
             if ( i == MAX_GLOBAL_SHARED_POOLS )
-                shared = 0;
+	    {
+                tmem_client_info("Shared auth failed, create non shared pool instead!\n");
+                pool->shared = 0;
+                goto out;
+            }
         }
-    }
-    pool->shared = shared;
-    pool->client = client;
-    if ( shared )
-    {
+
+        /*
+         * Authorize okay, match a global shared pool or use the newly allocated
+         * one
+         */
         first_unused_s_poolid = MAX_GLOBAL_SHARED_POOLS;
-        for ( s_poolid = 0; s_poolid < MAX_GLOBAL_SHARED_POOLS; s_poolid++ )
+        for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++ )
         {
-            if ( (shpool = global_shared_pools[s_poolid]) != NULL )
+            if ( (shpool = global_shared_pools[i]) != NULL )
             {
                 if ( shpool->uuid[0] == uuid_lo && shpool->uuid[1] == uuid_hi )
                 {
+                    /* Succ to match a global shared pool */
                     tmem_client_info("(matches shared pool uuid=%"PRIx64".%"PRIx64") pool_id=%d\n",
                         uuid_hi, uuid_lo, d_poolid);
-                    client->pools[d_poolid] = global_shared_pools[s_poolid];
-                    shared_pool_join(global_shared_pools[s_poolid], client);
-                    pool_free(pool);
-                    return d_poolid;
+                    client->pools[d_poolid] = shpool;
+                    if ( !shared_pool_join(shpool, client) )
+                    {
+                        pool_free(pool);
+                        goto out;
+                    }
+                    else
+                        goto fail;
                 }
             }
-            else if ( first_unused_s_poolid == MAX_GLOBAL_SHARED_POOLS )
-                first_unused_s_poolid = s_poolid;
+            else
+            {
+                if ( first_unused_s_poolid == MAX_GLOBAL_SHARED_POOLS )
+                    first_unused_s_poolid = i;
+            }
         }
+
+        /* Failed to find a global shard pool slot */
         if ( first_unused_s_poolid == MAX_GLOBAL_SHARED_POOLS )
         {
             tmem_client_warn("tmem: failed... no global shared pool slots available\n");
             goto fail;
         }
+        /* Add pool to global shard pool */
         else
         {
             INIT_LIST_HEAD(&pool->share_list);
             pool->shared_count = 0;
             global_shared_pools[first_unused_s_poolid] = pool;
-            (void)shared_pool_join(pool,client);
         }
     }
-    client->pools[d_poolid] = pool;
-    pool->pool_id = d_poolid;
-    pool->persistent = persistent;
-    pool->uuid[0] = uuid_lo; pool->uuid[1] = uuid_hi;
+
+out:
     tmem_client_info("pool_id=%d\n", d_poolid);
     return d_poolid;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:03 +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 1WaNXR-0006X6-9R; Wed, 16 Apr 2014 10:57:57 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXQ-0006Wj-CV
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:56 +0000
Received: from [85.158.139.211:9806] by server-7.bemta-5.messagelabs.com id
	AB/9C-20531-3326E435; Wed, 16 Apr 2014 10:57:55 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1397645873!7866364!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 497 invoked from network); 16 Apr 2014 10:57:54 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:57:54 -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 1WaNXN-0000dv-8T
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:53 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXN-0000PP-7T
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:57:53 +0000
Date: Wed, 16 Apr 2014 10:57:53 +0000
Message-Id: <E1WaNXN-0000PP-7T@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: reorg the shared pool allocate
	path
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 a36590e1b5040838af19d2ca712a516f07a6062b
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Tue Jan 28 12:28:32 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:09 2014 -0400

    tmem: reorg the shared pool allocate path
    
    Reorg the code to make it more readable.
    Check the return value of shared_pool_join() and drop a unneeded call to
    it. Disable creating a shared & persistant pool in an advance place.
    
    Note that one might be tempted to delay the creation of the pool even
    further in the code. That however would break the behavior of the code
    - that is if we ended up creating a shared pool and the
    'uuid_lo == -1L && uuid_hi == -1L' logic stands  we still need to
    create a pool - just not shared type.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |  104 +++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 70 insertions(+), 34 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index bad1bb9..27164cc 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1021,21 +1021,24 @@ static void pool_free(struct tmem_pool *pool)
     xfree(pool);
 }
 
-/* register new_client as a user of this shared pool and return new
-   total number of registered users */
+/*
+ * Register new_client as a user of this shared pool and return 0 on succ.
+ */
 static int shared_pool_join(struct tmem_pool *pool, struct client *new_client)
 {
     struct share_list *sl;
-
     ASSERT(is_shared(pool));
+
     if ( (sl = tmem_malloc(sizeof(struct share_list), NULL)) == NULL )
         return -1;
     sl->client = new_client;
     list_add_tail(&sl->share_list, &pool->share_list);
     if ( new_client->cli_id != pool->client->cli_id )
         tmem_client_info("adding new %s %d to shared pool owned by %s %d\n",
-            tmem_client_str, new_client->cli_id, tmem_client_str, pool->client->cli_id);
-    return ++pool->shared_count;
+                    tmem_client_str, new_client->cli_id, tmem_client_str,
+                    pool->client->cli_id);
+    ++pool->shared_count;
+    return 0;
 }
 
 /* reassign "ownership" of the pool to another client that shares this pool */
@@ -1846,8 +1849,7 @@ static int do_tmem_new_pool(domid_t this_cli_id,
     int specversion = (flags >> TMEM_POOL_VERSION_SHIFT)
          & TMEM_POOL_VERSION_MASK;
     struct tmem_pool *pool, *shpool;
-    int s_poolid, first_unused_s_poolid;
-    int i;
+    int i, first_unused_s_poolid;
 
     if ( this_cli_id == TMEM_CLI_ID_NULL )
         cli_id = current->domain->domain_id;
@@ -1861,6 +1863,11 @@ static int do_tmem_new_pool(domid_t this_cli_id,
         tmem_client_err("failed... unsupported spec version\n");
         return -EPERM;
     }
+    if ( shared && persistent )
+    {
+        tmem_client_err("failed... unable to create a shared-persistant pool\n");
+        return -EPERM;
+    }
     if ( pagebits != (PAGE_SHIFT - 12) )
     {
         tmem_client_err("failed... unsupported pagesize %d\n",
@@ -1877,17 +1884,12 @@ static int do_tmem_new_pool(domid_t this_cli_id,
         tmem_client_err("failed... reserved bits must be zero\n");
         return -EPERM;
     }
-    if ( (pool = pool_alloc()) == NULL )
-    {
-        tmem_client_err("failed... out of memory\n");
-        return -ENOMEM;
-    }
     if ( this_cli_id != TMEM_CLI_ID_NULL )
     {
         if ( (client = tmem_client_from_cli_id(this_cli_id)) == NULL
              || d_poolid >= MAX_POOLS_PER_DOMAIN
              || client->pools[d_poolid] != NULL )
-            goto fail;
+            return -EPERM;
     }
     else
     {
@@ -1900,13 +1902,35 @@ static int do_tmem_new_pool(domid_t this_cli_id,
         {
             tmem_client_err("failed... no more pool slots available for this %s\n",
                    tmem_client_str);
-            goto fail;
+            return -EPERM;
         }
     }
+
+    if ( (pool = pool_alloc()) == NULL )
+    {
+        tmem_client_err("failed... out of memory\n");
+        return -ENOMEM;
+    }
+    client->pools[d_poolid] = pool;
+    pool->client = client;
+    pool->pool_id = d_poolid;
+    pool->shared = shared;
+    pool->persistent = persistent;
+    pool->uuid[0] = uuid_lo;
+    pool->uuid[1] = uuid_hi;
+
+    /*
+     * Already created a pool when arrived here, but need some special process
+     * for shared pool.
+     */
     if ( shared )
     {
         if ( uuid_lo == -1L && uuid_hi == -1L )
-            shared = 0;
+        {
+            tmem_client_info("Invalid uuid, create non shared pool instead!\n");
+            pool->shared = 0;
+            goto out;
+        }
         if ( client->shared_auth_required && !global_shared_auth )
         {
             for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++)
@@ -1914,48 +1938,60 @@ static int do_tmem_new_pool(domid_t this_cli_id,
                      (client->shared_auth_uuid[i][1] == uuid_hi) )
                     break;
             if ( i == MAX_GLOBAL_SHARED_POOLS )
-                shared = 0;
+	    {
+                tmem_client_info("Shared auth failed, create non shared pool instead!\n");
+                pool->shared = 0;
+                goto out;
+            }
         }
-    }
-    pool->shared = shared;
-    pool->client = client;
-    if ( shared )
-    {
+
+        /*
+         * Authorize okay, match a global shared pool or use the newly allocated
+         * one
+         */
         first_unused_s_poolid = MAX_GLOBAL_SHARED_POOLS;
-        for ( s_poolid = 0; s_poolid < MAX_GLOBAL_SHARED_POOLS; s_poolid++ )
+        for ( i = 0; i < MAX_GLOBAL_SHARED_POOLS; i++ )
         {
-            if ( (shpool = global_shared_pools[s_poolid]) != NULL )
+            if ( (shpool = global_shared_pools[i]) != NULL )
             {
                 if ( shpool->uuid[0] == uuid_lo && shpool->uuid[1] == uuid_hi )
                 {
+                    /* Succ to match a global shared pool */
                     tmem_client_info("(matches shared pool uuid=%"PRIx64".%"PRIx64") pool_id=%d\n",
                         uuid_hi, uuid_lo, d_poolid);
-                    client->pools[d_poolid] = global_shared_pools[s_poolid];
-                    shared_pool_join(global_shared_pools[s_poolid], client);
-                    pool_free(pool);
-                    return d_poolid;
+                    client->pools[d_poolid] = shpool;
+                    if ( !shared_pool_join(shpool, client) )
+                    {
+                        pool_free(pool);
+                        goto out;
+                    }
+                    else
+                        goto fail;
                 }
             }
-            else if ( first_unused_s_poolid == MAX_GLOBAL_SHARED_POOLS )
-                first_unused_s_poolid = s_poolid;
+            else
+            {
+                if ( first_unused_s_poolid == MAX_GLOBAL_SHARED_POOLS )
+                    first_unused_s_poolid = i;
+            }
         }
+
+        /* Failed to find a global shard pool slot */
         if ( first_unused_s_poolid == MAX_GLOBAL_SHARED_POOLS )
         {
             tmem_client_warn("tmem: failed... no global shared pool slots available\n");
             goto fail;
         }
+        /* Add pool to global shard pool */
         else
         {
             INIT_LIST_HEAD(&pool->share_list);
             pool->shared_count = 0;
             global_shared_pools[first_unused_s_poolid] = pool;
-            (void)shared_pool_join(pool,client);
         }
     }
-    client->pools[d_poolid] = pool;
-    pool->pool_id = d_poolid;
-    pool->persistent = persistent;
-    pool->uuid[0] = uuid_lo; pool->uuid[1] = uuid_hi;
+
+out:
     tmem_client_info("pool_id=%d\n", d_poolid);
     return d_poolid;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:45 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:45 +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 1WaNYC-0006bg-Qf; Wed, 16 Apr 2014 10:58:44 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXu-0006Yf-Nc
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:39 +0000
Received: from [85.158.137.68:64894] by server-11.bemta-3.messagelabs.com id
	4A/40-19438-1526E435; Wed, 16 Apr 2014 10:58:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1397645904!7296273!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29753 invoked from network); 16 Apr 2014 10:58:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58:25 -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 1WaNXr-0000eX-RJ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXr-0000RK-Nj
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:23 +0000
Date: Wed, 16 Apr 2014 10:58:23 +0000
Message-Id: <E1WaNXr-0000RK-Nj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Merge branch
	'stable/tmem-for-4.5.v2.1' of
	git://xenbits.xen.org/people/konradwilk/xen into staging
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 01f757fa3fe0a5e9202ba79eb983cfbeecd295e0
Merge: 70e79fad6dc6f533ff83ee23b8d13de5a696d896 eb4bf0683e7c7e12b32943151dd3e4ea23852618
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 16:17:06 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 16:17:06 2014 +0200

    Merge branch 'stable/tmem-for-4.5.v2.1' of git://xenbits.xen.org/people/konradwilk/xen into staging

 xen/common/tmem.c |  583 +++++++++++++++++++++++++++--------------------------
 1 files changed, 299 insertions(+), 284 deletions(-)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:45 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:45 +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 1WaNYC-0006bg-Qf; Wed, 16 Apr 2014 10:58:44 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXu-0006Yf-Nc
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:39 +0000
Received: from [85.158.137.68:64894] by server-11.bemta-3.messagelabs.com id
	4A/40-19438-1526E435; Wed, 16 Apr 2014 10:58:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1397645904!7296273!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29753 invoked from network); 16 Apr 2014 10:58:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58:25 -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 1WaNXr-0000eX-RJ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXr-0000RK-Nj
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:23 +0000
Date: Wed, 16 Apr 2014 10:58:23 +0000
Message-Id: <E1WaNXr-0000RK-Nj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Merge branch
	'stable/tmem-for-4.5.v2.1' of
	git://xenbits.xen.org/people/konradwilk/xen into staging
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 01f757fa3fe0a5e9202ba79eb983cfbeecd295e0
Merge: 70e79fad6dc6f533ff83ee23b8d13de5a696d896 eb4bf0683e7c7e12b32943151dd3e4ea23852618
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 9 16:17:06 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 9 16:17:06 2014 +0200

    Merge branch 'stable/tmem-for-4.5.v2.1' of git://xenbits.xen.org/people/konradwilk/xen into staging

 xen/common/tmem.c |  583 +++++++++++++++++++++++++++--------------------------
 1 files changed, 299 insertions(+), 284 deletions(-)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:45 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:45 +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 1WaNYD-0006c7-38; Wed, 16 Apr 2014 10:58:45 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXa-0006YY-31
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:39 +0000
Received: from [85.158.139.211:19861] by server-12.bemta-5.messagelabs.com id
	A5/76-03824-D326E435; Wed, 16 Apr 2014 10:58:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1397645883!6008928!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5631 invoked from network); 16 Apr 2014 10:58:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58: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 1WaNXX-0000eR-Es
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXX-0000Pv-D6
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:03 +0000
Date: Wed, 16 Apr 2014 10:58:03 +0000
Message-Id: <E1WaNXX-0000Pv-D6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: remove useless parameter from
	client and pool flush
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 e5b3ef4e037084afc2ca7db99000197ec9e9cac0
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Wed Feb 12 22:43:31 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:09 2014 -0400

    tmem: remove useless parameter from client and pool flush
    
    Parameter "destroy" in function client_flush() and pool_flush() is unneeded
    because it was always set to 1.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   30 ++++++++++++------------------
 1 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 27164cc..66870a0 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1108,7 +1108,7 @@ static int shared_pool_quit(struct tmem_pool *pool, domid_t cli_id)
 }
 
 /* flush all data (owned by cli_id) from a pool and, optionally, free it */
-static void pool_flush(struct tmem_pool *pool, domid_t cli_id, bool_t destroy)
+static void pool_flush(struct tmem_pool *pool, domid_t cli_id)
 {
     ASSERT(pool != NULL);
     if ( (is_shared(pool)) && (shared_pool_quit(pool,cli_id) > 0) )
@@ -1117,23 +1117,19 @@ static void pool_flush(struct tmem_pool *pool, domid_t cli_id, bool_t destroy)
            tmem_cli_id_str, cli_id, pool->pool_id, tmem_cli_id_str,pool->client->cli_id);
         return;
     }
-    tmem_client_info("%s %s-%s tmem pool %s=%d pool_id=%d\n",
-                    destroy ? "destroying" : "flushing",
+    tmem_client_info("Destroying %s-%s tmem pool %s=%d pool_id=%d\n",
                     is_persistent(pool) ? "persistent" : "ephemeral" ,
                     is_shared(pool) ? "shared" : "private",
                     tmem_cli_id_str, pool->client->cli_id, pool->pool_id);
     if ( pool->client->live_migrating )
     {
-        tmem_client_warn("can't %s pool while %s is live-migrating\n",
-               destroy?"destroy":"flush", tmem_client_str);
+        tmem_client_warn("can't destroy pool while %s is live-migrating\n",
+                    tmem_client_str);
         return;
     }
     pool_destroy_objs(pool, TMEM_CLI_ID_NULL);
-    if ( destroy )
-    {
-        pool->client->pools[pool->pool_id] = NULL;
-        pool_free(pool);
-    }
+    pool->client->pools[pool->pool_id] = NULL;
+    pool_free(pool);
 }
 
 /************ CLIENT MANIPULATION OPERATIONS **************************/
@@ -1201,7 +1197,7 @@ static void client_free(struct client *client)
 }
 
 /* flush all data from a client and, optionally, free it */
-static void client_flush(struct client *client, bool_t destroy)
+static void client_flush(struct client *client)
 {
     int i;
     struct tmem_pool *pool;
@@ -1210,12 +1206,10 @@ static void client_flush(struct client *client, bool_t destroy)
     {
         if ( (pool = client->pools[i]) == NULL )
             continue;
-        pool_flush(pool,client->cli_id,destroy);
-        if ( destroy )
-            client->pools[i] = NULL;
+        pool_flush(pool, client->cli_id);
+        client->pools[i] = NULL;
     }
-    if ( destroy )
-        client_free(client);
+    client_free(client);
 }
 
 static bool_t client_over_quota(struct client *client)
@@ -1832,7 +1826,7 @@ static int do_tmem_destroy_pool(uint32_t pool_id)
     if ( (pool = client->pools[pool_id]) == NULL )
         return 0;
     client->pools[pool_id] = NULL;
-    pool_flush(pool,client->cli_id,1);
+    pool_flush(pool, client->cli_id);
     return 1;
 }
 
@@ -2775,7 +2769,7 @@ void tmem_destroy(void *v)
 
     printk("tmem: flushing tmem pools for %s=%d\n",
            tmem_cli_id_str, client->cli_id);
-    client_flush(client, 1);
+    client_flush(client);
 
     write_unlock(&tmem_rwlock);
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:45 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:45 +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 1WaNYD-0006c7-38; Wed, 16 Apr 2014 10:58:45 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXa-0006YY-31
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:39 +0000
Received: from [85.158.139.211:19861] by server-12.bemta-5.messagelabs.com id
	A5/76-03824-D326E435; Wed, 16 Apr 2014 10:58:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1397645883!6008928!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 5631 invoked from network); 16 Apr 2014 10:58:04 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58: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 1WaNXX-0000eR-Es
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXX-0000Pv-D6
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:03 +0000
Date: Wed, 16 Apr 2014 10:58:03 +0000
Message-Id: <E1WaNXX-0000Pv-D6@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tmem: remove useless parameter from
	client and pool flush
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 e5b3ef4e037084afc2ca7db99000197ec9e9cac0
Author:     Bob Liu <lliubbo@gmail.com>
AuthorDate: Wed Feb 12 22:43:31 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:09 2014 -0400

    tmem: remove useless parameter from client and pool flush
    
    Parameter "destroy" in function client_flush() and pool_flush() is unneeded
    because it was always set to 1.
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |   30 ++++++++++++------------------
 1 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 27164cc..66870a0 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1108,7 +1108,7 @@ static int shared_pool_quit(struct tmem_pool *pool, domid_t cli_id)
 }
 
 /* flush all data (owned by cli_id) from a pool and, optionally, free it */
-static void pool_flush(struct tmem_pool *pool, domid_t cli_id, bool_t destroy)
+static void pool_flush(struct tmem_pool *pool, domid_t cli_id)
 {
     ASSERT(pool != NULL);
     if ( (is_shared(pool)) && (shared_pool_quit(pool,cli_id) > 0) )
@@ -1117,23 +1117,19 @@ static void pool_flush(struct tmem_pool *pool, domid_t cli_id, bool_t destroy)
            tmem_cli_id_str, cli_id, pool->pool_id, tmem_cli_id_str,pool->client->cli_id);
         return;
     }
-    tmem_client_info("%s %s-%s tmem pool %s=%d pool_id=%d\n",
-                    destroy ? "destroying" : "flushing",
+    tmem_client_info("Destroying %s-%s tmem pool %s=%d pool_id=%d\n",
                     is_persistent(pool) ? "persistent" : "ephemeral" ,
                     is_shared(pool) ? "shared" : "private",
                     tmem_cli_id_str, pool->client->cli_id, pool->pool_id);
     if ( pool->client->live_migrating )
     {
-        tmem_client_warn("can't %s pool while %s is live-migrating\n",
-               destroy?"destroy":"flush", tmem_client_str);
+        tmem_client_warn("can't destroy pool while %s is live-migrating\n",
+                    tmem_client_str);
         return;
     }
     pool_destroy_objs(pool, TMEM_CLI_ID_NULL);
-    if ( destroy )
-    {
-        pool->client->pools[pool->pool_id] = NULL;
-        pool_free(pool);
-    }
+    pool->client->pools[pool->pool_id] = NULL;
+    pool_free(pool);
 }
 
 /************ CLIENT MANIPULATION OPERATIONS **************************/
@@ -1201,7 +1197,7 @@ static void client_free(struct client *client)
 }
 
 /* flush all data from a client and, optionally, free it */
-static void client_flush(struct client *client, bool_t destroy)
+static void client_flush(struct client *client)
 {
     int i;
     struct tmem_pool *pool;
@@ -1210,12 +1206,10 @@ static void client_flush(struct client *client, bool_t destroy)
     {
         if ( (pool = client->pools[i]) == NULL )
             continue;
-        pool_flush(pool,client->cli_id,destroy);
-        if ( destroy )
-            client->pools[i] = NULL;
+        pool_flush(pool, client->cli_id);
+        client->pools[i] = NULL;
     }
-    if ( destroy )
-        client_free(client);
+    client_free(client);
 }
 
 static bool_t client_over_quota(struct client *client)
@@ -1832,7 +1826,7 @@ static int do_tmem_destroy_pool(uint32_t pool_id)
     if ( (pool = client->pools[pool_id]) == NULL )
         return 0;
     client->pools[pool_id] = NULL;
-    pool_flush(pool,client->cli_id,1);
+    pool_flush(pool, client->cli_id);
     return 1;
 }
 
@@ -2775,7 +2769,7 @@ void tmem_destroy(void *v)
 
     printk("tmem: flushing tmem pools for %s=%d\n",
            tmem_cli_id_str, client->cli_id);
-    client_flush(client, 1);
+    client_flush(client);
 
     write_unlock(&tmem_rwlock);
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:45 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:45 +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 1WaNYD-0006cp-Dy; Wed, 16 Apr 2014 10:58:45 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXk-0006Ye-70
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:39 +0000
Received: from [85.158.139.211:26709] by server-6.bemta-5.messagelabs.com id
	6C/2F-19576-7426E435; Wed, 16 Apr 2014 10:58:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1397645893!7784745!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2561 invoked from network); 16 Apr 2014 10:58:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58:14 -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 1WaNXh-0000eU-K0
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXh-0000QM-J1
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:13 +0000
Date: Wed, 16 Apr 2014 10:58:13 +0000
Message-Id: <E1WaNXh-0000QM-J1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: tmem: tmem_try_to_evict_pgp: fix
	a lock issue
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 eb4bf0683e7c7e12b32943151dd3e4ea23852618
Author:     Bob Liu <bob.liu@oracle.com>
AuthorDate: Thu Apr 3 16:55:04 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:10 2014 -0400

    xen: tmem: tmem_try_to_evict_pgp: fix a lock issue
    
    During xen testing, below failure was triggered if dedup=0.
    
    (XEN) Assertion '!preempt_count()' failed at preempt.c:37
    (XEN) ----[ Xen-4.5-unstable  x86_64  debug=y  Not tainted ]----
    (XEN) CPU:    51
    (XEN) RIP:    e008:[<ffff82d08011bfef>] ASSERT_NOT_IN_ATOMIC+0x22/0x53
    (XEN) RFLAGS: 0000000000010286   CONTEXT: hypervisor
    (XEN) rax: ffff82d080318d20   rbx: ffff8300681ea000   rcx: 0000000000000001
    (XEN) rdx: 00000033bca03300   rsi: ffff8308110da000   rdi: ffff82d080286690
    (XEN) rbp: ffff83043cd0ff08   rsp: ffff83043cd0ff08   r8:  ffff8307d2beecb0
    (XEN) r9:  000000000000000d   r10: 00000000deadbeef   r11: 0000000000000202
    (XEN) r12: 0000000000000000   r13: 0000000000000000   r14: 0000000000000005
    (XEN) r15: 0000000000000001   cr0: 0000000080050033   cr4: 00000000001526f0
    (XEN) cr3: 000000005246d000   cr2: ffff880106123418
    (XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e010   cs: e008
    (XEN) Xen stack trace from rsp=ffff83043cd0ff08:
    (XEN)    00007cfbc32f00c7 ffff82d0802258f0 ffff880106123418 ffffea0006156e80
    (XEN)    ffff8800d0ab5368 00007faff4c83000 ffff8801bdea33e8 0000000000000002
    (XEN)    0000000000000202 00000000deadbeef 0000000000000000 00000000000c3565
    (XEN)    fffffffffffffff4 ffffffff810014ca ffffffff81de1000 000000000000c356
    (XEN)    00000000deadbeef 0001010000000000 ffffffff810014ca 000000000000e033
    (XEN)    0000000000000202 ffff8801bdea3360 000000000000e02b 000000000000beef
    (XEN)    000000000000beef 000000000000beef 000000000000beef 0000000000000033
    (XEN)    ffff8300681ea000 00000033bca03300 0000000000000000
    (XEN) Xen call trace:
    (XEN)    [<ffff82d08011bfef>] ASSERT_NOT_IN_ATOMIC+0x22/0x53
    (XEN)    [<ffff82d0802258f0>] test_all_events+0x6/0x30
    
    The root cause is there is an wronng
    'write_unlock(&pcd_tree_rwlocks[firstbyte])' in function
    tmem_try_to_evict_pgp().
    
    Nobody will lock &pcd_tree_rwlocks if dedup=0, but the write_unlock() will be
    executed anyway. This was introduced by a git commit
    38c433d0c711406778aba1ae183a195da98656f0 ("tmem: add page deduplication with
    optional compression or trailing-zero-elimination")
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 66870a0..f7f828f 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1263,7 +1263,8 @@ static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *ho
             return 1;
         }
 pcd_unlock:
-        write_unlock(&pcd_tree_rwlocks[firstbyte]);
+        if ( tmem_dedup_enabled() )
+            write_unlock(&pcd_tree_rwlocks[firstbyte]);
 obj_unlock:
         spin_unlock(&obj->obj_spinlock);
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:45 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:45 +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 1WaNYD-0006cp-Dy; Wed, 16 Apr 2014 10:58:45 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXk-0006Ye-70
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:39 +0000
Received: from [85.158.139.211:26709] by server-6.bemta-5.messagelabs.com id
	6C/2F-19576-7426E435; Wed, 16 Apr 2014 10:58:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-4.tower-206.messagelabs.com!1397645893!7784745!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2561 invoked from network); 16 Apr 2014 10:58:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-4.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58:14 -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 1WaNXh-0000eU-K0
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNXh-0000QM-J1
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:13 +0000
Date: Wed, 16 Apr 2014 10:58:13 +0000
Message-Id: <E1WaNXh-0000QM-J1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: tmem: tmem_try_to_evict_pgp: fix
	a lock issue
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 eb4bf0683e7c7e12b32943151dd3e4ea23852618
Author:     Bob Liu <bob.liu@oracle.com>
AuthorDate: Thu Apr 3 16:55:04 2014 +0800
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CommitDate: Wed Apr 9 09:18:10 2014 -0400

    xen: tmem: tmem_try_to_evict_pgp: fix a lock issue
    
    During xen testing, below failure was triggered if dedup=0.
    
    (XEN) Assertion '!preempt_count()' failed at preempt.c:37
    (XEN) ----[ Xen-4.5-unstable  x86_64  debug=y  Not tainted ]----
    (XEN) CPU:    51
    (XEN) RIP:    e008:[<ffff82d08011bfef>] ASSERT_NOT_IN_ATOMIC+0x22/0x53
    (XEN) RFLAGS: 0000000000010286   CONTEXT: hypervisor
    (XEN) rax: ffff82d080318d20   rbx: ffff8300681ea000   rcx: 0000000000000001
    (XEN) rdx: 00000033bca03300   rsi: ffff8308110da000   rdi: ffff82d080286690
    (XEN) rbp: ffff83043cd0ff08   rsp: ffff83043cd0ff08   r8:  ffff8307d2beecb0
    (XEN) r9:  000000000000000d   r10: 00000000deadbeef   r11: 0000000000000202
    (XEN) r12: 0000000000000000   r13: 0000000000000000   r14: 0000000000000005
    (XEN) r15: 0000000000000001   cr0: 0000000080050033   cr4: 00000000001526f0
    (XEN) cr3: 000000005246d000   cr2: ffff880106123418
    (XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e010   cs: e008
    (XEN) Xen stack trace from rsp=ffff83043cd0ff08:
    (XEN)    00007cfbc32f00c7 ffff82d0802258f0 ffff880106123418 ffffea0006156e80
    (XEN)    ffff8800d0ab5368 00007faff4c83000 ffff8801bdea33e8 0000000000000002
    (XEN)    0000000000000202 00000000deadbeef 0000000000000000 00000000000c3565
    (XEN)    fffffffffffffff4 ffffffff810014ca ffffffff81de1000 000000000000c356
    (XEN)    00000000deadbeef 0001010000000000 ffffffff810014ca 000000000000e033
    (XEN)    0000000000000202 ffff8801bdea3360 000000000000e02b 000000000000beef
    (XEN)    000000000000beef 000000000000beef 000000000000beef 0000000000000033
    (XEN)    ffff8300681ea000 00000033bca03300 0000000000000000
    (XEN) Xen call trace:
    (XEN)    [<ffff82d08011bfef>] ASSERT_NOT_IN_ATOMIC+0x22/0x53
    (XEN)    [<ffff82d0802258f0>] test_all_events+0x6/0x30
    
    The root cause is there is an wronng
    'write_unlock(&pcd_tree_rwlocks[firstbyte])' in function
    tmem_try_to_evict_pgp().
    
    Nobody will lock &pcd_tree_rwlocks if dedup=0, but the write_unlock() will be
    executed anyway. This was introduced by a git commit
    38c433d0c711406778aba1ae183a195da98656f0 ("tmem: add page deduplication with
    optional compression or trailing-zero-elimination")
    
    Signed-off-by: Bob Liu <bob.liu@oracle.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 xen/common/tmem.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index 66870a0..f7f828f 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1263,7 +1263,8 @@ static bool_t tmem_try_to_evict_pgp(struct tmem_page_descriptor *pgp, bool_t *ho
             return 1;
         }
 pcd_unlock:
-        write_unlock(&pcd_tree_rwlocks[firstbyte]);
+        if ( tmem_dedup_enabled() )
+            write_unlock(&pcd_tree_rwlocks[firstbyte]);
 obj_unlock:
         spin_unlock(&obj->obj_spinlock);
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58: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 1WaNYD-0006dH-OA; Wed, 16 Apr 2014 10:58:45 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNY4-0006Yi-PX
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:39 +0000
Received: from [193.109.254.147:15612] by server-2.bemta-14.messagelabs.com id
	81/13-21684-B526E435; Wed, 16 Apr 2014 10:58:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1397645914!8678755!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16724 invoked from network); 16 Apr 2014 10:58:35 -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;
	16 Apr 2014 10:58:35 -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 1WaNY1-0000ec-Vz
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNY1-0000Ro-Uw
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:33 +0000
Date: Wed, 16 Apr 2014 10:58:33 +0000
Message-Id: <E1WaNY1-0000Ro-Uw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl_json: remove extra "break"
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 3eb54a2fdbc216b39dc2c0a86f11a32d4c838269
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Wed Apr 9 14:29:13 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Wed Apr 9 15:38:31 2014 +0100

    libxl_json: remove extra "break"
    
    ... otherwise JSON array elements are not freed and memory is leaked.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_json.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c
index d2f7de8..989ac3f 100644
--- a/tools/libxl/libxl_json.c
+++ b/tools/libxl/libxl_json.c
@@ -285,7 +285,6 @@ void libxl__json_object_free(libxl__gc *gc, libxl__json_object *obj)
     }
     case JSON_ARRAY: {
         libxl__json_object *node = NULL;
-        break;
 
         for (idx = 0; idx < obj->u.array->count; idx++) {
             if (flexarray_get(obj->u.array, idx, (void**)&node) != 0)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:47 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58: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 1WaNYD-0006dH-OA; Wed, 16 Apr 2014 10:58:45 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNY4-0006Yi-PX
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:39 +0000
Received: from [193.109.254.147:15612] by server-2.bemta-14.messagelabs.com id
	81/13-21684-B526E435; Wed, 16 Apr 2014 10:58:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1397645914!8678755!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16724 invoked from network); 16 Apr 2014 10:58:35 -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;
	16 Apr 2014 10:58:35 -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 1WaNY1-0000ec-Vz
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNY1-0000Ro-Uw
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:33 +0000
Date: Wed, 16 Apr 2014 10:58:33 +0000
Message-Id: <E1WaNY1-0000Ro-Uw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl_json: remove extra "break"
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 3eb54a2fdbc216b39dc2c0a86f11a32d4c838269
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Wed Apr 9 14:29:13 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Wed Apr 9 15:38:31 2014 +0100

    libxl_json: remove extra "break"
    
    ... otherwise JSON array elements are not freed and memory is leaked.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_json.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c
index d2f7de8..989ac3f 100644
--- a/tools/libxl/libxl_json.c
+++ b/tools/libxl/libxl_json.c
@@ -285,7 +285,6 @@ void libxl__json_object_free(libxl__gc *gc, libxl__json_object *obj)
     }
     case JSON_ARRAY: {
         libxl__json_object *node = NULL;
-        break;
 
         for (idx = 0; idx < obj->u.array->count; idx++) {
             if (flexarray_get(obj->u.array, idx, (void**)&node) != 0)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:51 +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 1WaNYJ-0006gq-92; Wed, 16 Apr 2014 10:58:51 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYE-0006dt-Q1
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:47 +0000
Received: from [85.158.139.211:35145] by server-16.bemta-5.messagelabs.com id
	4E/FA-19700-6626E435; Wed, 16 Apr 2014 10:58:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1397645924!7831926!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7637 invoked from network); 16 Apr 2014 10:58:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58:45 -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 1WaNYC-0000ej-5Z
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYC-0000SA-4G
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:44 +0000
Date: Wed, 16 Apr 2014 10:58:44 +0000
Message-Id: <E1WaNYC-0000SA-4G@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs: remove stray CONFIG_XENDs and
	configure option from docs.
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 28d9b22d1b5308bb25e857635fc75cfbe23c3b63
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 09:26:23 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:08:08 2014 +0100

    docs: remove stray CONFIG_XENDs and configure option from docs.
    
    These were added by 7dbfc2f8b054 "docs: Honour --{en, dis}able-xend when
    building docs" between v1 and the (eventually committed) v2 of 9e8672f1c36d
    "tools: remove xend and associated python modules" and were missed when
    rebasing for v2.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Tested-by: Olaf Hering <olaf@aepfle.de>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 config/Docs.mk.in |    3 ---
 docs/Makefile     |    2 --
 docs/configure    |   34 ----------------------------------
 docs/configure.ac |    3 ---
 4 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/config/Docs.mk.in b/config/Docs.mk.in
index 03fac60..a2a72fd 100644
--- a/config/Docs.mk.in
+++ b/config/Docs.mk.in
@@ -12,6 +12,3 @@ POD2HTML            := @POD2HTML@
 POD2TEXT            := @POD2TEXT@
 MARKDOWN            := @MARKDOWN@
 PERL                := @PERL@
-
-# Subsets of documentation to build
-CONFIG_XEND         := @xend@
diff --git a/docs/Makefile b/docs/Makefile
index 7cd7440..5153bcb 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -9,10 +9,8 @@ DOC_ARCHES      := arm x86_32 x86_64
 # Documentation sources to build
 MAN1SRC-y := $(wildcard man/xl*.pod.1)
 MAN1SRC-y += $(wildcard man/xenstore*.pod.1)
-MAN1SRC-$(CONFIG_XEND) += man/xm.pod.1
 
 MAN5SRC-y := $(wildcard man/xl*.pod.5)
-MAN5SRC-$(CONFIG_XEND) += man/xend-config.sxp.pod.5 man/xmdomain.cfg.pod.5
 
 MARKDOWNSRC-y := $(wildcard misc/*.markdown)
 
diff --git a/docs/configure b/docs/configure
index c54f431..d76e4d4 100755
--- a/docs/configure
+++ b/docs/configure
@@ -588,7 +588,6 @@ ac_unique_file="misc/xen-command-line.markdown"
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 PERL
-xend
 MARKDOWN
 POD2TEXT
 POD2HTML
@@ -635,7 +634,6 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
-enable_xend
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1251,13 +1249,6 @@ if test -n "$ac_init_help"; then
    esac
   cat <<\_ACEOF
 
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-xend           Enable xend toolstack documentation (default is
-                          DISABLED)
-
 Some influential environment variables:
   FIG2DEV     Path to fig2dev tool
   POD2MAN     Path to pod2man tool
@@ -1996,31 +1987,6 @@ $as_echo "$as_me: WARNING: markdown is not available so some documentation won't
 fi
 
 
-# Enable/disable options
-
-# Check whether --enable-xend was given.
-if test "${enable_xend+set}" = set; then :
-  enableval=$enable_xend;
-fi
-
-
-if test "x$enable_xend" = "xno"; then :
-
-    ax_cv_xend="n"
-
-elif test "x$enable_xend" = "xyes"; then :
-
-    ax_cv_xend="y"
-
-elif test -z $ax_cv_xend; then :
-
-    ax_cv_xend="n"
-
-fi
-xend=$ax_cv_xend
-
-
-
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
diff --git a/docs/configure.ac b/docs/configure.ac
index 7e6d1b1..e545b00 100644
--- a/docs/configure.ac
+++ b/docs/configure.ac
@@ -19,9 +19,6 @@ AX_DOCS_TOOL_PROG([POD2HTML], [pod2html])
 AX_DOCS_TOOL_PROG([POD2TEXT], [pod2text])
 AX_DOCS_TOOL_PROGS([MARKDOWN], [markdown], [markdown markdown_py])
 
-# Enable/disable options
-AX_ARG_DEFAULT_DISABLE([xend], [Enable xend toolstack documentation])
-
 AC_ARG_VAR([PERL], [Path to Perl parser])
 AX_PATH_PROG_OR_FAIL([PERL], [perl])
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:51 +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 1WaNYJ-0006gq-92; Wed, 16 Apr 2014 10:58:51 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYE-0006dt-Q1
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:47 +0000
Received: from [85.158.139.211:35145] by server-16.bemta-5.messagelabs.com id
	4E/FA-19700-6626E435; Wed, 16 Apr 2014 10:58:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1397645924!7831926!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7637 invoked from network); 16 Apr 2014 10:58:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58:45 -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 1WaNYC-0000ej-5Z
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYC-0000SA-4G
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:44 +0000
Date: Wed, 16 Apr 2014 10:58:44 +0000
Message-Id: <E1WaNYC-0000SA-4G@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs: remove stray CONFIG_XENDs and
	configure option from docs.
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 28d9b22d1b5308bb25e857635fc75cfbe23c3b63
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 09:26:23 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:08:08 2014 +0100

    docs: remove stray CONFIG_XENDs and configure option from docs.
    
    These were added by 7dbfc2f8b054 "docs: Honour --{en, dis}able-xend when
    building docs" between v1 and the (eventually committed) v2 of 9e8672f1c36d
    "tools: remove xend and associated python modules" and were missed when
    rebasing for v2.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Tested-by: Olaf Hering <olaf@aepfle.de>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 config/Docs.mk.in |    3 ---
 docs/Makefile     |    2 --
 docs/configure    |   34 ----------------------------------
 docs/configure.ac |    3 ---
 4 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/config/Docs.mk.in b/config/Docs.mk.in
index 03fac60..a2a72fd 100644
--- a/config/Docs.mk.in
+++ b/config/Docs.mk.in
@@ -12,6 +12,3 @@ POD2HTML            := @POD2HTML@
 POD2TEXT            := @POD2TEXT@
 MARKDOWN            := @MARKDOWN@
 PERL                := @PERL@
-
-# Subsets of documentation to build
-CONFIG_XEND         := @xend@
diff --git a/docs/Makefile b/docs/Makefile
index 7cd7440..5153bcb 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -9,10 +9,8 @@ DOC_ARCHES      := arm x86_32 x86_64
 # Documentation sources to build
 MAN1SRC-y := $(wildcard man/xl*.pod.1)
 MAN1SRC-y += $(wildcard man/xenstore*.pod.1)
-MAN1SRC-$(CONFIG_XEND) += man/xm.pod.1
 
 MAN5SRC-y := $(wildcard man/xl*.pod.5)
-MAN5SRC-$(CONFIG_XEND) += man/xend-config.sxp.pod.5 man/xmdomain.cfg.pod.5
 
 MARKDOWNSRC-y := $(wildcard misc/*.markdown)
 
diff --git a/docs/configure b/docs/configure
index c54f431..d76e4d4 100755
--- a/docs/configure
+++ b/docs/configure
@@ -588,7 +588,6 @@ ac_unique_file="misc/xen-command-line.markdown"
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 PERL
-xend
 MARKDOWN
 POD2TEXT
 POD2HTML
@@ -635,7 +634,6 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
-enable_xend
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1251,13 +1249,6 @@ if test -n "$ac_init_help"; then
    esac
   cat <<\_ACEOF
 
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-xend           Enable xend toolstack documentation (default is
-                          DISABLED)
-
 Some influential environment variables:
   FIG2DEV     Path to fig2dev tool
   POD2MAN     Path to pod2man tool
@@ -1996,31 +1987,6 @@ $as_echo "$as_me: WARNING: markdown is not available so some documentation won't
 fi
 
 
-# Enable/disable options
-
-# Check whether --enable-xend was given.
-if test "${enable_xend+set}" = set; then :
-  enableval=$enable_xend;
-fi
-
-
-if test "x$enable_xend" = "xno"; then :
-
-    ax_cv_xend="n"
-
-elif test "x$enable_xend" = "xyes"; then :
-
-    ax_cv_xend="y"
-
-elif test -z $ax_cv_xend; then :
-
-    ax_cv_xend="n"
-
-fi
-xend=$ax_cv_xend
-
-
-
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
diff --git a/docs/configure.ac b/docs/configure.ac
index 7e6d1b1..e545b00 100644
--- a/docs/configure.ac
+++ b/docs/configure.ac
@@ -19,9 +19,6 @@ AX_DOCS_TOOL_PROG([POD2HTML], [pod2html])
 AX_DOCS_TOOL_PROG([POD2TEXT], [pod2text])
 AX_DOCS_TOOL_PROGS([MARKDOWN], [markdown], [markdown markdown_py])
 
-# Enable/disable options
-AX_ARG_DEFAULT_DISABLE([xend], [Enable xend toolstack documentation])
-
 AC_ARG_VAR([PERL], [Path to Perl parser])
 AX_PATH_PROG_OR_FAIL([PERL], [perl])
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:59 +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 1WaNYR-0006k6-Gf; Wed, 16 Apr 2014 10:58:59 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYP-0006jT-Sk
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:58 +0000
Received: from [85.158.139.211:41957] by server-11.bemta-5.messagelabs.com id
	D0/30-30804-1726E435; Wed, 16 Apr 2014 10:58:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-206.messagelabs.com!1397645934!1901313!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12892 invoked from network); 16 Apr 2014 10:58:55 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58:55 -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 1WaNYM-0000f7-Ag
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYM-0000SX-9V
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:54 +0000
Date: Wed, 16 Apr 2014 10:58:54 +0000
Message-Id: <E1WaNYM-0000SX-9V@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/hotplug: Remove network-*
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="===============1412211721320597626=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============1412211721320597626==
Content-Type: text/plain

commit 9fabe55939a8ed3128dae8a9cda8d4052eb86493
Author:     Ian Campbell <Ian.Campbell@citrix.com>
AuthorDate: Wed Apr 9 10:10:53 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:09:22 2014 +0100

    tools/hotplug: Remove network-*
    
    From 3f2142f0b7a0d600fa8d2d06b5eacf0d52aa5bca Mon Sep 17 00:00:00 2001
    From: Ian Campbell <ian.campbell@citrix.com>
    Date: Fri, 4 Apr 2014 15:00:12 +0100
    Subject: [PATCH v2] tools/hotplug: Remove network-*
    
    These are a xend-ism. Since Xen 4.1 the recommened way to configure networking
    has been to use the distro facilities (e.g.
    http://wiki.xen.org/wiki/HostConfiguration/Networking)
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/examples/README              |    5 +-
 tools/hotplug/Linux/Makefile       |    6 +-
 tools/hotplug/Linux/network-bridge |  339 ------------------------------------
 tools/hotplug/Linux/network-nat    |  124 -------------
 tools/hotplug/Linux/network-route  |   28 ---
 5 files changed, 4 insertions(+), 498 deletions(-)

diff --git a/tools/examples/README b/tools/examples/README
index 2225d5c..5916df3 100644
--- a/tools/examples/README
+++ b/tools/examples/README
@@ -18,9 +18,6 @@ external-device-migrate - called by xend for migrating external devices
 locking.sh          - locking functions to prevent concurrent access to
                       critical sections inside script files
 logging.sh          - logging function to log output using syslog
-network-bridge      - xen network start/stop script when using bridging
-network-nat         - xen network start/stop script when using NAT
-network-route       - xen network start/stop script when using routing
 vif-bridge          - virtual network start/stop script in bridged mode
 vif-common.sh       - sourced by vif-bridge 
 vif-nat             - xen virtual network start/stop script in NAT mode 
@@ -31,7 +28,7 @@ xen-backend.rules   - hotplug script rules
 xend-config.sxp     - default xend configuration file
 xen-hotplug-common.sh - sourced by vif-common.sh
 xen-network-common.sh - sourced by vif-common.sh
-xen-script-common.sh  - sourced by network-bridge, xen-hotplug-common.sh
+xen-script-common.sh  - sourced by xen-hotplug-common.sh
 xmexample1          - example configuration script for 'xm create'
 xmexample2          - a more complex configuration script for 'xm create'
 xmexample3          - an advanced configuration script for 'xm create' 
diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
index a14cb42..4874ec5 100644
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -9,9 +9,9 @@ XENCOMMONS_INITD = init.d/xencommons
 XENCOMMONS_SYSCONFIG = init.d/sysconfig.xencommons
 
 # Xen script dir and scripts to go there.
-XEN_SCRIPTS = network-bridge vif-bridge
-XEN_SCRIPTS += network-route vif-route
-XEN_SCRIPTS += network-nat vif-nat
+XEN_SCRIPTS = vif-bridge
+XEN_SCRIPTS += vif-route
+XEN_SCRIPTS += vif-nat
 XEN_SCRIPTS += vif-openvswitch
 XEN_SCRIPTS += vif2
 XEN_SCRIPTS += vif-setup
diff --git a/tools/hotplug/Linux/network-bridge b/tools/hotplug/Linux/network-bridge
deleted file mode 100644
index 9aa9dda..0000000
--- a/tools/hotplug/Linux/network-bridge
+++ /dev/null
@@ -1,339 +0,0 @@
-#!/bin/bash
-#============================================================================
-# Default Xen network start/stop script.
-# Xend calls a network script when it starts.
-# The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp
-# in the network-script field.
-#
-# This script creates a bridge (default ${netdev}), adds a device
-# (defaults to the device on the default gateway route) to it, copies
-# the IP addresses from the device to the bridge and adjusts the routes
-# accordingly.
-#
-# If all goes well, this should ensure that networking stays up.
-# However, some configurations are upset by this, especially
-# NFS roots. If the bridged setup does not meet your needs,
-# configure a different script, for example using routing instead.
-#
-# Usage:
-#
-# network-bridge (start|stop|status) {VAR=VAL}*
-#
-# Vars:
-#
-# bridge     The bridge to use (default ${netdev}).
-# netdev     The interface to add to the bridge (default gateway device).
-# antispoof  Whether to use iptables to prevent spoofing (default no).
-#
-# Internal Vars:
-# pdev="p${netdev}"
-# tdev=tmpbridge
-#
-# start:
-# Creates the bridge as tdev
-# Copies the IP and MAC addresses from pdev to bridge
-# Renames netdev to be pdev 
-# Renames tdev to bridge
-# Enslaves pdev to bridge
-#
-# stop:
-# Removes pdev from the bridge
-# Transfers addresses, routes from bridge to pdev
-# Renames bridge to tdev
-# Renames pdev to netdev 
-# Deletes tdev
-#
-# status:
-# Print addresses, interfaces, routes
-#
-#============================================================================
-
-
-dir=$(dirname "$0")
-. "$dir/logging.sh"
-. "$dir/xen-script-common.sh"
-. "$dir/xen-network-common.sh"
-. "$dir/locking.sh"
-
-findCommand "$@"
-evalVariables "$@"
-
-is_network_root () {
-    local rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; }}' /etc/mtab)
-    local rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)
-
-    [[ "$rootfs" =~ "^nfs" ]] || [[ "$rootopts" =~ "_netdev" ]] && has_nfsroot=1 || has_nfsroot=0
-    if [ $has_nfsroot -eq 1 ]; then
-        local bparms=$(cat /proc/cmdline)
-        for p in $bparms; do
-            local ipaddr=$(echo $p | awk /nfsroot=/'{ print substr($1,9,index($1,":")-9) }')
-            if [ "$ipaddr" != "" ]; then
-                local nfsdev=$(ip route get $ipaddr | awk /$ipaddr/'{ print $3 }')
-                [[ "$nfsdev" == "$netdev" ]] && return 0 || return 1
-            fi
-        done
-    fi
-    return 1
-}
-
-find_alt_device () {
-    local interf=$1
-    local prefix=${interf%[[:digit:]]}
-    local ifs=$(ip link show | grep " $prefix" |\
-                awk '{ printf ("%s",substr($2,1,length($2)-1)) }' |\
-                sed s/$interf//)
-    echo "$ifs"
-}
-
-netdev=${netdev:-$(ip route list 0.0.0.0/0  | \
-                   sed 's/.*dev \([a-z]\+[0-9]\+\).*$/\1/')}
-if is_network_root ; then
-    altdevs=$(find_alt_device $netdev)
-    for netdev in $altdevs; do break; done
-    if [ -z "$netdev" ]; then
-        [ -x /usr/bin/logger ] && /usr/bin/logger "network-bridge: bridging not supported on network root; not starting"
-        exit
-    fi
-fi
-netdev=${netdev:-eth0}
-bridge=${bridge:-${netdev}}
-antispoof=${antispoof:-no}
-
-pdev="p${netdev}"
-tdev=tmpbridge
-
-get_ip_info() {
-    addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e 's/ .*//'`
-    gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'`
-}
-    
-do_ifup() {
-    if [ $1 != "${netdev}" ] || ! ifup $1 ; then
-        if [ -n "$addr_pfx" ] ; then
-            # use the info from get_ip_info()
-            ip addr flush $1
-            ip addr add ${addr_pfx} dev $1
-        fi
-        ip link set dev $1 up
-        if [ -n "$gateway" ] ; then
-            ip route add default via ${gateway}
-        fi
-    fi
-}
-
-# Usage: transfer_addrs src dst
-# Copy all IP addresses (including aliases) from device $src to device $dst.
-transfer_addrs () {
-    local src=$1
-    local dst=$2
-    # Don't bother if $dst already has IP addresses.
-    if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then
-        return
-    fi
-    # Address lines start with 'inet' and have the device in them.
-    # Replace 'inet' with 'ip addr add' and change the device name $src
-    # to 'dev $src'.
-    ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
-s/inet/ip addr add/
-s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
-s/${src}/dev ${dst} label ${dst}/
-s/secondary//
-" | sh -e
-    # Remove automatic routes on destination device
-    ip route list | sed -ne "
-/dev ${dst}\( \|$\)/ {
-  s/^/ip route del /
-  p
-}" | sh -e
-}
-
-# Usage: transfer_routes src dst
-# Get all IP routes to device $src, delete them, and
-# add the same routes to device $dst.
-# The original routes have to be deleted, otherwise adding them
-# for $dst fails (duplicate routes).
-transfer_routes () {
-    local src=$1
-    local dst=$2
-    # List all routes and grep the ones with $src in.
-    # Stick 'ip route del' on the front to delete.
-    # Change $src to $dst and use 'ip route add' to add.
-    ip route list | sed -ne "
-/dev ${src}\( \|$\)/ {
-  h
-  s/^/ip route del /
-  P
-  g
-  s/${src}/${dst}/
-  s/^/ip route add /
-  P
-  d
-}" | sh -e
-}
-
-
-##
-# link_exists interface
-#
-# Returns 0 if the interface named exists (whether up or down), 1 otherwise.
-#
-link_exists()
-{
-    if ip link show "$1" >/dev/null 2>/dev/null
-    then
-        return 0
-    else
-        return 1
-    fi
-}
-
-# Set the default forwarding policy for $dev to drop.
-# Allow forwarding to the bridge.
-antispoofing () {
-    iptables -P FORWARD DROP
-    iptables -F FORWARD
-    iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT
-}
-
-# Usage: show_status dev bridge
-# Print ifconfig and routes.
-show_status () {
-    local dev=$1
-    local bridge=$2
-    
-    echo '============================================================'
-    ip addr show ${dev}
-    ip addr show ${bridge}
-    echo ' '
-    brctl show ${bridge}
-    echo ' '
-    ip route list
-    echo ' '
-    route -n
-    echo '============================================================'
-}
-
-op_start () {
-    if [ "${bridge}" = "null" ] ; then
-	return
-    fi
-
-    if [ `brctl show | wc -l` != 1 ]; then
-        return
-    fi
-
-    if link_exists "$pdev"; then
-        # The device is already up.
-        return
-    fi
-
-    claim_lock "network-bridge"
-
-    create_bridge ${tdev}
-
-    preiftransfer ${netdev}
-    transfer_addrs ${netdev} ${tdev}
-    # Remember slaves for bonding interface.
-    if [ -e /sys/class/net/${netdev}/bonding/slaves ]; then
-	slaves=`cat /sys/class/net/${netdev}/bonding/slaves`
-    fi
-    # Remember the IP details for do_ifup.
-    get_ip_info ${netdev}
-    if ! ifdown ${netdev}; then
-	ip link set ${netdev} down
-	ip addr flush ${netdev}
-    fi
-    ip link set ${netdev} name ${pdev}
-    ip link set ${tdev} name ${bridge}
-
-    setup_physical_bridge_port ${pdev}
-
-    # Restore slaves
-    if [ -n "${slaves}" ]; then
-	ip link set ${pdev} up
-	ifenslave ${pdev} ${slaves}
-    fi
-    add_to_bridge2 ${bridge} ${pdev}
-    do_ifup ${bridge}
-
-    if [ ${antispoof} = 'yes' ] ; then
-	antispoofing
-    fi
-
-    release_lock "network-bridge"
-}
-
-op_stop () {
-    if [ "${bridge}" = "null" ]; then
-	return
-    fi
-    if ! link_exists "$bridge"; then
-	return
-    fi
-    if ! [ -e "/sys/class/net/${bridge}/brif/${pdev}" ]; then
-        # $bridge is not a bridge to which pdev is enslaved
-        return
-    fi
-
-    claim_lock "network-bridge"
-
-    transfer_addrs ${bridge} ${pdev}
-    if ! ifdown ${bridge}; then
-	get_ip_info ${bridge}
-    fi
-    ip link set ${pdev} down
-    ip addr flush ${bridge}
-
-    brctl delif ${bridge} ${pdev}
-    ip link set ${bridge} down
-
-    ip link set ${bridge} name ${tdev}
-    ip link set ${pdev} name ${netdev}
-    do_ifup ${netdev}
-
-    brctl delbr ${tdev}
-
-    release_lock "network-bridge"
-}
-
-# adds $dev to $bridge but waits for $dev to be in running state first
-add_to_bridge2() {
-    local bridge=$1
-    local dev=$2
-    local maxtries=10
-
-    echo -n "Waiting for ${dev} to negotiate link."
-    ip link set ${dev} up
-    for i in `seq ${maxtries}` ; do
-	if ifconfig ${dev} | grep -q RUNNING ; then
-	    break
-	else
-	    echo -n '.'
-	    sleep 1
-	fi
-    done
-
-    if [ ${i} -eq ${maxtries} ] ; then echo -n '(link isnt in running state)' ; fi
-    echo
-
-    add_to_bridge ${bridge} ${dev}
-}
-
-case "$command" in
-    start)
-	op_start
-	;;
-    
-    stop)
-	op_stop
-	;;
-
-    status)
-	show_status ${netdev} ${bridge}
-	;;
-
-    *)
-	echo "Unknown command: $command" >&2
-	echo 'Valid commands are: start, stop, status' >&2
-	exit 1
-esac
diff --git a/tools/hotplug/Linux/network-nat b/tools/hotplug/Linux/network-nat
deleted file mode 100644
index eb1740e..0000000
--- a/tools/hotplug/Linux/network-nat
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/bin/bash
-#============================================================================
-# Default Xen network start/stop script when using NAT.
-# Xend calls a network script when it starts.
-# The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp
-# in the network-script field.
-#
-# Usage:
-#
-# network-nat (start|stop|status) {VAR=VAL}*
-#
-# Vars:
-#
-# netdev     The gateway interface (default eth0).
-# antispoof  Whether to use iptables to prevent spoofing (default no).
-# dhcp       Whether to alter the local DHCP configuration (default no).
-#
-#============================================================================
-
-dir=$(dirname "$0")
-. "$dir/hotplugpath.sh"
-. "$dir/xen-script-common.sh"
-. "$dir/xen-network-common.sh"
-
-findCommand "$@"
-evalVariables "$@"
-
-netdev=${netdev:-eth0}
-# antispoofing not yet implemented
-antispoof=${antispoof:-no}
-
-# turn on dhcp feature by default if dhcpd is installed
-if [ -f /etc/dhcpd.conf ]
-then
-	dhcp=${dhcp:-yes}
-else
-	dhcp=${dhcp:-no}
-fi
-
-
-if [ "$dhcp" != 'no' ]
-then
-  dhcpd_conf_file=$(find_dhcpd_conf_file)
-  dhcpd_init_file=$(find_dhcpd_init_file)
-  if [ -z "$dhcpd_conf_file" ] || [ -z "$dhcpd_init_file" ]
-  then
-    echo 'Failed to find dhcpd configuration or init file.' >&2
-    exit 1
-  fi
-fi
-
-domain_name=`cat /etc/resolv.conf | grep -v "#" | grep -E 'search|domain' -i | tail -n 1 | awk '{ print $2 }'`
-nameserver=`cat /etc/resolv.conf | grep -v "#" | grep "nameserver" -i -m 1 | awk '{ print $2 }'`
-
-function dhcp_start()
-{
-  if ! grep -q "subnet 10.0.0.0" "$dhcpd_conf_file"
-  then
-    echo >>"$dhcpd_conf_file" "subnet 10.0.0.0 netmask 255.255.0.0 {\
- option domain-name \"$domain_name\";\
- option domain-name-servers $nameserver; }"
-  fi
-
-  "$dhcpd_init_file" restart
-}
-
-
-function dhcp_stop()
-{
-  local tmpfile=$(mktemp)
-  grep -v "subnet 10.0.0.0" "$dhcpd_conf_file" >"$tmpfile"
-  if diff "$tmpfile" "$dhcpd_conf_file" >&/dev/null
-  then
-    rm "$tmpfile"
-  else
-    mv "$tmpfile" "$dhcpd_conf_file"
-  fi
-
-  "$dhcpd_init_file" restart
-}
-
-
-op_start() {
-	echo 1 >/proc/sys/net/ipv4/ip_forward
-	iptables -t nat -A POSTROUTING -o ${netdev} -j MASQUERADE
-        [ "$dhcp" != 'no' ] && dhcp_start
-}
-
-
-op_stop() {
-        [ "$dhcp" != 'no' ] && dhcp_stop
-	iptables -t nat -D POSTROUTING -o ${netdev} -j MASQUERADE
-}
-
-
-show_status() {
-    echo '============================================================'
-    ifconfig
-    echo ' '
-    ip route list
-    echo ' '
-    route -n
-    echo '============================================================'
-
-}
-
-case "$command" in
-    start)
-        op_start
-        ;;
-    
-    stop)
-        op_stop
-        ;;
-
-    status)
-        show_status
-       ;;
-
-    *)
-       echo "Unknown command: $command" >&2
-       echo 'Valid commands are: start, stop, status' >&2
-       exit 1
-esac
diff --git a/tools/hotplug/Linux/network-route b/tools/hotplug/Linux/network-route
deleted file mode 100644
index 8f6a1be..0000000
--- a/tools/hotplug/Linux/network-route
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-#============================================================================
-# Default Xen network start/stop script.
-# Xend calls a network script when it starts.
-# The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp
-# in the network-script field.
-#
-# Usage:
-#
-# network-route (start|stop|status) {VAR=VAL}*
-#
-# Vars:
-#
-# netdev     The gateway interface (default eth0).
-# antispoof  Whether to use iptables to prevent spoofing (default yes).
-#
-#============================================================================
-
-dir=$(dirname "$0")
-. "$dir/hotplugpath.sh"
-. "$dir/xen-script-common.sh"
-
-evalVariables "$@"
-
-netdev=${netdev:-eth0}
-
-echo 1 >/proc/sys/net/ipv4/ip_forward
-echo 1 >/proc/sys/net/ipv4/conf/${netdev}/proxy_arp
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============1412211721320597626==
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
--===============1412211721320597626==--

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:58:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:58:59 +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 1WaNYR-0006k6-Gf; Wed, 16 Apr 2014 10:58:59 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYP-0006jT-Sk
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:58 +0000
Received: from [85.158.139.211:41957] by server-11.bemta-5.messagelabs.com id
	D0/30-30804-1726E435; Wed, 16 Apr 2014 10:58:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-206.messagelabs.com!1397645934!1901313!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12892 invoked from network); 16 Apr 2014 10:58:55 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-14.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:58:55 -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 1WaNYM-0000f7-Ag
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYM-0000SX-9V
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:58:54 +0000
Date: Wed, 16 Apr 2014 10:58:54 +0000
Message-Id: <E1WaNYM-0000SX-9V@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/hotplug: Remove network-*
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="===============1412211721320597626=="
Sender: xen-changelog-bounces@lists.xen.org
Errors-To: xen-changelog-bounces@lists.xen.org

--===============1412211721320597626==
Content-Type: text/plain

commit 9fabe55939a8ed3128dae8a9cda8d4052eb86493
Author:     Ian Campbell <Ian.Campbell@citrix.com>
AuthorDate: Wed Apr 9 10:10:53 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:09:22 2014 +0100

    tools/hotplug: Remove network-*
    
    From 3f2142f0b7a0d600fa8d2d06b5eacf0d52aa5bca Mon Sep 17 00:00:00 2001
    From: Ian Campbell <ian.campbell@citrix.com>
    Date: Fri, 4 Apr 2014 15:00:12 +0100
    Subject: [PATCH v2] tools/hotplug: Remove network-*
    
    These are a xend-ism. Since Xen 4.1 the recommened way to configure networking
    has been to use the distro facilities (e.g.
    http://wiki.xen.org/wiki/HostConfiguration/Networking)
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Roger Pau Monné <roger.pau@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/examples/README              |    5 +-
 tools/hotplug/Linux/Makefile       |    6 +-
 tools/hotplug/Linux/network-bridge |  339 ------------------------------------
 tools/hotplug/Linux/network-nat    |  124 -------------
 tools/hotplug/Linux/network-route  |   28 ---
 5 files changed, 4 insertions(+), 498 deletions(-)

diff --git a/tools/examples/README b/tools/examples/README
index 2225d5c..5916df3 100644
--- a/tools/examples/README
+++ b/tools/examples/README
@@ -18,9 +18,6 @@ external-device-migrate - called by xend for migrating external devices
 locking.sh          - locking functions to prevent concurrent access to
                       critical sections inside script files
 logging.sh          - logging function to log output using syslog
-network-bridge      - xen network start/stop script when using bridging
-network-nat         - xen network start/stop script when using NAT
-network-route       - xen network start/stop script when using routing
 vif-bridge          - virtual network start/stop script in bridged mode
 vif-common.sh       - sourced by vif-bridge 
 vif-nat             - xen virtual network start/stop script in NAT mode 
@@ -31,7 +28,7 @@ xen-backend.rules   - hotplug script rules
 xend-config.sxp     - default xend configuration file
 xen-hotplug-common.sh - sourced by vif-common.sh
 xen-network-common.sh - sourced by vif-common.sh
-xen-script-common.sh  - sourced by network-bridge, xen-hotplug-common.sh
+xen-script-common.sh  - sourced by xen-hotplug-common.sh
 xmexample1          - example configuration script for 'xm create'
 xmexample2          - a more complex configuration script for 'xm create'
 xmexample3          - an advanced configuration script for 'xm create' 
diff --git a/tools/hotplug/Linux/Makefile b/tools/hotplug/Linux/Makefile
index a14cb42..4874ec5 100644
--- a/tools/hotplug/Linux/Makefile
+++ b/tools/hotplug/Linux/Makefile
@@ -9,9 +9,9 @@ XENCOMMONS_INITD = init.d/xencommons
 XENCOMMONS_SYSCONFIG = init.d/sysconfig.xencommons
 
 # Xen script dir and scripts to go there.
-XEN_SCRIPTS = network-bridge vif-bridge
-XEN_SCRIPTS += network-route vif-route
-XEN_SCRIPTS += network-nat vif-nat
+XEN_SCRIPTS = vif-bridge
+XEN_SCRIPTS += vif-route
+XEN_SCRIPTS += vif-nat
 XEN_SCRIPTS += vif-openvswitch
 XEN_SCRIPTS += vif2
 XEN_SCRIPTS += vif-setup
diff --git a/tools/hotplug/Linux/network-bridge b/tools/hotplug/Linux/network-bridge
deleted file mode 100644
index 9aa9dda..0000000
--- a/tools/hotplug/Linux/network-bridge
+++ /dev/null
@@ -1,339 +0,0 @@
-#!/bin/bash
-#============================================================================
-# Default Xen network start/stop script.
-# Xend calls a network script when it starts.
-# The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp
-# in the network-script field.
-#
-# This script creates a bridge (default ${netdev}), adds a device
-# (defaults to the device on the default gateway route) to it, copies
-# the IP addresses from the device to the bridge and adjusts the routes
-# accordingly.
-#
-# If all goes well, this should ensure that networking stays up.
-# However, some configurations are upset by this, especially
-# NFS roots. If the bridged setup does not meet your needs,
-# configure a different script, for example using routing instead.
-#
-# Usage:
-#
-# network-bridge (start|stop|status) {VAR=VAL}*
-#
-# Vars:
-#
-# bridge     The bridge to use (default ${netdev}).
-# netdev     The interface to add to the bridge (default gateway device).
-# antispoof  Whether to use iptables to prevent spoofing (default no).
-#
-# Internal Vars:
-# pdev="p${netdev}"
-# tdev=tmpbridge
-#
-# start:
-# Creates the bridge as tdev
-# Copies the IP and MAC addresses from pdev to bridge
-# Renames netdev to be pdev 
-# Renames tdev to bridge
-# Enslaves pdev to bridge
-#
-# stop:
-# Removes pdev from the bridge
-# Transfers addresses, routes from bridge to pdev
-# Renames bridge to tdev
-# Renames pdev to netdev 
-# Deletes tdev
-#
-# status:
-# Print addresses, interfaces, routes
-#
-#============================================================================
-
-
-dir=$(dirname "$0")
-. "$dir/logging.sh"
-. "$dir/xen-script-common.sh"
-. "$dir/xen-network-common.sh"
-. "$dir/locking.sh"
-
-findCommand "$@"
-evalVariables "$@"
-
-is_network_root () {
-    local rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; }}' /etc/mtab)
-    local rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)
-
-    [[ "$rootfs" =~ "^nfs" ]] || [[ "$rootopts" =~ "_netdev" ]] && has_nfsroot=1 || has_nfsroot=0
-    if [ $has_nfsroot -eq 1 ]; then
-        local bparms=$(cat /proc/cmdline)
-        for p in $bparms; do
-            local ipaddr=$(echo $p | awk /nfsroot=/'{ print substr($1,9,index($1,":")-9) }')
-            if [ "$ipaddr" != "" ]; then
-                local nfsdev=$(ip route get $ipaddr | awk /$ipaddr/'{ print $3 }')
-                [[ "$nfsdev" == "$netdev" ]] && return 0 || return 1
-            fi
-        done
-    fi
-    return 1
-}
-
-find_alt_device () {
-    local interf=$1
-    local prefix=${interf%[[:digit:]]}
-    local ifs=$(ip link show | grep " $prefix" |\
-                awk '{ printf ("%s",substr($2,1,length($2)-1)) }' |\
-                sed s/$interf//)
-    echo "$ifs"
-}
-
-netdev=${netdev:-$(ip route list 0.0.0.0/0  | \
-                   sed 's/.*dev \([a-z]\+[0-9]\+\).*$/\1/')}
-if is_network_root ; then
-    altdevs=$(find_alt_device $netdev)
-    for netdev in $altdevs; do break; done
-    if [ -z "$netdev" ]; then
-        [ -x /usr/bin/logger ] && /usr/bin/logger "network-bridge: bridging not supported on network root; not starting"
-        exit
-    fi
-fi
-netdev=${netdev:-eth0}
-bridge=${bridge:-${netdev}}
-antispoof=${antispoof:-no}
-
-pdev="p${netdev}"
-tdev=tmpbridge
-
-get_ip_info() {
-    addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e 's/ .*//'`
-    gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'`
-}
-    
-do_ifup() {
-    if [ $1 != "${netdev}" ] || ! ifup $1 ; then
-        if [ -n "$addr_pfx" ] ; then
-            # use the info from get_ip_info()
-            ip addr flush $1
-            ip addr add ${addr_pfx} dev $1
-        fi
-        ip link set dev $1 up
-        if [ -n "$gateway" ] ; then
-            ip route add default via ${gateway}
-        fi
-    fi
-}
-
-# Usage: transfer_addrs src dst
-# Copy all IP addresses (including aliases) from device $src to device $dst.
-transfer_addrs () {
-    local src=$1
-    local dst=$2
-    # Don't bother if $dst already has IP addresses.
-    if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then
-        return
-    fi
-    # Address lines start with 'inet' and have the device in them.
-    # Replace 'inet' with 'ip addr add' and change the device name $src
-    # to 'dev $src'.
-    ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
-s/inet/ip addr add/
-s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
-s/${src}/dev ${dst} label ${dst}/
-s/secondary//
-" | sh -e
-    # Remove automatic routes on destination device
-    ip route list | sed -ne "
-/dev ${dst}\( \|$\)/ {
-  s/^/ip route del /
-  p
-}" | sh -e
-}
-
-# Usage: transfer_routes src dst
-# Get all IP routes to device $src, delete them, and
-# add the same routes to device $dst.
-# The original routes have to be deleted, otherwise adding them
-# for $dst fails (duplicate routes).
-transfer_routes () {
-    local src=$1
-    local dst=$2
-    # List all routes and grep the ones with $src in.
-    # Stick 'ip route del' on the front to delete.
-    # Change $src to $dst and use 'ip route add' to add.
-    ip route list | sed -ne "
-/dev ${src}\( \|$\)/ {
-  h
-  s/^/ip route del /
-  P
-  g
-  s/${src}/${dst}/
-  s/^/ip route add /
-  P
-  d
-}" | sh -e
-}
-
-
-##
-# link_exists interface
-#
-# Returns 0 if the interface named exists (whether up or down), 1 otherwise.
-#
-link_exists()
-{
-    if ip link show "$1" >/dev/null 2>/dev/null
-    then
-        return 0
-    else
-        return 1
-    fi
-}
-
-# Set the default forwarding policy for $dev to drop.
-# Allow forwarding to the bridge.
-antispoofing () {
-    iptables -P FORWARD DROP
-    iptables -F FORWARD
-    iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT
-}
-
-# Usage: show_status dev bridge
-# Print ifconfig and routes.
-show_status () {
-    local dev=$1
-    local bridge=$2
-    
-    echo '============================================================'
-    ip addr show ${dev}
-    ip addr show ${bridge}
-    echo ' '
-    brctl show ${bridge}
-    echo ' '
-    ip route list
-    echo ' '
-    route -n
-    echo '============================================================'
-}
-
-op_start () {
-    if [ "${bridge}" = "null" ] ; then
-	return
-    fi
-
-    if [ `brctl show | wc -l` != 1 ]; then
-        return
-    fi
-
-    if link_exists "$pdev"; then
-        # The device is already up.
-        return
-    fi
-
-    claim_lock "network-bridge"
-
-    create_bridge ${tdev}
-
-    preiftransfer ${netdev}
-    transfer_addrs ${netdev} ${tdev}
-    # Remember slaves for bonding interface.
-    if [ -e /sys/class/net/${netdev}/bonding/slaves ]; then
-	slaves=`cat /sys/class/net/${netdev}/bonding/slaves`
-    fi
-    # Remember the IP details for do_ifup.
-    get_ip_info ${netdev}
-    if ! ifdown ${netdev}; then
-	ip link set ${netdev} down
-	ip addr flush ${netdev}
-    fi
-    ip link set ${netdev} name ${pdev}
-    ip link set ${tdev} name ${bridge}
-
-    setup_physical_bridge_port ${pdev}
-
-    # Restore slaves
-    if [ -n "${slaves}" ]; then
-	ip link set ${pdev} up
-	ifenslave ${pdev} ${slaves}
-    fi
-    add_to_bridge2 ${bridge} ${pdev}
-    do_ifup ${bridge}
-
-    if [ ${antispoof} = 'yes' ] ; then
-	antispoofing
-    fi
-
-    release_lock "network-bridge"
-}
-
-op_stop () {
-    if [ "${bridge}" = "null" ]; then
-	return
-    fi
-    if ! link_exists "$bridge"; then
-	return
-    fi
-    if ! [ -e "/sys/class/net/${bridge}/brif/${pdev}" ]; then
-        # $bridge is not a bridge to which pdev is enslaved
-        return
-    fi
-
-    claim_lock "network-bridge"
-
-    transfer_addrs ${bridge} ${pdev}
-    if ! ifdown ${bridge}; then
-	get_ip_info ${bridge}
-    fi
-    ip link set ${pdev} down
-    ip addr flush ${bridge}
-
-    brctl delif ${bridge} ${pdev}
-    ip link set ${bridge} down
-
-    ip link set ${bridge} name ${tdev}
-    ip link set ${pdev} name ${netdev}
-    do_ifup ${netdev}
-
-    brctl delbr ${tdev}
-
-    release_lock "network-bridge"
-}
-
-# adds $dev to $bridge but waits for $dev to be in running state first
-add_to_bridge2() {
-    local bridge=$1
-    local dev=$2
-    local maxtries=10
-
-    echo -n "Waiting for ${dev} to negotiate link."
-    ip link set ${dev} up
-    for i in `seq ${maxtries}` ; do
-	if ifconfig ${dev} | grep -q RUNNING ; then
-	    break
-	else
-	    echo -n '.'
-	    sleep 1
-	fi
-    done
-
-    if [ ${i} -eq ${maxtries} ] ; then echo -n '(link isnt in running state)' ; fi
-    echo
-
-    add_to_bridge ${bridge} ${dev}
-}
-
-case "$command" in
-    start)
-	op_start
-	;;
-    
-    stop)
-	op_stop
-	;;
-
-    status)
-	show_status ${netdev} ${bridge}
-	;;
-
-    *)
-	echo "Unknown command: $command" >&2
-	echo 'Valid commands are: start, stop, status' >&2
-	exit 1
-esac
diff --git a/tools/hotplug/Linux/network-nat b/tools/hotplug/Linux/network-nat
deleted file mode 100644
index eb1740e..0000000
--- a/tools/hotplug/Linux/network-nat
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/bin/bash
-#============================================================================
-# Default Xen network start/stop script when using NAT.
-# Xend calls a network script when it starts.
-# The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp
-# in the network-script field.
-#
-# Usage:
-#
-# network-nat (start|stop|status) {VAR=VAL}*
-#
-# Vars:
-#
-# netdev     The gateway interface (default eth0).
-# antispoof  Whether to use iptables to prevent spoofing (default no).
-# dhcp       Whether to alter the local DHCP configuration (default no).
-#
-#============================================================================
-
-dir=$(dirname "$0")
-. "$dir/hotplugpath.sh"
-. "$dir/xen-script-common.sh"
-. "$dir/xen-network-common.sh"
-
-findCommand "$@"
-evalVariables "$@"
-
-netdev=${netdev:-eth0}
-# antispoofing not yet implemented
-antispoof=${antispoof:-no}
-
-# turn on dhcp feature by default if dhcpd is installed
-if [ -f /etc/dhcpd.conf ]
-then
-	dhcp=${dhcp:-yes}
-else
-	dhcp=${dhcp:-no}
-fi
-
-
-if [ "$dhcp" != 'no' ]
-then
-  dhcpd_conf_file=$(find_dhcpd_conf_file)
-  dhcpd_init_file=$(find_dhcpd_init_file)
-  if [ -z "$dhcpd_conf_file" ] || [ -z "$dhcpd_init_file" ]
-  then
-    echo 'Failed to find dhcpd configuration or init file.' >&2
-    exit 1
-  fi
-fi
-
-domain_name=`cat /etc/resolv.conf | grep -v "#" | grep -E 'search|domain' -i | tail -n 1 | awk '{ print $2 }'`
-nameserver=`cat /etc/resolv.conf | grep -v "#" | grep "nameserver" -i -m 1 | awk '{ print $2 }'`
-
-function dhcp_start()
-{
-  if ! grep -q "subnet 10.0.0.0" "$dhcpd_conf_file"
-  then
-    echo >>"$dhcpd_conf_file" "subnet 10.0.0.0 netmask 255.255.0.0 {\
- option domain-name \"$domain_name\";\
- option domain-name-servers $nameserver; }"
-  fi
-
-  "$dhcpd_init_file" restart
-}
-
-
-function dhcp_stop()
-{
-  local tmpfile=$(mktemp)
-  grep -v "subnet 10.0.0.0" "$dhcpd_conf_file" >"$tmpfile"
-  if diff "$tmpfile" "$dhcpd_conf_file" >&/dev/null
-  then
-    rm "$tmpfile"
-  else
-    mv "$tmpfile" "$dhcpd_conf_file"
-  fi
-
-  "$dhcpd_init_file" restart
-}
-
-
-op_start() {
-	echo 1 >/proc/sys/net/ipv4/ip_forward
-	iptables -t nat -A POSTROUTING -o ${netdev} -j MASQUERADE
-        [ "$dhcp" != 'no' ] && dhcp_start
-}
-
-
-op_stop() {
-        [ "$dhcp" != 'no' ] && dhcp_stop
-	iptables -t nat -D POSTROUTING -o ${netdev} -j MASQUERADE
-}
-
-
-show_status() {
-    echo '============================================================'
-    ifconfig
-    echo ' '
-    ip route list
-    echo ' '
-    route -n
-    echo '============================================================'
-
-}
-
-case "$command" in
-    start)
-        op_start
-        ;;
-    
-    stop)
-        op_stop
-        ;;
-
-    status)
-        show_status
-       ;;
-
-    *)
-       echo "Unknown command: $command" >&2
-       echo 'Valid commands are: start, stop, status' >&2
-       exit 1
-esac
diff --git a/tools/hotplug/Linux/network-route b/tools/hotplug/Linux/network-route
deleted file mode 100644
index 8f6a1be..0000000
--- a/tools/hotplug/Linux/network-route
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-#============================================================================
-# Default Xen network start/stop script.
-# Xend calls a network script when it starts.
-# The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp
-# in the network-script field.
-#
-# Usage:
-#
-# network-route (start|stop|status) {VAR=VAL}*
-#
-# Vars:
-#
-# netdev     The gateway interface (default eth0).
-# antispoof  Whether to use iptables to prevent spoofing (default yes).
-#
-#============================================================================
-
-dir=$(dirname "$0")
-. "$dir/hotplugpath.sh"
-. "$dir/xen-script-common.sh"
-
-evalVariables "$@"
-
-netdev=${netdev:-eth0}
-
-echo 1 >/proc/sys/net/ipv4/ip_forward
-echo 1 >/proc/sys/net/ipv4/conf/${netdev}/proxy_arp
--
generated by git-patchbot for /home/xen/git/xen.git#master


--===============1412211721320597626==
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
--===============1412211721320597626==--

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59: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 1WaNYo-0006mm-Sq; Wed, 16 Apr 2014 10:59:22 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYZ-0006ky-VA
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:19 +0000
Received: from [193.109.254.147:43037] by server-10.bemta-14.messagelabs.com
	id FC/78-04546-B726E435; Wed, 16 Apr 2014 10:59:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1397645944!7916550!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24509 invoked from network); 16 Apr 2014 10:59:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:59:05 -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 1WaNYW-0000fi-GY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYW-0000Tc-FT
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:04 +0000
Date: Wed, 16 Apr 2014 10:59:04 +0000
Message-Id: <E1WaNYW-0000Tc-FT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs: remove xend latex source
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 0a49101d0ecddae3d28ba085be586802e6be3a6b
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 10:55:13 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:10:04 2014 +0100

    docs: remove xend latex source
    
    AFAICT this hasn't actually been built since 8311d176ea6ff "docs: Remove
    outdated LaTex documentation".
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 docs/misc/xend.tex |  419 ----------------------------------------------------
 1 files changed, 0 insertions(+), 419 deletions(-)

diff --git a/docs/misc/xend.tex b/docs/misc/xend.tex
deleted file mode 100644
index 1a6c687..0000000
--- a/docs/misc/xend.tex
+++ /dev/null
@@ -1,419 +0,0 @@
-% -*- mode: LaTeX -*-
-\def\seca{\chapter}
-\def\secb{\section}
-\def\secc{\subsection}
-\def\secd{\subsubsection}
-\def\refa{chapter}
-\def\refb{section}
-\def\refc{section}
-\def\refd{section}
-
-%\def\seca{\section}
-%\def\secb{\subsection}
-%\def\secc{\subsubsection}
-%\def\refa{section}
-%\def\refb{section}
-%\def\refc{section}
-
-\documentclass[11pt,twoside,final,openright]{report}
-\usepackage{a4,graphicx,setspace}
-\setstretch{1.15}
-
-\begin{document}
-
-% TITLE PAGE
-\pagestyle{empty}
-\begin{center}
-\vspace*{\fill}
-\includegraphics{figs/xenlogo.eps}
-\vfill
-\vfill
-\vfill
-\begin{tabular}{l}
-{\Huge \bf Xend} \\[4mm]
-{\huge Xen v2.0 for x86} \\[80mm]
-
-{\Large Xen is Copyright (c) 2004, The Xen Team} \\[3mm]
-{\Large University of Cambridge, UK} \\[20mm]
-{\large Last updated 30 August 2004}
-\end{tabular}
-\vfill
-\end{center}
-\cleardoublepage
-
-% TABLE OF CONTENTS
-\pagestyle{plain}
-\pagenumbering{roman}
-{ \parskip 0pt plus 1pt
-  \tableofcontents }
-\cleardoublepage
-% PREPARE FOR MAIN TEXT
-\pagenumbering{arabic}
-\raggedbottom
-\widowpenalty=10000
-\clubpenalty=10000
-\parindent=0pt
-\renewcommand{\topfraction}{.8}
-\renewcommand{\bottomfraction}{.8}
-\renewcommand{\textfraction}{.2}
-\renewcommand{\floatpagefraction}{.8}
-
-\setstretch{1.15}
-
-\seca{Introduction}
-Xend is the control daemon used to manage a machine running the Xen hypervisor.
-Xend is responsible for creating and destroying domains and managing their
-resources, such as virtual block devices and virtual network interfaces.
-
-Xend exists because the Xen hypervisor itself only manages the memory image
-of a domain and its scheduling. Xen provides the event channels that connect
-a domain to its devices, but is intentionally not involved in setting them up.
-
-Xend runs as a daemon in the privileged domain 0 and uses a low-level api
-to communicate with Xen via the domain 0 kernel. Xend exports its control
-interface to its clients using HTTP. Most programming languages have
-HTTP client libraries, so this interface can be used from most popular 
-languages, for example Python, Perl, C, Java.
-Xend itself is written in Python, as are most of the Xen tools.
-
-The xend interface is intended to be a complete interface for the creation
-and management of domains. It supports domain creation, shutdown, reboot,
-destruction, save, restore and migration.
-
-When xend creates a domain it creates the domain memory image and communicates
-with the device driver domain(s) to configure the devices for the domain.
-This sets up connections between the domain and backend device controllers
-in the driver domain. When a domain shuts down its memory image cannot be fully released
-unless its backend devices are released and disconnected. This is done by xend.
-In order to protect against loss of this information when xend is restarted,
-xend maintains a persistent database of domain configurations. This allows
-xend to be stopped and restarted without loss of configuration information.
-For example, in order to upgrade the xend software.
-
-\seca{Domain lifecycle}
-\secb{Domain creation}
-Xend is instructed to create a domain by posting a domain\_create message to it,
-containing the domain configuration to be instantiated. The domain configuration
-is in sxp format and is as far as possible {\em fully-bound}, that is, all
-parameters are fully-specified. The domain configuration is saved in the filesystem
-so that it can be reused later if necessary.
-
-The domain configuration specifies the domain name, memory size, kernel image
-and parameters, and all the domain devices. Xend uses the Xen api to create
-the domain memory image, and then {\em builds} the memory image for the domain
-using the kernel image. At this point the domain exists, but it cannot be run because
-it has no devices. Xend then communicates with the device driver domain to create
-the configured devices. Once the devices are created it sets up event channels
-for them between the driver domain and the new domain, and notifies the new domain
-that its devices are connected. At this point the domain can be started.
-
-Xend is also responsible for managing domain consoles. When a domain is created,
-xend sets up a console event channel to the domain, and creates a TCP listening port
-for the domain console. When a connection is accepted to the port, xend
-connects input and output for the port to the domain console channel.
-
-\secb{Domain destruction}
-When a domain terminates, because it has been shutdown or it has crashed, the
-domain resources must be released so that the domain memory image can be
-finally removed from xen. Xend monitors the domains, and is also signaled by
-xen (using a VIRQ) when a domain exits. Xend examines the domain states and
-determines which domains have exited. It then communicates with the driver domain
-to release the devices for exited domains. Xend also closes any open console
-connections and removes the TCP listeners for exited domains.
-Once all devices have been released it instructs xen to destroy the memory image.
-
-\secb{Domain restart}
-Domain restart is the xen equivalent of a machine reboot. When a domain
-exits because it has been shutdown in reboot mode, its exit code is reboot.
-When examining domains to find those that have exited and destroy them,
-xend detects those that have exited for reboot and does not completely destroy
-them. It disconnects all their devices, and detaches the console listener
-from its channel to the domain, but does not close it. Instead it schedules
-a call to rebuild the domain from its configuration. This proceeds almost
-identically to creating the domain, except that the console listener is
-reused and connected to the new domain. This allows existing console
-connections to remain connected across a domain restart. The restarted
-domain keeps the same name and domain id.
-
-The determination of when to restart a domain is in fact slightly more
-complex than described above. A domain is configured with a 
-{\em restart mode}. If the restart mode is {\em onreboot}, the default,
-restart happens when the domain is shutdown normally and
-exits with code reboot. If the restart mode is {\em never} the domain is
-not restarted. If the restart mode is {\em always} the domain is always
-restarted, regardless of how it exited.
-
-In order to prevent continual domain crash causing restart loops, xend
-has a {\em minimum restart time}. Xend remembers when a domain was last
-restarted and will fail a restart that happens inside the minimum
-restart time.
-
-\seca{Devices}
-\secb{Virtual network interfaces}
-Each virtual network interface (vif) has 2 parts: the font-end device in its domain,
-and the back-end device in the driver domain. Usually the driver domain is domain 0,
-and there is a linux network device corresponding to the vif. The linux device for
-interface N on domain D is called vifD.N. When a packet is sent on the vif in the 
-domain the packet is received from the linux device. The linux devices are connected
-to network interfaces using ethernet bridging.
-
-The default setup is a bridge xen-br0, with eth0 connected to it, and the routes
-for eth0 directed at xen-br0. This is controlled by the xend network setup script,
-default {\tt /etc/xen/network}, which is run when xend starts.
-
-When the vifs for a domain are created, a vif control script, default {\tt /etc/xen/vif-bridge},
-is run to connect the vif to its bridge. The default script connects the vif
-to xen-br0 and optionally sets up iptables rules to prevent IP address spoofing.
-The bridge a vif is connected to can be defined in its configuration, and this is useful
-for setting up virtual networks using several bridges.
-
-\secb{Virtual block devices}
-Virtual block devices in a domain are interfaces onto back-end device drivers
-that export physical devices to domains. In the default configuration the back-end
-driver is in domain 0 and can export any linux block device to a domain. This includes
-physical disk partitions, LVM volumes and loopback mounts of files. In fact anything
-that linux can represent as a block device can be exported to a domain as virtual
-block device.
-
-\seca{Xend invocation}
-Xend is started (by root) using the command
-\begin{verbatim}
-xend start
-\end{verbatim}
-Xend can be stopped using
-\begin{verbatim}
-xend stop
-\end{verbatim}
-Xend must be started before any domains (apart from domain 0) can be created.
-If you try to use the {\tt xm} tool when xend is not running you will get a
-'connection refused' message.
-
-\secb{Xend configuration}
-Xend reads its own configuration from {\tt /etc/xen/xend-config.sxp}, which is
-a sequence of s-expressions. The configuration parameters are:
-\begin{itemize}
-
-\item xend-port: Port xend should use for the HTTP interface (default 8000).
-
-\item xend-address: Address xend should listen on.
-  Specifying 'localhost' prevents remote connections.
-  Specifying the empty string '' allows all connections, and is the default.
-
-\item network-script: The script used to start/stop networking for xend (default network).
-
-\item vif-bridge: The default bridge that virtual interfaces should be connected to
-  (default xen-br0).
-
-\item vif-script: The default script used to control virtual interfaces
-  (default vif-bridge).
-
-\item vif-antispoof: Whether iptables should be set up to prevent IP spoofing for
-  virtual interfaces (default yes).
-\end{itemize}
-
-Configuration scripts ({\it e.g.} for network-script) are looked for in {\tt /etc/xen}
-unless their name begins with '/'.
-
-Xend sends its log output to {\tt /var/log/xen/xend.log}. This is a rotating logfile,
-and logs are moved onto {\tt xend.log.1} {\it etc.} as they get large. Old logs may
-be deleted.
-
-\secb{Xend database}
-Xend needs to make some data persistent, and it uses files under {\tt /var/xen/xend-db}
-for this. The persistent data is stored in files in SXP format. Domain information
-is saved when domains are created. When xend starts it reads the file {\tt /var/xen/lastboot}
-(if it exists) to determine the last time the system was rebooted. It compares this time
-with the last reboot time in {\tt wtmp} to determine if the system has been rebooted
-since xend last ran. If the system has been rebooted xend removes all its saved data
-that is not persistent across reboots (for example domain data).
-
-\seca{Xend HTTP Interface}
- The xend interface uses HTTP 1.1 \cite{http} as its transport.
-Simple PUT and GET calls can encode parameters using the standard url-encoding 
-for parameters: MIME type {\tt application/x-www-form-urlencoded}.
-When file upload is required, the {\tt multipart/form-data} encoding is used.
-See the HTML 4.1 specification for details \cite{html}.
-
-Xend functions as a webserver and supports two interfaces: one
-for web-browsers and one for programs.
-The web-browser interface returns replies in HTML and includes forms
-for interactive operations such as stopping domains and creating domains
-from an uploaded configuration. The programmatic interface usually returns replies
-in s-expression format. Both interfaces are accessed
-in exactly the same way over HTTP - the only difference is the data returned.
-
-The webserver distinguishes browsers from programs using the {\tt User-Agent}
-and {\tt Accept} headers in the HTTP request. If there is no {\tt User-Agent} or no
-{\tt Acccept} header, or {\tt Accept} includes the type {\tt application/sxp}, the
-webserver assumes the client is a program and returns SXP. Otherwise
-it assumes the client is a webserver and returns HTML.
-In some cases the return value is essentially a string, so {\tt Content-Type}
-{\tt text/plain} is returned.
-
-The HTTP api supported is listed below. All paths in it are relative to the
-server root, for example {\tt http://localhost:8000/xend}.
-As defined in the HTTP specification, we use GET for side-effect free
-operations that may safely be repeated, and POST for operations with
-side-effects. For each request we list the HTTP method (GET or POST),
-the url relative to the server root, the operation name and arguments (if any).
-The operation name is passed as request parameter 'op', and the arguments
-are passed by name. Operation name and parameters can be encoded using either
-encoding described above. We also list the corresponding api function from the
-Python client interface in {\tt xen.xend.XendClient}.
-
-\begin{itemize}
-\item {\tt GET /},\\
-  {\tt xend()}:\\
-  Get list of urls under xend root.
-
-\item {\tt GET /node},\\
-  {\tt xend\_node()}:\\
-  Get node information.
-
-\item {\tt POST /node shutdown()},\\
-  {\tt xend\_node\_shutdown()}:\\
-  Shutdown the node
-
-\item {\tt POST /node reboot()},\\
-  {\tt xend\_node\_reboot()}:\\
-  Reboot the node
-
-\item {\tt POST /node notify()}:\\
-  Set node notification url
-  
-\item {\tt GET /node/dmesg},\\
-  {\tt xend\_node\_dmesg()}:\\
-  Get xen boot message.
-
-\item {\tt GET /node/log},\\
-  {\tt xend\_node\_log()}:\\
-  Get xend log.
-
-\item {\tt GET /domain}\\
-  {\tt xend\_domains()}:\\
-  Get list of domains.
-
-\item {\tt POST /domain create(config)},\\
-  {\tt xend\_domain\_create(config)}:\\
-  Create a domain.
-
-\item {\tt POST /domain restore(file)},\\
-  {\tt xend\_domain\_restore(filename)}:\\
-  Restore a saved domain.
-
-\item {\tt GET /domain/<dom>},\\
-  {\tt xend\_domain(dom)}:\\
-  Get domain information.
-
-\item {\tt POST /domain/[dom] configure(config)},\\
-  {\tt xend\_domain\_configure(dom, conf)}:\\
-  Configure an existing domain (for internal use by restore and migrate).
-
-\item {\tt POST /domain/[dom] unpause()},\\
-  {\tt xend\_domain\_unpause(dom)}:\\
-  Start domain running
-
-\item {\tt POST /domain/[dom] pause()},\\
-  {\tt xend\_domain\_pause(dom)}:\\
-  Stop domain running.
-
-\item {\tt POST /domain/[dom] shutdown(reason)},\\
-  {\tt xend\_domain\_shutdown(dom, reason)}:\\
-  Shutdown domain, reason can be reboot, poweroff, halt.
-
-\item {\tt POST /domain/[dom] destroy(reason)},\\
-  {\tt xend\_domain\_destroy(dom, reason)}:\\
-  Destroy domain, reason can be reboot, halt.
-
-\item {\tt POST /domain/[dom] save(file)},\\
-  {\tt xend\_domain\_save(dom, filename)}:\\
-  Save a domain to a file.
-
-\item {\tt POST /domain/[dom] migrate(dst)},\\
-  {\tt xend\_domain\_migrate(dom, dst)}:\\
-  Migrate a domain.
-
-\item {\tt POST /domain/[dom] pincpu(cpu)},\\
-  {\tt xend\_domain\_pincpu(self, id, cpu)}\\:
-  Pin a domain to a cpu.
-
-\item {\tt POST /domain/[dom] maxmem\_set(memory)},\\
-  {\tt xend\_domain\_maxmem\_set(dom, memory)}:\\
-  Set domain maximum memory limit.
-
-\item {\tt POST /domain/[dom] device\_create(config)}\\
-  {\tt xend\_domain\_device\_create(dom, config)}:\\
-  Add a device to a domain.
-
-\item {\tt POST /domain/[dom] device\_destroy(type, index)},\\
-  {\tt xend\_domain\_device\_destroy(dom, type, index)}:\\
-  Delete a device from a domain
-
-\item {\tt GET /domain/[dom] vifs()},\\
-  {\tt xend\_domain\_vifs(dom)}:\\
-  Get virtual network interfaces.
-
-\item {\tt GET /domain/[dom] vif(vif)},\\
-  {\tt xend\_domain\_vif(dom, vif)}:\\
-  Get virtual network interface.
-
-\item {\tt GET /domain/[dom] vbds()},\\
-  {\tt xend\_domain\_vbds(dom)}:\\
-  Get virtual block devices.
-
-\item {\tt GET /domain/[dom] vbd(vbd)},\\
-  {\tt xend\_domain\_vbd(dom, vbd)}:\\
-  Get virtual block device.
-
-\item {\tt GET /console},\\
-  {\tt xend\_consoles()}:\\
-  Get list of consoles.
-
-\item {\tt GET /console/[id]}\\
-  {\tt xend\_console(id)}:\\
-  Get information about a console.
-
-\item {\tt GET /console/[id] disconnect()}\\
-  {\tt xend\_console\_disconnect(self, id)}:\\
-  Disconnect any console TCP connection.
-
-\item {\tt POST /event inject(event)}\\
-  {\tt xend\_event\_inject(sxpr)}:\\
-  Inject an event.
-
-\end{itemize}
-
-\secb{Xend debugging interface}
-Xend also listens on port 8001. Connecting to this port (for example via telnet)
-allows access to some debugging functions:
-\begin{itemize}
-\item help: list functions
-\item traceon: turn xend tracing on
-\item traceoff: turn xend tracing off
-\item quit: disconnect.
-\item info: list console listeners, block and network device controllers.
-\end{itemize}
-
-When tracing is on xend logs all functions calls and exceptions to
-{\tt /var/log/xen/xend.trace}.
-
-\begin{thebibliography}{99}
-
-\bibitem{html}
-HTML 4.01 Specification,\\
-http://www.w3.org/TR/html4/,\\
-W3C Recommendation, 24 December 1999.
-
-\bibitem{http}
-Hypertext Transfer Protocol -- HTTP/1.1,\\
-http://www.ietf.org/rfc/rfc2616.txt,\\
-RFC 2616, IETF 1999.
-
-\bibitem{ssh}
-http://www.openssh.org.
-
-\bibitem{stunnel}
-http://www.stunnel.org.
-
-\end{thebibliography}
-\end{document}
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:23 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59: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 1WaNYo-0006mm-Sq; Wed, 16 Apr 2014 10:59:22 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYZ-0006ky-VA
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:19 +0000
Received: from [193.109.254.147:43037] by server-10.bemta-14.messagelabs.com
	id FC/78-04546-B726E435; Wed, 16 Apr 2014 10:59:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1397645944!7916550!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24509 invoked from network); 16 Apr 2014 10:59:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:59:05 -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 1WaNYW-0000fi-GY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYW-0000Tc-FT
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:04 +0000
Date: Wed, 16 Apr 2014 10:59:04 +0000
Message-Id: <E1WaNYW-0000Tc-FT@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] docs: remove xend latex source
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 0a49101d0ecddae3d28ba085be586802e6be3a6b
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 10:55:13 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:10:04 2014 +0100

    docs: remove xend latex source
    
    AFAICT this hasn't actually been built since 8311d176ea6ff "docs: Remove
    outdated LaTex documentation".
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 docs/misc/xend.tex |  419 ----------------------------------------------------
 1 files changed, 0 insertions(+), 419 deletions(-)

diff --git a/docs/misc/xend.tex b/docs/misc/xend.tex
deleted file mode 100644
index 1a6c687..0000000
--- a/docs/misc/xend.tex
+++ /dev/null
@@ -1,419 +0,0 @@
-% -*- mode: LaTeX -*-
-\def\seca{\chapter}
-\def\secb{\section}
-\def\secc{\subsection}
-\def\secd{\subsubsection}
-\def\refa{chapter}
-\def\refb{section}
-\def\refc{section}
-\def\refd{section}
-
-%\def\seca{\section}
-%\def\secb{\subsection}
-%\def\secc{\subsubsection}
-%\def\refa{section}
-%\def\refb{section}
-%\def\refc{section}
-
-\documentclass[11pt,twoside,final,openright]{report}
-\usepackage{a4,graphicx,setspace}
-\setstretch{1.15}
-
-\begin{document}
-
-% TITLE PAGE
-\pagestyle{empty}
-\begin{center}
-\vspace*{\fill}
-\includegraphics{figs/xenlogo.eps}
-\vfill
-\vfill
-\vfill
-\begin{tabular}{l}
-{\Huge \bf Xend} \\[4mm]
-{\huge Xen v2.0 for x86} \\[80mm]
-
-{\Large Xen is Copyright (c) 2004, The Xen Team} \\[3mm]
-{\Large University of Cambridge, UK} \\[20mm]
-{\large Last updated 30 August 2004}
-\end{tabular}
-\vfill
-\end{center}
-\cleardoublepage
-
-% TABLE OF CONTENTS
-\pagestyle{plain}
-\pagenumbering{roman}
-{ \parskip 0pt plus 1pt
-  \tableofcontents }
-\cleardoublepage
-% PREPARE FOR MAIN TEXT
-\pagenumbering{arabic}
-\raggedbottom
-\widowpenalty=10000
-\clubpenalty=10000
-\parindent=0pt
-\renewcommand{\topfraction}{.8}
-\renewcommand{\bottomfraction}{.8}
-\renewcommand{\textfraction}{.2}
-\renewcommand{\floatpagefraction}{.8}
-
-\setstretch{1.15}
-
-\seca{Introduction}
-Xend is the control daemon used to manage a machine running the Xen hypervisor.
-Xend is responsible for creating and destroying domains and managing their
-resources, such as virtual block devices and virtual network interfaces.
-
-Xend exists because the Xen hypervisor itself only manages the memory image
-of a domain and its scheduling. Xen provides the event channels that connect
-a domain to its devices, but is intentionally not involved in setting them up.
-
-Xend runs as a daemon in the privileged domain 0 and uses a low-level api
-to communicate with Xen via the domain 0 kernel. Xend exports its control
-interface to its clients using HTTP. Most programming languages have
-HTTP client libraries, so this interface can be used from most popular 
-languages, for example Python, Perl, C, Java.
-Xend itself is written in Python, as are most of the Xen tools.
-
-The xend interface is intended to be a complete interface for the creation
-and management of domains. It supports domain creation, shutdown, reboot,
-destruction, save, restore and migration.
-
-When xend creates a domain it creates the domain memory image and communicates
-with the device driver domain(s) to configure the devices for the domain.
-This sets up connections between the domain and backend device controllers
-in the driver domain. When a domain shuts down its memory image cannot be fully released
-unless its backend devices are released and disconnected. This is done by xend.
-In order to protect against loss of this information when xend is restarted,
-xend maintains a persistent database of domain configurations. This allows
-xend to be stopped and restarted without loss of configuration information.
-For example, in order to upgrade the xend software.
-
-\seca{Domain lifecycle}
-\secb{Domain creation}
-Xend is instructed to create a domain by posting a domain\_create message to it,
-containing the domain configuration to be instantiated. The domain configuration
-is in sxp format and is as far as possible {\em fully-bound}, that is, all
-parameters are fully-specified. The domain configuration is saved in the filesystem
-so that it can be reused later if necessary.
-
-The domain configuration specifies the domain name, memory size, kernel image
-and parameters, and all the domain devices. Xend uses the Xen api to create
-the domain memory image, and then {\em builds} the memory image for the domain
-using the kernel image. At this point the domain exists, but it cannot be run because
-it has no devices. Xend then communicates with the device driver domain to create
-the configured devices. Once the devices are created it sets up event channels
-for them between the driver domain and the new domain, and notifies the new domain
-that its devices are connected. At this point the domain can be started.
-
-Xend is also responsible for managing domain consoles. When a domain is created,
-xend sets up a console event channel to the domain, and creates a TCP listening port
-for the domain console. When a connection is accepted to the port, xend
-connects input and output for the port to the domain console channel.
-
-\secb{Domain destruction}
-When a domain terminates, because it has been shutdown or it has crashed, the
-domain resources must be released so that the domain memory image can be
-finally removed from xen. Xend monitors the domains, and is also signaled by
-xen (using a VIRQ) when a domain exits. Xend examines the domain states and
-determines which domains have exited. It then communicates with the driver domain
-to release the devices for exited domains. Xend also closes any open console
-connections and removes the TCP listeners for exited domains.
-Once all devices have been released it instructs xen to destroy the memory image.
-
-\secb{Domain restart}
-Domain restart is the xen equivalent of a machine reboot. When a domain
-exits because it has been shutdown in reboot mode, its exit code is reboot.
-When examining domains to find those that have exited and destroy them,
-xend detects those that have exited for reboot and does not completely destroy
-them. It disconnects all their devices, and detaches the console listener
-from its channel to the domain, but does not close it. Instead it schedules
-a call to rebuild the domain from its configuration. This proceeds almost
-identically to creating the domain, except that the console listener is
-reused and connected to the new domain. This allows existing console
-connections to remain connected across a domain restart. The restarted
-domain keeps the same name and domain id.
-
-The determination of when to restart a domain is in fact slightly more
-complex than described above. A domain is configured with a 
-{\em restart mode}. If the restart mode is {\em onreboot}, the default,
-restart happens when the domain is shutdown normally and
-exits with code reboot. If the restart mode is {\em never} the domain is
-not restarted. If the restart mode is {\em always} the domain is always
-restarted, regardless of how it exited.
-
-In order to prevent continual domain crash causing restart loops, xend
-has a {\em minimum restart time}. Xend remembers when a domain was last
-restarted and will fail a restart that happens inside the minimum
-restart time.
-
-\seca{Devices}
-\secb{Virtual network interfaces}
-Each virtual network interface (vif) has 2 parts: the font-end device in its domain,
-and the back-end device in the driver domain. Usually the driver domain is domain 0,
-and there is a linux network device corresponding to the vif. The linux device for
-interface N on domain D is called vifD.N. When a packet is sent on the vif in the 
-domain the packet is received from the linux device. The linux devices are connected
-to network interfaces using ethernet bridging.
-
-The default setup is a bridge xen-br0, with eth0 connected to it, and the routes
-for eth0 directed at xen-br0. This is controlled by the xend network setup script,
-default {\tt /etc/xen/network}, which is run when xend starts.
-
-When the vifs for a domain are created, a vif control script, default {\tt /etc/xen/vif-bridge},
-is run to connect the vif to its bridge. The default script connects the vif
-to xen-br0 and optionally sets up iptables rules to prevent IP address spoofing.
-The bridge a vif is connected to can be defined in its configuration, and this is useful
-for setting up virtual networks using several bridges.
-
-\secb{Virtual block devices}
-Virtual block devices in a domain are interfaces onto back-end device drivers
-that export physical devices to domains. In the default configuration the back-end
-driver is in domain 0 and can export any linux block device to a domain. This includes
-physical disk partitions, LVM volumes and loopback mounts of files. In fact anything
-that linux can represent as a block device can be exported to a domain as virtual
-block device.
-
-\seca{Xend invocation}
-Xend is started (by root) using the command
-\begin{verbatim}
-xend start
-\end{verbatim}
-Xend can be stopped using
-\begin{verbatim}
-xend stop
-\end{verbatim}
-Xend must be started before any domains (apart from domain 0) can be created.
-If you try to use the {\tt xm} tool when xend is not running you will get a
-'connection refused' message.
-
-\secb{Xend configuration}
-Xend reads its own configuration from {\tt /etc/xen/xend-config.sxp}, which is
-a sequence of s-expressions. The configuration parameters are:
-\begin{itemize}
-
-\item xend-port: Port xend should use for the HTTP interface (default 8000).
-
-\item xend-address: Address xend should listen on.
-  Specifying 'localhost' prevents remote connections.
-  Specifying the empty string '' allows all connections, and is the default.
-
-\item network-script: The script used to start/stop networking for xend (default network).
-
-\item vif-bridge: The default bridge that virtual interfaces should be connected to
-  (default xen-br0).
-
-\item vif-script: The default script used to control virtual interfaces
-  (default vif-bridge).
-
-\item vif-antispoof: Whether iptables should be set up to prevent IP spoofing for
-  virtual interfaces (default yes).
-\end{itemize}
-
-Configuration scripts ({\it e.g.} for network-script) are looked for in {\tt /etc/xen}
-unless their name begins with '/'.
-
-Xend sends its log output to {\tt /var/log/xen/xend.log}. This is a rotating logfile,
-and logs are moved onto {\tt xend.log.1} {\it etc.} as they get large. Old logs may
-be deleted.
-
-\secb{Xend database}
-Xend needs to make some data persistent, and it uses files under {\tt /var/xen/xend-db}
-for this. The persistent data is stored in files in SXP format. Domain information
-is saved when domains are created. When xend starts it reads the file {\tt /var/xen/lastboot}
-(if it exists) to determine the last time the system was rebooted. It compares this time
-with the last reboot time in {\tt wtmp} to determine if the system has been rebooted
-since xend last ran. If the system has been rebooted xend removes all its saved data
-that is not persistent across reboots (for example domain data).
-
-\seca{Xend HTTP Interface}
- The xend interface uses HTTP 1.1 \cite{http} as its transport.
-Simple PUT and GET calls can encode parameters using the standard url-encoding 
-for parameters: MIME type {\tt application/x-www-form-urlencoded}.
-When file upload is required, the {\tt multipart/form-data} encoding is used.
-See the HTML 4.1 specification for details \cite{html}.
-
-Xend functions as a webserver and supports two interfaces: one
-for web-browsers and one for programs.
-The web-browser interface returns replies in HTML and includes forms
-for interactive operations such as stopping domains and creating domains
-from an uploaded configuration. The programmatic interface usually returns replies
-in s-expression format. Both interfaces are accessed
-in exactly the same way over HTTP - the only difference is the data returned.
-
-The webserver distinguishes browsers from programs using the {\tt User-Agent}
-and {\tt Accept} headers in the HTTP request. If there is no {\tt User-Agent} or no
-{\tt Acccept} header, or {\tt Accept} includes the type {\tt application/sxp}, the
-webserver assumes the client is a program and returns SXP. Otherwise
-it assumes the client is a webserver and returns HTML.
-In some cases the return value is essentially a string, so {\tt Content-Type}
-{\tt text/plain} is returned.
-
-The HTTP api supported is listed below. All paths in it are relative to the
-server root, for example {\tt http://localhost:8000/xend}.
-As defined in the HTTP specification, we use GET for side-effect free
-operations that may safely be repeated, and POST for operations with
-side-effects. For each request we list the HTTP method (GET or POST),
-the url relative to the server root, the operation name and arguments (if any).
-The operation name is passed as request parameter 'op', and the arguments
-are passed by name. Operation name and parameters can be encoded using either
-encoding described above. We also list the corresponding api function from the
-Python client interface in {\tt xen.xend.XendClient}.
-
-\begin{itemize}
-\item {\tt GET /},\\
-  {\tt xend()}:\\
-  Get list of urls under xend root.
-
-\item {\tt GET /node},\\
-  {\tt xend\_node()}:\\
-  Get node information.
-
-\item {\tt POST /node shutdown()},\\
-  {\tt xend\_node\_shutdown()}:\\
-  Shutdown the node
-
-\item {\tt POST /node reboot()},\\
-  {\tt xend\_node\_reboot()}:\\
-  Reboot the node
-
-\item {\tt POST /node notify()}:\\
-  Set node notification url
-  
-\item {\tt GET /node/dmesg},\\
-  {\tt xend\_node\_dmesg()}:\\
-  Get xen boot message.
-
-\item {\tt GET /node/log},\\
-  {\tt xend\_node\_log()}:\\
-  Get xend log.
-
-\item {\tt GET /domain}\\
-  {\tt xend\_domains()}:\\
-  Get list of domains.
-
-\item {\tt POST /domain create(config)},\\
-  {\tt xend\_domain\_create(config)}:\\
-  Create a domain.
-
-\item {\tt POST /domain restore(file)},\\
-  {\tt xend\_domain\_restore(filename)}:\\
-  Restore a saved domain.
-
-\item {\tt GET /domain/<dom>},\\
-  {\tt xend\_domain(dom)}:\\
-  Get domain information.
-
-\item {\tt POST /domain/[dom] configure(config)},\\
-  {\tt xend\_domain\_configure(dom, conf)}:\\
-  Configure an existing domain (for internal use by restore and migrate).
-
-\item {\tt POST /domain/[dom] unpause()},\\
-  {\tt xend\_domain\_unpause(dom)}:\\
-  Start domain running
-
-\item {\tt POST /domain/[dom] pause()},\\
-  {\tt xend\_domain\_pause(dom)}:\\
-  Stop domain running.
-
-\item {\tt POST /domain/[dom] shutdown(reason)},\\
-  {\tt xend\_domain\_shutdown(dom, reason)}:\\
-  Shutdown domain, reason can be reboot, poweroff, halt.
-
-\item {\tt POST /domain/[dom] destroy(reason)},\\
-  {\tt xend\_domain\_destroy(dom, reason)}:\\
-  Destroy domain, reason can be reboot, halt.
-
-\item {\tt POST /domain/[dom] save(file)},\\
-  {\tt xend\_domain\_save(dom, filename)}:\\
-  Save a domain to a file.
-
-\item {\tt POST /domain/[dom] migrate(dst)},\\
-  {\tt xend\_domain\_migrate(dom, dst)}:\\
-  Migrate a domain.
-
-\item {\tt POST /domain/[dom] pincpu(cpu)},\\
-  {\tt xend\_domain\_pincpu(self, id, cpu)}\\:
-  Pin a domain to a cpu.
-
-\item {\tt POST /domain/[dom] maxmem\_set(memory)},\\
-  {\tt xend\_domain\_maxmem\_set(dom, memory)}:\\
-  Set domain maximum memory limit.
-
-\item {\tt POST /domain/[dom] device\_create(config)}\\
-  {\tt xend\_domain\_device\_create(dom, config)}:\\
-  Add a device to a domain.
-
-\item {\tt POST /domain/[dom] device\_destroy(type, index)},\\
-  {\tt xend\_domain\_device\_destroy(dom, type, index)}:\\
-  Delete a device from a domain
-
-\item {\tt GET /domain/[dom] vifs()},\\
-  {\tt xend\_domain\_vifs(dom)}:\\
-  Get virtual network interfaces.
-
-\item {\tt GET /domain/[dom] vif(vif)},\\
-  {\tt xend\_domain\_vif(dom, vif)}:\\
-  Get virtual network interface.
-
-\item {\tt GET /domain/[dom] vbds()},\\
-  {\tt xend\_domain\_vbds(dom)}:\\
-  Get virtual block devices.
-
-\item {\tt GET /domain/[dom] vbd(vbd)},\\
-  {\tt xend\_domain\_vbd(dom, vbd)}:\\
-  Get virtual block device.
-
-\item {\tt GET /console},\\
-  {\tt xend\_consoles()}:\\
-  Get list of consoles.
-
-\item {\tt GET /console/[id]}\\
-  {\tt xend\_console(id)}:\\
-  Get information about a console.
-
-\item {\tt GET /console/[id] disconnect()}\\
-  {\tt xend\_console\_disconnect(self, id)}:\\
-  Disconnect any console TCP connection.
-
-\item {\tt POST /event inject(event)}\\
-  {\tt xend\_event\_inject(sxpr)}:\\
-  Inject an event.
-
-\end{itemize}
-
-\secb{Xend debugging interface}
-Xend also listens on port 8001. Connecting to this port (for example via telnet)
-allows access to some debugging functions:
-\begin{itemize}
-\item help: list functions
-\item traceon: turn xend tracing on
-\item traceoff: turn xend tracing off
-\item quit: disconnect.
-\item info: list console listeners, block and network device controllers.
-\end{itemize}
-
-When tracing is on xend logs all functions calls and exceptions to
-{\tt /var/log/xen/xend.trace}.
-
-\begin{thebibliography}{99}
-
-\bibitem{html}
-HTML 4.01 Specification,\\
-http://www.w3.org/TR/html4/,\\
-W3C Recommendation, 24 December 1999.
-
-\bibitem{http}
-Hypertext Transfer Protocol -- HTTP/1.1,\\
-http://www.ietf.org/rfc/rfc2616.txt,\\
-RFC 2616, IETF 1999.
-
-\bibitem{ssh}
-http://www.openssh.org.
-
-\bibitem{stunnel}
-http://www.stunnel.org.
-
-\end{thebibliography}
-\end{document}
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59: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 1WaNYq-0006na-3Z; Wed, 16 Apr 2014 10:59:24 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYm-0006lt-NG
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:22 +0000
Received: from [85.158.139.211:49953] by server-16.bemta-5.messagelabs.com id
	94/1C-19700-8826E435; Wed, 16 Apr 2014 10:59:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1397645954!4876165!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14170 invoked from network); 16 Apr 2014 10:59:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:59:15 -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 1WaNYg-0000fl-Mi
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYg-0000U0-LP
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:14 +0000
Date: Wed, 16 Apr 2014 10:59:14 +0000
Message-Id: <E1WaNYg-0000U0-LP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] build: remove Linux kernel build
	integration.
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 40305629dc48a6bfdef52ae5995bfcfb1d59ae8e
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Apr 8 16:37:58 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:10:37 2014 +0100

    build: remove Linux kernel build integration.
    
    We haven't shipped a XenoLinux kernel for more releases than I can remember.
    We held onto these because osstest was using them but this is no longer the
    case.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Makefile                             |   61 +---
 buildconfigs/Rules.mk                |   42 --
 buildconfigs/enable-xen-config       |  127 ------
 buildconfigs/interface.exclude       |    7 -
 buildconfigs/ketchup                 |  742 ----------------------------------
 buildconfigs/mk.linux-2.6            |   10 -
 buildconfigs/mk.linux-2.6-common     |  154 -------
 buildconfigs/mk.linux-2.6-git        |    2 -
 buildconfigs/mk.linux-2.6-mm         |    2 -
 buildconfigs/mk.linux-2.6-native     |    5 -
 buildconfigs/mk.linux-2.6-pvops      |   17 -
 buildconfigs/mk.linux-2.6-rc         |    2 -
 buildconfigs/mk.linux-2.6-tip        |    2 -
 buildconfigs/mk.linux-2.6-tip-latest |   17 -
 buildconfigs/mk.linux-2.6-xen        |    6 -
 buildconfigs/mk.linux-2.6-xen0       |    2 -
 buildconfigs/mk.linux-2.6-xenU       |    2 -
 buildconfigs/select-linux-arch       |   30 --
 buildconfigs/select-linux-image      |   33 --
 buildconfigs/select-repository       |   69 ----
 buildconfigs/src.git-clone           |   32 --
 buildconfigs/src.hg-clone            |   32 --
 buildconfigs/src.tarball             |   19 -
 config/Linux.mk                      |    7 -
 configure                            |   50 ---
 configure.ac                         |    1 -
 26 files changed, 11 insertions(+), 1462 deletions(-)

diff --git a/Makefile b/Makefile
index 91ca280..41dabbf 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
 all: dist
 
 -include config/Toplevel.mk
-SUBSYSTEMS?=xen kernels tools stubdom docs
+SUBSYSTEMS?=xen tools stubdom docs
 TARGS_DIST=$(patsubst %, dist-%, $(SUBSYSTEMS))
 TARGS_INSTALL=$(patsubst %, install-%, $(SUBSYSTEMS))
 
@@ -15,15 +15,15 @@ export XEN_ROOT=$(CURDIR)
 include Config.mk
 
 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
-export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
-include buildconfigs/Rules.mk
+export XEN_TARGET_ARCH SUBARCH
+export DESTDIR
 
 # build and install everything into the standard system directories
 .PHONY: install
 install: $(TARGS_INSTALL)
 
 .PHONY: build
-build: kernels
+build:
 	$(MAKE) -C xen build
 	$(MAKE) -C tools build
 	$(MAKE) -C stubdom build
@@ -54,17 +54,12 @@ dist-%: install-%
 	@: # do nothing
 
 # Legacy dist targets
-.PHONY: xen tools stubdom kernels docs
+.PHONY: xen tools stubdom docs
 xen: dist-xen
 tools: dist-tools
-kernels: dist-kernels
 stubdom: dist-stubdom
 docs: dist-docs
 
-.PHONY: prep-kernels
-prep-kernels:
-	for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
-
 .PHONY: install-xen
 install-xen:
 	$(MAKE) -C xen install
@@ -95,10 +90,6 @@ endif
 install-tools: $(QEMU_TRAD_DIR_TARGET) $(QEMU_XEN_DIR_TARGET)
 	$(MAKE) -C tools install
 
-.PHONY: install-kernels
-install-kernels:
-	for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
-
 .PHONY: install-stubdom
 install-stubdom: $(QEMU_TRAD_DIR_TARGET) install-tools
 	$(MAKE) -C stubdom install
@@ -122,27 +113,12 @@ install-docs:
 dev-docs:
 	$(MAKE) -C docs dev-docs
 
-# Build all the various kernels and modules
-.PHONY: kbuild
-kbuild: kernels
-
-# Delete the kernel build trees entirely
-.PHONY: kdelete
-kdelete:
-	for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
-
-# Clean the kernel build trees
-.PHONY: kclean
-kclean:
-	for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
-
-# build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
-# and place them in the install directory. 'make install' should then
-# copy them to the normal system directories
+# build xen and the tools and place them in the install
+# directory. 'make install' should then copy them to the normal system
+# directories
 .PHONY: world
 world: 
 	$(MAKE) clean
-	$(MAKE) kdelete
 	$(MAKE) dist
 
 # Package a build in a debball file, that is inside a .deb format
@@ -159,7 +135,6 @@ debball: dist
 rpmball: dist
 	bash ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion --no-print-directory)
 
-# clean doesn't do a kclean
 .PHONY: clean
 clean::
 	$(MAKE) -C xen clean
@@ -170,7 +145,7 @@ ifeq (x86_64,$(XEN_TARGET_ARCH))
 endif
 	$(MAKE) -C docs clean
 
-# clean, but blow away kernel build tree plus tarballs
+# clean, but blow away tarballs
 .PHONY: distclean
 distclean:
 	rm -f config/Toplevel.mk
@@ -181,9 +156,7 @@ ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
 endif
 	$(MAKE) -C docs distclean
-	rm -rf dist patches/tmp
-	for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
-	rm -rf patches/*/.makedep
+	rm -rf dist
 	rm -rf config.log config.status config.cache autom4te.cache
 
 # Linux name for GNU distclean
@@ -203,19 +176,15 @@ help:
 	@echo '  install          - build and install everything'
 	@echo '  install-xen      - build and install the Xen hypervisor'
 	@echo '  install-tools    - build and install the control tools'
-	@echo '  install-kernels  - build and install guest kernels'
 	@echo '  install-stubdom  - build and install the stubdomain images'
 	@echo '  install-docs     - build and install user documentation'
 	@echo ''
 	@echo 'Building targets:'
 	@echo '  dist             - build and install everything into local dist directory'
-	@echo '  world            - clean everything, delete guest kernel build'
-	@echo '                     trees then make dist'
+	@echo '  world            - clean everything then make dist'
 	@echo '  xen              - build and install Xen hypervisor'
 	@echo '  tools            - build and install tools'
 	@echo '  stubdom          - build and install the stubdomain images'
-	@echo '  kernels          - build and install guest kernels'
-	@echo '  kbuild           - synonym for make kernels'
 	@echo '  docs             - build and install user documentation'
 	@echo '  dev-docs         - build developer-only documentation'
 	@echo ''
@@ -223,11 +192,8 @@ help:
 	@echo '  clean            - clean the Xen, tools and docs (but not guest kernel trees)'
 	@echo '  distclean        - clean plus delete kernel build trees and'
 	@echo '                     local downloaded files'
-	@echo '  kdelete          - delete guest kernel build trees'
-	@echo '  kclean           - clean guest kernel build trees'
 	@echo ''
 	@echo 'Miscellaneous targets:'
-	@echo '  prep-kernels     - prepares kernel directories, does not build'
 	@echo '  uninstall        - attempt to remove installed Xen tools'
 	@echo '                     (use with extreme care!)'
 	@echo
@@ -255,11 +221,6 @@ uninstall:
 	make -C tools uninstall
 	rm -rf $(D)/boot/tboot*
 
-# Legacy targets for compatibility
-.PHONY: linux26
-linux26:
-	$(MAKE) 'KERNELS=linux-2.6*' kernels
-
 .PHONY: xenversion
 xenversion:
 	@$(MAKE) --no-print-directory -C xen xenversion
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk
deleted file mode 100644
index ee61cf6..0000000
--- a/buildconfigs/Rules.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-
-include Config.mk
-
-export DESTDIR
-
-ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
-
-%-install:
-	$(MAKE) -f buildconfigs/mk.$* build
-
-%-dist: DESTDIR=$(DISTDIR)/install
-%-dist: %-install
-	@: # do nothing
-
-# Legacy dist target
-%-build: %-dist
-	@: # do nothing
-
-%-prep: DESTDIR=$(DISTDIR)/install
-%-prep:
-	$(MAKE) -f buildconfigs/mk.$* prep
-
-%-config: DESTDIR=$(DISTDIR)/install
-%-config:
-	$(MAKE) -f buildconfigs/mk.$* config
-
-%-delete:
-	$(MAKE) -f buildconfigs/mk.$* delete
-
-%-clean:
-	$(MAKE) -f buildconfigs/mk.$* clean
-
-%.patch:
-	$(MAKE) -f buildconfigs/mk.$* $@
-
-%-mrproper:
-	$(MAKE) -f buildconfigs/mk.$*-xen mrproper
-	rm -rf pristine-$(*)* ref-$(*)*
-	rm -rf $*-xen.patch
-
-# never delete any intermediate files.
-.SECONDARY:
diff --git a/buildconfigs/enable-xen-config b/buildconfigs/enable-xen-config
deleted file mode 100644
index 7ee4d37..0000000
--- a/buildconfigs/enable-xen-config
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ $# -ne 1 ] ; then
-	echo "Usage $(basename $0) <config-file>" 1>&2
-	exit 1
-fi
-
-CONFIG=$1
-
-setopt()
-{
-	OPTION=$1
-	VALUE=$2
-
-	# First remove any existing instances of this option
-	sed -e "s/^# ${OPTION} is not set$//g ; s/^${OPTION}=.*$//g" -i "${CONFIG}"
-
-	# Then append the new value
-	case ${VALUE} in
-	    n)     echo "# ${OPTION} is not set" >> "${CONFIG}" ;;
-	    y|m|*) echo "${OPTION}=${VALUE}" >> "${CONFIG}" ;;
-	esac
-}
-
-setopt CONFIG_PARAVIRT y
-setopt CONFIG_PARAVIRT_DEBUG y
-setopt CONFIG_PARAVIRT_GUEST y
-setopt CONFIG_PARAVIRT_SPINLOCKS y
-
-setopt CONFIG_XEN y
-setopt CONFIG_XEN_BLKDEV_FRONTEND y
-setopt CONFIG_XEN_NETDEV_FRONTEND y
-setopt CONFIG_XEN_KBDDEV_FRONTEND y
-setopt CONFIG_XEN_FBDEV_FRONTEND y
-setopt CONFIG_XEN_PCIDEV_FRONTEND y
-setopt CONFIG_XEN_BALLOON y
-setopt CONFIG_XEN_SCRUB_PAGES y
-setopt CONFIG_XEN_DEV_EVTCHN y
-setopt CONFIG_XEN_BACKEND y
-setopt CONFIG_XEN_BLKDEV_BACKEND y
-setopt CONFIG_XEN_BLKDEV_TAP y
-setopt CONFIG_XEN_NETDEV_BACKEND y
-setopt CONFIG_XEN_PCIDEV_BACKEND y
-setopt CONFIG_XEN_PCIDEV_BACKEND_VPCI y
-setopt CONFIG_XEN_PCIDEV_BACKEND_PASS n
-setopt CONFIG_XEN_PCIDEV_BACKEND_SLOT n
-setopt CONFIG_XEN_PCIDEV_BE_DEBUG n
-setopt CONFIG_XENFS y
-setopt CONFIG_XEN_COMPAT_XENFS y
-setopt CONFIG_XEN_PCI_PASSTHROUGH y
-setopt CONFIG_HVC_XEN y
-setopt CONFIG_XEN_MAX_DOMAIN_MEMORY 32
-setopt CONFIG_XEN_DEBUG_FS y
-setopt CONFIG_XEN_DOM0 y
-setopt CONFIG_XEN_SYS_HYPERVISOR y
-setopt CONFIG_XEN_GNTDEV y
-setopt CONFIG_XEN_PLATFORM_PCI y
-
-setopt CONFIG_VMI y
-setopt CONFIG_TUN y
-
-setopt CONFIG_KVM y
-setopt CONFIG_KVM_INTEL y
-setopt CONFIG_KVM_AMD y
-setopt CONFIG_KVM_CLOCK y
-setopt CONFIG_KVM_GUEST n
-setopt CONFIG_KVM_TRACE n
-
-setopt CONFIG_LGUEST n
-
-setopt CONFIG_LOCALVERSION_AUTO n
-
-setopt CONFIG_BRIDGE y
-
-setopt CONFIG_DEBUG_STACK_USAGE n
-
-setopt CONFIG_MEMORY_HOTPLUG y
-setopt CONFIG_MEMORY_HOTREMOVE y
-
-setopt CONFIG_MIGRATION n
-
-setopt CONFIG_ACPI_HOTPLUG_MEMORY n
-
-# Should all be set one way or another in defconfig but aren't
-setopt CONFIG_NUMA n
-setopt CONFIG_X86_VSMP n
-setopt CONFIG_X86_UV n
-setopt CONFIG_CALGARY_IOMMU n
-setopt CONFIG_AMD_IOMMU n
-setopt CONFIG_MAXSMP n
-setopt CONFIG_SPARSEMEM_VMEMMAP n
-setopt CONFIG_I7300_IDLE n
-setopt CONFIG_DMAR n
-setopt CONFIG_INTR_REMAP n
-setopt CONFIG_GFS2_FS n
-setopt CONFIG_IOMMU_DEBUG n
-setopt CONFIG_X86_MCE_INTEL n
-setopt CONFIG_X86_MCE_AMD n
-setopt CONFIG_CRYPTO_AES_NI_INTEL n
-setopt CONFIG_CISS_SCSI_TAPE n
-
-setopt CONFIG_FUSION y
-setopt CONFIG_FUSION_SPI m
-setopt CONFIG_FUSION_SAS m
-setopt CONFIG_FUSION_FC m
-setopt CONFIG_FUSION_MAX_SGE 128
-setopt CONFIG_FUSION_CTL n
-setopt CONFIG_FUSION_LOGGING n
-
-setopt CONFIG_BLK_CPQ_CISS_DA m
-
-case ${XEN_TARGET_ARCH} in
-    x86_32) setopt CONFIG_64BIT n ;;
-    x86_64)
-	setopt CONFIG_64BIT y
-	setopt CONFIG_IA32_EMULATION y
-	setopt CONFIG_IA32_AOUT n
-	setopt CONFIG_CRYPTO_AES_X86_64 n
-	setopt CONFIG_CRYPTO_SALSA20_X86_64 n
-	setopt CONFIG_CRYPTO_TWOFISH_X86_64 n
-	;;
-    *) ;;
-esac
-
-exit 0
diff --git a/buildconfigs/interface.exclude b/buildconfigs/interface.exclude
deleted file mode 100644
index 1df89a5..0000000
--- a/buildconfigs/interface.exclude
+++ /dev/null
@@ -1,7 +0,0 @@
-*.size
-*.pyc
-checker
-checker.c
-ia64.h
-x86_32.h
-x86_64.h
diff --git a/buildconfigs/ketchup b/buildconfigs/ketchup
deleted file mode 100644
index 8725f7d..0000000
--- a/buildconfigs/ketchup
+++ /dev/null
@@ -1,742 +0,0 @@
-#!/usr/bin/python
-#
-# ketchup 0.9.8
-# http://selenic.com/ketchup/wiki
-#
-# Copyright 2004 Matt Mackall <mpm@selenic.com>
-#
-# This software may be used and distributed according to the terms
-# of the GNU General Public License, incorporated herein by reference.
-#
-# Usage:
-#
-# in an existing kernel directory, run:
-#
-#  ketchup <version>
-#
-# where version is a complete kernel version, or a branch name to grab
-# the latest version
-#
-# You can override some variables by creating a ~/.ketchuprc file.
-# The ~/.ketchuprc is just a Python script, eg. it might look like this:
-#
-# kernel_url = 'http://kernel.localdomain/pub/linux/kernel'
-# archive = os.environ["HOME"] + '/tmp/ketchup-archive'
-# gpg = '/weird/path/to/gpg'
-#
-
-import re, sys, urllib, os, getopt, glob, shutil
-
-def error(*args):
-    sys.stderr.write("ketchup: ")
-    for a in args:
-        sys.stderr.write(str(a))
-        sys.stderr.write("\n")
-
-def qprint(*args):
-    if not options["quiet"]:
-        sys.stdout.write(" ".join(map(str, args)))
-        sys.stdout.write("\n")
-
-def lprint(*args):
-    sys.stdout.write(" ".join(map(str, args)))
-    sys.stdout.write("\n")
-
-
-def fancyopts(args, options, state, syntax=''):
-    long = []
-    short = ''
-    map = {}
-    dt = {}
-
-    def help(state, opt, arg, options = options, syntax = syntax):
-        lprint("Usage: ", syntax)
-
-        for s, l, d, c in options:
-            opt = ' '
-            if s: opt = opt + '-' + s + ' '
-            if l: opt = opt + '--' + l + ' '
-            if d: opt = opt + '(' + str(d) + ')'
-            lprint(opt)
-            if c: lprint('   %s' % c)
-        sys.exit(0)
-
-    options = [('h', 'help', help, 'Show usage info')] + options
-
-    for s, l, d, c in options:
-        map['-'+s] = map['--'+l]=l
-        state[l] = d
-        dt[l] = type(d)
-        if not d is None and not type(d) is type(help): s, l = s + ':', l + '='
-        if s: short = short + s
-        if l: long.append(l)
-
-    if os.environ.has_key("KETCHUP_OPTS"):
-        args = os.environ["KETCHUP_OPTS"].split() + args
-
-    try:
-        opts, args = getopt.getopt(args, short, long)
-    except getopt.GetoptError:
-        help(state, None, args)
-        sys.exit(-1)
-
-    for opt, arg in opts:
-        if dt[map[opt]] is type(help): state[map[opt]](state,map[opt],arg)
-        elif dt[map[opt]] is type(1): state[map[opt]] = int(arg)
-        elif dt[map[opt]] is type(''): state[map[opt]] = arg
-        elif dt[map[opt]] is type([]): state[map[opt]].append(arg)
-        elif dt[map[opt]] is type(None): state[map[opt]] = 1
-
-    return args
-
-# Default values
-kernel_url = 'http://www.kernel.org/pub/linux/kernel'
-archive = os.environ["HOME"] + "/.ketchup"
-rename_prefix = 'linux-'
-rename_with_localversion = False
-wget = "/usr/bin/wget"
-gpg = "/usr/bin/gpg"
-precommand = postcommand = None
-default_tree = None
-local_trees = {}
-
-# Functions to parse version strings
-
-def tree(ver):
-    return float(re.match(r'(\d+\.\d+)', ver).group(1))
-
-def rev(ver):
-    p = pre(ver)
-    r = int(re.match(r'\d+\.\d+\.(\d+)', ver).group(1))
-    if p: r = r - 1
-    return r
-
-def pre(ver):
-    try: return re.match(r'\d+\.\d+\.\d+(\.\d+)?-((rc|pre)\d+)', ver).group(2)
-    except: return None
-
-def post(ver):
-    try: return re.match(r'\d+\.\d+\.\d+\.(\d+)', ver).group(1)
-    except: return None
-
-def pretype(ver):
-    try: return re.match(r'\d+\.\d+\.\d+(\.\d+)?-((rc|pre)\d+)', ver).group(3)
-    except: return None
-
-def prenum(ver):
-    try: return int(re.match(r'\d+\.\d+\.\d+-((rc|pre)(\d+))', ver).group(3))
-    except: return None
-
-def prebase(ver):
-    return re.match(r'(\d+\.\d+\.\d+((-(rc|pre)|\.)\d+)?)', ver).group(1)
-
-def revbase(ver):
-    return "%s.%s" % (tree(ver), rev(ver))
-
-def base(ver):
-    v = revbase(ver)
-    if post(ver): v += "." + post(ver)
-    return v
-
-def forkname(ver):
-    try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+?)\d+)?',
-                         ver).group(5)
-    except: return None
-
-def forknum(ver):
-    try: return int(
-        re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+?)(\d+))?',
-                 ver).group(6))
-    except: return None
-
-def fork(ver):
-    try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+))?', ver).group(4)
-    except: return None
-
-def get_ver(makefile):
-    """ Read the version information from the specified makefile """
-    part = {}
-    parts = "VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION".split(' ')
-    m = open(makefile)
-    for l in m.readlines():
-        for p in parts:
-            try: part[p] = re.match(r'%s\s*=\s*(\S+)' % p, l).group(1)
-            except: pass
-
-    version = "%s.%s.%s" % tuple([part[p] for p in parts[:3]])
-    version += part.get("EXTRAVERSION","")
-    return version
-
-def get_localversion():
-    v = ''
-
-    for name in glob.glob('localversion*'):
-        try: v += open(name).readline().strip()
-        except: pass
-
-    try:
-        c = open('.config').read()
-        v += re.search(r'^CONFIG_LOCALVERSION="(.+)"', c, re.M).group(1)
-    except: pass
-
-    return v
-
-def compare_ver(a, b):
-    """
-    Compare kernel versions a and b
-
-    Note that -pre and -rc versions sort before the version they modify,
-    -pre sorts before -rc, -bk, -git, and -mm, etc. sort alphabetically.
-    """
-    if a == b: return 0
-
-    c = cmp(float(tree(a)), float(tree(b)))
-    if c: return c
-    c = cmp(rev(a), rev(b))
-    if c: return c
-    c = cmp(int(post(a) or 0), int(post(b) or 0))
-    if c: return c
-    c = cmp(pretype(a), pretype(b)) # pre sorts before rc
-    if c: return c
-    c = cmp(prenum(a), prenum(b))
-    if c: return c
-    c = cmp(forkname(a), forkname(b))
-    if c: return c
-    return cmp(forknum(a), forknum(b))
-
-def last(url, pat="(.*/)"):
-    for l in urllib.urlopen(url).readlines():
-        m = re.search('(?i)<a href="%s">' % pat, l)
-        if m: n = m.group(1)
-    return n
-
-def latest_mm(url, pat):
-    url = kernel_url + '/people/akpm/patches/2.6/'
-    url += last(url)
-    part = last(url)
-    return part[:-1]
-
-def latest_ck(url, pat):
-    url = "http://ck.kolivas.org/patches/2.6/pre-releases/"
-    url += last(url)
-    part = last(url)
-    pre = part[:-1]
-
-    url = "http://ck.kolivas.org/patches/2.6/"
-    url += last(url,"(2.6.*/)")
-    part = last(url)
-    rel = part[:-1]
-
-    l = [pre, rel]
-    l.sort(compare_ver)
-    return l[-1]
-
-def latest_dir(url, pat):
-    """Find the latest link matching pat at url after sorting"""
-    p = []
-    for l in urllib.urlopen(url).readlines():
-        m = re.search('"%s"' % pat, l)
-        if m: p.append(m.group(1))
-
-    if not p: return None
-
-    p.sort(compare_ver)
-    return p[-1]
-
-# mbligh is lazy and has a bunch of empty directories
-def latest_mjb(url, pat):
-    url = kernel_url + '/people/mbligh/'
-
-    # find the last Linus release and search backwards
-    l = [find_ver('2.6'), find_ver("2.6-pre")]
-    l.sort(compare_ver)
-    linus = l[-1]
-
-    p = []
-    for l in urllib.urlopen(url).readlines():
-        m = re.search('"(2\.6\..*/)"', l)
-        if m:
-            v = m.group(1)
-            if compare_ver(v, linus) <= 0:
-                p.append(v)
-
-    p.sort(compare_ver)
-    p.reverse()
-
-    for ver in p:
-        mjb = latest_dir(url + ver, pat)
-        if mjb: return mjb
-
-    return None
-
-def latest_26_tip(url, pat):
-    l = [find_ver('2.6'), find_ver('2.6-git'), find_ver('2.6-pre')]
-    l.sort(compare_ver)
-    return l[-1]
-
-def find_info(ver):
-    b = "%.1f" % tree(ver)
-    f = forkname(ver)
-    p = pre(ver)
-
-    s = b
-    if f:
-        s = "%s-%s" % (b, f)
-    elif p:
-        s = "%s-pre" % b
-
-    return version_info[s]
-
-def version_urls(ver):
-    """ Return the URL for the patch associated with the specified version """
-    i = find_info(ver)[1]
-    if type(i) != type([]):
-        i = [i]
-
-    v = {
-        'full': ver,
-        'tree': tree(ver),
-        'base': base(ver),
-        'prebase': prebase(ver)
-        }
-
-    l = []
-    for e in i:
-        l.append(e % v)
-
-    return l
-
-def patch_path(ver):
-    return os.path.join(archive, os.path.basename(version_urls(ver)[0]))
-
-def download(url, f):
-    qprint("Downloading %s" % os.path.basename(url))
-    if options["dry-run"]:
-        return 1
-
-    if not options["wget"]:
-        p = urllib.urlopen(url).read()
-        if p.find("<title>404") != -1:
-            return None
-        open(f, 'w').write(p)
-    else:
-        e = os.system("%s -c -O %s %s" %
-                      (options["wget"], f + ".partial", url))
-        if e:
-            return None
-        os.rename(f + ".partial", f)
-
-    return 1
-
-def verify(url, f, sign):
-    if options["no-gpg"] or options["dry-run"] or not options["gpg-path"]:
-        return 1
-
-    sf = f + sign
-    if not download(url + sign, sf):
-        error("signature download failed")
-        error("removing files...")
-        os.unlink(f)
-        return 0
-
-    qprint("Verifying signature...")
-    r = os.system("%s --verify %s %s" % (options["gpg-path"], sf, f))
-    if r:
-        error("gpg returned %d" % r)
-        error("removing files...")
-        os.unlink(f)
-        os.unlink(sf)
-        return 0
-
-    return 1
-
-def trydownload(urls, f, sign):
-    for url in urls:
-        if download(url, f):
-            if not sign or verify(url, f, sign):
-                return f
-        if url[-4:] == ".bz2":
-            f2 = f[:-4] + ".gz"
-            url2 = url[:-4] + ".gz"
-            if download(url2, f2):
-                if not sign or verify(url2, f2, sign):
-                    return f2
-    return None
-
-def get_patch(ver):
-    """Return the path to patch for given ver, downloading if necessary"""
-    f = patch_path(ver)
-    if os.path.exists(f):
-        return f
-    if f[-4:] == ".bz2":
-        f2 = f[:-4] + ".gz"
-        if os.path.exists(f2):
-            return f2
-
-    urls = version_urls(ver)
-    sign = find_info(ver)[3]
-    if sign == 1: sign = ".sign"
-    f = trydownload(urls, f, sign)
-    if not f:
-        error("patch download failed")
-        sys.exit(-1)
-
-    return f
-
-def apply_patch(ver, reverse = 0):
-    """Find the patch to upgrade from the predecessor of ver to ver and
-    apply or reverse it."""
-    p = get_patch(ver)
-    r = ""
-    if reverse:
-        r = " -R"
-
-    qprint("Applying %s%s" % (os.path.basename(p), r))
-    if options["dry-run"]:
-        return ver
-
-    def cmd(patch, reverse, dry):
-        base = "patch -l -p1%s" % reverse
-        if dry:
-            base += " --dry-run"
-
-        if p[-4:] == ".bz2":
-            pipe = "bzcat %s | %s" % (patch, base)
-        elif p[-3:] == ".gz":
-            pipe = "zcat %s | %s" % (patch, base)
-        else:
-            pipe = "%s < %s" % (base, patch)
-
-        err = os.system(pipe + " > .patchdiag")
-        if err:
-            sys.stderr.write(open(".patchdiag").read())
-        os.unlink(".patchdiag")
-        return err
-
-    err = cmd(p, r, 1)
-    if err:
-        error("patch %s failed: %d" % (p, err))
-        sys.exit(-1)
-
-    err = cmd(p, r, 0)
-    if err:
-        error("patch %s failed while it was supposed to apply: %d" % (p, err))
-        sys.exit(-1)
-
-def untar(tarfile):
-    old = os.getcwd()
-    os.mkdir("ketchup-tmp")
-    os.chdir("ketchup-tmp")
-
-    err = os.system("bzcat %s | tar -xf -" % tarfile)
-    if err:
-        error("Unpacking failed: ", err)
-        sys.exit(-1)
-
-    err = os.system("mv linux*/* linux*/.[^.]* ..; rmdir linux*")
-    if err:
-        error("Unpacking failed: ", err)
-        sys.exit(-1)
-
-    os.chdir(old)
-    shutil.rmtree("ketchup-tmp")
-
-def install_nearest(ver):
-    t = tree(ver)
-    tarballs = glob.glob(archive + "/linux-%s.*.tar.bz2" % t)
-    list = []
-
-    for f in tarballs:
-        m = re.match(r'.*/linux-(.*).tar.bz2$', f)
-        v = m.group(1)
-        d = abs(rev(v) - rev(ver))
-        list.append((d, f, v))
-    list.sort()
-
-    if not list or (options["full-tarball"] and list[0][0]):
-        f = "linux-%s.tar.bz2" % ver
-        url = "%s/v%s/%s" % (kernel_url, t, f)
-        f = archive + "/" + f
-
-        sign = find_info(ver)[3]
-        if sign == 1: sign = ".sign"
-
-        f = trydownload([url], f, sign)
-        if not f:
-            error("Tarball download failed")
-            sys.exit(-1)
-
-    else:
-        f = list[0][1]
-        ver = list[0][2]
-
-    qprint("Unpacking %s" % os.path.basename(f))
-    if options["dry-run"]: return ver
-    untar(f)
-
-    return ver
-
-def find_ver(ver):
-    if ver in version_info.keys():
-        v = version_info[ver]
-        d = v[1]
-        if type(d) is type([]):
-            d = d[0]
-        for n in range(5):
-            return v[0](os.path.dirname(d), v[2])
-            error('retrying version lookup for %s' % ver)
-    else:
-        return ver
-
-def transform(a, b):
-    if a == b:
-        qprint("Nothing to do!")
-        return
-    if not a:
-        a = install_nearest(base(b))
-    t = tree(a)
-    if t != tree(b):
-        error("Can't patch %s to %s" % (tree(a), tree(b)))
-        sys.exit(-1)
-    if fork(a):
-        apply_patch(a, 1)
-        a = prebase(a)
-    if prebase(a) != prebase(b):
-        if pre(a):
-            apply_patch(a, 1)
-            a = base(a)
-
-        if post(a) and post(a) != post(b):
-            apply_patch(prebase(a), 1)
-
-        ra, rb = rev(a), rev(b)
-        if ra > rb:
-            for r in range(ra, rb, -1):
-                apply_patch("%s.%s" % (t, r), -1)
-        if ra < rb:
-            for r in range(ra + 1, rb + 1):
-                apply_patch("%s.%s" % (t, r))
-        a = revbase(b)
-
-        if post(b) and post(a) != post(b):
-            apply_patch(prebase(b), 0)
-            a = base(b)
-
-        if pre(b):
-            apply_patch(prebase(b))
-            a = prebase(b)
-
-    if fork(b):
-        a = apply_patch(b)
-
-def rename_dir(v):
-    """Rename the current directory to linux-v, where v is the function arg"""
-    if rename_with_localversion:
-        v += get_localversion()
-    cwd = os.getcwd()
-    basedir = os.path.dirname(cwd)
-    newdir = os.path.join(basedir, rename_prefix + v)
-    if newdir == cwd:
-        return
-    if os.access(newdir, os.F_OK):
-        error("Cannot rename directory, destination exists: %s", newdir);
-        return
-    os.rename(cwd, newdir)
-    qprint('Current directory renamed to %s' % newdir)
-
-
-# latest lookup function, canonical urls, pattern for lookup function,
-#  signature flag, description
-version_info = {
-    '2.4': (latest_dir,
-            kernel_url + "/v2.4" + "/patch-%(base)s.bz2",
-            r'patch-(.*?).bz2',
-            1, "old stable kernel series"),
-    '2.4-pre': (latest_dir,
-                kernel_url + "/v2.4" + "/testing/patch-%(prebase)s.bz2",
-                r'patch-(.*?).bz2',
-                1, "old stable kernel series prereleases"),
-    '2.6': (latest_dir,
-            kernel_url + "/v2.6" + "/patch-%(prebase)s.bz2",
-            r'patch-(.*?).bz2',
-            1, "current stable kernel series"),
-    '2.6-rc': (latest_dir,
-                kernel_url + "/v2.6" + "/testing/patch-%(prebase)s.bz2",
-                r'patch-(.*?).bz2',
-                1, "current stable kernel series prereleases"),
-    '2.6-pre': (latest_dir,
-                kernel_url + "/v2.6" + "/testing/patch-%(prebase)s.bz2",
-                r'patch-(.*?).bz2',
-                1, "current stable kernel series prereleases"),
-    '2.6-git': (latest_dir,
-                [kernel_url + "/v2.6" + "/snapshots/patch-%(full)s.bz2",
-                 kernel_url + "/v2.6" + "/snapshots/old/patch-%(full)s.bz2"],
-                r'patch-(.*?).bz2',
-                1, "current stable kernel series snapshots"),
-    '2.6-bk': (latest_dir,
-               [kernel_url + "/v2.6" + "/snapshots/patch-%(full)s.bz2",
-                kernel_url + "/v2.6" + "/snapshots/old/patch-%(full)s.bz2"],
-               r'patch-(.*?).bz2',
-               1, "old stable kernel series snapshots"),
-    '2.6-tip': (latest_26_tip, "", "", 1,
-                "current stable kernel series tip"),
-    '2.6-mm': (latest_mm,
-               kernel_url + "/people/akpm/patches/" +
-               "%(tree)s/%(prebase)s/%(full)s/%(full)s.bz2", "",
-               1, "Andrew Morton's -mm development tree"),
-    '2.6-tiny': (latest_dir,
-                 "http://www.selenic.com/tiny/%(full)s.patch.bz2",
-                 r'(2.6.*?).patch.bz2',
-                 1, "Matt Mackall's -tiny tree for small systems"),
-    '2.6-mjb': (latest_mjb,
-                 kernel_url + "/people/mbligh/%(prebase)s/patch-%(full)s.bz2",
-                 r'patch-(2.6.*?).bz2',
-                 1, "Martin Bligh's random collection 'o crap"),
-    '2.6-rt': (latest_dir,
-               ["http://people.redhat.com/mingo/" +
-                "realtime-preempt/patch-%(full)s",
-                "http://people.redhat.com/mingo/" +
-                "realtime-preempt/older/patch-%(full)s"],
-               r'patch-(2.6.*?)',
-               0, "Ingo Molnar's realtime-preempt kernel"),
-    '2.6-ck': (latest_ck,
-               ["http://ck.kolivas.org/patches/2.6/" +
-                "%(prebase)s/%(full)s/patch-%(full)s.bz2",
-                "http://ck.kolivas.org/patches/2.6/pre-releases/" +
-                "%(prebase)s/%(full)s/patch-%(full)s.bz2"],
-               "", ".sig",
-               "Con Kolivas' patches for system responsiveness (desktop)"),
-    '2.6-cks': (latest_dir,
-                "http://ck.kolivas.org/patches/cks/patch-%(full)s.bz2",
-                r'patch-(2.6.*?).bz2', ".sig",
-                "Con Kolivas' patches for system responsiveness (server)")
-    }
-
-# Override defaults with ~/.ketchuprc which is just a Python script
-rcpath = os.path.expanduser('~/.ketchuprc')
-if os.path.isfile(rcpath):
-    try:
-        execfile(rcpath)
-    except Exception, e:
-        sys.exit('Failed parsing %s\nError was: %s' % (rcpath, e))
-
-# Add local trees
-for k,v in local_trees.items():
-    version_info[k] = v
-
-# Environment variables override defaults and ketchuprc
-kernel_url = os.environ.get("KETCHUP_URL", kernel_url)
-archive = os.environ.get("KETCHUP_ARCH", archive)
-
-# And finally command line overrides everything
-if not os.path.exists(wget): wget = ""
-if not os.path.exists(gpg): gpg = ""
-
-options = {}
-opts = [
-    ('a', 'archive', archive, 'cache directory'),
-    ('d', 'directory', '.', 'directory to update'),
-    ('f', 'full-tarball', None, 'if unpacking a tarball, download the latest'),
-    ('g', 'gpg-path', gpg, 'path for GnuPG'),
-    ('G', 'no-gpg', None, 'disable GPG signature verification'),
-    ('k', 'kernel-url', kernel_url, 'base url for kernel.org mirror'),
-    ('l', 'list-trees', None, 'list supported trees'),
-    ('m', 'show-makefile', None, 'output version in makefile <arg>'),
-    ('n', 'dry-run', None, 'don\'t download or apply patches'),
-    ('p', 'show-previous', None, 'output version previous to <arg>'),
-    ('q', 'quiet', None, 'reduce output'),
-    ('r', 'rename-directory', None, 'rename updated directory to %s<v>'
-     % rename_prefix),
-    ('s', 'show-latest', None, 'output the latest version of <arg>'),
-    ('u', 'show-url', None, 'output URL for <arg>'),
-    ('w', 'wget', wget, 'command to use for wget'),
-    ]
-
-args = fancyopts(sys.argv[1:], opts, options,
-                 'ketchup [options] [ver]')
-
-archive = options["archive"]
-kernel_url = options["kernel-url"]
-if options["no-gpg"]: options["gpg-path"] = ''
-
-# Process args
-
-if not os.path.exists(options["directory"]):
-    qprint("Creating target directory", options["directory"])
-    os.mkdir(options["directory"])
-os.chdir(options["directory"])
-
-if os.path.isfile(".ketchuprc"):
-    try:
-        execfile(".ketchuprc")
-    except Exception, e:
-        sys.exit('Failed parsing .ketchuprc\nError was: %s' % (e))
-
-if options["list-trees"]:
-    l = version_info.keys()
-    l.sort()
-    for tree in l:
-	if version_info[tree][3] == 0:
-	   lprint(tree, "(unsigned)")
-        else:
-	   lprint(tree, "(signed)")
-        lprint(" " + version_info[tree][4])
-    sys.exit(0)
-
-if options["show-makefile"] and len(args) < 2:
-    if not args:
-        lprint(get_ver("Makefile"))
-    else:
-        lprint(get_ver(args[0]))
-    sys.exit(0)
-
-if len(args) == 0 and default_tree:
-    qprint("Using default tree \"%s\"" % (default_tree))
-    args.append(default_tree)
-
-if len(args) != 1:
-    error("No version given on command line and no default in configuration")
-    sys.exit(-1)
-
-if options["show-latest"]:
-    lprint(find_ver(args[0]))
-    sys.exit(0)
-
-if options["show-url"]:
-    lprint(version_urls(find_ver(args[0]))[0])
-    sys.exit(0)
-
-if options["show-previous"]:
-    v = find_ver(args[0])
-    p = prebase(v)
-    if p == v: p = base(v)
-    if p == v:
-        if rev(v) > 0: p = "%.1f.%s" % (tree(v), rev(v) -1)
-        else: p = "unknown"
-    lprint(p)
-    sys.exit(0)
-
-if not os.path.exists(options["archive"]):
-    qprint("Creating cache directory", options["archive"])
-    os.mkdir(options["archive"])
-
-if precommand and os.system(precommand):
-    sys.exit('Precommand "%s" failed!' % precommand)
-
-try:
-    a = get_ver('Makefile')
-except:
-    a = None
-
-if not a and os.listdir("."):
-    error("Can't find kernel version for non-empty directory")
-    sys.exit(-1)
-
-b = find_ver(args[0])
-qprint("%s -> %s" % (a, b))
-transform(a, b)
-if options["rename-directory"] and not options["dry-run"]:
-    rename_dir(b)
-
-if postcommand and os.system(postcommand):
-    sys.exit('Postcommand "%s" failed!' % postcommand)
diff --git a/buildconfigs/mk.linux-2.6 b/buildconfigs/mk.linux-2.6
deleted file mode 100644
index 6b8d989..0000000
--- a/buildconfigs/mk.linux-2.6
+++ /dev/null
@@ -1,10 +0,0 @@
-XEN_LINUX_SOURCE ?= tarball
-LINUX_VER ?= 2.6
-
-IMAGE_TARGET ?= vmlinux bzImage
-
-XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
-
-EXTRAVERSION ?=
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-common b/buildconfigs/mk.linux-2.6-common
deleted file mode 100644
index e8e97fb..0000000
--- a/buildconfigs/mk.linux-2.6-common
+++ /dev/null
@@ -1,154 +0,0 @@
-LINUX_SERIES = 2.6
-
-# Linux search path, will be searched for tarballs and mercurial
-# repositories.
-LINUX_SRC_PATH ?= .:..
-
-# The source directory is not automatically updated to avoid blowing
-# away developer's changes. If you want to automatically pull a new
-# version of the Linux tree then add `XEN_LINUX_UPDATE=y' to your make
-# command line.
-ifeq ($(XEN_LINUX_UPDATE),y)
-__XEN_LINUX_UPDATE = $(LINUX_SRCDIR)/.force-update
-else
-__XEN_LINUX_UPDATE =
-endif
-
-ifeq ($(XEN_LINUX_NONINTERACTIVE_CONFIG),y)
-__NONINT_CONFIG = yes $$'\n' |
-else
-__NONINT_CONFIG =
-endif
-
-LINUX_DIR     = build-linux-$(LINUX_VER)$(EXTRAVERSION)_$(XEN_TARGET_ARCH)
-
-IMAGE_TARGET ?= vmlinuz
-
-LINUX_VER3  := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
-
-.PHONY: _build
-_build: build
-
--include buildconfigs/src.$(XEN_LINUX_SOURCE)
-
-LINUX_ARCH = $$(sh buildconfigs/select-linux-arch $(LINUX_SRCDIR))
-IMAGE_PATH = $$(sh buildconfigs/select-linux-image $(LINUX_DIR) $(LINUX_ARCH) $(IMAGE_TARGET))
-
-INSTALL_BOOT_PATH := $(DESTDIR)/boot
-
-# Default to allowing interface mismatch
-ifndef XEN_LINUX_ALLOW_INTERFACE_MISMATCH
-XEN_LINUX_ALLOW_INTERFACE_MISMATCH := y
-endif
-
-KERNELRELEASE = $(shell $(MAKE) -s --no-print-directory -C $(LINUX_DIR) kernelrelease)
-
-# The real action starts here!
-.PHONY: build
-build: $(LINUX_DIR)/include/linux/autoconf.h
-ifneq ($(XEN_LINUX_ALLOW_INTERFACE_MISMATCH),y)
-	@if ! diff -urN -X buildconfigs/interface.exclude \
-              $(LINUX_SRCDIR)/include/xen/interface xen/include/public ; then \
-		echo "" 1>&2 ; \
-		echo " *** $(LINUX_SRCDIR)/include/xen/interface is out of date " 1>&2 ; \
-		echo " *** relative to $(XEN_ROOT)/xen/include/public." 1>&2 ; \
-		echo "" 1>&2 ; \
-		exit 1 ; \
-	fi
-endif
-	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
-	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules || exit 1 ; \
-	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
-	fi
-	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) $(IMAGE_TARGET)
-	mkdir -p $(INSTALL_BOOT_PATH)
-	@cp -v $(IMAGE_PATH) $(INSTALL_BOOT_PATH)/vmlinuz-$(KERNELRELEASE)
-	@cp -v $(LINUX_DIR)/.config $(INSTALL_BOOT_PATH)/config-$(KERNELRELEASE)
-	@cp -v $(LINUX_DIR)/System.map $(INSTALL_BOOT_PATH)/System.map-$(KERNELRELEASE)
-
-$(LINUX_DIR)/include/linux/autoconf.h: CONFIG_FILE=$(CURDIR)/$(LINUX_DIR)/.config
-$(LINUX_DIR)/include/linux/autoconf.h: $(LINUX_SRCDIR)/.valid-src
-	rm -rf $(LINUX_DIR)
-	mkdir -p $(LINUX_DIR)
-	# Re-use config from install dir if one exists. Next try to use
-	# buildconfigs/create_config.sh is one is provided by the source
-	# tree. Finally attempt to use make defconfig.
-	set -e ; \
-	CONFIG_VERSION=$$(sed -ne 's/$$(XENGUEST)//; s/^EXTRAVERSION = //p' $(LINUX_SRCDIR)/Makefile); \
-	if [ ! -z "$(XEN_LINUX_CONFIG)" -a -r "$(XEN_LINUX_CONFIG)" ]; then \
-	  cp $(XEN_LINUX_CONFIG) $(CONFIG_FILE); \
-	elif [ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION$(EXTRAVERSION) ] ; then \
-	  cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION$(EXTRAVERSION) $(CONFIG_FILE) ; \
-        elif [ -e $(LINUX_SRCDIR)/buildconfigs/create_config.sh ] ; then \
-	  cd $(LINUX_SRCDIR) && sh buildconfigs/create_config.sh \
-		$(CONFIG_FILE) $(EXTRAVERSION) $(XEN_TARGET_ARCH) $(XEN_SYSTYPE) ; \
-          echo "Configured $(LINUX_DIR) using create_config.sh" ; \
-	elif $(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) defconfig O=$$(/bin/pwd)/$(LINUX_DIR) ; then \
-	  echo "Configured $(LINUX_DIR) using defconfig" ; \
-	else \
-          echo "No configuration method found for this kernel" ; \
-	fi
-ifneq ($(XEN_LINUX_CONFIG_UPDATE),)
-	echo "Updating $(CONFIG_FILE) using $(XEN_LINUX_CONFIG_UPDATE)"
-	sh $(XEN_LINUX_CONFIG_UPDATE) $(CONFIG_FILE)
-endif
-ifeq ($(XEN_TARGET_ARCH),x86_32)
-	sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
-endif
-ifneq ($(EXTRAVERSION),)
-	echo "$(EXTRAVERSION)" >$(LINUX_DIR)/localversion-xen
-endif
-	$(__NONINT_CONFIG) $(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) oldconfig O=$$(/bin/pwd)/$(LINUX_DIR)
-	@set -e ; if [ ! -f $(LINUX_DIR)/Makefile ] ; then \
-	    echo "==================================="; \
-	    echo "oldconfig did not create a Makefile"; \
-	    echo "Generating $(LINUX_DIR)/Makefile   "; \
-	    echo "==================================="; \
-	    ( echo "# Automatically generated: don't edit"; \
-	      echo ""; \
-	      echo "VERSION = 2"; \
-	      echo "PATCHLEVEL = 6"; \
-	      echo ""; \
-	      echo "KERNELSRC    := $(CURDIR)/$(LINUX_SRCDIR)"; \
-	      echo "KERNELOUTPUT := $(CURDIR)/$(LINUX_DIR)"; \
-	      echo ""; \
-	      echo "MAKEFLAGS += --no-print-directory"; \
-	      echo ""; \
-	      echo ".PHONY: all \$$(MAKECMDGOALS)"; \
-	      echo ""; \
-	      echo "all:"; \
-	      echo "	\$$(MAKE) -C \$$(KERNELSRC) O=\$$(KERNELOUTPUT)"; \
-	      echo ""; \
-	      echo "Makefile:;"; \
-	      echo ""; \
-	      echo "\$$(filter-out all Makefile,\$$(MAKECMDGOALS)) %/:"; \
-	      echo "	\$$(MAKE) -C \$$(KERNELSRC) O=\$$(KERNELOUTPUT) \$$@"; \
-	    ) > $(LINUX_DIR)/Makefile ; \
-	fi
-	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) prepare
-
-.PHONY: prep
-prep: $(LINUX_DIR)/include/linux/autoconf.h
-
-.PHONY: config
-config: CONFIGMODE = menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
-
-.PHONY: clean
-clean::
-	[ ! -d $(LINUX_DIR) ] || \
-		$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
-
-.PHONY: delete
-delete: 
-	rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR) $(LINUX_SRCDIR)
-
-.PHONY: mrproper
-mrproper:
-	rm -rf $(LINUX_SRCDIR)
-	rm -f linux-$(LINUX_VER).tar.bz2
-
-.PHONY: $(LINUX_SRCDIR)/.force-update
-$(LINUX_SRCDIR)/.force-update:
-	@ :
diff --git a/buildconfigs/mk.linux-2.6-git b/buildconfigs/mk.linux-2.6-git
deleted file mode 100644
index 1a142dd..0000000
--- a/buildconfigs/mk.linux-2.6-git
+++ /dev/null
@@ -1,2 +0,0 @@
-LINUX_VER ?= 2.6-git
-include buildconfigs/mk.linux-2.6
diff --git a/buildconfigs/mk.linux-2.6-mm b/buildconfigs/mk.linux-2.6-mm
deleted file mode 100644
index f02e864..0000000
--- a/buildconfigs/mk.linux-2.6-mm
+++ /dev/null
@@ -1,2 +0,0 @@
-LINUX_VER ?= 2.6-mm
-include buildconfigs/mk.linux-2.6
diff --git a/buildconfigs/mk.linux-2.6-native b/buildconfigs/mk.linux-2.6-native
deleted file mode 100644
index c7c0949..0000000
--- a/buildconfigs/mk.linux-2.6-native
+++ /dev/null
@@ -1,5 +0,0 @@
-EXTRAVERSION = -native
-IMAGE_TARGET = bzImage
-INSTALL_BOOT_PATH = $(DESTDIR)/boot
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-pvops b/buildconfigs/mk.linux-2.6-pvops
deleted file mode 100644
index 59cae79..0000000
--- a/buildconfigs/mk.linux-2.6-pvops
+++ /dev/null
@@ -1,17 +0,0 @@
-XEN_LINUX_SOURCE ?= git-clone
-LINUX_VER ?= 2.6-pvops
-
-IMAGE_TARGET ?= bzImage
-
-XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
-
-ifeq ($(GIT_HTTP),y)
-XEN_LINUX_GIT_URL ?= http://www.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
-else
-XEN_LINUX_GIT_URL ?= git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
-endif
-XEN_LINUX_GIT_REMOTEBRANCH ?= xen/stable-2.6.32.x
-
-EXTRAVERSION ?=
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-rc b/buildconfigs/mk.linux-2.6-rc
deleted file mode 100644
index 34f4513..0000000
--- a/buildconfigs/mk.linux-2.6-rc
+++ /dev/null
@@ -1,2 +0,0 @@
-LINUX_VER ?= 2.6-rc
-include buildconfigs/mk.linux-2.6
diff --git a/buildconfigs/mk.linux-2.6-tip b/buildconfigs/mk.linux-2.6-tip
deleted file mode 100644
index 0588ad2..0000000
--- a/buildconfigs/mk.linux-2.6-tip
+++ /dev/null
@@ -1,2 +0,0 @@
-LINUX_VER ?= 2.6-tip
-include buildconfigs/mk.linux-2.6
diff --git a/buildconfigs/mk.linux-2.6-tip-latest b/buildconfigs/mk.linux-2.6-tip-latest
deleted file mode 100644
index 2a0b9af..0000000
--- a/buildconfigs/mk.linux-2.6-tip-latest
+++ /dev/null
@@ -1,17 +0,0 @@
-XEN_LINUX_SOURCE ?= git-clone
-LINUX_VER ?= 2.6-x86-latest
-
-IMAGE_TARGET ?= bzImage vmlinux
-
-XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
-
-ifeq ($(GIT_HTTP),y)
-XEN_LINUX_GIT_URL ?= http://www.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git
-else
-XEN_LINUX_GIT_URL ?= git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git
-endif
-XEN_LINUX_GIT_REMOTEBRANCH ?= auto-latest
-
-EXTRAVERSION ?=
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-xen b/buildconfigs/mk.linux-2.6-xen
deleted file mode 100644
index 8594b55..0000000
--- a/buildconfigs/mk.linux-2.6-xen
+++ /dev/null
@@ -1,6 +0,0 @@
-EXTRAVERSION ?= -xen
-LINUX_VER    ?= 2.6.18
-
-XEN_LINUX_SOURCE ?= hg-clone
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-xen0 b/buildconfigs/mk.linux-2.6-xen0
deleted file mode 100644
index 96a5712..0000000
--- a/buildconfigs/mk.linux-2.6-xen0
+++ /dev/null
@@ -1,2 +0,0 @@
-EXTRAVERSION = -xen0
-include buildconfigs/mk.linux-2.6-xen
diff --git a/buildconfigs/mk.linux-2.6-xenU b/buildconfigs/mk.linux-2.6-xenU
deleted file mode 100644
index 02f3e07..0000000
--- a/buildconfigs/mk.linux-2.6-xenU
+++ /dev/null
@@ -1,2 +0,0 @@
-EXTRAVERSION = -xenU
-include buildconfigs/mk.linux-2.6-xen
diff --git a/buildconfigs/select-linux-arch b/buildconfigs/select-linux-arch
deleted file mode 100755
index a5d0856..0000000
--- a/buildconfigs/select-linux-arch
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-ME=$(basename $0)
-
-if [ $# -lt 1 ] || [ $# -gt 2 ] ; then
-    echo "usage: $ME <linux-build-directory>" 1>&2
-    exit 1;
-fi
-
-LINUX_DIR=$1
-
-case ${XEN_TARGET_ARCH} in
-    x86_32|x86_64)
-	if [ -d ${LINUX_DIR}/arch/x86 ] ; then
-	    ARCH=x86
-	elif [ "${XEN_TARGET_ARCH}" = "x86_32" ] ; then
-	    ARCH=i386
-	else
-	    ARCH=x86_64
-	fi
-	;;
-    *)
-	ARCH=${XEN_TARGET_ARCH}
-	;;
-esac
-
-echo "$ME: ${ARCH}" 1>&2
-echo ${ARCH}
-
-exit 0
diff --git a/buildconfigs/select-linux-image b/buildconfigs/select-linux-image
deleted file mode 100755
index 07899f8..0000000
--- a/buildconfigs/select-linux-image
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-ME=$(basename $0)
-
-if [ $# -lt 3 ] ; then
-    echo "usage: $ME <linux-build-directory> <linux-arch> <linux-targets...>" 1>&2
-    exit 1;
-fi
-
-LINUX_DIR=$1
-LINUX_ARCH=$2
-LINUX_TARGET=$3 # We don't care about second and subsequent targets
-
-case ${XEN_TARGET_ARCH} in
-    ia64)
-	IMAGE=${LINUX_DIR}/arch/ia64/hp/sim/boot/vmlinux.gz
-	;;
-    *)
-	if [ -f ${LINUX_DIR}/arch/${LINUX_ARCH}/boot/${LINUX_TARGET} ] ; then
-	    IMAGE=${LINUX_DIR}/arch/${LINUX_ARCH}/boot/${LINUX_TARGET}
-	elif [ -f ${LINUX_DIR}/${LINUX_TARGET} ] ; then
-	    IMAGE=${LINUX_DIR}/${LINUX_TARGET}
-	else
-	    echo "$ME: cannot determine Linux image to use for ${LINUX_ARCH} in ${LINUX_DIR}" 1>&2
-	    exit 1
-	fi
-	;;
-esac
-
-echo "$ME: ${IMAGE}" 1>&2
-echo ${IMAGE}
-
-exit 0
diff --git a/buildconfigs/select-repository b/buildconfigs/select-repository
deleted file mode 100755
index 48ae00f..0000000
--- a/buildconfigs/select-repository
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-ME=$(basename $0)
-
-if [ $# -lt 1 ] || [ $# -gt 2 ] ; then
-    echo "usage: $ME <repository-name> [search-path]" 1>&2
-    exit 1;
-fi
-
-REPO=$1
-LINUX_SRC_PATH=$2
-
-if [ X"${LINUX_SRC_PATH}" != X ] ; then
-    echo "$ME: Searching \`${LINUX_SRC_PATH}' for $REPO" 1>&2
-    IFS_saved="$IFS"
-    IFS=:
-    for i in $LINUX_SRC_PATH ; do
-	# Ignore current directory since we will almost certainly find
-	# the target directory there which breaks updating (there's no
-	# point updating from yourself!).
-	if [ X"." = X"${i}" ] ; then
-	    echo "$ME: Ignoring \`.'" 1>&2
-	    continue
-	fi
-
-	if [ -d "$i/$REPO/.hg" ] ; then
-	    echo "$ME: Found $i/$REPO" 1>&2
-	    echo "$i/$REPO"
-	    exit 0
-	fi
-    done
-    IFS="$IFS_saved"
-fi
-
-if [ -d ${XEN_ROOT}/.hgxxx ] ; then
-    XEN=$(hg -R ${XEN_ROOT} path default)
-    if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then
-	echo "$ME: Unable to determine Xen repository parent." 1>&2
-	exit 1;
-    fi
-
-    BASE=$(dirname ${XEN})
-    if [ $? -ne 0 ] || [ X"$BASE" = "X" ] ; then
-	echo "$ME: Unable to determine Xen repository base." 1>&2
-	exit 1;
-    fi
-    if [ -d "$XEN" ] && [ ! -d "$BASE/$REPO" ] ; then
-	echo "$ME: No such dir: $BASE/$REPO" 1>&2
-	exit 1
-    fi
-
-    echo "$ME: Found ${BASE}/${REPO}" 1>&2
-
-    # If ${BASE}/${REPO} is a local directory then prepend file:// so that
-    # the test in src.hg-clone will fail and we will clone instead of
-    # linking this repository. We only want to link repositories which
-    # were found via LINUX_SRC_PATH.
-    if [ -d "${BASE}/${REPO}" ] ; then
-	echo "file://${BASE}/${REPO}"
-    else
-	echo ${BASE}/${REPO}
-    fi
-else
-    echo "Unable to determine path to Linux source tree." 1>&2
-    echo "Falling back to linux-2.6.18-xen Mercurial repository." 1>&2
-    echo http://xenbits.xen.org/linux-2.6.18-xen.hg
-fi
-
-exit 0
diff --git a/buildconfigs/src.git-clone b/buildconfigs/src.git-clone
deleted file mode 100644
index 35865e1..0000000
--- a/buildconfigs/src.git-clone
+++ /dev/null
@@ -1,32 +0,0 @@
-# Mercurial
-GIT ?= git
-
-LINUX_SRCDIR ?= linux-$(LINUX_VER).git
-
-# The URL of the remote GIT repository
-ifeq ($(XEN_LINUX_GIT_URL),)
-.ERROR: XEN_LINUX_GIT_URL not specified
-endif
-
-# The branch in the remote repository
-ifeq ($(XEN_LINUX_GIT_REMOTEBRANCH),)
-.ERROR: XEN_LINUX_GIT_REMOTEBRANCH not specified
-endif
-
-XEN_GIT_ORIGIN ?= xen
-
-XEN_LINUX_GIT_LOCALBRANCH ?= $(XEN_LINUX_GIT_REMOTEBRANCH)
-
-# Set XEN_LINUX_GITREV to update to a particlar revision.
-XEN_LINUX_GITREV  ?= $(XEN_GIT_ORIGIN)/$(XEN_LINUX_GIT_REMOTEBRANCH)
-
-$(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
-	set -ex; \
-	if ! [ -d $(LINUX_SRCDIR) ]; then \
-		rm -rf $(LINUX_SRCDIR) $(LINUX_SRCDIR).tmp; \
-		mkdir $(LINUX_SRCDIR).tmp; rmdir $(LINUX_SRCDIR).tmp; \
-		$(GIT) clone -o $(XEN_GIT_ORIGIN) -n $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
-		(cd $(LINUX_SRCDIR).tmp; git checkout -b $(XEN_LINUX_GIT_LOCALBRANCH) $(XEN_LINUX_GITREV) ); \
-		mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \
-	fi
-	touch $@
diff --git a/buildconfigs/src.hg-clone b/buildconfigs/src.hg-clone
deleted file mode 100644
index 0586bc8..0000000
--- a/buildconfigs/src.hg-clone
+++ /dev/null
@@ -1,32 +0,0 @@
-# Mercurial
-HG ?= hg
-
-LINUX_SRCDIR ?= linux-$(LINUX_VER)-xen.hg
-
-# Repository to clone.
-XEN_LINUX_HGREPO ?= $$(sh buildconfigs/select-repository $(LINUX_SRCDIR) $(LINUX_SRC_PATH))
-
-# Set XEN_LINUX_HGREV to update to a particlar revision.
-XEN_LINUX_HGREV  ?= tip
-
-$(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
-	set -e ; \
-	if [ ! -e $(LINUX_SRCDIR)/.hg ] ; then \
-	    __repo=$(XEN_LINUX_HGREPO) ; \
-	    if [ -d $${__repo} ] ; then \
-	        echo "Linking $${__repo} to $(LINUX_SRCDIR)." ; \
-	        ln -s $${__repo} $(LINUX_SRCDIR) ; \
-	    else \
-	        echo "Cloning $${__repo} to $(LINUX_SRCDIR)." ; \
-	        $(HG) clone $${__repo#file://} $(LINUX_SRCDIR) ; \
-	    fi ; \
-	else \
-	    __parent=$$($(HG) -R $(LINUX_SRCDIR) path default) ; \
-	    echo "Pulling changes from $${__parent} into $(LINUX_SRCDIR)." ; \
-	    $(HG) -R $(LINUX_SRCDIR) pull $${__parent} ; \
-	fi
-	set -e ; if [ -n "$(XEN_LINUX_HGREV)" ] ; then \
-	    echo "Updating $(LINUX_SRCDIR) to revision $(XEN_LINUX_HGREV)." ; \
-	    ( cd $(LINUX_SRCDIR) && $(HG) update $(XEN_LINUX_HGREV) ); \
-	fi
-	touch $@
diff --git a/buildconfigs/src.tarball b/buildconfigs/src.tarball
deleted file mode 100644
index 2101e1a..0000000
--- a/buildconfigs/src.tarball
+++ /dev/null
@@ -1,19 +0,0 @@
-XEN_LINUX_MIRROR ?= http://www.kernel.org/pub/linux/kernel/v2.6/
-XEN_LINUX_TARBALL ?= linux-$(LINUX_VER)-xen.tar.bz2
-
-LINUX_SRCDIR ?= linux-$(LINUX_VER)
-
-KETCHUP ?= python buildconfigs/ketchup
-
-vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
-
-# download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
-linux-%.tar.bz2:
-	@echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
-	false wget $(XEN_LINUX_MIRROR)/$@ -O./$@
-
-# XXX create a pristine tree for diff -Nurp convenience
-
-%/.valid-src: $(__XEN_LINUX_UPDATE)
-	$(KETCHUP) -d $(@D) $(LINUX_VER)
-	touch $@ # update timestamp to avoid rebuild
diff --git a/config/Linux.mk b/config/Linux.mk
index 10d84af..b421a1c 100644
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -1,8 +1 @@
 include $(XEN_ROOT)/config/StdGNU.mk
-
-# You may use wildcards, e.g. KERNELS=*2.6*
-KERNELS ?= 
-
-XKERNELS := $(foreach kernel, $(KERNELS), \
-              $(patsubst buildconfigs/mk.%,%, \
-                $(wildcard buildconfigs/mk.$(kernel))) )
diff --git a/configure b/configure
index c2c724a..d5c8500 100755
--- a/configure
+++ b/configure
@@ -592,7 +592,6 @@ SUBSYSTEMS
 docs
 stubdom
 tools
-kernels
 xen
 subdirs
 host_os
@@ -645,7 +644,6 @@ ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_xen
-enable_kernels
 enable_tools
 enable_stubdom
 enable_docs
@@ -654,7 +652,6 @@ enable_docs
 host_alias
 target_alias'
 ac_subdirs_all='xen
-kernels
 tools
 stubdom
 docs'
@@ -1271,7 +1268,6 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-xen           Disable build and install of xen
-  --disable-kernels       Disable build and install of kernels
   --disable-tools         Disable build and install of tools
   --enable-stubdom        Enable build and install of stubdom
   --disable-docs          Disable build and install of docs
@@ -1891,52 +1887,6 @@ fi
 
 
 
-# Check whether --enable-kernels was given.
-if test "${enable_kernels+set}" = set; then :
-  enableval=$enable_kernels;
-
-if test "x$enableval" = "xyes"; then :
-
-
-kernels=y
-SUBSYSTEMS="$SUBSYSTEMS kernels"
-
-
-else
-
-if test "x$enableval" = "xno"; then :
-
-
-kernels=n
-
-
-fi
-
-fi
-
-
-else
-
-
-kernels=y
-SUBSYSTEMS="$SUBSYSTEMS kernels"
-
-
-fi
-
-
-if test -e "kernels/configure"; then :
-
-if test "x$kernels" = "xy" || test "x$kernels" = "x" ; then
-    subdirs="$subdirs kernels"
-
-fi
-
-fi
-
-
-
-
 # Check whether --enable-tools was given.
 if test "${enable_tools+set}" = set; then :
   enableval=$enable_tools;
diff --git a/configure.ac b/configure.ac
index ce06dad..6c14524 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,6 @@ case "$host_cpu" in
 esac
 
 AX_SUBSYSTEM_DEFAULT_ENABLE([xen])
-AX_SUBSYSTEM_DEFAULT_ENABLE([kernels])
 AX_SUBSYSTEM_DEFAULT_ENABLE([tools])
 AX_SUBSYSTEM_CONDITIONAL([stubdom], $arch_enable_stubdom)
 AX_SUBSYSTEM_DEFAULT_ENABLE([docs])
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:24 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59: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 1WaNYq-0006na-3Z; Wed, 16 Apr 2014 10:59:24 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYm-0006lt-NG
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:22 +0000
Received: from [85.158.139.211:49953] by server-16.bemta-5.messagelabs.com id
	94/1C-19700-8826E435; Wed, 16 Apr 2014 10:59:20 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1397645954!4876165!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14170 invoked from network); 16 Apr 2014 10:59:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:59:15 -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 1WaNYg-0000fl-Mi
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYg-0000U0-LP
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:14 +0000
Date: Wed, 16 Apr 2014 10:59:14 +0000
Message-Id: <E1WaNYg-0000U0-LP@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] build: remove Linux kernel build
	integration.
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 40305629dc48a6bfdef52ae5995bfcfb1d59ae8e
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Tue Apr 8 16:37:58 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:10:37 2014 +0100

    build: remove Linux kernel build integration.
    
    We haven't shipped a XenoLinux kernel for more releases than I can remember.
    We held onto these because osstest was using them but this is no longer the
    case.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Makefile                             |   61 +---
 buildconfigs/Rules.mk                |   42 --
 buildconfigs/enable-xen-config       |  127 ------
 buildconfigs/interface.exclude       |    7 -
 buildconfigs/ketchup                 |  742 ----------------------------------
 buildconfigs/mk.linux-2.6            |   10 -
 buildconfigs/mk.linux-2.6-common     |  154 -------
 buildconfigs/mk.linux-2.6-git        |    2 -
 buildconfigs/mk.linux-2.6-mm         |    2 -
 buildconfigs/mk.linux-2.6-native     |    5 -
 buildconfigs/mk.linux-2.6-pvops      |   17 -
 buildconfigs/mk.linux-2.6-rc         |    2 -
 buildconfigs/mk.linux-2.6-tip        |    2 -
 buildconfigs/mk.linux-2.6-tip-latest |   17 -
 buildconfigs/mk.linux-2.6-xen        |    6 -
 buildconfigs/mk.linux-2.6-xen0       |    2 -
 buildconfigs/mk.linux-2.6-xenU       |    2 -
 buildconfigs/select-linux-arch       |   30 --
 buildconfigs/select-linux-image      |   33 --
 buildconfigs/select-repository       |   69 ----
 buildconfigs/src.git-clone           |   32 --
 buildconfigs/src.hg-clone            |   32 --
 buildconfigs/src.tarball             |   19 -
 config/Linux.mk                      |    7 -
 configure                            |   50 ---
 configure.ac                         |    1 -
 26 files changed, 11 insertions(+), 1462 deletions(-)

diff --git a/Makefile b/Makefile
index 91ca280..41dabbf 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
 all: dist
 
 -include config/Toplevel.mk
-SUBSYSTEMS?=xen kernels tools stubdom docs
+SUBSYSTEMS?=xen tools stubdom docs
 TARGS_DIST=$(patsubst %, dist-%, $(SUBSYSTEMS))
 TARGS_INSTALL=$(patsubst %, install-%, $(SUBSYSTEMS))
 
@@ -15,15 +15,15 @@ export XEN_ROOT=$(CURDIR)
 include Config.mk
 
 SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
-export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
-include buildconfigs/Rules.mk
+export XEN_TARGET_ARCH SUBARCH
+export DESTDIR
 
 # build and install everything into the standard system directories
 .PHONY: install
 install: $(TARGS_INSTALL)
 
 .PHONY: build
-build: kernels
+build:
 	$(MAKE) -C xen build
 	$(MAKE) -C tools build
 	$(MAKE) -C stubdom build
@@ -54,17 +54,12 @@ dist-%: install-%
 	@: # do nothing
 
 # Legacy dist targets
-.PHONY: xen tools stubdom kernels docs
+.PHONY: xen tools stubdom docs
 xen: dist-xen
 tools: dist-tools
-kernels: dist-kernels
 stubdom: dist-stubdom
 docs: dist-docs
 
-.PHONY: prep-kernels
-prep-kernels:
-	for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
-
 .PHONY: install-xen
 install-xen:
 	$(MAKE) -C xen install
@@ -95,10 +90,6 @@ endif
 install-tools: $(QEMU_TRAD_DIR_TARGET) $(QEMU_XEN_DIR_TARGET)
 	$(MAKE) -C tools install
 
-.PHONY: install-kernels
-install-kernels:
-	for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
-
 .PHONY: install-stubdom
 install-stubdom: $(QEMU_TRAD_DIR_TARGET) install-tools
 	$(MAKE) -C stubdom install
@@ -122,27 +113,12 @@ install-docs:
 dev-docs:
 	$(MAKE) -C docs dev-docs
 
-# Build all the various kernels and modules
-.PHONY: kbuild
-kbuild: kernels
-
-# Delete the kernel build trees entirely
-.PHONY: kdelete
-kdelete:
-	for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
-
-# Clean the kernel build trees
-.PHONY: kclean
-kclean:
-	for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
-
-# build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
-# and place them in the install directory. 'make install' should then
-# copy them to the normal system directories
+# build xen and the tools and place them in the install
+# directory. 'make install' should then copy them to the normal system
+# directories
 .PHONY: world
 world: 
 	$(MAKE) clean
-	$(MAKE) kdelete
 	$(MAKE) dist
 
 # Package a build in a debball file, that is inside a .deb format
@@ -159,7 +135,6 @@ debball: dist
 rpmball: dist
 	bash ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion --no-print-directory)
 
-# clean doesn't do a kclean
 .PHONY: clean
 clean::
 	$(MAKE) -C xen clean
@@ -170,7 +145,7 @@ ifeq (x86_64,$(XEN_TARGET_ARCH))
 endif
 	$(MAKE) -C docs clean
 
-# clean, but blow away kernel build tree plus tarballs
+# clean, but blow away tarballs
 .PHONY: distclean
 distclean:
 	rm -f config/Toplevel.mk
@@ -181,9 +156,7 @@ ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom distclean
 endif
 	$(MAKE) -C docs distclean
-	rm -rf dist patches/tmp
-	for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
-	rm -rf patches/*/.makedep
+	rm -rf dist
 	rm -rf config.log config.status config.cache autom4te.cache
 
 # Linux name for GNU distclean
@@ -203,19 +176,15 @@ help:
 	@echo '  install          - build and install everything'
 	@echo '  install-xen      - build and install the Xen hypervisor'
 	@echo '  install-tools    - build and install the control tools'
-	@echo '  install-kernels  - build and install guest kernels'
 	@echo '  install-stubdom  - build and install the stubdomain images'
 	@echo '  install-docs     - build and install user documentation'
 	@echo ''
 	@echo 'Building targets:'
 	@echo '  dist             - build and install everything into local dist directory'
-	@echo '  world            - clean everything, delete guest kernel build'
-	@echo '                     trees then make dist'
+	@echo '  world            - clean everything then make dist'
 	@echo '  xen              - build and install Xen hypervisor'
 	@echo '  tools            - build and install tools'
 	@echo '  stubdom          - build and install the stubdomain images'
-	@echo '  kernels          - build and install guest kernels'
-	@echo '  kbuild           - synonym for make kernels'
 	@echo '  docs             - build and install user documentation'
 	@echo '  dev-docs         - build developer-only documentation'
 	@echo ''
@@ -223,11 +192,8 @@ help:
 	@echo '  clean            - clean the Xen, tools and docs (but not guest kernel trees)'
 	@echo '  distclean        - clean plus delete kernel build trees and'
 	@echo '                     local downloaded files'
-	@echo '  kdelete          - delete guest kernel build trees'
-	@echo '  kclean           - clean guest kernel build trees'
 	@echo ''
 	@echo 'Miscellaneous targets:'
-	@echo '  prep-kernels     - prepares kernel directories, does not build'
 	@echo '  uninstall        - attempt to remove installed Xen tools'
 	@echo '                     (use with extreme care!)'
 	@echo
@@ -255,11 +221,6 @@ uninstall:
 	make -C tools uninstall
 	rm -rf $(D)/boot/tboot*
 
-# Legacy targets for compatibility
-.PHONY: linux26
-linux26:
-	$(MAKE) 'KERNELS=linux-2.6*' kernels
-
 .PHONY: xenversion
 xenversion:
 	@$(MAKE) --no-print-directory -C xen xenversion
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk
deleted file mode 100644
index ee61cf6..0000000
--- a/buildconfigs/Rules.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-
-include Config.mk
-
-export DESTDIR
-
-ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
-
-%-install:
-	$(MAKE) -f buildconfigs/mk.$* build
-
-%-dist: DESTDIR=$(DISTDIR)/install
-%-dist: %-install
-	@: # do nothing
-
-# Legacy dist target
-%-build: %-dist
-	@: # do nothing
-
-%-prep: DESTDIR=$(DISTDIR)/install
-%-prep:
-	$(MAKE) -f buildconfigs/mk.$* prep
-
-%-config: DESTDIR=$(DISTDIR)/install
-%-config:
-	$(MAKE) -f buildconfigs/mk.$* config
-
-%-delete:
-	$(MAKE) -f buildconfigs/mk.$* delete
-
-%-clean:
-	$(MAKE) -f buildconfigs/mk.$* clean
-
-%.patch:
-	$(MAKE) -f buildconfigs/mk.$* $@
-
-%-mrproper:
-	$(MAKE) -f buildconfigs/mk.$*-xen mrproper
-	rm -rf pristine-$(*)* ref-$(*)*
-	rm -rf $*-xen.patch
-
-# never delete any intermediate files.
-.SECONDARY:
diff --git a/buildconfigs/enable-xen-config b/buildconfigs/enable-xen-config
deleted file mode 100644
index 7ee4d37..0000000
--- a/buildconfigs/enable-xen-config
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ $# -ne 1 ] ; then
-	echo "Usage $(basename $0) <config-file>" 1>&2
-	exit 1
-fi
-
-CONFIG=$1
-
-setopt()
-{
-	OPTION=$1
-	VALUE=$2
-
-	# First remove any existing instances of this option
-	sed -e "s/^# ${OPTION} is not set$//g ; s/^${OPTION}=.*$//g" -i "${CONFIG}"
-
-	# Then append the new value
-	case ${VALUE} in
-	    n)     echo "# ${OPTION} is not set" >> "${CONFIG}" ;;
-	    y|m|*) echo "${OPTION}=${VALUE}" >> "${CONFIG}" ;;
-	esac
-}
-
-setopt CONFIG_PARAVIRT y
-setopt CONFIG_PARAVIRT_DEBUG y
-setopt CONFIG_PARAVIRT_GUEST y
-setopt CONFIG_PARAVIRT_SPINLOCKS y
-
-setopt CONFIG_XEN y
-setopt CONFIG_XEN_BLKDEV_FRONTEND y
-setopt CONFIG_XEN_NETDEV_FRONTEND y
-setopt CONFIG_XEN_KBDDEV_FRONTEND y
-setopt CONFIG_XEN_FBDEV_FRONTEND y
-setopt CONFIG_XEN_PCIDEV_FRONTEND y
-setopt CONFIG_XEN_BALLOON y
-setopt CONFIG_XEN_SCRUB_PAGES y
-setopt CONFIG_XEN_DEV_EVTCHN y
-setopt CONFIG_XEN_BACKEND y
-setopt CONFIG_XEN_BLKDEV_BACKEND y
-setopt CONFIG_XEN_BLKDEV_TAP y
-setopt CONFIG_XEN_NETDEV_BACKEND y
-setopt CONFIG_XEN_PCIDEV_BACKEND y
-setopt CONFIG_XEN_PCIDEV_BACKEND_VPCI y
-setopt CONFIG_XEN_PCIDEV_BACKEND_PASS n
-setopt CONFIG_XEN_PCIDEV_BACKEND_SLOT n
-setopt CONFIG_XEN_PCIDEV_BE_DEBUG n
-setopt CONFIG_XENFS y
-setopt CONFIG_XEN_COMPAT_XENFS y
-setopt CONFIG_XEN_PCI_PASSTHROUGH y
-setopt CONFIG_HVC_XEN y
-setopt CONFIG_XEN_MAX_DOMAIN_MEMORY 32
-setopt CONFIG_XEN_DEBUG_FS y
-setopt CONFIG_XEN_DOM0 y
-setopt CONFIG_XEN_SYS_HYPERVISOR y
-setopt CONFIG_XEN_GNTDEV y
-setopt CONFIG_XEN_PLATFORM_PCI y
-
-setopt CONFIG_VMI y
-setopt CONFIG_TUN y
-
-setopt CONFIG_KVM y
-setopt CONFIG_KVM_INTEL y
-setopt CONFIG_KVM_AMD y
-setopt CONFIG_KVM_CLOCK y
-setopt CONFIG_KVM_GUEST n
-setopt CONFIG_KVM_TRACE n
-
-setopt CONFIG_LGUEST n
-
-setopt CONFIG_LOCALVERSION_AUTO n
-
-setopt CONFIG_BRIDGE y
-
-setopt CONFIG_DEBUG_STACK_USAGE n
-
-setopt CONFIG_MEMORY_HOTPLUG y
-setopt CONFIG_MEMORY_HOTREMOVE y
-
-setopt CONFIG_MIGRATION n
-
-setopt CONFIG_ACPI_HOTPLUG_MEMORY n
-
-# Should all be set one way or another in defconfig but aren't
-setopt CONFIG_NUMA n
-setopt CONFIG_X86_VSMP n
-setopt CONFIG_X86_UV n
-setopt CONFIG_CALGARY_IOMMU n
-setopt CONFIG_AMD_IOMMU n
-setopt CONFIG_MAXSMP n
-setopt CONFIG_SPARSEMEM_VMEMMAP n
-setopt CONFIG_I7300_IDLE n
-setopt CONFIG_DMAR n
-setopt CONFIG_INTR_REMAP n
-setopt CONFIG_GFS2_FS n
-setopt CONFIG_IOMMU_DEBUG n
-setopt CONFIG_X86_MCE_INTEL n
-setopt CONFIG_X86_MCE_AMD n
-setopt CONFIG_CRYPTO_AES_NI_INTEL n
-setopt CONFIG_CISS_SCSI_TAPE n
-
-setopt CONFIG_FUSION y
-setopt CONFIG_FUSION_SPI m
-setopt CONFIG_FUSION_SAS m
-setopt CONFIG_FUSION_FC m
-setopt CONFIG_FUSION_MAX_SGE 128
-setopt CONFIG_FUSION_CTL n
-setopt CONFIG_FUSION_LOGGING n
-
-setopt CONFIG_BLK_CPQ_CISS_DA m
-
-case ${XEN_TARGET_ARCH} in
-    x86_32) setopt CONFIG_64BIT n ;;
-    x86_64)
-	setopt CONFIG_64BIT y
-	setopt CONFIG_IA32_EMULATION y
-	setopt CONFIG_IA32_AOUT n
-	setopt CONFIG_CRYPTO_AES_X86_64 n
-	setopt CONFIG_CRYPTO_SALSA20_X86_64 n
-	setopt CONFIG_CRYPTO_TWOFISH_X86_64 n
-	;;
-    *) ;;
-esac
-
-exit 0
diff --git a/buildconfigs/interface.exclude b/buildconfigs/interface.exclude
deleted file mode 100644
index 1df89a5..0000000
--- a/buildconfigs/interface.exclude
+++ /dev/null
@@ -1,7 +0,0 @@
-*.size
-*.pyc
-checker
-checker.c
-ia64.h
-x86_32.h
-x86_64.h
diff --git a/buildconfigs/ketchup b/buildconfigs/ketchup
deleted file mode 100644
index 8725f7d..0000000
--- a/buildconfigs/ketchup
+++ /dev/null
@@ -1,742 +0,0 @@
-#!/usr/bin/python
-#
-# ketchup 0.9.8
-# http://selenic.com/ketchup/wiki
-#
-# Copyright 2004 Matt Mackall <mpm@selenic.com>
-#
-# This software may be used and distributed according to the terms
-# of the GNU General Public License, incorporated herein by reference.
-#
-# Usage:
-#
-# in an existing kernel directory, run:
-#
-#  ketchup <version>
-#
-# where version is a complete kernel version, or a branch name to grab
-# the latest version
-#
-# You can override some variables by creating a ~/.ketchuprc file.
-# The ~/.ketchuprc is just a Python script, eg. it might look like this:
-#
-# kernel_url = 'http://kernel.localdomain/pub/linux/kernel'
-# archive = os.environ["HOME"] + '/tmp/ketchup-archive'
-# gpg = '/weird/path/to/gpg'
-#
-
-import re, sys, urllib, os, getopt, glob, shutil
-
-def error(*args):
-    sys.stderr.write("ketchup: ")
-    for a in args:
-        sys.stderr.write(str(a))
-        sys.stderr.write("\n")
-
-def qprint(*args):
-    if not options["quiet"]:
-        sys.stdout.write(" ".join(map(str, args)))
-        sys.stdout.write("\n")
-
-def lprint(*args):
-    sys.stdout.write(" ".join(map(str, args)))
-    sys.stdout.write("\n")
-
-
-def fancyopts(args, options, state, syntax=''):
-    long = []
-    short = ''
-    map = {}
-    dt = {}
-
-    def help(state, opt, arg, options = options, syntax = syntax):
-        lprint("Usage: ", syntax)
-
-        for s, l, d, c in options:
-            opt = ' '
-            if s: opt = opt + '-' + s + ' '
-            if l: opt = opt + '--' + l + ' '
-            if d: opt = opt + '(' + str(d) + ')'
-            lprint(opt)
-            if c: lprint('   %s' % c)
-        sys.exit(0)
-
-    options = [('h', 'help', help, 'Show usage info')] + options
-
-    for s, l, d, c in options:
-        map['-'+s] = map['--'+l]=l
-        state[l] = d
-        dt[l] = type(d)
-        if not d is None and not type(d) is type(help): s, l = s + ':', l + '='
-        if s: short = short + s
-        if l: long.append(l)
-
-    if os.environ.has_key("KETCHUP_OPTS"):
-        args = os.environ["KETCHUP_OPTS"].split() + args
-
-    try:
-        opts, args = getopt.getopt(args, short, long)
-    except getopt.GetoptError:
-        help(state, None, args)
-        sys.exit(-1)
-
-    for opt, arg in opts:
-        if dt[map[opt]] is type(help): state[map[opt]](state,map[opt],arg)
-        elif dt[map[opt]] is type(1): state[map[opt]] = int(arg)
-        elif dt[map[opt]] is type(''): state[map[opt]] = arg
-        elif dt[map[opt]] is type([]): state[map[opt]].append(arg)
-        elif dt[map[opt]] is type(None): state[map[opt]] = 1
-
-    return args
-
-# Default values
-kernel_url = 'http://www.kernel.org/pub/linux/kernel'
-archive = os.environ["HOME"] + "/.ketchup"
-rename_prefix = 'linux-'
-rename_with_localversion = False
-wget = "/usr/bin/wget"
-gpg = "/usr/bin/gpg"
-precommand = postcommand = None
-default_tree = None
-local_trees = {}
-
-# Functions to parse version strings
-
-def tree(ver):
-    return float(re.match(r'(\d+\.\d+)', ver).group(1))
-
-def rev(ver):
-    p = pre(ver)
-    r = int(re.match(r'\d+\.\d+\.(\d+)', ver).group(1))
-    if p: r = r - 1
-    return r
-
-def pre(ver):
-    try: return re.match(r'\d+\.\d+\.\d+(\.\d+)?-((rc|pre)\d+)', ver).group(2)
-    except: return None
-
-def post(ver):
-    try: return re.match(r'\d+\.\d+\.\d+\.(\d+)', ver).group(1)
-    except: return None
-
-def pretype(ver):
-    try: return re.match(r'\d+\.\d+\.\d+(\.\d+)?-((rc|pre)\d+)', ver).group(3)
-    except: return None
-
-def prenum(ver):
-    try: return int(re.match(r'\d+\.\d+\.\d+-((rc|pre)(\d+))', ver).group(3))
-    except: return None
-
-def prebase(ver):
-    return re.match(r'(\d+\.\d+\.\d+((-(rc|pre)|\.)\d+)?)', ver).group(1)
-
-def revbase(ver):
-    return "%s.%s" % (tree(ver), rev(ver))
-
-def base(ver):
-    v = revbase(ver)
-    if post(ver): v += "." + post(ver)
-    return v
-
-def forkname(ver):
-    try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+?)\d+)?',
-                         ver).group(5)
-    except: return None
-
-def forknum(ver):
-    try: return int(
-        re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+?)(\d+))?',
-                 ver).group(6))
-    except: return None
-
-def fork(ver):
-    try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+))?', ver).group(4)
-    except: return None
-
-def get_ver(makefile):
-    """ Read the version information from the specified makefile """
-    part = {}
-    parts = "VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION".split(' ')
-    m = open(makefile)
-    for l in m.readlines():
-        for p in parts:
-            try: part[p] = re.match(r'%s\s*=\s*(\S+)' % p, l).group(1)
-            except: pass
-
-    version = "%s.%s.%s" % tuple([part[p] for p in parts[:3]])
-    version += part.get("EXTRAVERSION","")
-    return version
-
-def get_localversion():
-    v = ''
-
-    for name in glob.glob('localversion*'):
-        try: v += open(name).readline().strip()
-        except: pass
-
-    try:
-        c = open('.config').read()
-        v += re.search(r'^CONFIG_LOCALVERSION="(.+)"', c, re.M).group(1)
-    except: pass
-
-    return v
-
-def compare_ver(a, b):
-    """
-    Compare kernel versions a and b
-
-    Note that -pre and -rc versions sort before the version they modify,
-    -pre sorts before -rc, -bk, -git, and -mm, etc. sort alphabetically.
-    """
-    if a == b: return 0
-
-    c = cmp(float(tree(a)), float(tree(b)))
-    if c: return c
-    c = cmp(rev(a), rev(b))
-    if c: return c
-    c = cmp(int(post(a) or 0), int(post(b) or 0))
-    if c: return c
-    c = cmp(pretype(a), pretype(b)) # pre sorts before rc
-    if c: return c
-    c = cmp(prenum(a), prenum(b))
-    if c: return c
-    c = cmp(forkname(a), forkname(b))
-    if c: return c
-    return cmp(forknum(a), forknum(b))
-
-def last(url, pat="(.*/)"):
-    for l in urllib.urlopen(url).readlines():
-        m = re.search('(?i)<a href="%s">' % pat, l)
-        if m: n = m.group(1)
-    return n
-
-def latest_mm(url, pat):
-    url = kernel_url + '/people/akpm/patches/2.6/'
-    url += last(url)
-    part = last(url)
-    return part[:-1]
-
-def latest_ck(url, pat):
-    url = "http://ck.kolivas.org/patches/2.6/pre-releases/"
-    url += last(url)
-    part = last(url)
-    pre = part[:-1]
-
-    url = "http://ck.kolivas.org/patches/2.6/"
-    url += last(url,"(2.6.*/)")
-    part = last(url)
-    rel = part[:-1]
-
-    l = [pre, rel]
-    l.sort(compare_ver)
-    return l[-1]
-
-def latest_dir(url, pat):
-    """Find the latest link matching pat at url after sorting"""
-    p = []
-    for l in urllib.urlopen(url).readlines():
-        m = re.search('"%s"' % pat, l)
-        if m: p.append(m.group(1))
-
-    if not p: return None
-
-    p.sort(compare_ver)
-    return p[-1]
-
-# mbligh is lazy and has a bunch of empty directories
-def latest_mjb(url, pat):
-    url = kernel_url + '/people/mbligh/'
-
-    # find the last Linus release and search backwards
-    l = [find_ver('2.6'), find_ver("2.6-pre")]
-    l.sort(compare_ver)
-    linus = l[-1]
-
-    p = []
-    for l in urllib.urlopen(url).readlines():
-        m = re.search('"(2\.6\..*/)"', l)
-        if m:
-            v = m.group(1)
-            if compare_ver(v, linus) <= 0:
-                p.append(v)
-
-    p.sort(compare_ver)
-    p.reverse()
-
-    for ver in p:
-        mjb = latest_dir(url + ver, pat)
-        if mjb: return mjb
-
-    return None
-
-def latest_26_tip(url, pat):
-    l = [find_ver('2.6'), find_ver('2.6-git'), find_ver('2.6-pre')]
-    l.sort(compare_ver)
-    return l[-1]
-
-def find_info(ver):
-    b = "%.1f" % tree(ver)
-    f = forkname(ver)
-    p = pre(ver)
-
-    s = b
-    if f:
-        s = "%s-%s" % (b, f)
-    elif p:
-        s = "%s-pre" % b
-
-    return version_info[s]
-
-def version_urls(ver):
-    """ Return the URL for the patch associated with the specified version """
-    i = find_info(ver)[1]
-    if type(i) != type([]):
-        i = [i]
-
-    v = {
-        'full': ver,
-        'tree': tree(ver),
-        'base': base(ver),
-        'prebase': prebase(ver)
-        }
-
-    l = []
-    for e in i:
-        l.append(e % v)
-
-    return l
-
-def patch_path(ver):
-    return os.path.join(archive, os.path.basename(version_urls(ver)[0]))
-
-def download(url, f):
-    qprint("Downloading %s" % os.path.basename(url))
-    if options["dry-run"]:
-        return 1
-
-    if not options["wget"]:
-        p = urllib.urlopen(url).read()
-        if p.find("<title>404") != -1:
-            return None
-        open(f, 'w').write(p)
-    else:
-        e = os.system("%s -c -O %s %s" %
-                      (options["wget"], f + ".partial", url))
-        if e:
-            return None
-        os.rename(f + ".partial", f)
-
-    return 1
-
-def verify(url, f, sign):
-    if options["no-gpg"] or options["dry-run"] or not options["gpg-path"]:
-        return 1
-
-    sf = f + sign
-    if not download(url + sign, sf):
-        error("signature download failed")
-        error("removing files...")
-        os.unlink(f)
-        return 0
-
-    qprint("Verifying signature...")
-    r = os.system("%s --verify %s %s" % (options["gpg-path"], sf, f))
-    if r:
-        error("gpg returned %d" % r)
-        error("removing files...")
-        os.unlink(f)
-        os.unlink(sf)
-        return 0
-
-    return 1
-
-def trydownload(urls, f, sign):
-    for url in urls:
-        if download(url, f):
-            if not sign or verify(url, f, sign):
-                return f
-        if url[-4:] == ".bz2":
-            f2 = f[:-4] + ".gz"
-            url2 = url[:-4] + ".gz"
-            if download(url2, f2):
-                if not sign or verify(url2, f2, sign):
-                    return f2
-    return None
-
-def get_patch(ver):
-    """Return the path to patch for given ver, downloading if necessary"""
-    f = patch_path(ver)
-    if os.path.exists(f):
-        return f
-    if f[-4:] == ".bz2":
-        f2 = f[:-4] + ".gz"
-        if os.path.exists(f2):
-            return f2
-
-    urls = version_urls(ver)
-    sign = find_info(ver)[3]
-    if sign == 1: sign = ".sign"
-    f = trydownload(urls, f, sign)
-    if not f:
-        error("patch download failed")
-        sys.exit(-1)
-
-    return f
-
-def apply_patch(ver, reverse = 0):
-    """Find the patch to upgrade from the predecessor of ver to ver and
-    apply or reverse it."""
-    p = get_patch(ver)
-    r = ""
-    if reverse:
-        r = " -R"
-
-    qprint("Applying %s%s" % (os.path.basename(p), r))
-    if options["dry-run"]:
-        return ver
-
-    def cmd(patch, reverse, dry):
-        base = "patch -l -p1%s" % reverse
-        if dry:
-            base += " --dry-run"
-
-        if p[-4:] == ".bz2":
-            pipe = "bzcat %s | %s" % (patch, base)
-        elif p[-3:] == ".gz":
-            pipe = "zcat %s | %s" % (patch, base)
-        else:
-            pipe = "%s < %s" % (base, patch)
-
-        err = os.system(pipe + " > .patchdiag")
-        if err:
-            sys.stderr.write(open(".patchdiag").read())
-        os.unlink(".patchdiag")
-        return err
-
-    err = cmd(p, r, 1)
-    if err:
-        error("patch %s failed: %d" % (p, err))
-        sys.exit(-1)
-
-    err = cmd(p, r, 0)
-    if err:
-        error("patch %s failed while it was supposed to apply: %d" % (p, err))
-        sys.exit(-1)
-
-def untar(tarfile):
-    old = os.getcwd()
-    os.mkdir("ketchup-tmp")
-    os.chdir("ketchup-tmp")
-
-    err = os.system("bzcat %s | tar -xf -" % tarfile)
-    if err:
-        error("Unpacking failed: ", err)
-        sys.exit(-1)
-
-    err = os.system("mv linux*/* linux*/.[^.]* ..; rmdir linux*")
-    if err:
-        error("Unpacking failed: ", err)
-        sys.exit(-1)
-
-    os.chdir(old)
-    shutil.rmtree("ketchup-tmp")
-
-def install_nearest(ver):
-    t = tree(ver)
-    tarballs = glob.glob(archive + "/linux-%s.*.tar.bz2" % t)
-    list = []
-
-    for f in tarballs:
-        m = re.match(r'.*/linux-(.*).tar.bz2$', f)
-        v = m.group(1)
-        d = abs(rev(v) - rev(ver))
-        list.append((d, f, v))
-    list.sort()
-
-    if not list or (options["full-tarball"] and list[0][0]):
-        f = "linux-%s.tar.bz2" % ver
-        url = "%s/v%s/%s" % (kernel_url, t, f)
-        f = archive + "/" + f
-
-        sign = find_info(ver)[3]
-        if sign == 1: sign = ".sign"
-
-        f = trydownload([url], f, sign)
-        if not f:
-            error("Tarball download failed")
-            sys.exit(-1)
-
-    else:
-        f = list[0][1]
-        ver = list[0][2]
-
-    qprint("Unpacking %s" % os.path.basename(f))
-    if options["dry-run"]: return ver
-    untar(f)
-
-    return ver
-
-def find_ver(ver):
-    if ver in version_info.keys():
-        v = version_info[ver]
-        d = v[1]
-        if type(d) is type([]):
-            d = d[0]
-        for n in range(5):
-            return v[0](os.path.dirname(d), v[2])
-            error('retrying version lookup for %s' % ver)
-    else:
-        return ver
-
-def transform(a, b):
-    if a == b:
-        qprint("Nothing to do!")
-        return
-    if not a:
-        a = install_nearest(base(b))
-    t = tree(a)
-    if t != tree(b):
-        error("Can't patch %s to %s" % (tree(a), tree(b)))
-        sys.exit(-1)
-    if fork(a):
-        apply_patch(a, 1)
-        a = prebase(a)
-    if prebase(a) != prebase(b):
-        if pre(a):
-            apply_patch(a, 1)
-            a = base(a)
-
-        if post(a) and post(a) != post(b):
-            apply_patch(prebase(a), 1)
-
-        ra, rb = rev(a), rev(b)
-        if ra > rb:
-            for r in range(ra, rb, -1):
-                apply_patch("%s.%s" % (t, r), -1)
-        if ra < rb:
-            for r in range(ra + 1, rb + 1):
-                apply_patch("%s.%s" % (t, r))
-        a = revbase(b)
-
-        if post(b) and post(a) != post(b):
-            apply_patch(prebase(b), 0)
-            a = base(b)
-
-        if pre(b):
-            apply_patch(prebase(b))
-            a = prebase(b)
-
-    if fork(b):
-        a = apply_patch(b)
-
-def rename_dir(v):
-    """Rename the current directory to linux-v, where v is the function arg"""
-    if rename_with_localversion:
-        v += get_localversion()
-    cwd = os.getcwd()
-    basedir = os.path.dirname(cwd)
-    newdir = os.path.join(basedir, rename_prefix + v)
-    if newdir == cwd:
-        return
-    if os.access(newdir, os.F_OK):
-        error("Cannot rename directory, destination exists: %s", newdir);
-        return
-    os.rename(cwd, newdir)
-    qprint('Current directory renamed to %s' % newdir)
-
-
-# latest lookup function, canonical urls, pattern for lookup function,
-#  signature flag, description
-version_info = {
-    '2.4': (latest_dir,
-            kernel_url + "/v2.4" + "/patch-%(base)s.bz2",
-            r'patch-(.*?).bz2',
-            1, "old stable kernel series"),
-    '2.4-pre': (latest_dir,
-                kernel_url + "/v2.4" + "/testing/patch-%(prebase)s.bz2",
-                r'patch-(.*?).bz2',
-                1, "old stable kernel series prereleases"),
-    '2.6': (latest_dir,
-            kernel_url + "/v2.6" + "/patch-%(prebase)s.bz2",
-            r'patch-(.*?).bz2',
-            1, "current stable kernel series"),
-    '2.6-rc': (latest_dir,
-                kernel_url + "/v2.6" + "/testing/patch-%(prebase)s.bz2",
-                r'patch-(.*?).bz2',
-                1, "current stable kernel series prereleases"),
-    '2.6-pre': (latest_dir,
-                kernel_url + "/v2.6" + "/testing/patch-%(prebase)s.bz2",
-                r'patch-(.*?).bz2',
-                1, "current stable kernel series prereleases"),
-    '2.6-git': (latest_dir,
-                [kernel_url + "/v2.6" + "/snapshots/patch-%(full)s.bz2",
-                 kernel_url + "/v2.6" + "/snapshots/old/patch-%(full)s.bz2"],
-                r'patch-(.*?).bz2',
-                1, "current stable kernel series snapshots"),
-    '2.6-bk': (latest_dir,
-               [kernel_url + "/v2.6" + "/snapshots/patch-%(full)s.bz2",
-                kernel_url + "/v2.6" + "/snapshots/old/patch-%(full)s.bz2"],
-               r'patch-(.*?).bz2',
-               1, "old stable kernel series snapshots"),
-    '2.6-tip': (latest_26_tip, "", "", 1,
-                "current stable kernel series tip"),
-    '2.6-mm': (latest_mm,
-               kernel_url + "/people/akpm/patches/" +
-               "%(tree)s/%(prebase)s/%(full)s/%(full)s.bz2", "",
-               1, "Andrew Morton's -mm development tree"),
-    '2.6-tiny': (latest_dir,
-                 "http://www.selenic.com/tiny/%(full)s.patch.bz2",
-                 r'(2.6.*?).patch.bz2',
-                 1, "Matt Mackall's -tiny tree for small systems"),
-    '2.6-mjb': (latest_mjb,
-                 kernel_url + "/people/mbligh/%(prebase)s/patch-%(full)s.bz2",
-                 r'patch-(2.6.*?).bz2',
-                 1, "Martin Bligh's random collection 'o crap"),
-    '2.6-rt': (latest_dir,
-               ["http://people.redhat.com/mingo/" +
-                "realtime-preempt/patch-%(full)s",
-                "http://people.redhat.com/mingo/" +
-                "realtime-preempt/older/patch-%(full)s"],
-               r'patch-(2.6.*?)',
-               0, "Ingo Molnar's realtime-preempt kernel"),
-    '2.6-ck': (latest_ck,
-               ["http://ck.kolivas.org/patches/2.6/" +
-                "%(prebase)s/%(full)s/patch-%(full)s.bz2",
-                "http://ck.kolivas.org/patches/2.6/pre-releases/" +
-                "%(prebase)s/%(full)s/patch-%(full)s.bz2"],
-               "", ".sig",
-               "Con Kolivas' patches for system responsiveness (desktop)"),
-    '2.6-cks': (latest_dir,
-                "http://ck.kolivas.org/patches/cks/patch-%(full)s.bz2",
-                r'patch-(2.6.*?).bz2', ".sig",
-                "Con Kolivas' patches for system responsiveness (server)")
-    }
-
-# Override defaults with ~/.ketchuprc which is just a Python script
-rcpath = os.path.expanduser('~/.ketchuprc')
-if os.path.isfile(rcpath):
-    try:
-        execfile(rcpath)
-    except Exception, e:
-        sys.exit('Failed parsing %s\nError was: %s' % (rcpath, e))
-
-# Add local trees
-for k,v in local_trees.items():
-    version_info[k] = v
-
-# Environment variables override defaults and ketchuprc
-kernel_url = os.environ.get("KETCHUP_URL", kernel_url)
-archive = os.environ.get("KETCHUP_ARCH", archive)
-
-# And finally command line overrides everything
-if not os.path.exists(wget): wget = ""
-if not os.path.exists(gpg): gpg = ""
-
-options = {}
-opts = [
-    ('a', 'archive', archive, 'cache directory'),
-    ('d', 'directory', '.', 'directory to update'),
-    ('f', 'full-tarball', None, 'if unpacking a tarball, download the latest'),
-    ('g', 'gpg-path', gpg, 'path for GnuPG'),
-    ('G', 'no-gpg', None, 'disable GPG signature verification'),
-    ('k', 'kernel-url', kernel_url, 'base url for kernel.org mirror'),
-    ('l', 'list-trees', None, 'list supported trees'),
-    ('m', 'show-makefile', None, 'output version in makefile <arg>'),
-    ('n', 'dry-run', None, 'don\'t download or apply patches'),
-    ('p', 'show-previous', None, 'output version previous to <arg>'),
-    ('q', 'quiet', None, 'reduce output'),
-    ('r', 'rename-directory', None, 'rename updated directory to %s<v>'
-     % rename_prefix),
-    ('s', 'show-latest', None, 'output the latest version of <arg>'),
-    ('u', 'show-url', None, 'output URL for <arg>'),
-    ('w', 'wget', wget, 'command to use for wget'),
-    ]
-
-args = fancyopts(sys.argv[1:], opts, options,
-                 'ketchup [options] [ver]')
-
-archive = options["archive"]
-kernel_url = options["kernel-url"]
-if options["no-gpg"]: options["gpg-path"] = ''
-
-# Process args
-
-if not os.path.exists(options["directory"]):
-    qprint("Creating target directory", options["directory"])
-    os.mkdir(options["directory"])
-os.chdir(options["directory"])
-
-if os.path.isfile(".ketchuprc"):
-    try:
-        execfile(".ketchuprc")
-    except Exception, e:
-        sys.exit('Failed parsing .ketchuprc\nError was: %s' % (e))
-
-if options["list-trees"]:
-    l = version_info.keys()
-    l.sort()
-    for tree in l:
-	if version_info[tree][3] == 0:
-	   lprint(tree, "(unsigned)")
-        else:
-	   lprint(tree, "(signed)")
-        lprint(" " + version_info[tree][4])
-    sys.exit(0)
-
-if options["show-makefile"] and len(args) < 2:
-    if not args:
-        lprint(get_ver("Makefile"))
-    else:
-        lprint(get_ver(args[0]))
-    sys.exit(0)
-
-if len(args) == 0 and default_tree:
-    qprint("Using default tree \"%s\"" % (default_tree))
-    args.append(default_tree)
-
-if len(args) != 1:
-    error("No version given on command line and no default in configuration")
-    sys.exit(-1)
-
-if options["show-latest"]:
-    lprint(find_ver(args[0]))
-    sys.exit(0)
-
-if options["show-url"]:
-    lprint(version_urls(find_ver(args[0]))[0])
-    sys.exit(0)
-
-if options["show-previous"]:
-    v = find_ver(args[0])
-    p = prebase(v)
-    if p == v: p = base(v)
-    if p == v:
-        if rev(v) > 0: p = "%.1f.%s" % (tree(v), rev(v) -1)
-        else: p = "unknown"
-    lprint(p)
-    sys.exit(0)
-
-if not os.path.exists(options["archive"]):
-    qprint("Creating cache directory", options["archive"])
-    os.mkdir(options["archive"])
-
-if precommand and os.system(precommand):
-    sys.exit('Precommand "%s" failed!' % precommand)
-
-try:
-    a = get_ver('Makefile')
-except:
-    a = None
-
-if not a and os.listdir("."):
-    error("Can't find kernel version for non-empty directory")
-    sys.exit(-1)
-
-b = find_ver(args[0])
-qprint("%s -> %s" % (a, b))
-transform(a, b)
-if options["rename-directory"] and not options["dry-run"]:
-    rename_dir(b)
-
-if postcommand and os.system(postcommand):
-    sys.exit('Postcommand "%s" failed!' % postcommand)
diff --git a/buildconfigs/mk.linux-2.6 b/buildconfigs/mk.linux-2.6
deleted file mode 100644
index 6b8d989..0000000
--- a/buildconfigs/mk.linux-2.6
+++ /dev/null
@@ -1,10 +0,0 @@
-XEN_LINUX_SOURCE ?= tarball
-LINUX_VER ?= 2.6
-
-IMAGE_TARGET ?= vmlinux bzImage
-
-XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
-
-EXTRAVERSION ?=
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-common b/buildconfigs/mk.linux-2.6-common
deleted file mode 100644
index e8e97fb..0000000
--- a/buildconfigs/mk.linux-2.6-common
+++ /dev/null
@@ -1,154 +0,0 @@
-LINUX_SERIES = 2.6
-
-# Linux search path, will be searched for tarballs and mercurial
-# repositories.
-LINUX_SRC_PATH ?= .:..
-
-# The source directory is not automatically updated to avoid blowing
-# away developer's changes. If you want to automatically pull a new
-# version of the Linux tree then add `XEN_LINUX_UPDATE=y' to your make
-# command line.
-ifeq ($(XEN_LINUX_UPDATE),y)
-__XEN_LINUX_UPDATE = $(LINUX_SRCDIR)/.force-update
-else
-__XEN_LINUX_UPDATE =
-endif
-
-ifeq ($(XEN_LINUX_NONINTERACTIVE_CONFIG),y)
-__NONINT_CONFIG = yes $$'\n' |
-else
-__NONINT_CONFIG =
-endif
-
-LINUX_DIR     = build-linux-$(LINUX_VER)$(EXTRAVERSION)_$(XEN_TARGET_ARCH)
-
-IMAGE_TARGET ?= vmlinuz
-
-LINUX_VER3  := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
-
-.PHONY: _build
-_build: build
-
--include buildconfigs/src.$(XEN_LINUX_SOURCE)
-
-LINUX_ARCH = $$(sh buildconfigs/select-linux-arch $(LINUX_SRCDIR))
-IMAGE_PATH = $$(sh buildconfigs/select-linux-image $(LINUX_DIR) $(LINUX_ARCH) $(IMAGE_TARGET))
-
-INSTALL_BOOT_PATH := $(DESTDIR)/boot
-
-# Default to allowing interface mismatch
-ifndef XEN_LINUX_ALLOW_INTERFACE_MISMATCH
-XEN_LINUX_ALLOW_INTERFACE_MISMATCH := y
-endif
-
-KERNELRELEASE = $(shell $(MAKE) -s --no-print-directory -C $(LINUX_DIR) kernelrelease)
-
-# The real action starts here!
-.PHONY: build
-build: $(LINUX_DIR)/include/linux/autoconf.h
-ifneq ($(XEN_LINUX_ALLOW_INTERFACE_MISMATCH),y)
-	@if ! diff -urN -X buildconfigs/interface.exclude \
-              $(LINUX_SRCDIR)/include/xen/interface xen/include/public ; then \
-		echo "" 1>&2 ; \
-		echo " *** $(LINUX_SRCDIR)/include/xen/interface is out of date " 1>&2 ; \
-		echo " *** relative to $(XEN_ROOT)/xen/include/public." 1>&2 ; \
-		echo "" 1>&2 ; \
-		exit 1 ; \
-	fi
-endif
-	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
-	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules || exit 1 ; \
-	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
-	fi
-	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) $(IMAGE_TARGET)
-	mkdir -p $(INSTALL_BOOT_PATH)
-	@cp -v $(IMAGE_PATH) $(INSTALL_BOOT_PATH)/vmlinuz-$(KERNELRELEASE)
-	@cp -v $(LINUX_DIR)/.config $(INSTALL_BOOT_PATH)/config-$(KERNELRELEASE)
-	@cp -v $(LINUX_DIR)/System.map $(INSTALL_BOOT_PATH)/System.map-$(KERNELRELEASE)
-
-$(LINUX_DIR)/include/linux/autoconf.h: CONFIG_FILE=$(CURDIR)/$(LINUX_DIR)/.config
-$(LINUX_DIR)/include/linux/autoconf.h: $(LINUX_SRCDIR)/.valid-src
-	rm -rf $(LINUX_DIR)
-	mkdir -p $(LINUX_DIR)
-	# Re-use config from install dir if one exists. Next try to use
-	# buildconfigs/create_config.sh is one is provided by the source
-	# tree. Finally attempt to use make defconfig.
-	set -e ; \
-	CONFIG_VERSION=$$(sed -ne 's/$$(XENGUEST)//; s/^EXTRAVERSION = //p' $(LINUX_SRCDIR)/Makefile); \
-	if [ ! -z "$(XEN_LINUX_CONFIG)" -a -r "$(XEN_LINUX_CONFIG)" ]; then \
-	  cp $(XEN_LINUX_CONFIG) $(CONFIG_FILE); \
-	elif [ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION$(EXTRAVERSION) ] ; then \
-	  cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION$(EXTRAVERSION) $(CONFIG_FILE) ; \
-        elif [ -e $(LINUX_SRCDIR)/buildconfigs/create_config.sh ] ; then \
-	  cd $(LINUX_SRCDIR) && sh buildconfigs/create_config.sh \
-		$(CONFIG_FILE) $(EXTRAVERSION) $(XEN_TARGET_ARCH) $(XEN_SYSTYPE) ; \
-          echo "Configured $(LINUX_DIR) using create_config.sh" ; \
-	elif $(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) defconfig O=$$(/bin/pwd)/$(LINUX_DIR) ; then \
-	  echo "Configured $(LINUX_DIR) using defconfig" ; \
-	else \
-          echo "No configuration method found for this kernel" ; \
-	fi
-ifneq ($(XEN_LINUX_CONFIG_UPDATE),)
-	echo "Updating $(CONFIG_FILE) using $(XEN_LINUX_CONFIG_UPDATE)"
-	sh $(XEN_LINUX_CONFIG_UPDATE) $(CONFIG_FILE)
-endif
-ifeq ($(XEN_TARGET_ARCH),x86_32)
-	sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
-endif
-ifneq ($(EXTRAVERSION),)
-	echo "$(EXTRAVERSION)" >$(LINUX_DIR)/localversion-xen
-endif
-	$(__NONINT_CONFIG) $(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) oldconfig O=$$(/bin/pwd)/$(LINUX_DIR)
-	@set -e ; if [ ! -f $(LINUX_DIR)/Makefile ] ; then \
-	    echo "==================================="; \
-	    echo "oldconfig did not create a Makefile"; \
-	    echo "Generating $(LINUX_DIR)/Makefile   "; \
-	    echo "==================================="; \
-	    ( echo "# Automatically generated: don't edit"; \
-	      echo ""; \
-	      echo "VERSION = 2"; \
-	      echo "PATCHLEVEL = 6"; \
-	      echo ""; \
-	      echo "KERNELSRC    := $(CURDIR)/$(LINUX_SRCDIR)"; \
-	      echo "KERNELOUTPUT := $(CURDIR)/$(LINUX_DIR)"; \
-	      echo ""; \
-	      echo "MAKEFLAGS += --no-print-directory"; \
-	      echo ""; \
-	      echo ".PHONY: all \$$(MAKECMDGOALS)"; \
-	      echo ""; \
-	      echo "all:"; \
-	      echo "	\$$(MAKE) -C \$$(KERNELSRC) O=\$$(KERNELOUTPUT)"; \
-	      echo ""; \
-	      echo "Makefile:;"; \
-	      echo ""; \
-	      echo "\$$(filter-out all Makefile,\$$(MAKECMDGOALS)) %/:"; \
-	      echo "	\$$(MAKE) -C \$$(KERNELSRC) O=\$$(KERNELOUTPUT) \$$@"; \
-	    ) > $(LINUX_DIR)/Makefile ; \
-	fi
-	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) prepare
-
-.PHONY: prep
-prep: $(LINUX_DIR)/include/linux/autoconf.h
-
-.PHONY: config
-config: CONFIGMODE = menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
-
-.PHONY: clean
-clean::
-	[ ! -d $(LINUX_DIR) ] || \
-		$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
-
-.PHONY: delete
-delete: 
-	rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR) $(LINUX_SRCDIR)
-
-.PHONY: mrproper
-mrproper:
-	rm -rf $(LINUX_SRCDIR)
-	rm -f linux-$(LINUX_VER).tar.bz2
-
-.PHONY: $(LINUX_SRCDIR)/.force-update
-$(LINUX_SRCDIR)/.force-update:
-	@ :
diff --git a/buildconfigs/mk.linux-2.6-git b/buildconfigs/mk.linux-2.6-git
deleted file mode 100644
index 1a142dd..0000000
--- a/buildconfigs/mk.linux-2.6-git
+++ /dev/null
@@ -1,2 +0,0 @@
-LINUX_VER ?= 2.6-git
-include buildconfigs/mk.linux-2.6
diff --git a/buildconfigs/mk.linux-2.6-mm b/buildconfigs/mk.linux-2.6-mm
deleted file mode 100644
index f02e864..0000000
--- a/buildconfigs/mk.linux-2.6-mm
+++ /dev/null
@@ -1,2 +0,0 @@
-LINUX_VER ?= 2.6-mm
-include buildconfigs/mk.linux-2.6
diff --git a/buildconfigs/mk.linux-2.6-native b/buildconfigs/mk.linux-2.6-native
deleted file mode 100644
index c7c0949..0000000
--- a/buildconfigs/mk.linux-2.6-native
+++ /dev/null
@@ -1,5 +0,0 @@
-EXTRAVERSION = -native
-IMAGE_TARGET = bzImage
-INSTALL_BOOT_PATH = $(DESTDIR)/boot
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-pvops b/buildconfigs/mk.linux-2.6-pvops
deleted file mode 100644
index 59cae79..0000000
--- a/buildconfigs/mk.linux-2.6-pvops
+++ /dev/null
@@ -1,17 +0,0 @@
-XEN_LINUX_SOURCE ?= git-clone
-LINUX_VER ?= 2.6-pvops
-
-IMAGE_TARGET ?= bzImage
-
-XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
-
-ifeq ($(GIT_HTTP),y)
-XEN_LINUX_GIT_URL ?= http://www.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
-else
-XEN_LINUX_GIT_URL ?= git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git
-endif
-XEN_LINUX_GIT_REMOTEBRANCH ?= xen/stable-2.6.32.x
-
-EXTRAVERSION ?=
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-rc b/buildconfigs/mk.linux-2.6-rc
deleted file mode 100644
index 34f4513..0000000
--- a/buildconfigs/mk.linux-2.6-rc
+++ /dev/null
@@ -1,2 +0,0 @@
-LINUX_VER ?= 2.6-rc
-include buildconfigs/mk.linux-2.6
diff --git a/buildconfigs/mk.linux-2.6-tip b/buildconfigs/mk.linux-2.6-tip
deleted file mode 100644
index 0588ad2..0000000
--- a/buildconfigs/mk.linux-2.6-tip
+++ /dev/null
@@ -1,2 +0,0 @@
-LINUX_VER ?= 2.6-tip
-include buildconfigs/mk.linux-2.6
diff --git a/buildconfigs/mk.linux-2.6-tip-latest b/buildconfigs/mk.linux-2.6-tip-latest
deleted file mode 100644
index 2a0b9af..0000000
--- a/buildconfigs/mk.linux-2.6-tip-latest
+++ /dev/null
@@ -1,17 +0,0 @@
-XEN_LINUX_SOURCE ?= git-clone
-LINUX_VER ?= 2.6-x86-latest
-
-IMAGE_TARGET ?= bzImage vmlinux
-
-XEN_LINUX_CONFIG_UPDATE := buildconfigs/enable-xen-config
-
-ifeq ($(GIT_HTTP),y)
-XEN_LINUX_GIT_URL ?= http://www.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git
-else
-XEN_LINUX_GIT_URL ?= git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip.git
-endif
-XEN_LINUX_GIT_REMOTEBRANCH ?= auto-latest
-
-EXTRAVERSION ?=
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-xen b/buildconfigs/mk.linux-2.6-xen
deleted file mode 100644
index 8594b55..0000000
--- a/buildconfigs/mk.linux-2.6-xen
+++ /dev/null
@@ -1,6 +0,0 @@
-EXTRAVERSION ?= -xen
-LINUX_VER    ?= 2.6.18
-
-XEN_LINUX_SOURCE ?= hg-clone
-
-include buildconfigs/mk.linux-2.6-common
diff --git a/buildconfigs/mk.linux-2.6-xen0 b/buildconfigs/mk.linux-2.6-xen0
deleted file mode 100644
index 96a5712..0000000
--- a/buildconfigs/mk.linux-2.6-xen0
+++ /dev/null
@@ -1,2 +0,0 @@
-EXTRAVERSION = -xen0
-include buildconfigs/mk.linux-2.6-xen
diff --git a/buildconfigs/mk.linux-2.6-xenU b/buildconfigs/mk.linux-2.6-xenU
deleted file mode 100644
index 02f3e07..0000000
--- a/buildconfigs/mk.linux-2.6-xenU
+++ /dev/null
@@ -1,2 +0,0 @@
-EXTRAVERSION = -xenU
-include buildconfigs/mk.linux-2.6-xen
diff --git a/buildconfigs/select-linux-arch b/buildconfigs/select-linux-arch
deleted file mode 100755
index a5d0856..0000000
--- a/buildconfigs/select-linux-arch
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-ME=$(basename $0)
-
-if [ $# -lt 1 ] || [ $# -gt 2 ] ; then
-    echo "usage: $ME <linux-build-directory>" 1>&2
-    exit 1;
-fi
-
-LINUX_DIR=$1
-
-case ${XEN_TARGET_ARCH} in
-    x86_32|x86_64)
-	if [ -d ${LINUX_DIR}/arch/x86 ] ; then
-	    ARCH=x86
-	elif [ "${XEN_TARGET_ARCH}" = "x86_32" ] ; then
-	    ARCH=i386
-	else
-	    ARCH=x86_64
-	fi
-	;;
-    *)
-	ARCH=${XEN_TARGET_ARCH}
-	;;
-esac
-
-echo "$ME: ${ARCH}" 1>&2
-echo ${ARCH}
-
-exit 0
diff --git a/buildconfigs/select-linux-image b/buildconfigs/select-linux-image
deleted file mode 100755
index 07899f8..0000000
--- a/buildconfigs/select-linux-image
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-ME=$(basename $0)
-
-if [ $# -lt 3 ] ; then
-    echo "usage: $ME <linux-build-directory> <linux-arch> <linux-targets...>" 1>&2
-    exit 1;
-fi
-
-LINUX_DIR=$1
-LINUX_ARCH=$2
-LINUX_TARGET=$3 # We don't care about second and subsequent targets
-
-case ${XEN_TARGET_ARCH} in
-    ia64)
-	IMAGE=${LINUX_DIR}/arch/ia64/hp/sim/boot/vmlinux.gz
-	;;
-    *)
-	if [ -f ${LINUX_DIR}/arch/${LINUX_ARCH}/boot/${LINUX_TARGET} ] ; then
-	    IMAGE=${LINUX_DIR}/arch/${LINUX_ARCH}/boot/${LINUX_TARGET}
-	elif [ -f ${LINUX_DIR}/${LINUX_TARGET} ] ; then
-	    IMAGE=${LINUX_DIR}/${LINUX_TARGET}
-	else
-	    echo "$ME: cannot determine Linux image to use for ${LINUX_ARCH} in ${LINUX_DIR}" 1>&2
-	    exit 1
-	fi
-	;;
-esac
-
-echo "$ME: ${IMAGE}" 1>&2
-echo ${IMAGE}
-
-exit 0
diff --git a/buildconfigs/select-repository b/buildconfigs/select-repository
deleted file mode 100755
index 48ae00f..0000000
--- a/buildconfigs/select-repository
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-ME=$(basename $0)
-
-if [ $# -lt 1 ] || [ $# -gt 2 ] ; then
-    echo "usage: $ME <repository-name> [search-path]" 1>&2
-    exit 1;
-fi
-
-REPO=$1
-LINUX_SRC_PATH=$2
-
-if [ X"${LINUX_SRC_PATH}" != X ] ; then
-    echo "$ME: Searching \`${LINUX_SRC_PATH}' for $REPO" 1>&2
-    IFS_saved="$IFS"
-    IFS=:
-    for i in $LINUX_SRC_PATH ; do
-	# Ignore current directory since we will almost certainly find
-	# the target directory there which breaks updating (there's no
-	# point updating from yourself!).
-	if [ X"." = X"${i}" ] ; then
-	    echo "$ME: Ignoring \`.'" 1>&2
-	    continue
-	fi
-
-	if [ -d "$i/$REPO/.hg" ] ; then
-	    echo "$ME: Found $i/$REPO" 1>&2
-	    echo "$i/$REPO"
-	    exit 0
-	fi
-    done
-    IFS="$IFS_saved"
-fi
-
-if [ -d ${XEN_ROOT}/.hgxxx ] ; then
-    XEN=$(hg -R ${XEN_ROOT} path default)
-    if [ $? -ne 0 ] || [ X"$XEN" = "X" ] ; then
-	echo "$ME: Unable to determine Xen repository parent." 1>&2
-	exit 1;
-    fi
-
-    BASE=$(dirname ${XEN})
-    if [ $? -ne 0 ] || [ X"$BASE" = "X" ] ; then
-	echo "$ME: Unable to determine Xen repository base." 1>&2
-	exit 1;
-    fi
-    if [ -d "$XEN" ] && [ ! -d "$BASE/$REPO" ] ; then
-	echo "$ME: No such dir: $BASE/$REPO" 1>&2
-	exit 1
-    fi
-
-    echo "$ME: Found ${BASE}/${REPO}" 1>&2
-
-    # If ${BASE}/${REPO} is a local directory then prepend file:// so that
-    # the test in src.hg-clone will fail and we will clone instead of
-    # linking this repository. We only want to link repositories which
-    # were found via LINUX_SRC_PATH.
-    if [ -d "${BASE}/${REPO}" ] ; then
-	echo "file://${BASE}/${REPO}"
-    else
-	echo ${BASE}/${REPO}
-    fi
-else
-    echo "Unable to determine path to Linux source tree." 1>&2
-    echo "Falling back to linux-2.6.18-xen Mercurial repository." 1>&2
-    echo http://xenbits.xen.org/linux-2.6.18-xen.hg
-fi
-
-exit 0
diff --git a/buildconfigs/src.git-clone b/buildconfigs/src.git-clone
deleted file mode 100644
index 35865e1..0000000
--- a/buildconfigs/src.git-clone
+++ /dev/null
@@ -1,32 +0,0 @@
-# Mercurial
-GIT ?= git
-
-LINUX_SRCDIR ?= linux-$(LINUX_VER).git
-
-# The URL of the remote GIT repository
-ifeq ($(XEN_LINUX_GIT_URL),)
-.ERROR: XEN_LINUX_GIT_URL not specified
-endif
-
-# The branch in the remote repository
-ifeq ($(XEN_LINUX_GIT_REMOTEBRANCH),)
-.ERROR: XEN_LINUX_GIT_REMOTEBRANCH not specified
-endif
-
-XEN_GIT_ORIGIN ?= xen
-
-XEN_LINUX_GIT_LOCALBRANCH ?= $(XEN_LINUX_GIT_REMOTEBRANCH)
-
-# Set XEN_LINUX_GITREV to update to a particlar revision.
-XEN_LINUX_GITREV  ?= $(XEN_GIT_ORIGIN)/$(XEN_LINUX_GIT_REMOTEBRANCH)
-
-$(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
-	set -ex; \
-	if ! [ -d $(LINUX_SRCDIR) ]; then \
-		rm -rf $(LINUX_SRCDIR) $(LINUX_SRCDIR).tmp; \
-		mkdir $(LINUX_SRCDIR).tmp; rmdir $(LINUX_SRCDIR).tmp; \
-		$(GIT) clone -o $(XEN_GIT_ORIGIN) -n $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
-		(cd $(LINUX_SRCDIR).tmp; git checkout -b $(XEN_LINUX_GIT_LOCALBRANCH) $(XEN_LINUX_GITREV) ); \
-		mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \
-	fi
-	touch $@
diff --git a/buildconfigs/src.hg-clone b/buildconfigs/src.hg-clone
deleted file mode 100644
index 0586bc8..0000000
--- a/buildconfigs/src.hg-clone
+++ /dev/null
@@ -1,32 +0,0 @@
-# Mercurial
-HG ?= hg
-
-LINUX_SRCDIR ?= linux-$(LINUX_VER)-xen.hg
-
-# Repository to clone.
-XEN_LINUX_HGREPO ?= $$(sh buildconfigs/select-repository $(LINUX_SRCDIR) $(LINUX_SRC_PATH))
-
-# Set XEN_LINUX_HGREV to update to a particlar revision.
-XEN_LINUX_HGREV  ?= tip
-
-$(LINUX_SRCDIR)/.valid-src: $(__XEN_LINUX_UPDATE)
-	set -e ; \
-	if [ ! -e $(LINUX_SRCDIR)/.hg ] ; then \
-	    __repo=$(XEN_LINUX_HGREPO) ; \
-	    if [ -d $${__repo} ] ; then \
-	        echo "Linking $${__repo} to $(LINUX_SRCDIR)." ; \
-	        ln -s $${__repo} $(LINUX_SRCDIR) ; \
-	    else \
-	        echo "Cloning $${__repo} to $(LINUX_SRCDIR)." ; \
-	        $(HG) clone $${__repo#file://} $(LINUX_SRCDIR) ; \
-	    fi ; \
-	else \
-	    __parent=$$($(HG) -R $(LINUX_SRCDIR) path default) ; \
-	    echo "Pulling changes from $${__parent} into $(LINUX_SRCDIR)." ; \
-	    $(HG) -R $(LINUX_SRCDIR) pull $${__parent} ; \
-	fi
-	set -e ; if [ -n "$(XEN_LINUX_HGREV)" ] ; then \
-	    echo "Updating $(LINUX_SRCDIR) to revision $(XEN_LINUX_HGREV)." ; \
-	    ( cd $(LINUX_SRCDIR) && $(HG) update $(XEN_LINUX_HGREV) ); \
-	fi
-	touch $@
diff --git a/buildconfigs/src.tarball b/buildconfigs/src.tarball
deleted file mode 100644
index 2101e1a..0000000
--- a/buildconfigs/src.tarball
+++ /dev/null
@@ -1,19 +0,0 @@
-XEN_LINUX_MIRROR ?= http://www.kernel.org/pub/linux/kernel/v2.6/
-XEN_LINUX_TARBALL ?= linux-$(LINUX_VER)-xen.tar.bz2
-
-LINUX_SRCDIR ?= linux-$(LINUX_VER)
-
-KETCHUP ?= python buildconfigs/ketchup
-
-vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
-
-# download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
-linux-%.tar.bz2:
-	@echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
-	false wget $(XEN_LINUX_MIRROR)/$@ -O./$@
-
-# XXX create a pristine tree for diff -Nurp convenience
-
-%/.valid-src: $(__XEN_LINUX_UPDATE)
-	$(KETCHUP) -d $(@D) $(LINUX_VER)
-	touch $@ # update timestamp to avoid rebuild
diff --git a/config/Linux.mk b/config/Linux.mk
index 10d84af..b421a1c 100644
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -1,8 +1 @@
 include $(XEN_ROOT)/config/StdGNU.mk
-
-# You may use wildcards, e.g. KERNELS=*2.6*
-KERNELS ?= 
-
-XKERNELS := $(foreach kernel, $(KERNELS), \
-              $(patsubst buildconfigs/mk.%,%, \
-                $(wildcard buildconfigs/mk.$(kernel))) )
diff --git a/configure b/configure
index c2c724a..d5c8500 100755
--- a/configure
+++ b/configure
@@ -592,7 +592,6 @@ SUBSYSTEMS
 docs
 stubdom
 tools
-kernels
 xen
 subdirs
 host_os
@@ -645,7 +644,6 @@ ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 enable_xen
-enable_kernels
 enable_tools
 enable_stubdom
 enable_docs
@@ -654,7 +652,6 @@ enable_docs
 host_alias
 target_alias'
 ac_subdirs_all='xen
-kernels
 tools
 stubdom
 docs'
@@ -1271,7 +1268,6 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-xen           Disable build and install of xen
-  --disable-kernels       Disable build and install of kernels
   --disable-tools         Disable build and install of tools
   --enable-stubdom        Enable build and install of stubdom
   --disable-docs          Disable build and install of docs
@@ -1891,52 +1887,6 @@ fi
 
 
 
-# Check whether --enable-kernels was given.
-if test "${enable_kernels+set}" = set; then :
-  enableval=$enable_kernels;
-
-if test "x$enableval" = "xyes"; then :
-
-
-kernels=y
-SUBSYSTEMS="$SUBSYSTEMS kernels"
-
-
-else
-
-if test "x$enableval" = "xno"; then :
-
-
-kernels=n
-
-
-fi
-
-fi
-
-
-else
-
-
-kernels=y
-SUBSYSTEMS="$SUBSYSTEMS kernels"
-
-
-fi
-
-
-if test -e "kernels/configure"; then :
-
-if test "x$kernels" = "xy" || test "x$kernels" = "x" ; then
-    subdirs="$subdirs kernels"
-
-fi
-
-fi
-
-
-
-
 # Check whether --enable-tools was given.
 if test "${enable_tools+set}" = set; then :
   enableval=$enable_tools;
diff --git a/configure.ac b/configure.ac
index ce06dad..6c14524 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,6 @@ case "$host_cpu" in
 esac
 
 AX_SUBSYSTEM_DEFAULT_ENABLE([xen])
-AX_SUBSYSTEM_DEFAULT_ENABLE([kernels])
 AX_SUBSYSTEM_DEFAULT_ENABLE([tools])
 AX_SUBSYSTEM_CONDITIONAL([stubdom], $arch_enable_stubdom)
 AX_SUBSYSTEM_DEFAULT_ENABLE([docs])
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59: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 1WaNYw-0006rA-Rm; Wed, 16 Apr 2014 10:59:30 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYu-0006pz-77
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:28 +0000
Received: from [85.158.137.68:24334] by server-12.bemta-3.messagelabs.com id
	18/7C-14831-F826E435; Wed, 16 Apr 2014 10:59:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1397645965!7315043!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18491 invoked from network); 16 Apr 2014 10:59:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:59:26 -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 1WaNYq-0000fo-Sv
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYq-0000V5-R8
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:24 +0000
Date: Wed, 16 Apr 2014 10:59:24 +0000
Message-Id: <E1WaNYq-0000V5-R8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: make sure that likely and
	unlikely convert the expression to a boolean
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 e5545fb6d0dc5e2c48b2e450d18246d9bc1ae35b
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Mon Apr 7 12:07:04 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:11:34 2014 +0100

    xen: make sure that likely and unlikely convert the expression to a boolean
    
    According to http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
    __builtin_expect has the prototype:
        long __builtin_expect (long exp, long c)
    
    If sizeof(exp) > sizeof(long) then this will effectively mask off the top bits
    of exp, meaning that the if in "if (unlikey(x))" will see the masked version,
    which might be false when true was expected, likely has the same issue.
    
    This is mostly likely to affect x86_32 and arm32 builds.  x86_32 is not
    present on 4.3 onwards and a quick grep of current staging shows that all the
    existing arm32  uses of both likely and unlikely already pass a boolean. I
    noticed this with an as yet unposted patch which did not have this property.
    
    Also the defintion of likely might not have had the expected affect for cases
    where a true value > 1 might be passed.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Cc: Keir Fraser <keir@xen.org>
    Cc: Tim Deegan <tim@xen.org>
---
 xen/include/xen/compiler.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
index 6e07990..4b3472d 100644
--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -7,8 +7,8 @@
 
 #define barrier()     __asm__ __volatile__("": : :"memory")
 
-#define likely(x)     __builtin_expect((x),1)
-#define unlikely(x)   __builtin_expect((x),0)
+#define likely(x)     __builtin_expect(!!(x),1)
+#define unlikely(x)   __builtin_expect(!!(x),0)
 
 #define inline        __inline__
 #define always_inline __inline__ __attribute__ ((always_inline))
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:31 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59: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 1WaNYw-0006rA-Rm; Wed, 16 Apr 2014 10:59:30 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYu-0006pz-77
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:28 +0000
Received: from [85.158.137.68:24334] by server-12.bemta-3.messagelabs.com id
	18/7C-14831-F826E435; Wed, 16 Apr 2014 10:59:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1397645965!7315043!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18491 invoked from network); 16 Apr 2014 10:59:26 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:59:26 -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 1WaNYq-0000fo-Sv
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNYq-0000V5-R8
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:24 +0000
Date: Wed, 16 Apr 2014 10:59:24 +0000
Message-Id: <E1WaNYq-0000V5-R8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: make sure that likely and
	unlikely convert the expression to a boolean
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 e5545fb6d0dc5e2c48b2e450d18246d9bc1ae35b
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Mon Apr 7 12:07:04 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:11:34 2014 +0100

    xen: make sure that likely and unlikely convert the expression to a boolean
    
    According to http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
    __builtin_expect has the prototype:
        long __builtin_expect (long exp, long c)
    
    If sizeof(exp) > sizeof(long) then this will effectively mask off the top bits
    of exp, meaning that the if in "if (unlikey(x))" will see the masked version,
    which might be false when true was expected, likely has the same issue.
    
    This is mostly likely to affect x86_32 and arm32 builds.  x86_32 is not
    present on 4.3 onwards and a quick grep of current staging shows that all the
    existing arm32  uses of both likely and unlikely already pass a boolean. I
    noticed this with an as yet unposted patch which did not have this property.
    
    Also the defintion of likely might not have had the expected affect for cases
    where a true value > 1 might be passed.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Cc: Keir Fraser <keir@xen.org>
    Cc: Tim Deegan <tim@xen.org>
---
 xen/include/xen/compiler.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
index 6e07990..4b3472d 100644
--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -7,8 +7,8 @@
 
 #define barrier()     __asm__ __volatile__("": : :"memory")
 
-#define likely(x)     __builtin_expect((x),1)
-#define unlikely(x)   __builtin_expect((x),0)
+#define likely(x)     __builtin_expect(!!(x),1)
+#define unlikely(x)   __builtin_expect(!!(x),0)
 
 #define inline        __inline__
 #define always_inline __inline__ __attribute__ ((always_inline))
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59:39 +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 1WaNZ5-0006uS-OT; Wed, 16 Apr 2014 10:59:39 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZ3-0006tr-QW
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:38 +0000
Received: from [193.109.254.147:29627] by server-2.bemta-14.messagelabs.com id
	85/84-21684-9926E435; Wed, 16 Apr 2014 10:59:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1397645975!8679075!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24658 invoked from network); 16 Apr 2014 10:59:36 -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;
	16 Apr 2014 10:59:36 -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 1WaNZ1-0000g6-27
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZ1-0000VW-0B
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:35 +0000
Date: Wed, 16 Apr 2014 10:59:35 +0000
Message-Id: <E1WaNZ1-0000VW-0B@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: arm: improve placement of
	initial modules.
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 6f4ff742a5caa411397fc38233f818e64a0c541c
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 12:51:14 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:13:24 2014 +0100

    tools: arm: improve placement of initial modules.
    
    314c9815e2f5 "tools: implement initial ramdisk support for ARM." broke starting
    guests with <= 128 MB ram by placing the boot modules (dtb and initrd)
    immediately after the kernel in this case, running the risk of them being
    overwritten. Instead place the modules at the end of RAM, as the hypervisor
    does for dom0.
    
    The hypervisor also falls back to placing things before the kernel as a last
    resort before failing, so add that here too.
    
    Tested with the Debian installer initrd and guests of 96MB, 128MB, 256MB and
    1GB. All work, also tested with 64MB but the installer doesn't run with so
    little RAM (but our placement of the initrd is correct).
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxc/xc_dom_arm.c |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
index f051515..60ac51a 100644
--- a/tools/libxc/xc_dom_arm.c
+++ b/tools/libxc/xc_dom_arm.c
@@ -253,8 +253,11 @@ int arch_setup_meminit(struct xc_dom_image *dom)
 
     /* Convenient */
     const uint64_t rambase = dom->rambase_pfn << XC_PAGE_SHIFT;
-    const uint64_t ramend = rambase + ( dom->total_pages << XC_PAGE_SHIFT );
+    const uint64_t ramsize = dom->total_pages << XC_PAGE_SHIFT;
+    const uint64_t ramend = rambase + ramsize;
+    const uint64_t kernbase = dom->kernel_seg.vstart;
     const uint64_t kernend = ROUNDUP(dom->kernel_seg.vend, 21/*2MB*/);
+    const uint64_t kernsize = kernend - kernbase;
     const uint64_t dtb_size = dom->devicetree_blob ?
         ROUNDUP(dom->devicetree_size, XC_PAGE_SHIFT) : 0;
     const uint64_t ramdisk_size = dom->ramdisk_blob ?
@@ -262,6 +265,13 @@ int arch_setup_meminit(struct xc_dom_image *dom)
     const uint64_t modsize = dtb_size + ramdisk_size;
     const uint64_t ram128mb = rambase + (128<<20);
 
+    if ( modsize + kernsize > ramsize )
+    {
+        DOMPRINTF("%s: Not enough memory for the kernel+dtb+initrd",
+                  __FUNCTION__);
+        return -1;
+    }
+
     rc = set_mode(dom->xch, dom->guest_domid, dom->guest_type);
     if ( rc )
         return rc;
@@ -290,17 +300,20 @@ int arch_setup_meminit(struct xc_dom_image *dom)
             0, 0, &dom->p2m_host[i]);
     }
 
-
     /*
-     * Place boot modules at 128MB into RAM if there is enough RAM and
-     * the kernel does not overlap. Otherwise place them immediately
-     * after the kernel. If there is no space after the kernel then
-     * there is insufficient RAM and we fail.
+     * We try to place dtb+initrd at 128MB or if we have less RAM
+     * as high as possible. If there is no space then fallback to
+     * just before the kernel.
+     *
+     * If changing this then consider
+     * xen/arch/arm/kernel.c:place_modules as well.
      */
     if ( ramend >= ram128mb + modsize && kernend < ram128mb )
         modbase = ram128mb;
-    else if ( ramend >= kernend + modsize )
-        modbase = kernend;
+    else if ( ramend - modsize > kernend )
+        modbase = ramend - modsize;
+    else if (kernbase - rambase > modsize )
+        modbase = kernbase - modsize;
     else
         return -1;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59:39 +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 1WaNZ5-0006uS-OT; Wed, 16 Apr 2014 10:59:39 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZ3-0006tr-QW
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:38 +0000
Received: from [193.109.254.147:29627] by server-2.bemta-14.messagelabs.com id
	85/84-21684-9926E435; Wed, 16 Apr 2014 10:59:37 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-27.messagelabs.com!1397645975!8679075!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24658 invoked from network); 16 Apr 2014 10:59:36 -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;
	16 Apr 2014 10:59:36 -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 1WaNZ1-0000g6-27
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZ1-0000VW-0B
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:35 +0000
Date: Wed, 16 Apr 2014 10:59:35 +0000
Message-Id: <E1WaNZ1-0000VW-0B@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: arm: improve placement of
	initial modules.
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 6f4ff742a5caa411397fc38233f818e64a0c541c
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 12:51:14 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:13:24 2014 +0100

    tools: arm: improve placement of initial modules.
    
    314c9815e2f5 "tools: implement initial ramdisk support for ARM." broke starting
    guests with <= 128 MB ram by placing the boot modules (dtb and initrd)
    immediately after the kernel in this case, running the risk of them being
    overwritten. Instead place the modules at the end of RAM, as the hypervisor
    does for dom0.
    
    The hypervisor also falls back to placing things before the kernel as a last
    resort before failing, so add that here too.
    
    Tested with the Debian installer initrd and guests of 96MB, 128MB, 256MB and
    1GB. All work, also tested with 64MB but the installer doesn't run with so
    little RAM (but our placement of the initrd is correct).
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    Cc: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxc/xc_dom_arm.c |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
index f051515..60ac51a 100644
--- a/tools/libxc/xc_dom_arm.c
+++ b/tools/libxc/xc_dom_arm.c
@@ -253,8 +253,11 @@ int arch_setup_meminit(struct xc_dom_image *dom)
 
     /* Convenient */
     const uint64_t rambase = dom->rambase_pfn << XC_PAGE_SHIFT;
-    const uint64_t ramend = rambase + ( dom->total_pages << XC_PAGE_SHIFT );
+    const uint64_t ramsize = dom->total_pages << XC_PAGE_SHIFT;
+    const uint64_t ramend = rambase + ramsize;
+    const uint64_t kernbase = dom->kernel_seg.vstart;
     const uint64_t kernend = ROUNDUP(dom->kernel_seg.vend, 21/*2MB*/);
+    const uint64_t kernsize = kernend - kernbase;
     const uint64_t dtb_size = dom->devicetree_blob ?
         ROUNDUP(dom->devicetree_size, XC_PAGE_SHIFT) : 0;
     const uint64_t ramdisk_size = dom->ramdisk_blob ?
@@ -262,6 +265,13 @@ int arch_setup_meminit(struct xc_dom_image *dom)
     const uint64_t modsize = dtb_size + ramdisk_size;
     const uint64_t ram128mb = rambase + (128<<20);
 
+    if ( modsize + kernsize > ramsize )
+    {
+        DOMPRINTF("%s: Not enough memory for the kernel+dtb+initrd",
+                  __FUNCTION__);
+        return -1;
+    }
+
     rc = set_mode(dom->xch, dom->guest_domid, dom->guest_type);
     if ( rc )
         return rc;
@@ -290,17 +300,20 @@ int arch_setup_meminit(struct xc_dom_image *dom)
             0, 0, &dom->p2m_host[i]);
     }
 
-
     /*
-     * Place boot modules at 128MB into RAM if there is enough RAM and
-     * the kernel does not overlap. Otherwise place them immediately
-     * after the kernel. If there is no space after the kernel then
-     * there is insufficient RAM and we fail.
+     * We try to place dtb+initrd at 128MB or if we have less RAM
+     * as high as possible. If there is no space then fallback to
+     * just before the kernel.
+     *
+     * If changing this then consider
+     * xen/arch/arm/kernel.c:place_modules as well.
      */
     if ( ramend >= ram128mb + modsize && kernend < ram128mb )
         modbase = ram128mb;
-    else if ( ramend >= kernend + modsize )
-        modbase = kernend;
+    else if ( ramend - modsize > kernend )
+        modbase = ramend - modsize;
+    else if (kernbase - rambase > modsize )
+        modbase = kernbase - modsize;
     else
         return -1;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59:49 +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 1WaNZF-0006xU-I6; Wed, 16 Apr 2014 10:59:49 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZE-0006wz-7a
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:48 +0000
Received: from [85.158.137.68:58681] by server-8.bemta-3.messagelabs.com id
	A3/8E-21547-3A26E435; Wed, 16 Apr 2014 10:59:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1397645985!7241539!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1800 invoked from network); 16 Apr 2014 10:59:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:59:46 -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 1WaNZB-0000gC-70
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZB-0000Vs-5k
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:45 +0000
Date: Wed, 16 Apr 2014 10:59:45 +0000
Message-Id: <E1WaNZB-0000Vs-5k@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: use same variables as
	userspace in dom0 builder place_modules()
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 00dea7acf444891f789aad213c871095422fe9d0
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 12:51:15 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:14:35 2014 +0100

    xen: arm: use same variables as userspace in dom0 builder place_modules()
    
    The placement algorithm should be effectively the same and using different
    variable names makes my head hurt when I try to compare.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/kernel.c |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index ae86772..bc625a4 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -65,25 +65,25 @@ void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len)
 }
 
 static void place_modules(struct kernel_info *info,
-                         paddr_t kernel_start,
-                         paddr_t kernel_end)
+                          paddr_t kernbase, paddr_t kernend)
 {
     /* Align DTB and initrd size to 2Mb. Linux only requires 4 byte alignment */
     const paddr_t initrd_len =
         ROUNDUP(early_info.modules.module[MOD_INITRD].size, MB(2));
     const paddr_t dtb_len = ROUNDUP(fdt_totalsize(info->fdt), MB(2));
-    const paddr_t total = initrd_len + dtb_len;
+    const paddr_t modsize = initrd_len + dtb_len;
 
     /* Convenient */
-    const paddr_t mem_start = info->mem.bank[0].start;
-    const paddr_t mem_size = info->mem.bank[0].size;
-    const paddr_t mem_end = mem_start + mem_size;
-    const paddr_t kernel_size = kernel_end - kernel_start;
+    const paddr_t rambase = info->mem.bank[0].start;
+    const paddr_t ramsize = info->mem.bank[0].size;
+    const paddr_t ramend = rambase + ramsize;
+    const paddr_t kernsize = kernend - kernbase;
+    const paddr_t ram128mb = rambase + MB(128);
 
-    paddr_t addr;
+    paddr_t modbase;
 
-    if ( total + kernel_size > mem_size )
-        panic("Not enough memory in the first bank for the dtb+initrd");
+    if ( modsize + kernsize > ramsize )
+        panic("Not enough memory in the first bank for the kernel+dtb+initrd");
 
     /*
      * DTB must be loaded such that it does not conflict with the
@@ -100,19 +100,19 @@ static void place_modules(struct kernel_info *info,
      * just after the kernel, if there is room, otherwise just before.
      */
 
-    if ( kernel_end < MIN(mem_start + MB(128), mem_end - total) )
-        addr = MIN(mem_start + MB(128), mem_end - total);
-    else if ( mem_end - ROUNDUP(kernel_end, MB(2)) >= total )
-        addr = ROUNDUP(kernel_end, MB(2));
-    else if ( kernel_start - mem_start >= total )
-        addr = kernel_start - total;
+    if ( kernend < MIN(ram128mb, ramend - modsize) )
+        modbase = MIN(ram128mb, ramend - modsize);
+    else if ( ramend - ROUNDUP(kernend, MB(2)) >= modsize )
+        modbase = ROUNDUP(kernend, MB(2));
+    else if ( kernbase - rambase >= modsize )
+        modbase = kernbase - modsize;
     else
     {
         panic("Unable to find suitable location for dtb+initrd");
         return;
     }
 
-    info->dtb_paddr = addr;
+    info->dtb_paddr = modbase;
     info->initrd_paddr = info->dtb_paddr + dtb_len;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 10:59:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 10:59:49 +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 1WaNZF-0006xU-I6; Wed, 16 Apr 2014 10:59:49 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZE-0006wz-7a
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:48 +0000
Received: from [85.158.137.68:58681] by server-8.bemta-3.messagelabs.com id
	A3/8E-21547-3A26E435; Wed, 16 Apr 2014 10:59:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-31.messagelabs.com!1397645985!7241539!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1800 invoked from network); 16 Apr 2014 10:59:46 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 10:59:46 -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 1WaNZB-0000gC-70
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:45 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZB-0000Vs-5k
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:45 +0000
Date: Wed, 16 Apr 2014 10:59:45 +0000
Message-Id: <E1WaNZB-0000Vs-5k@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: use same variables as
	userspace in dom0 builder place_modules()
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 00dea7acf444891f789aad213c871095422fe9d0
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 12:51:15 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:14:35 2014 +0100

    xen: arm: use same variables as userspace in dom0 builder place_modules()
    
    The placement algorithm should be effectively the same and using different
    variable names makes my head hurt when I try to compare.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/kernel.c |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index ae86772..bc625a4 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -65,25 +65,25 @@ void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len)
 }
 
 static void place_modules(struct kernel_info *info,
-                         paddr_t kernel_start,
-                         paddr_t kernel_end)
+                          paddr_t kernbase, paddr_t kernend)
 {
     /* Align DTB and initrd size to 2Mb. Linux only requires 4 byte alignment */
     const paddr_t initrd_len =
         ROUNDUP(early_info.modules.module[MOD_INITRD].size, MB(2));
     const paddr_t dtb_len = ROUNDUP(fdt_totalsize(info->fdt), MB(2));
-    const paddr_t total = initrd_len + dtb_len;
+    const paddr_t modsize = initrd_len + dtb_len;
 
     /* Convenient */
-    const paddr_t mem_start = info->mem.bank[0].start;
-    const paddr_t mem_size = info->mem.bank[0].size;
-    const paddr_t mem_end = mem_start + mem_size;
-    const paddr_t kernel_size = kernel_end - kernel_start;
+    const paddr_t rambase = info->mem.bank[0].start;
+    const paddr_t ramsize = info->mem.bank[0].size;
+    const paddr_t ramend = rambase + ramsize;
+    const paddr_t kernsize = kernend - kernbase;
+    const paddr_t ram128mb = rambase + MB(128);
 
-    paddr_t addr;
+    paddr_t modbase;
 
-    if ( total + kernel_size > mem_size )
-        panic("Not enough memory in the first bank for the dtb+initrd");
+    if ( modsize + kernsize > ramsize )
+        panic("Not enough memory in the first bank for the kernel+dtb+initrd");
 
     /*
      * DTB must be loaded such that it does not conflict with the
@@ -100,19 +100,19 @@ static void place_modules(struct kernel_info *info,
      * just after the kernel, if there is room, otherwise just before.
      */
 
-    if ( kernel_end < MIN(mem_start + MB(128), mem_end - total) )
-        addr = MIN(mem_start + MB(128), mem_end - total);
-    else if ( mem_end - ROUNDUP(kernel_end, MB(2)) >= total )
-        addr = ROUNDUP(kernel_end, MB(2));
-    else if ( kernel_start - mem_start >= total )
-        addr = kernel_start - total;
+    if ( kernend < MIN(ram128mb, ramend - modsize) )
+        modbase = MIN(ram128mb, ramend - modsize);
+    else if ( ramend - ROUNDUP(kernend, MB(2)) >= modsize )
+        modbase = ROUNDUP(kernend, MB(2));
+    else if ( kernbase - rambase >= modsize )
+        modbase = kernbase - modsize;
     else
     {
         panic("Unable to find suitable location for dtb+initrd");
         return;
     }
 
-    info->dtb_paddr = addr;
+    info->dtb_paddr = modbase;
     info->initrd_paddr = info->dtb_paddr + dtb_len;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00:00 +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 1WaNZQ-0006zn-1m; Wed, 16 Apr 2014 11:00:00 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZO-0006zT-4U
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:58 +0000
Received: from [193.109.254.147:59313] by server-1.bemta-14.messagelabs.com id
	B0/F1-00839-DA26E435; Wed, 16 Apr 2014 10:59:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1397645995!8674113!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19725 invoked from network); 16 Apr 2014 10:59:56 -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;
	16 Apr 2014 10:59:56 -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 1WaNZL-0000gI-Ck
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZL-0000WE-Az
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:55 +0000
Date: Wed, 16 Apr 2014 10:59:55 +0000
Message-Id: <E1WaNZL-0000WE-Az@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: rework dom0 initrd and dtb
	placement
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 bef15de706d796f0d9f16fd3b69d6b5cada2ce9b
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 12:51:16 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:14:45 2014 +0100

    xen: arm: rework dom0 initrd and dtb placement
    
    This now uses the same decision tree as libxc (which is much easier to test).
    
    The main change is to explicitly handle the placement at 128MB or end of RAM
    as two cases, rather than combining with MIN. The effect is the same but the
    code is clearer.
    
    Secondly the attempt to place the modules right after the kernel is removed,
    since it is redundant with the case where placing them at the end of RAM ends
    up abutting the kernel.
    
    Also round the kernel size up to a 2MB boundary.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/kernel.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index bc625a4..1102392 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -77,7 +77,7 @@ static void place_modules(struct kernel_info *info,
     const paddr_t rambase = info->mem.bank[0].start;
     const paddr_t ramsize = info->mem.bank[0].size;
     const paddr_t ramend = rambase + ramsize;
-    const paddr_t kernsize = kernend - kernbase;
+    const paddr_t kernsize = ROUNDUP(kernend, MB(2)) - kernbase;
     const paddr_t ram128mb = rambase + MB(128);
 
     paddr_t modbase;
@@ -95,16 +95,18 @@ static void place_modules(struct kernel_info *info,
      * If the bootloader provides an initrd, it will be loaded just
      * after the DTB.
      *
-     * We try to place dtb+initrd at 128MB, (or, if we have less RAM,
-     * as high as possible). If there is no space then fallback to
-     * just after the kernel, if there is room, otherwise just before.
+     * We try to place dtb+initrd at 128MB or if we have less RAM
+     * as high as possible. If there is no space then fallback to
+     * just before the kernel.
+     *
+     * If changing this then consider
+     * tools/libxc/xc_dom_arm.c:arch_setup_meminit as well.
      */
-
-    if ( kernend < MIN(ram128mb, ramend - modsize) )
-        modbase = MIN(ram128mb, ramend - modsize);
-    else if ( ramend - ROUNDUP(kernend, MB(2)) >= modsize )
-        modbase = ROUNDUP(kernend, MB(2));
-    else if ( kernbase - rambase >= modsize )
+    if ( ramend >= ram128mb + modsize && kernend < ram128mb )
+        modbase = ram128mb;
+    else if ( ramend - modsize > ROUNDUP(kernend, MB(2)) )
+        modbase = ramend - modsize;
+    else if ( kernbase - rambase > modsize )
         modbase = kernbase - modsize;
     else
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:00 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00:00 +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 1WaNZQ-0006zn-1m; Wed, 16 Apr 2014 11:00:00 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZO-0006zT-4U
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:58 +0000
Received: from [193.109.254.147:59313] by server-1.bemta-14.messagelabs.com id
	B0/F1-00839-DA26E435; Wed, 16 Apr 2014 10:59:57 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1397645995!8674113!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19725 invoked from network); 16 Apr 2014 10:59:56 -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;
	16 Apr 2014 10:59:56 -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 1WaNZL-0000gI-Ck
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZL-0000WE-Az
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 10:59:55 +0000
Date: Wed, 16 Apr 2014 10:59:55 +0000
Message-Id: <E1WaNZL-0000WE-Az@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: rework dom0 initrd and dtb
	placement
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 bef15de706d796f0d9f16fd3b69d6b5cada2ce9b
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 9 12:51:16 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Thu Apr 10 12:14:45 2014 +0100

    xen: arm: rework dom0 initrd and dtb placement
    
    This now uses the same decision tree as libxc (which is much easier to test).
    
    The main change is to explicitly handle the placement at 128MB or end of RAM
    as two cases, rather than combining with MIN. The effect is the same but the
    code is clearer.
    
    Secondly the attempt to place the modules right after the kernel is removed,
    since it is redundant with the case where placing them at the end of RAM ends
    up abutting the kernel.
    
    Also round the kernel size up to a 2MB boundary.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/kernel.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index bc625a4..1102392 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -77,7 +77,7 @@ static void place_modules(struct kernel_info *info,
     const paddr_t rambase = info->mem.bank[0].start;
     const paddr_t ramsize = info->mem.bank[0].size;
     const paddr_t ramend = rambase + ramsize;
-    const paddr_t kernsize = kernend - kernbase;
+    const paddr_t kernsize = ROUNDUP(kernend, MB(2)) - kernbase;
     const paddr_t ram128mb = rambase + MB(128);
 
     paddr_t modbase;
@@ -95,16 +95,18 @@ static void place_modules(struct kernel_info *info,
      * If the bootloader provides an initrd, it will be loaded just
      * after the DTB.
      *
-     * We try to place dtb+initrd at 128MB, (or, if we have less RAM,
-     * as high as possible). If there is no space then fallback to
-     * just after the kernel, if there is room, otherwise just before.
+     * We try to place dtb+initrd at 128MB or if we have less RAM
+     * as high as possible. If there is no space then fallback to
+     * just before the kernel.
+     *
+     * If changing this then consider
+     * tools/libxc/xc_dom_arm.c:arch_setup_meminit as well.
      */
-
-    if ( kernend < MIN(ram128mb, ramend - modsize) )
-        modbase = MIN(ram128mb, ramend - modsize);
-    else if ( ramend - ROUNDUP(kernend, MB(2)) >= modsize )
-        modbase = ROUNDUP(kernend, MB(2));
-    else if ( kernbase - rambase >= modsize )
+    if ( ramend >= ram128mb + modsize && kernend < ram128mb )
+        modbase = ram128mb;
+    else if ( ramend - modsize > ROUNDUP(kernend, MB(2)) )
+        modbase = ramend - modsize;
+    else if ( kernbase - rambase > modsize )
         modbase = kernbase - modsize;
     else
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:35 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00: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 1WaNZz-00073H-H0; Wed, 16 Apr 2014 11:00:35 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZd-00070V-A4
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:30 +0000
Received: from [85.158.139.211:3277] by server-10.bemta-5.messagelabs.com id
	36/A2-27081-CB26E435; Wed, 16 Apr 2014 11:00:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-206.messagelabs.com!1397646010!7585984!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16183 invoked from network); 16 Apr 2014 11:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:00:11 -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 1WaNZa-0000jG-KE
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZV-0000XI-GF
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:05 +0000
Date: Wed, 16 Apr 2014 11:00:05 +0000
Message-Id: <E1WaNZV-0000XI-GF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Change Xen RAS maintainer email
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 2bc2f2d3e819944243dd7ff781f2ee3c19521a08
Author:     Liu Jinsong <jinsong.liu@alibaba-inc.com>
AuthorDate: Thu Apr 10 15:52:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 15:52:56 2014 +0200

    Change Xen RAS maintainer email
    
    ... since Jinsong switched to Alibaba Corp.
    
    Signed-off-by: Liu Jinsong <jinsong.liu@alibaba-inc.com>
---
 MAINTAINERS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 19dd49f..11726ae 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -216,7 +216,7 @@ F:      xen/arch/x86/x86_64/kexec_reloc.S
 
 MACHINE CHECK (MCA) & RAS
 M:	Christoph Egger <chegger@amazon.de>
-M:	Liu Jinsong <jinsong.liu@intel.com>
+M:	Liu Jinsong <jinsong.liu@alibaba-inc.com>
 S:	Supported
 F:	xen/arch/x86/cpu/mcheck/
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:35 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00: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 1WaNZz-00073H-H0; Wed, 16 Apr 2014 11:00:35 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZd-00070V-A4
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:30 +0000
Received: from [85.158.139.211:3277] by server-10.bemta-5.messagelabs.com id
	36/A2-27081-CB26E435; Wed, 16 Apr 2014 11:00:12 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-206.messagelabs.com!1397646010!7585984!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16183 invoked from network); 16 Apr 2014 11:00:11 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:00:11 -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 1WaNZa-0000jG-KE
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:10 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZV-0000XI-GF
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:05 +0000
Date: Wed, 16 Apr 2014 11:00:05 +0000
Message-Id: <E1WaNZV-0000XI-GF@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Change Xen RAS maintainer email
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 2bc2f2d3e819944243dd7ff781f2ee3c19521a08
Author:     Liu Jinsong <jinsong.liu@alibaba-inc.com>
AuthorDate: Thu Apr 10 15:52:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 15:52:56 2014 +0200

    Change Xen RAS maintainer email
    
    ... since Jinsong switched to Alibaba Corp.
    
    Signed-off-by: Liu Jinsong <jinsong.liu@alibaba-inc.com>
---
 MAINTAINERS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 19dd49f..11726ae 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -216,7 +216,7 @@ F:      xen/arch/x86/x86_64/kexec_reloc.S
 
 MACHINE CHECK (MCA) & RAS
 M:	Christoph Egger <chegger@amazon.de>
-M:	Liu Jinsong <jinsong.liu@intel.com>
+M:	Liu Jinsong <jinsong.liu@alibaba-inc.com>
 S:	Supported
 F:	xen/arch/x86/cpu/mcheck/
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:36 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00: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 1WaNa0-00074d-Ei; Wed, 16 Apr 2014 11:00:36 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZo-00070W-8C
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:30 +0000
Received: from [85.158.137.68:40394] by server-11.bemta-3.messagelabs.com id
	76/C3-19438-7C26E435; Wed, 16 Apr 2014 11:00:23 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397646021!7292444!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8812 invoked from network); 16 Apr 2014 11:00:22 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:00:22 -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 1WaNZl-0000jM-Bd
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZk-0000YR-PJ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:21 +0000
Date: Wed, 16 Apr 2014 11:00:20 +0000
Message-Id: <E1WaNZk-0000YR-PJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Change Xen POWER MANAGEMENT maintainer
	email
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 4eb9c9b90ccba96f3160ab830ad0888f99bdae0e
Author:     Liu Jinsong <jinsong.liu@alibaba-inc.com>
AuthorDate: Thu Apr 10 15:53:10 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 15:53:10 2014 +0200

    Change Xen POWER MANAGEMENT maintainer email
    
    ... since Jinsong switched to Alibaba Corp.
    
    Signed-off-by: Liu Jinsong <jinsong.liu@alibaba-inc.com>
---
 MAINTAINERS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 11726ae..06d2368 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -233,7 +233,7 @@ F:	tools/ocaml/
 
 POWER MANAGEMENT
 M:	Jan Beulich <jbeulich@suse.com>
-M:	Liu Jinsong <jinsong.liu@intel.com>
+M:	Liu Jinsong <jinsong.liu@alibaba-inc.com>
 S:	Supported
 F:	xen/arch/x86/acpi/
 X:	xen/arch/x86/acpi/boot.c
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:36 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00: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 1WaNa0-00074d-Ei; Wed, 16 Apr 2014 11:00:36 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZo-00070W-8C
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:30 +0000
Received: from [85.158.137.68:40394] by server-11.bemta-3.messagelabs.com id
	76/C3-19438-7C26E435; Wed, 16 Apr 2014 11:00:23 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397646021!7292444!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 8812 invoked from network); 16 Apr 2014 11:00:22 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:00:22 -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 1WaNZl-0000jM-Bd
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:21 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZk-0000YR-PJ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:21 +0000
Date: Wed, 16 Apr 2014 11:00:20 +0000
Message-Id: <E1WaNZk-0000YR-PJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Change Xen POWER MANAGEMENT maintainer
	email
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 4eb9c9b90ccba96f3160ab830ad0888f99bdae0e
Author:     Liu Jinsong <jinsong.liu@alibaba-inc.com>
AuthorDate: Thu Apr 10 15:53:10 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 15:53:10 2014 +0200

    Change Xen POWER MANAGEMENT maintainer email
    
    ... since Jinsong switched to Alibaba Corp.
    
    Signed-off-by: Liu Jinsong <jinsong.liu@alibaba-inc.com>
---
 MAINTAINERS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 11726ae..06d2368 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -233,7 +233,7 @@ F:	tools/ocaml/
 
 POWER MANAGEMENT
 M:	Jan Beulich <jbeulich@suse.com>
-M:	Liu Jinsong <jinsong.liu@intel.com>
+M:	Liu Jinsong <jinsong.liu@alibaba-inc.com>
 S:	Supported
 F:	xen/arch/x86/acpi/
 X:	xen/arch/x86/acpi/boot.c
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:37 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00:37 +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 1WaNa1-00075Q-OY; Wed, 16 Apr 2014 11:00:37 +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 1WaNZz-00073T-5G
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:35 +0000
Received: from [85.158.143.35:7805] by server-2.bemta-4.messagelabs.com id
	06/DE-06539-2D26E435; Wed, 16 Apr 2014 11:00:34 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1397646031!9441691!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31661 invoked from network); 16 Apr 2014 11:00:32 -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;
	16 Apr 2014 11:00:32 -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 1WaNZv-0000jR-Mi
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:31 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZv-0000ZN-GY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:31 +0000
Date: Wed, 16 Apr 2014 11:00:31 +0000
Message-Id: <E1WaNZv-0000ZN-GY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: force re-evaluation of memory
	type as necessary
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 aa9114edd97b292cd89b3616e3f2089471fd2201
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:01:41 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:01:41 2014 +0200

    x86/EPT: force re-evaluation of memory type as necessary
    
    The main goal here is to drop the bogus dependency of
    epte_get_entry_emt() on d->arch.hvm_domain.params[HVM_PARAM_IDENT_PT].
    
    Any change to state influencing epte_get_entry_emt()'s decision needs
    to result in re-calculation. Do this by using the EPT_MISCONFIG VM
    exit, storing an invalid memory type into EPT's emt field (leaving the
    IOMMU, which doesn't care about memory types, unaffected).
    
    This is being done in a hierarchical manner to keep execution time
    down: Initially only the top level directory gets invalidated this way.
    Upon access, the involved intermediate page table levels get cleared
    back to zero, and the leaf entry gets its field properly set. For 4k
    leaves all other entries in the same directory also get processed to
    amortize the cost of the extra VM exit (which halved the number of
    these VM exits in my testing).
    
    This restoring can result in spurious EPT_MISCONFIG VM exits (since
    two vCPU-s may access addresses involving identical page table
    structures). Rather than simply returning in such cases (and risking
    that such a VM exit results from a real mis-configuration, which
    would then result in an endless loop rather than killing the VM), a
    per-vCPU flag is being introduced indicating when such a spurious VM
    exit might validly happen - if another one occurs right after VM re-
    entry, the flag would generally end up being clear, causing the VM
    to be killed as before on such VM exits.
    
    Note that putting a reserved memory type value in the EPT structures
    isn't formally sanctioned by the specification. Intel isn't willing to
    adjust the specification to make this or a similar use of the
    EPT_MISCONFIG VM exit formally possible, but they have indicated that
    us using this is low risk wrt forward compatibility.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/domctl.c              |    6 ++
 xen/arch/x86/hvm/hvm.c             |    3 +
 xen/arch/x86/hvm/mtrr.c            |   20 ++++-
 xen/arch/x86/hvm/vmx/vmx.c         |   10 +++
 xen/arch/x86/mm/p2m-ept.c          |  139 +++++++++++++++++++++++++++++++++++-
 xen/arch/x86/mm/p2m.c              |   12 +++
 xen/common/domctl.c                |    4 +
 xen/include/asm-x86/hvm/vmx/vmcs.h |    3 +
 xen/include/asm-x86/hvm/vmx/vmx.h  |    1 +
 xen/include/asm-x86/mtrr.h         |    1 +
 xen/include/asm-x86/p2m.h          |    4 +
 11 files changed, 198 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 26635ff..d626e6f 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -83,6 +83,8 @@ long arch_do_domctl(
             ret = ioports_permit_access(d, fp, fp + np - 1);
         else
             ret = ioports_deny_access(d, fp, fp + np - 1);
+        if ( !ret )
+            memory_type_changed(d);
     }
     break;
 
@@ -706,6 +708,8 @@ long arch_do_domctl(
                        ret, add ? "removing" : "denying", d->domain_id,
                        mfn, mfn + nr_mfns - 1);
         }
+        /* Do this unconditionally to cover errors on above failure paths. */
+        memory_type_changed(d);
     }
     break;
 
@@ -792,6 +796,8 @@ long arch_do_domctl(
                        "ioport_map: error %ld denying dom%d access to [%x,%x]\n",
                        ret, d->domain_id, fmp, fmp + np - 1);
         }
+        if ( !ret )
+            memory_type_changed(d);
     }
     break;
 
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 8c3797e..46634cd 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -252,6 +252,9 @@ int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat)
 
     if ( !hvm_funcs.set_guest_pat(v, guest_pat) )
         v->arch.hvm_vcpu.pat_cr = guest_pat;
+
+    memory_type_changed(v->domain);
+
     return 1;
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 45c8e7b..ae24efa 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -431,8 +431,12 @@ bool_t mtrr_def_type_msr_set(struct domain *d, struct mtrr_state *m,
          return 0;
     }
 
-    m->enabled = enabled;
-    m->def_type = def_type;
+    if ( m->enabled != enabled || m->def_type != def_type )
+    {
+        m->enabled = enabled;
+        m->def_type = def_type;
+        memory_type_changed(d);
+    }
 
     return 1;
 }
@@ -452,6 +456,7 @@ bool_t mtrr_fix_range_msr_set(struct domain *d, struct mtrr_state *m,
                 return 0;
 
         fixed_range_base[row] = msr_content;
+        memory_type_changed(d);
     }
 
     return 1;
@@ -496,6 +501,8 @@ bool_t mtrr_var_range_msr_set(
 
     m->overlapped = is_var_mtrr_overlapped(m);
 
+    memory_type_changed(d);
+
     return 1;
 }
 
@@ -690,6 +697,12 @@ static int hvm_load_mtrr_msr(struct domain *d, hvm_domain_context_t *h)
 HVM_REGISTER_SAVE_RESTORE(MTRR, hvm_save_mtrr_msr, hvm_load_mtrr_msr,
                           1, HVMSR_PER_VCPU);
 
+void memory_type_changed(struct domain *d)
+{
+    if ( iommu_enabled && !iommu_snoop && d->vcpu && d->vcpu[0] )
+        p2m_memory_type_changed(d);
+}
+
 uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
                            uint8_t *ipat, bool_t direct_mmio)
 {
@@ -733,8 +746,7 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
-    gmtrr_mtype = is_hvm_domain(d) && v &&
-                  d->arch.hvm_domain.params[HVM_PARAM_IDENT_PT] ?
+    gmtrr_mtype = is_hvm_domain(d) && v ?
                   get_mtrr_type(&v->arch.hvm_vcpu.mtrr, (gfn << PAGE_SHIFT)) :
                   MTRR_TYPE_WRBACK;
 
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 77ce167..180cf6c 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -3016,6 +3016,16 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
         break;
     }
 
+    case EXIT_REASON_EPT_MISCONFIG:
+    {
+        paddr_t gpa;
+
+        __vmread(GUEST_PHYSICAL_ADDRESS, &gpa);
+        if ( !ept_handle_misconfig(gpa) )
+            goto exit_and_crash;
+        break;
+    }
+
     case EXIT_REASON_MONITOR_TRAP_FLAG:
         v->arch.hvm_vmx.exec_control &= ~CPU_BASED_MONITOR_TRAP_FLAG;
         vmx_update_cpu_exec_control(v);
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 99a1084..342fc70 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -270,6 +270,125 @@ static int ept_next_level(struct p2m_domain *p2m, bool_t read_only,
     return GUEST_TABLE_NORMAL_PAGE;
 }
 
+static bool_t ept_invalidate_emt(mfn_t mfn)
+{
+    ept_entry_t *epte = map_domain_page(mfn_x(mfn));
+    unsigned int i;
+    bool_t changed = 0;
+
+    for ( i = 0; i < EPT_PAGETABLE_ENTRIES; i++ )
+    {
+        ept_entry_t e = atomic_read_ept_entry(&epte[i]);
+
+        if ( !is_epte_valid(&e) || !is_epte_present(&e) ||
+             e.emt == MTRR_NUM_TYPES )
+            continue;
+
+        e.emt = MTRR_NUM_TYPES;
+        atomic_write_ept_entry(&epte[i], e);
+        changed = 1;
+    }
+
+    unmap_domain_page(epte);
+
+    return changed;
+}
+
+bool_t ept_handle_misconfig(uint64_t gpa)
+{
+    struct vcpu *curr = current;
+    struct p2m_domain *p2m = p2m_get_hostp2m(curr->domain);
+    struct ept_data *ept = &p2m->ept;
+    unsigned int level = ept_get_wl(ept);
+    unsigned long gfn = PFN_DOWN(gpa);
+    unsigned long mfn = ept_get_asr(ept);
+    ept_entry_t *epte;
+    int okay;
+
+    if ( !mfn )
+        return 0;
+
+    p2m_lock(p2m);
+
+    okay = -curr->arch.hvm_vmx.ept_spurious_misconfig;
+    for ( ; ; --level )
+    {
+        ept_entry_t e;
+        unsigned int i;
+
+        epte = map_domain_page(mfn);
+        i = (gfn >> (level * EPT_TABLE_ORDER)) & (EPT_PAGETABLE_ENTRIES - 1);
+        e = atomic_read_ept_entry(&epte[i]);
+
+        if ( level == 0 || is_epte_superpage(&e) )
+        {
+            uint8_t ipat = 0;
+
+            if ( e.emt != MTRR_NUM_TYPES )
+                break;
+
+            if ( level == 0 )
+            {
+                for ( gfn -= i, i = 0; i < EPT_PAGETABLE_ENTRIES; ++i )
+                {
+                    e = atomic_read_ept_entry(&epte[i]);
+                    if ( e.emt == MTRR_NUM_TYPES )
+                        e.emt = 0;
+                    if ( !is_epte_valid(&e) || !is_epte_present(&e) )
+                        continue;
+                    e.emt = epte_get_entry_emt(p2m->domain, gfn + i,
+                                               _mfn(e.mfn), &ipat,
+                                               e.sa_p2mt == p2m_mmio_direct);
+                    e.ipat = ipat;
+                    atomic_write_ept_entry(&epte[i], e);
+                }
+            }
+            else
+            {
+                e.emt = epte_get_entry_emt(p2m->domain, gfn, _mfn(e.mfn),
+                                           &ipat,
+                                           e.sa_p2mt == p2m_mmio_direct);
+                e.ipat = ipat;
+                atomic_write_ept_entry(&epte[i], e);
+            }
+
+            okay = 1;
+            break;
+        }
+
+        if ( e.emt == MTRR_NUM_TYPES )
+        {
+            ASSERT(is_epte_present(&e));
+            ept_invalidate_emt(_mfn(e.mfn));
+            smp_wmb();
+            e.emt = 0;
+            atomic_write_ept_entry(&epte[i], e);
+            unmap_domain_page(epte);
+            okay = 1;
+        }
+        else if ( is_epte_present(&e) && !e.emt )
+            unmap_domain_page(epte);
+        else
+            break;
+
+        mfn = e.mfn;
+    }
+
+    unmap_domain_page(epte);
+    if ( okay > 0 )
+    {
+        struct vcpu *v;
+
+        for_each_vcpu ( curr->domain, v )
+            v->arch.hvm_vmx.ept_spurious_misconfig = 1;
+    }
+    curr->arch.hvm_vmx.ept_spurious_misconfig = 0;
+    ept_sync_domain(p2m);
+    p2m_unlock(p2m);
+
+    return !!okay;
+}
+
 /*
  * ept_set_entry() computes 'need_modify_vtd_table' for itself,
  * by observing whether any gfn->mfn translations are modified.
@@ -660,6 +779,17 @@ static void ept_change_entry_type_global(struct p2m_domain *p2m,
     ept_sync_domain(p2m);
 }
 
+static void ept_memory_type_changed(struct p2m_domain *p2m)
+{
+    unsigned long mfn = ept_get_asr(&p2m->ept);
+
+    if ( !mfn )
+        return;
+
+    if ( ept_invalidate_emt(_mfn(mfn)) )
+        ept_sync_domain(p2m);
+}
+
 static void __ept_sync_domain(void *info)
 {
     struct ept_data *ept = &((struct p2m_domain *)info)->ept;
@@ -697,6 +827,7 @@ int ept_p2m_init(struct p2m_domain *p2m)
     p2m->set_entry = ept_set_entry;
     p2m->get_entry = ept_get_entry;
     p2m->change_entry_type_global = ept_change_entry_type_global;
+    p2m->memory_type_changed = ept_memory_type_changed;
     p2m->audit_p2m = NULL;
 
     /* Set the memory type used when accessing EPT paging structures. */
@@ -737,6 +868,7 @@ static void ept_dump_p2m_table(unsigned char key)
         [MTRR_TYPE_WRTHROUGH]      = "WT",
         [MTRR_TYPE_WRPROT]         = "WP",
         [MTRR_TYPE_WRBACK]         = "WB",
+        [MTRR_NUM_TYPES]           = "??"
     };
 
     for_each_domain(d)
@@ -750,11 +882,16 @@ static void ept_dump_p2m_table(unsigned char key)
 
         for ( gfn = 0; gfn <= p2m->max_mapped_pfn; gfn += 1UL << order )
         {
+            char c = 0;
+
             gfn_remainder = gfn;
             table = map_domain_page(pagetable_get_pfn(p2m_get_pagetable(p2m)));
 
             for ( i = ept_get_wl(ept); i > 0; i-- )
             {
+                ept_entry = table + (gfn_remainder >> (i * EPT_TABLE_ORDER));
+                if ( ept_entry->emt == MTRR_NUM_TYPES )
+                    c = '?';
                 ret = ept_next_level(p2m, 1, &table, &gfn_remainder, i);
                 if ( ret != GUEST_TABLE_NORMAL_PAGE )
                     break;
@@ -775,7 +912,7 @@ static void ept_dump_p2m_table(unsigned char key)
                            memory_types[ept_entry->emt][0],
                            memory_types[ept_entry->emt][1]
                            ?: ept_entry->emt + '0',
-                           ept_entry->ipat ? '!' : ' ');
+                           c ?: ept_entry->ipat ? '!' : ' ');
 
                 if ( !(record_counter++ % 100) )
                     process_pending_softirqs();
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index c38f334..d2de237 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -200,6 +200,18 @@ void p2m_change_entry_type_global(struct domain *d,
     p2m_unlock(p2m);
 }
 
+void p2m_memory_type_changed(struct domain *d)
+{
+    struct p2m_domain *p2m = p2m_get_hostp2m(d);
+
+    if ( p2m->memory_type_changed )
+    {
+        p2m_lock(p2m);
+        p2m->memory_type_changed(p2m);
+        p2m_unlock(p2m);
+    }
+}
+
 mfn_t __get_gfn_type_access(struct p2m_domain *p2m, unsigned long gfn,
                     p2m_type_t *t, p2m_access_t *a, p2m_query_t q,
                     unsigned int *page_order, bool_t locked)
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 5342e5d..5e807ab 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -815,6 +815,10 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
             ret = iomem_permit_access(d, mfn, mfn + nr_mfns - 1);
         else
             ret = iomem_deny_access(d, mfn, mfn + nr_mfns - 1);
+#ifdef CONFIG_X86
+        if ( !ret )
+            memory_type_changed(d);
+#endif
     }
     break;
 
diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h
index 45dcfa1..445b39f 100644
--- a/xen/include/asm-x86/hvm/vmx/vmcs.h
+++ b/xen/include/asm-x86/hvm/vmx/vmcs.h
@@ -124,6 +124,9 @@ struct arch_vmx_struct {
 
     unsigned long        host_cr0;
 
+    /* Do we need to tolerate a spurious EPT_MISCONFIG VM exit? */
+    bool_t               ept_spurious_misconfig;
+
     /* Is the guest in real mode? */
     uint8_t              vmx_realmode;
     /* Are we emulating rather than VMENTERing? */
diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/asm-x86/hvm/vmx/vmx.h
index d4030990..2e8cd70 100644
--- a/xen/include/asm-x86/hvm/vmx/vmx.h
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h
@@ -520,6 +520,7 @@ int ept_p2m_init(struct p2m_domain *p2m);
 void ept_p2m_uninit(struct p2m_domain *p2m);
 
 void ept_walk_table(struct domain *d, unsigned long gfn);
+bool_t ept_handle_misconfig(uint64_t gpa);
 void setup_ept_dump(void);
 
 void update_guest_eip(void);
diff --git a/xen/include/asm-x86/mtrr.h b/xen/include/asm-x86/mtrr.h
index 1b5993e..b3f238c 100644
--- a/xen/include/asm-x86/mtrr.h
+++ b/xen/include/asm-x86/mtrr.h
@@ -88,6 +88,7 @@ extern bool_t mtrr_fix_range_msr_set(struct domain *, struct mtrr_state *,
                                      uint32_t row, uint64_t msr_content);
 extern bool_t mtrr_def_type_msr_set(struct domain *, struct mtrr_state *,
                                     uint64_t msr_content);
+extern void memory_type_changed(struct domain *);
 extern bool_t pat_msr_set(uint64_t *pat, uint64_t msr);
 
 bool_t is_var_mtrr_overlapped(struct mtrr_state *m);
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index d644f82..c64f3d0 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -233,6 +233,7 @@ struct p2m_domain {
     void               (*change_entry_type_global)(struct p2m_domain *p2m,
                                                    p2m_type_t ot,
                                                    p2m_type_t nt);
+    void               (*memory_type_changed)(struct p2m_domain *p2m);
     
     void               (*write_p2m_entry)(struct p2m_domain *p2m,
                                           unsigned long gfn, l1_pgentry_t *p,
@@ -506,6 +507,9 @@ void p2m_change_type_range(struct domain *d,
 p2m_type_t p2m_change_type(struct domain *d, unsigned long gfn,
                            p2m_type_t ot, p2m_type_t nt);
 
+/* Report a change affecting memory types. */
+void p2m_memory_type_changed(struct domain *d);
+
 /* Set mmio addresses in the p2m table (for pass-through) */
 int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn);
 int clear_mmio_p2m_entry(struct domain *d, unsigned long gfn);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:37 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00:37 +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 1WaNa1-00075Q-OY; Wed, 16 Apr 2014 11:00:37 +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 1WaNZz-00073T-5G
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:35 +0000
Received: from [85.158.143.35:7805] by server-2.bemta-4.messagelabs.com id
	06/DE-06539-2D26E435; Wed, 16 Apr 2014 11:00:34 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1397646031!9441691!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31661 invoked from network); 16 Apr 2014 11:00:32 -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;
	16 Apr 2014 11:00:32 -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 1WaNZv-0000jR-Mi
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:31 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNZv-0000ZN-GY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:31 +0000
Date: Wed, 16 Apr 2014 11:00:31 +0000
Message-Id: <E1WaNZv-0000ZN-GY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: force re-evaluation of memory
	type as necessary
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 aa9114edd97b292cd89b3616e3f2089471fd2201
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:01:41 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:01:41 2014 +0200

    x86/EPT: force re-evaluation of memory type as necessary
    
    The main goal here is to drop the bogus dependency of
    epte_get_entry_emt() on d->arch.hvm_domain.params[HVM_PARAM_IDENT_PT].
    
    Any change to state influencing epte_get_entry_emt()'s decision needs
    to result in re-calculation. Do this by using the EPT_MISCONFIG VM
    exit, storing an invalid memory type into EPT's emt field (leaving the
    IOMMU, which doesn't care about memory types, unaffected).
    
    This is being done in a hierarchical manner to keep execution time
    down: Initially only the top level directory gets invalidated this way.
    Upon access, the involved intermediate page table levels get cleared
    back to zero, and the leaf entry gets its field properly set. For 4k
    leaves all other entries in the same directory also get processed to
    amortize the cost of the extra VM exit (which halved the number of
    these VM exits in my testing).
    
    This restoring can result in spurious EPT_MISCONFIG VM exits (since
    two vCPU-s may access addresses involving identical page table
    structures). Rather than simply returning in such cases (and risking
    that such a VM exit results from a real mis-configuration, which
    would then result in an endless loop rather than killing the VM), a
    per-vCPU flag is being introduced indicating when such a spurious VM
    exit might validly happen - if another one occurs right after VM re-
    entry, the flag would generally end up being clear, causing the VM
    to be killed as before on such VM exits.
    
    Note that putting a reserved memory type value in the EPT structures
    isn't formally sanctioned by the specification. Intel isn't willing to
    adjust the specification to make this or a similar use of the
    EPT_MISCONFIG VM exit formally possible, but they have indicated that
    us using this is low risk wrt forward compatibility.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/domctl.c              |    6 ++
 xen/arch/x86/hvm/hvm.c             |    3 +
 xen/arch/x86/hvm/mtrr.c            |   20 ++++-
 xen/arch/x86/hvm/vmx/vmx.c         |   10 +++
 xen/arch/x86/mm/p2m-ept.c          |  139 +++++++++++++++++++++++++++++++++++-
 xen/arch/x86/mm/p2m.c              |   12 +++
 xen/common/domctl.c                |    4 +
 xen/include/asm-x86/hvm/vmx/vmcs.h |    3 +
 xen/include/asm-x86/hvm/vmx/vmx.h  |    1 +
 xen/include/asm-x86/mtrr.h         |    1 +
 xen/include/asm-x86/p2m.h          |    4 +
 11 files changed, 198 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 26635ff..d626e6f 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -83,6 +83,8 @@ long arch_do_domctl(
             ret = ioports_permit_access(d, fp, fp + np - 1);
         else
             ret = ioports_deny_access(d, fp, fp + np - 1);
+        if ( !ret )
+            memory_type_changed(d);
     }
     break;
 
@@ -706,6 +708,8 @@ long arch_do_domctl(
                        ret, add ? "removing" : "denying", d->domain_id,
                        mfn, mfn + nr_mfns - 1);
         }
+        /* Do this unconditionally to cover errors on above failure paths. */
+        memory_type_changed(d);
     }
     break;
 
@@ -792,6 +796,8 @@ long arch_do_domctl(
                        "ioport_map: error %ld denying dom%d access to [%x,%x]\n",
                        ret, d->domain_id, fmp, fmp + np - 1);
         }
+        if ( !ret )
+            memory_type_changed(d);
     }
     break;
 
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 8c3797e..46634cd 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -252,6 +252,9 @@ int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat)
 
     if ( !hvm_funcs.set_guest_pat(v, guest_pat) )
         v->arch.hvm_vcpu.pat_cr = guest_pat;
+
+    memory_type_changed(v->domain);
+
     return 1;
 }
 
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 45c8e7b..ae24efa 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -431,8 +431,12 @@ bool_t mtrr_def_type_msr_set(struct domain *d, struct mtrr_state *m,
          return 0;
     }
 
-    m->enabled = enabled;
-    m->def_type = def_type;
+    if ( m->enabled != enabled || m->def_type != def_type )
+    {
+        m->enabled = enabled;
+        m->def_type = def_type;
+        memory_type_changed(d);
+    }
 
     return 1;
 }
@@ -452,6 +456,7 @@ bool_t mtrr_fix_range_msr_set(struct domain *d, struct mtrr_state *m,
                 return 0;
 
         fixed_range_base[row] = msr_content;
+        memory_type_changed(d);
     }
 
     return 1;
@@ -496,6 +501,8 @@ bool_t mtrr_var_range_msr_set(
 
     m->overlapped = is_var_mtrr_overlapped(m);
 
+    memory_type_changed(d);
+
     return 1;
 }
 
@@ -690,6 +697,12 @@ static int hvm_load_mtrr_msr(struct domain *d, hvm_domain_context_t *h)
 HVM_REGISTER_SAVE_RESTORE(MTRR, hvm_save_mtrr_msr, hvm_load_mtrr_msr,
                           1, HVMSR_PER_VCPU);
 
+void memory_type_changed(struct domain *d)
+{
+    if ( iommu_enabled && !iommu_snoop && d->vcpu && d->vcpu[0] )
+        p2m_memory_type_changed(d);
+}
+
 uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
                            uint8_t *ipat, bool_t direct_mmio)
 {
@@ -733,8 +746,7 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
-    gmtrr_mtype = is_hvm_domain(d) && v &&
-                  d->arch.hvm_domain.params[HVM_PARAM_IDENT_PT] ?
+    gmtrr_mtype = is_hvm_domain(d) && v ?
                   get_mtrr_type(&v->arch.hvm_vcpu.mtrr, (gfn << PAGE_SHIFT)) :
                   MTRR_TYPE_WRBACK;
 
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 77ce167..180cf6c 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -3016,6 +3016,16 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
         break;
     }
 
+    case EXIT_REASON_EPT_MISCONFIG:
+    {
+        paddr_t gpa;
+
+        __vmread(GUEST_PHYSICAL_ADDRESS, &gpa);
+        if ( !ept_handle_misconfig(gpa) )
+            goto exit_and_crash;
+        break;
+    }
+
     case EXIT_REASON_MONITOR_TRAP_FLAG:
         v->arch.hvm_vmx.exec_control &= ~CPU_BASED_MONITOR_TRAP_FLAG;
         vmx_update_cpu_exec_control(v);
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 99a1084..342fc70 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -270,6 +270,125 @@ static int ept_next_level(struct p2m_domain *p2m, bool_t read_only,
     return GUEST_TABLE_NORMAL_PAGE;
 }
 
+static bool_t ept_invalidate_emt(mfn_t mfn)
+{
+    ept_entry_t *epte = map_domain_page(mfn_x(mfn));
+    unsigned int i;
+    bool_t changed = 0;
+
+    for ( i = 0; i < EPT_PAGETABLE_ENTRIES; i++ )
+    {
+        ept_entry_t e = atomic_read_ept_entry(&epte[i]);
+
+        if ( !is_epte_valid(&e) || !is_epte_present(&e) ||
+             e.emt == MTRR_NUM_TYPES )
+            continue;
+
+        e.emt = MTRR_NUM_TYPES;
+        atomic_write_ept_entry(&epte[i], e);
+        changed = 1;
+    }
+
+    unmap_domain_page(epte);
+
+    return changed;
+}
+
+bool_t ept_handle_misconfig(uint64_t gpa)
+{
+    struct vcpu *curr = current;
+    struct p2m_domain *p2m = p2m_get_hostp2m(curr->domain);
+    struct ept_data *ept = &p2m->ept;
+    unsigned int level = ept_get_wl(ept);
+    unsigned long gfn = PFN_DOWN(gpa);
+    unsigned long mfn = ept_get_asr(ept);
+    ept_entry_t *epte;
+    int okay;
+
+    if ( !mfn )
+        return 0;
+
+    p2m_lock(p2m);
+
+    okay = -curr->arch.hvm_vmx.ept_spurious_misconfig;
+    for ( ; ; --level )
+    {
+        ept_entry_t e;
+        unsigned int i;
+
+        epte = map_domain_page(mfn);
+        i = (gfn >> (level * EPT_TABLE_ORDER)) & (EPT_PAGETABLE_ENTRIES - 1);
+        e = atomic_read_ept_entry(&epte[i]);
+
+        if ( level == 0 || is_epte_superpage(&e) )
+        {
+            uint8_t ipat = 0;
+
+            if ( e.emt != MTRR_NUM_TYPES )
+                break;
+
+            if ( level == 0 )
+            {
+                for ( gfn -= i, i = 0; i < EPT_PAGETABLE_ENTRIES; ++i )
+                {
+                    e = atomic_read_ept_entry(&epte[i]);
+                    if ( e.emt == MTRR_NUM_TYPES )
+                        e.emt = 0;
+                    if ( !is_epte_valid(&e) || !is_epte_present(&e) )
+                        continue;
+                    e.emt = epte_get_entry_emt(p2m->domain, gfn + i,
+                                               _mfn(e.mfn), &ipat,
+                                               e.sa_p2mt == p2m_mmio_direct);
+                    e.ipat = ipat;
+                    atomic_write_ept_entry(&epte[i], e);
+                }
+            }
+            else
+            {
+                e.emt = epte_get_entry_emt(p2m->domain, gfn, _mfn(e.mfn),
+                                           &ipat,
+                                           e.sa_p2mt == p2m_mmio_direct);
+                e.ipat = ipat;
+                atomic_write_ept_entry(&epte[i], e);
+            }
+
+            okay = 1;
+            break;
+        }
+
+        if ( e.emt == MTRR_NUM_TYPES )
+        {
+            ASSERT(is_epte_present(&e));
+            ept_invalidate_emt(_mfn(e.mfn));
+            smp_wmb();
+            e.emt = 0;
+            atomic_write_ept_entry(&epte[i], e);
+            unmap_domain_page(epte);
+            okay = 1;
+        }
+        else if ( is_epte_present(&e) && !e.emt )
+            unmap_domain_page(epte);
+        else
+            break;
+
+        mfn = e.mfn;
+    }
+
+    unmap_domain_page(epte);
+    if ( okay > 0 )
+    {
+        struct vcpu *v;
+
+        for_each_vcpu ( curr->domain, v )
+            v->arch.hvm_vmx.ept_spurious_misconfig = 1;
+    }
+    curr->arch.hvm_vmx.ept_spurious_misconfig = 0;
+    ept_sync_domain(p2m);
+    p2m_unlock(p2m);
+
+    return !!okay;
+}
+
 /*
  * ept_set_entry() computes 'need_modify_vtd_table' for itself,
  * by observing whether any gfn->mfn translations are modified.
@@ -660,6 +779,17 @@ static void ept_change_entry_type_global(struct p2m_domain *p2m,
     ept_sync_domain(p2m);
 }
 
+static void ept_memory_type_changed(struct p2m_domain *p2m)
+{
+    unsigned long mfn = ept_get_asr(&p2m->ept);
+
+    if ( !mfn )
+        return;
+
+    if ( ept_invalidate_emt(_mfn(mfn)) )
+        ept_sync_domain(p2m);
+}
+
 static void __ept_sync_domain(void *info)
 {
     struct ept_data *ept = &((struct p2m_domain *)info)->ept;
@@ -697,6 +827,7 @@ int ept_p2m_init(struct p2m_domain *p2m)
     p2m->set_entry = ept_set_entry;
     p2m->get_entry = ept_get_entry;
     p2m->change_entry_type_global = ept_change_entry_type_global;
+    p2m->memory_type_changed = ept_memory_type_changed;
     p2m->audit_p2m = NULL;
 
     /* Set the memory type used when accessing EPT paging structures. */
@@ -737,6 +868,7 @@ static void ept_dump_p2m_table(unsigned char key)
         [MTRR_TYPE_WRTHROUGH]      = "WT",
         [MTRR_TYPE_WRPROT]         = "WP",
         [MTRR_TYPE_WRBACK]         = "WB",
+        [MTRR_NUM_TYPES]           = "??"
     };
 
     for_each_domain(d)
@@ -750,11 +882,16 @@ static void ept_dump_p2m_table(unsigned char key)
 
         for ( gfn = 0; gfn <= p2m->max_mapped_pfn; gfn += 1UL << order )
         {
+            char c = 0;
+
             gfn_remainder = gfn;
             table = map_domain_page(pagetable_get_pfn(p2m_get_pagetable(p2m)));
 
             for ( i = ept_get_wl(ept); i > 0; i-- )
             {
+                ept_entry = table + (gfn_remainder >> (i * EPT_TABLE_ORDER));
+                if ( ept_entry->emt == MTRR_NUM_TYPES )
+                    c = '?';
                 ret = ept_next_level(p2m, 1, &table, &gfn_remainder, i);
                 if ( ret != GUEST_TABLE_NORMAL_PAGE )
                     break;
@@ -775,7 +912,7 @@ static void ept_dump_p2m_table(unsigned char key)
                            memory_types[ept_entry->emt][0],
                            memory_types[ept_entry->emt][1]
                            ?: ept_entry->emt + '0',
-                           ept_entry->ipat ? '!' : ' ');
+                           c ?: ept_entry->ipat ? '!' : ' ');
 
                 if ( !(record_counter++ % 100) )
                     process_pending_softirqs();
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index c38f334..d2de237 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -200,6 +200,18 @@ void p2m_change_entry_type_global(struct domain *d,
     p2m_unlock(p2m);
 }
 
+void p2m_memory_type_changed(struct domain *d)
+{
+    struct p2m_domain *p2m = p2m_get_hostp2m(d);
+
+    if ( p2m->memory_type_changed )
+    {
+        p2m_lock(p2m);
+        p2m->memory_type_changed(p2m);
+        p2m_unlock(p2m);
+    }
+}
+
 mfn_t __get_gfn_type_access(struct p2m_domain *p2m, unsigned long gfn,
                     p2m_type_t *t, p2m_access_t *a, p2m_query_t q,
                     unsigned int *page_order, bool_t locked)
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 5342e5d..5e807ab 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -815,6 +815,10 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
             ret = iomem_permit_access(d, mfn, mfn + nr_mfns - 1);
         else
             ret = iomem_deny_access(d, mfn, mfn + nr_mfns - 1);
+#ifdef CONFIG_X86
+        if ( !ret )
+            memory_type_changed(d);
+#endif
     }
     break;
 
diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/asm-x86/hvm/vmx/vmcs.h
index 45dcfa1..445b39f 100644
--- a/xen/include/asm-x86/hvm/vmx/vmcs.h
+++ b/xen/include/asm-x86/hvm/vmx/vmcs.h
@@ -124,6 +124,9 @@ struct arch_vmx_struct {
 
     unsigned long        host_cr0;
 
+    /* Do we need to tolerate a spurious EPT_MISCONFIG VM exit? */
+    bool_t               ept_spurious_misconfig;
+
     /* Is the guest in real mode? */
     uint8_t              vmx_realmode;
     /* Are we emulating rather than VMENTERing? */
diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/asm-x86/hvm/vmx/vmx.h
index d4030990..2e8cd70 100644
--- a/xen/include/asm-x86/hvm/vmx/vmx.h
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h
@@ -520,6 +520,7 @@ int ept_p2m_init(struct p2m_domain *p2m);
 void ept_p2m_uninit(struct p2m_domain *p2m);
 
 void ept_walk_table(struct domain *d, unsigned long gfn);
+bool_t ept_handle_misconfig(uint64_t gpa);
 void setup_ept_dump(void);
 
 void update_guest_eip(void);
diff --git a/xen/include/asm-x86/mtrr.h b/xen/include/asm-x86/mtrr.h
index 1b5993e..b3f238c 100644
--- a/xen/include/asm-x86/mtrr.h
+++ b/xen/include/asm-x86/mtrr.h
@@ -88,6 +88,7 @@ extern bool_t mtrr_fix_range_msr_set(struct domain *, struct mtrr_state *,
                                      uint32_t row, uint64_t msr_content);
 extern bool_t mtrr_def_type_msr_set(struct domain *, struct mtrr_state *,
                                     uint64_t msr_content);
+extern void memory_type_changed(struct domain *);
 extern bool_t pat_msr_set(uint64_t *pat, uint64_t msr);
 
 bool_t is_var_mtrr_overlapped(struct mtrr_state *m);
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index d644f82..c64f3d0 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -233,6 +233,7 @@ struct p2m_domain {
     void               (*change_entry_type_global)(struct p2m_domain *p2m,
                                                    p2m_type_t ot,
                                                    p2m_type_t nt);
+    void               (*memory_type_changed)(struct p2m_domain *p2m);
     
     void               (*write_p2m_entry)(struct p2m_domain *p2m,
                                           unsigned long gfn, l1_pgentry_t *p,
@@ -506,6 +507,9 @@ void p2m_change_type_range(struct domain *d,
 p2m_type_t p2m_change_type(struct domain *d, unsigned long gfn,
                            p2m_type_t ot, p2m_type_t nt);
 
+/* Report a change affecting memory types. */
+void p2m_memory_type_changed(struct domain *d);
+
 /* Set mmio addresses in the p2m table (for pass-through) */
 int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn);
 int clear_mmio_p2m_entry(struct domain *d, unsigned long gfn);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:46 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00:46 +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 1WaNaA-00078b-CS; Wed, 16 Apr 2014 11:00:46 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNa9-000785-5q
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:45 +0000
Received: from [85.158.137.68:47119] by server-1.bemta-3.messagelabs.com id
	E7/2A-11134-CD26E435; Wed, 16 Apr 2014 11:00:44 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397646042!7292576!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11739 invoked from network); 16 Apr 2014 11:00:43 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:00:43 -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 1WaNa5-0000jj-T4
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:41 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNa5-0000Zm-QY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:41 +0000
Date: Wed, 16 Apr 2014 11:00:41 +0000
Message-Id: <E1WaNa5-0000Zm-QY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: split super pages upon
	mismatching memory 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

commit 3d90d6e69fe219ce77a3e85b8637cfd62d3a4e0a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:05:12 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:05:12 2014 +0200

    x86/EPT: split super pages upon mismatching memory types
    
    ... between constituent pages. To indicate such, the page order is
    being passed down to the vMTRR routines, with a negative return value
    (possible only on order-non-zero pages) indicating such collisions.
    
    Some code redundancy reduction is being done to ept_set_entry() along
    the way, allowing the new handling to be centralized to a single place
    there.
    
    In order to keep ept_set_entry() fast and simple, the actual splitting
    is being deferred to the EPT_MISCONFIG VM exit handler.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/mtrr.c    |   76 ++++++++++++++++++++++++++-----------------
 xen/arch/x86/mm/p2m-ept.c  |   64 ++++++++++++++++++------------------
 xen/include/asm-x86/mtrr.h |    5 ++-
 3 files changed, 81 insertions(+), 64 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index ae24efa..dde70a6 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -222,30 +222,40 @@ void hvm_vcpu_cacheattr_destroy(struct vcpu *v)
 
 /*
  * Get MTRR memory type for physical address pa.
+ *
+ * May return a negative value when order > 0, indicating to the caller
+ * that the respective mapping needs splitting.
  */
-static uint8_t get_mtrr_type(struct mtrr_state *m, paddr_t pa)
+static int get_mtrr_type(const struct mtrr_state *m,
+                         paddr_t pa, unsigned int order)
 {
-   int32_t     addr, seg, index;
    uint8_t     overlap_mtrr = 0;
    uint8_t     overlap_mtrr_pos = 0;
-   uint64_t    phys_base;
-   uint64_t    phys_mask;
-   uint8_t     num_var_ranges = m->mtrr_cap & 0xff;
+   uint64_t    mask = -(uint64_t)PAGE_SIZE << order;
+   unsigned int seg, num_var_ranges = m->mtrr_cap & 0xff;
 
    if ( unlikely(!(m->enabled & 0x2)) )
        return MTRR_TYPE_UNCACHABLE;
 
+   pa &= mask;
    if ( (pa < 0x100000) && (m->enabled & 1) )
    {
-       /* Fixed range MTRR takes effective */
-       addr = (uint32_t) pa;
+       /* Fixed range MTRR takes effect. */
+       uint32_t addr = (uint32_t)pa, index;
+
        if ( addr < 0x80000 )
        {
+           /* 0x00000 ... 0x7FFFF in 64k steps */
+           if ( order > 4 )
+               return -1;
            seg = (addr >> 16);
            return m->fixed_ranges[seg];
        }
        else if ( addr < 0xc0000 )
        {
+           /* 0x80000 ... 0xBFFFF in 16k steps */
+           if ( order > 2 )
+               return -1;
            seg = (addr - 0x80000) >> 14;
            index = (seg >> 3) + 1;
            seg &= 7;            /* select 0-7 segments */
@@ -253,7 +263,9 @@ static uint8_t get_mtrr_type(struct mtrr_state *m, paddr_t pa)
        }
        else
        {
-           /* 0xC0000 --- 0x100000 */
+           /* 0xC0000 ... 0xFFFFF in 4k steps */
+           if ( order )
+               return -1;
            seg = (addr - 0xc0000) >> 12;
            index = (seg >> 3) + 3;
            seg &= 7;            /* select 0-7 segments */
@@ -264,14 +276,15 @@ static uint8_t get_mtrr_type(struct mtrr_state *m, paddr_t pa)
    /* Match with variable MTRRs. */
    for ( seg = 0; seg < num_var_ranges; seg++ )
    {
-       phys_base = ((uint64_t*)m->var_ranges)[seg*2];
-       phys_mask = ((uint64_t*)m->var_ranges)[seg*2 + 1];
+       uint64_t phys_base = m->var_ranges[seg].base;
+       uint64_t phys_mask = m->var_ranges[seg].mask;
+
        if ( phys_mask & MTRR_PHYSMASK_VALID )
        {
-           if ( ((uint64_t) pa & phys_mask) >> MTRR_PHYSMASK_SHIFT ==
-                (phys_base & phys_mask) >> MTRR_PHYSMASK_SHIFT )
+           phys_mask &= mask;
+           if ( (pa & phys_mask) == (phys_base & phys_mask) )
            {
-               if ( unlikely(m->overlapped) )
+               if ( unlikely(m->overlapped) || order )
                {
                     overlap_mtrr |= 1 << (phys_base & MTRR_PHYSBASE_TYPE_MASK);
                     overlap_mtrr_pos = phys_base & MTRR_PHYSBASE_TYPE_MASK;
@@ -285,23 +298,24 @@ static uint8_t get_mtrr_type(struct mtrr_state *m, paddr_t pa)
        }
    }
 
-   /* Overlapped or not found. */
+   /* Not found? */
    if ( unlikely(overlap_mtrr == 0) )
        return m->def_type;
 
-   if ( likely(!(overlap_mtrr & ~( ((uint8_t)1) << overlap_mtrr_pos ))) )
-       /* Covers both one variable memory range matches and
-        * two or more identical match.
-        */
+   /* One match, or multiple identical ones? */
+   if ( likely(overlap_mtrr == (1 << overlap_mtrr_pos)) )
        return overlap_mtrr_pos;
 
+   if ( order )
+       return -1;
+
+   /* Two or more matches, one being UC? */
    if ( overlap_mtrr & (1 << MTRR_TYPE_UNCACHABLE) )
-       /* Two or more match, one is UC. */
        return MTRR_TYPE_UNCACHABLE;
 
-   if ( !(overlap_mtrr &
-          ~((1 << MTRR_TYPE_WRTHROUGH) | (1 << MTRR_TYPE_WRBACK))) )
-       /* Two or more match, WT and WB. */
+   /* Two or more matches, all of them WT and WB? */
+   if ( overlap_mtrr ==
+        ((1 << MTRR_TYPE_WRTHROUGH) | (1 << MTRR_TYPE_WRBACK)) )
        return MTRR_TYPE_WRTHROUGH;
 
    /* Behaviour is undefined, but return the last overlapped type. */
@@ -341,7 +355,7 @@ static uint8_t effective_mm_type(struct mtrr_state *m,
      * just use it
      */ 
     if ( gmtrr_mtype == NO_HARDCODE_MEM_TYPE )
-        mtrr_mtype = get_mtrr_type(m, gpa);
+        mtrr_mtype = get_mtrr_type(m, gpa, 0);
     else
         mtrr_mtype = gmtrr_mtype;
 
@@ -370,7 +384,7 @@ uint32_t get_pat_flags(struct vcpu *v,
     guest_eff_mm_type = effective_mm_type(g, pat, gpaddr, 
                                           gl1e_flags, gmtrr_mtype);
     /* 2. Get the memory type of host physical address, with MTRR */
-    shadow_mtrr_type = get_mtrr_type(&mtrr_state, spaddr);
+    shadow_mtrr_type = get_mtrr_type(&mtrr_state, spaddr, 0);
 
     /* 3. Find the memory type in PAT, with host MTRR memory type
      * and guest effective memory type.
@@ -703,10 +717,10 @@ void memory_type_changed(struct domain *d)
         p2m_memory_type_changed(d);
 }
 
-uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
-                           uint8_t *ipat, bool_t direct_mmio)
+int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
+                       unsigned int order, uint8_t *ipat, bool_t direct_mmio)
 {
-    uint8_t gmtrr_mtype, hmtrr_mtype;
+    int gmtrr_mtype, hmtrr_mtype;
     uint32_t type;
     struct vcpu *v = current;
 
@@ -747,10 +761,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     gmtrr_mtype = is_hvm_domain(d) && v ?
-                  get_mtrr_type(&v->arch.hvm_vcpu.mtrr, (gfn << PAGE_SHIFT)) :
+                  get_mtrr_type(&v->arch.hvm_vcpu.mtrr,
+                                gfn << PAGE_SHIFT, order) :
                   MTRR_TYPE_WRBACK;
-
-    hmtrr_mtype = get_mtrr_type(&mtrr_state, (mfn_x(mfn) << PAGE_SHIFT));
+    hmtrr_mtype = get_mtrr_type(&mtrr_state, mfn_x(mfn) << PAGE_SHIFT, order);
+    if ( gmtrr_mtype < 0 || hmtrr_mtype < 0 )
+        return -1;
 
     /* If both types match we're fine. */
     if ( likely(gmtrr_mtype == hmtrr_mtype) )
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 342fc70..3f84915 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -337,7 +337,7 @@ bool_t ept_handle_misconfig(uint64_t gpa)
                     if ( !is_epte_valid(&e) || !is_epte_present(&e) )
                         continue;
                     e.emt = epte_get_entry_emt(p2m->domain, gfn + i,
-                                               _mfn(e.mfn), &ipat,
+                                               _mfn(e.mfn), 0, &ipat,
                                                e.sa_p2mt == p2m_mmio_direct);
                     e.ipat = ipat;
                     atomic_write_ept_entry(&epte[i], e);
@@ -345,9 +345,22 @@ bool_t ept_handle_misconfig(uint64_t gpa)
             }
             else
             {
-                e.emt = epte_get_entry_emt(p2m->domain, gfn, _mfn(e.mfn),
-                                           &ipat,
-                                           e.sa_p2mt == p2m_mmio_direct);
+                int emt = epte_get_entry_emt(p2m->domain, gfn, _mfn(e.mfn),
+                                             level * EPT_TABLE_ORDER, &ipat,
+                                             e.sa_p2mt == p2m_mmio_direct);
+                if ( unlikely(emt < 0) )
+                {
+                    unmap_domain_page(epte);
+                    if ( ept_split_super_page(p2m, &e, level, level - 1) )
+                    {
+                        mfn = e.mfn;
+                        continue;
+                    }
+                    ept_free_entry(p2m, &e, level);
+                    okay = 0;
+                    break;
+                }
+                e.emt = emt;
                 e.ipat = ipat;
                 atomic_write_ept_entry(&epte[i], e);
             }
@@ -408,6 +421,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     int vtd_pte_present = 0;
     int needs_sync = 1;
     ept_entry_t old_entry = { .epte = 0 };
+    ept_entry_t new_entry = { .epte = 0 };
     struct ept_data *ept = &p2m->ept;
     struct domain *d = p2m->domain;
 
@@ -457,7 +471,6 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     if ( i == target )
     {
         /* We reached the target level. */
-        ept_entry_t new_entry = { .epte = 0 };
 
         /* No need to flush if the old entry wasn't valid */
         if ( !is_epte_present(ept_entry) )
@@ -468,35 +481,11 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
          *
          * Read-then-write is OK because we hold the p2m lock. */
         old_entry = *ept_entry;
-
-        if ( mfn_valid(mfn_x(mfn)) || direct_mmio || p2m_is_paged(p2mt) ||
-             (p2mt == p2m_ram_paging_in) )
-        {
-            /* Construct the new entry, and then write it once */
-            new_entry.emt = epte_get_entry_emt(p2m->domain, gfn, mfn, &ipat,
-                                                direct_mmio);
-
-            new_entry.ipat = ipat;
-            new_entry.sp = !!order;
-            new_entry.sa_p2mt = p2mt;
-            new_entry.access = p2ma;
-            new_entry.snp = (iommu_enabled && iommu_snoop);
-
-            new_entry.mfn = mfn_x(mfn);
-
-            if ( old_entry.mfn == new_entry.mfn )
-                need_modify_vtd_table = 0;
-
-            ept_p2m_type_to_flags(&new_entry, p2mt, p2ma);
-        }
-
-        atomic_write_ept_entry(ept_entry, new_entry);
     }
     else
     {
         /* We need to split the original page. */
         ept_entry_t split_ept_entry;
-        ept_entry_t new_entry = { .epte = 0 };
 
         ASSERT(is_epte_superpage(ept_entry));
 
@@ -520,8 +509,19 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         ASSERT(i == target);
 
         ept_entry = table + (gfn_remainder >> (i * EPT_TABLE_ORDER));
+    }
+
+    if ( mfn_valid(mfn_x(mfn)) || direct_mmio || p2m_is_paged(p2mt) ||
+         (p2mt == p2m_ram_paging_in) )
+    {
+        int emt = epte_get_entry_emt(p2m->domain, gfn, mfn,
+                                     i * EPT_TABLE_ORDER, &ipat, direct_mmio);
+
+        if ( emt >= 0 )
+            new_entry.emt = emt;
+        else /* ept_handle_misconfig() will need to take care of this. */
+            new_entry.emt = MTRR_NUM_TYPES;
 
-        new_entry.emt = epte_get_entry_emt(d, gfn, mfn, &ipat, direct_mmio);
         new_entry.ipat = ipat;
         new_entry.sp = !!i;
         new_entry.sa_p2mt = p2mt;
@@ -536,10 +536,10 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
              need_modify_vtd_table = 0;
 
         ept_p2m_type_to_flags(&new_entry, p2mt, p2ma);
-
-        atomic_write_ept_entry(ept_entry, new_entry);
     }
 
+    atomic_write_ept_entry(ept_entry, new_entry);
+
     /* Track the highest gfn for which we have ever had a valid mapping */
     if ( p2mt != p2m_invalid &&
          (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) )
diff --git a/xen/include/asm-x86/mtrr.h b/xen/include/asm-x86/mtrr.h
index b3f238c..328ba04 100644
--- a/xen/include/asm-x86/mtrr.h
+++ b/xen/include/asm-x86/mtrr.h
@@ -72,8 +72,9 @@ extern int mtrr_del_page(int reg, unsigned long base, unsigned long size);
 extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi);
 extern u32 get_pat_flags(struct vcpu *v, u32 gl1e_flags, paddr_t gpaddr,
                   paddr_t spaddr, uint8_t gmtrr_mtype);
-extern uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn,
-                                  mfn_t mfn, uint8_t *ipat, bool_t direct_mmio);
+extern int epte_get_entry_emt(struct domain *, unsigned long gfn, mfn_t mfn,
+                              unsigned int order, uint8_t *ipat,
+                              bool_t direct_mmio);
 extern void ept_change_entry_emt_with_range(
     struct domain *d, unsigned long start_gfn, unsigned long end_gfn);
 extern unsigned char pat_type_2_pte_flags(unsigned char pat_type);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:46 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00:46 +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 1WaNaA-00078b-CS; Wed, 16 Apr 2014 11:00:46 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNa9-000785-5q
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:45 +0000
Received: from [85.158.137.68:47119] by server-1.bemta-3.messagelabs.com id
	E7/2A-11134-CD26E435; Wed, 16 Apr 2014 11:00:44 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397646042!7292576!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11739 invoked from network); 16 Apr 2014 11:00:43 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:00:43 -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 1WaNa5-0000jj-T4
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:41 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNa5-0000Zm-QY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:41 +0000
Date: Wed, 16 Apr 2014 11:00:41 +0000
Message-Id: <E1WaNa5-0000Zm-QY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: split super pages upon
	mismatching memory 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

commit 3d90d6e69fe219ce77a3e85b8637cfd62d3a4e0a
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:05:12 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:05:12 2014 +0200

    x86/EPT: split super pages upon mismatching memory types
    
    ... between constituent pages. To indicate such, the page order is
    being passed down to the vMTRR routines, with a negative return value
    (possible only on order-non-zero pages) indicating such collisions.
    
    Some code redundancy reduction is being done to ept_set_entry() along
    the way, allowing the new handling to be centralized to a single place
    there.
    
    In order to keep ept_set_entry() fast and simple, the actual splitting
    is being deferred to the EPT_MISCONFIG VM exit handler.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/mtrr.c    |   76 ++++++++++++++++++++++++++-----------------
 xen/arch/x86/mm/p2m-ept.c  |   64 ++++++++++++++++++------------------
 xen/include/asm-x86/mtrr.h |    5 ++-
 3 files changed, 81 insertions(+), 64 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index ae24efa..dde70a6 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -222,30 +222,40 @@ void hvm_vcpu_cacheattr_destroy(struct vcpu *v)
 
 /*
  * Get MTRR memory type for physical address pa.
+ *
+ * May return a negative value when order > 0, indicating to the caller
+ * that the respective mapping needs splitting.
  */
-static uint8_t get_mtrr_type(struct mtrr_state *m, paddr_t pa)
+static int get_mtrr_type(const struct mtrr_state *m,
+                         paddr_t pa, unsigned int order)
 {
-   int32_t     addr, seg, index;
    uint8_t     overlap_mtrr = 0;
    uint8_t     overlap_mtrr_pos = 0;
-   uint64_t    phys_base;
-   uint64_t    phys_mask;
-   uint8_t     num_var_ranges = m->mtrr_cap & 0xff;
+   uint64_t    mask = -(uint64_t)PAGE_SIZE << order;
+   unsigned int seg, num_var_ranges = m->mtrr_cap & 0xff;
 
    if ( unlikely(!(m->enabled & 0x2)) )
        return MTRR_TYPE_UNCACHABLE;
 
+   pa &= mask;
    if ( (pa < 0x100000) && (m->enabled & 1) )
    {
-       /* Fixed range MTRR takes effective */
-       addr = (uint32_t) pa;
+       /* Fixed range MTRR takes effect. */
+       uint32_t addr = (uint32_t)pa, index;
+
        if ( addr < 0x80000 )
        {
+           /* 0x00000 ... 0x7FFFF in 64k steps */
+           if ( order > 4 )
+               return -1;
            seg = (addr >> 16);
            return m->fixed_ranges[seg];
        }
        else if ( addr < 0xc0000 )
        {
+           /* 0x80000 ... 0xBFFFF in 16k steps */
+           if ( order > 2 )
+               return -1;
            seg = (addr - 0x80000) >> 14;
            index = (seg >> 3) + 1;
            seg &= 7;            /* select 0-7 segments */
@@ -253,7 +263,9 @@ static uint8_t get_mtrr_type(struct mtrr_state *m, paddr_t pa)
        }
        else
        {
-           /* 0xC0000 --- 0x100000 */
+           /* 0xC0000 ... 0xFFFFF in 4k steps */
+           if ( order )
+               return -1;
            seg = (addr - 0xc0000) >> 12;
            index = (seg >> 3) + 3;
            seg &= 7;            /* select 0-7 segments */
@@ -264,14 +276,15 @@ static uint8_t get_mtrr_type(struct mtrr_state *m, paddr_t pa)
    /* Match with variable MTRRs. */
    for ( seg = 0; seg < num_var_ranges; seg++ )
    {
-       phys_base = ((uint64_t*)m->var_ranges)[seg*2];
-       phys_mask = ((uint64_t*)m->var_ranges)[seg*2 + 1];
+       uint64_t phys_base = m->var_ranges[seg].base;
+       uint64_t phys_mask = m->var_ranges[seg].mask;
+
        if ( phys_mask & MTRR_PHYSMASK_VALID )
        {
-           if ( ((uint64_t) pa & phys_mask) >> MTRR_PHYSMASK_SHIFT ==
-                (phys_base & phys_mask) >> MTRR_PHYSMASK_SHIFT )
+           phys_mask &= mask;
+           if ( (pa & phys_mask) == (phys_base & phys_mask) )
            {
-               if ( unlikely(m->overlapped) )
+               if ( unlikely(m->overlapped) || order )
                {
                     overlap_mtrr |= 1 << (phys_base & MTRR_PHYSBASE_TYPE_MASK);
                     overlap_mtrr_pos = phys_base & MTRR_PHYSBASE_TYPE_MASK;
@@ -285,23 +298,24 @@ static uint8_t get_mtrr_type(struct mtrr_state *m, paddr_t pa)
        }
    }
 
-   /* Overlapped or not found. */
+   /* Not found? */
    if ( unlikely(overlap_mtrr == 0) )
        return m->def_type;
 
-   if ( likely(!(overlap_mtrr & ~( ((uint8_t)1) << overlap_mtrr_pos ))) )
-       /* Covers both one variable memory range matches and
-        * two or more identical match.
-        */
+   /* One match, or multiple identical ones? */
+   if ( likely(overlap_mtrr == (1 << overlap_mtrr_pos)) )
        return overlap_mtrr_pos;
 
+   if ( order )
+       return -1;
+
+   /* Two or more matches, one being UC? */
    if ( overlap_mtrr & (1 << MTRR_TYPE_UNCACHABLE) )
-       /* Two or more match, one is UC. */
        return MTRR_TYPE_UNCACHABLE;
 
-   if ( !(overlap_mtrr &
-          ~((1 << MTRR_TYPE_WRTHROUGH) | (1 << MTRR_TYPE_WRBACK))) )
-       /* Two or more match, WT and WB. */
+   /* Two or more matches, all of them WT and WB? */
+   if ( overlap_mtrr ==
+        ((1 << MTRR_TYPE_WRTHROUGH) | (1 << MTRR_TYPE_WRBACK)) )
        return MTRR_TYPE_WRTHROUGH;
 
    /* Behaviour is undefined, but return the last overlapped type. */
@@ -341,7 +355,7 @@ static uint8_t effective_mm_type(struct mtrr_state *m,
      * just use it
      */ 
     if ( gmtrr_mtype == NO_HARDCODE_MEM_TYPE )
-        mtrr_mtype = get_mtrr_type(m, gpa);
+        mtrr_mtype = get_mtrr_type(m, gpa, 0);
     else
         mtrr_mtype = gmtrr_mtype;
 
@@ -370,7 +384,7 @@ uint32_t get_pat_flags(struct vcpu *v,
     guest_eff_mm_type = effective_mm_type(g, pat, gpaddr, 
                                           gl1e_flags, gmtrr_mtype);
     /* 2. Get the memory type of host physical address, with MTRR */
-    shadow_mtrr_type = get_mtrr_type(&mtrr_state, spaddr);
+    shadow_mtrr_type = get_mtrr_type(&mtrr_state, spaddr, 0);
 
     /* 3. Find the memory type in PAT, with host MTRR memory type
      * and guest effective memory type.
@@ -703,10 +717,10 @@ void memory_type_changed(struct domain *d)
         p2m_memory_type_changed(d);
 }
 
-uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
-                           uint8_t *ipat, bool_t direct_mmio)
+int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
+                       unsigned int order, uint8_t *ipat, bool_t direct_mmio)
 {
-    uint8_t gmtrr_mtype, hmtrr_mtype;
+    int gmtrr_mtype, hmtrr_mtype;
     uint32_t type;
     struct vcpu *v = current;
 
@@ -747,10 +761,12 @@ uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     }
 
     gmtrr_mtype = is_hvm_domain(d) && v ?
-                  get_mtrr_type(&v->arch.hvm_vcpu.mtrr, (gfn << PAGE_SHIFT)) :
+                  get_mtrr_type(&v->arch.hvm_vcpu.mtrr,
+                                gfn << PAGE_SHIFT, order) :
                   MTRR_TYPE_WRBACK;
-
-    hmtrr_mtype = get_mtrr_type(&mtrr_state, (mfn_x(mfn) << PAGE_SHIFT));
+    hmtrr_mtype = get_mtrr_type(&mtrr_state, mfn_x(mfn) << PAGE_SHIFT, order);
+    if ( gmtrr_mtype < 0 || hmtrr_mtype < 0 )
+        return -1;
 
     /* If both types match we're fine. */
     if ( likely(gmtrr_mtype == hmtrr_mtype) )
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 342fc70..3f84915 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -337,7 +337,7 @@ bool_t ept_handle_misconfig(uint64_t gpa)
                     if ( !is_epte_valid(&e) || !is_epte_present(&e) )
                         continue;
                     e.emt = epte_get_entry_emt(p2m->domain, gfn + i,
-                                               _mfn(e.mfn), &ipat,
+                                               _mfn(e.mfn), 0, &ipat,
                                                e.sa_p2mt == p2m_mmio_direct);
                     e.ipat = ipat;
                     atomic_write_ept_entry(&epte[i], e);
@@ -345,9 +345,22 @@ bool_t ept_handle_misconfig(uint64_t gpa)
             }
             else
             {
-                e.emt = epte_get_entry_emt(p2m->domain, gfn, _mfn(e.mfn),
-                                           &ipat,
-                                           e.sa_p2mt == p2m_mmio_direct);
+                int emt = epte_get_entry_emt(p2m->domain, gfn, _mfn(e.mfn),
+                                             level * EPT_TABLE_ORDER, &ipat,
+                                             e.sa_p2mt == p2m_mmio_direct);
+                if ( unlikely(emt < 0) )
+                {
+                    unmap_domain_page(epte);
+                    if ( ept_split_super_page(p2m, &e, level, level - 1) )
+                    {
+                        mfn = e.mfn;
+                        continue;
+                    }
+                    ept_free_entry(p2m, &e, level);
+                    okay = 0;
+                    break;
+                }
+                e.emt = emt;
                 e.ipat = ipat;
                 atomic_write_ept_entry(&epte[i], e);
             }
@@ -408,6 +421,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     int vtd_pte_present = 0;
     int needs_sync = 1;
     ept_entry_t old_entry = { .epte = 0 };
+    ept_entry_t new_entry = { .epte = 0 };
     struct ept_data *ept = &p2m->ept;
     struct domain *d = p2m->domain;
 
@@ -457,7 +471,6 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     if ( i == target )
     {
         /* We reached the target level. */
-        ept_entry_t new_entry = { .epte = 0 };
 
         /* No need to flush if the old entry wasn't valid */
         if ( !is_epte_present(ept_entry) )
@@ -468,35 +481,11 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
          *
          * Read-then-write is OK because we hold the p2m lock. */
         old_entry = *ept_entry;
-
-        if ( mfn_valid(mfn_x(mfn)) || direct_mmio || p2m_is_paged(p2mt) ||
-             (p2mt == p2m_ram_paging_in) )
-        {
-            /* Construct the new entry, and then write it once */
-            new_entry.emt = epte_get_entry_emt(p2m->domain, gfn, mfn, &ipat,
-                                                direct_mmio);
-
-            new_entry.ipat = ipat;
-            new_entry.sp = !!order;
-            new_entry.sa_p2mt = p2mt;
-            new_entry.access = p2ma;
-            new_entry.snp = (iommu_enabled && iommu_snoop);
-
-            new_entry.mfn = mfn_x(mfn);
-
-            if ( old_entry.mfn == new_entry.mfn )
-                need_modify_vtd_table = 0;
-
-            ept_p2m_type_to_flags(&new_entry, p2mt, p2ma);
-        }
-
-        atomic_write_ept_entry(ept_entry, new_entry);
     }
     else
     {
         /* We need to split the original page. */
         ept_entry_t split_ept_entry;
-        ept_entry_t new_entry = { .epte = 0 };
 
         ASSERT(is_epte_superpage(ept_entry));
 
@@ -520,8 +509,19 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         ASSERT(i == target);
 
         ept_entry = table + (gfn_remainder >> (i * EPT_TABLE_ORDER));
+    }
+
+    if ( mfn_valid(mfn_x(mfn)) || direct_mmio || p2m_is_paged(p2mt) ||
+         (p2mt == p2m_ram_paging_in) )
+    {
+        int emt = epte_get_entry_emt(p2m->domain, gfn, mfn,
+                                     i * EPT_TABLE_ORDER, &ipat, direct_mmio);
+
+        if ( emt >= 0 )
+            new_entry.emt = emt;
+        else /* ept_handle_misconfig() will need to take care of this. */
+            new_entry.emt = MTRR_NUM_TYPES;
 
-        new_entry.emt = epte_get_entry_emt(d, gfn, mfn, &ipat, direct_mmio);
         new_entry.ipat = ipat;
         new_entry.sp = !!i;
         new_entry.sa_p2mt = p2mt;
@@ -536,10 +536,10 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
              need_modify_vtd_table = 0;
 
         ept_p2m_type_to_flags(&new_entry, p2mt, p2ma);
-
-        atomic_write_ept_entry(ept_entry, new_entry);
     }
 
+    atomic_write_ept_entry(ept_entry, new_entry);
+
     /* Track the highest gfn for which we have ever had a valid mapping */
     if ( p2mt != p2m_invalid &&
          (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) )
diff --git a/xen/include/asm-x86/mtrr.h b/xen/include/asm-x86/mtrr.h
index b3f238c..328ba04 100644
--- a/xen/include/asm-x86/mtrr.h
+++ b/xen/include/asm-x86/mtrr.h
@@ -72,8 +72,9 @@ extern int mtrr_del_page(int reg, unsigned long base, unsigned long size);
 extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi);
 extern u32 get_pat_flags(struct vcpu *v, u32 gl1e_flags, paddr_t gpaddr,
                   paddr_t spaddr, uint8_t gmtrr_mtype);
-extern uint8_t epte_get_entry_emt(struct domain *d, unsigned long gfn,
-                                  mfn_t mfn, uint8_t *ipat, bool_t direct_mmio);
+extern int epte_get_entry_emt(struct domain *, unsigned long gfn, mfn_t mfn,
+                              unsigned int order, uint8_t *ipat,
+                              bool_t direct_mmio);
 extern void ept_change_entry_emt_with_range(
     struct domain *d, unsigned long start_gfn, unsigned long end_gfn);
 extern unsigned char pat_type_2_pte_flags(unsigned char pat_type);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00:56 +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 1WaNaK-0007BY-Tg; Wed, 16 Apr 2014 11:00:56 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaJ-0007Av-0B
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:55 +0000
Received: from [85.158.139.211:56747] by server-17.bemta-5.messagelabs.com id
	43/2B-09046-6E26E435; Wed, 16 Apr 2014 11:00:54 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1397646052!7815716!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24257 invoked from network); 16 Apr 2014 11:00:53 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:00:53 -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 1WaNaG-0000jq-6f
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:52 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaG-0000a8-0V
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:52 +0000
Date: Wed, 16 Apr 2014 11:00:52 +0000
Message-Id: <E1WaNaG-0000a8-0V@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: IOMMU snoop capability should
	not affect memory type selection
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 6afff051a28bb873f9ad4d8ca678b8f0d1b4f089
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:06:09 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:06:09 2014 +0200

    x86/EPT: IOMMU snoop capability should not affect memory type selection
    
    This capability solely makes a statement on cache coherency guarantees
    by the IOMMU. It does specifically not imply any further guarantees
    implied by certain memory types (cachability, ordering).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/hvm.c  |   27 +++++++++++----------------
 xen/arch/x86/hvm/mtrr.c |    8 +-------
 2 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 46634cd..ae7a645 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -1950,6 +1950,7 @@ static void hvm_update_cr(struct vcpu *v, unsigned int cr, unsigned long value)
 int hvm_set_cr0(unsigned long value)
 {
     struct vcpu *v = current;
+    struct domain *d = v->domain;
     unsigned long gfn, old_value = v->arch.hvm_vcpu.guest_cr[0];
     struct page_info *page;
 
@@ -1973,8 +1974,8 @@ int hvm_set_cr0(unsigned long value)
         goto gpf;
 
     /* A pvh is not expected to change to real mode. */
-    if ( is_pvh_vcpu(v)
-         && (value & (X86_CR0_PE | X86_CR0_PG)) != (X86_CR0_PG | X86_CR0_PE) )
+    if ( is_pvh_domain(d) &&
+         (value & (X86_CR0_PE | X86_CR0_PG)) != (X86_CR0_PG | X86_CR0_PE) )
     {
         printk(XENLOG_G_WARNING
                "PVH attempting to turn off PE/PG. CR0:%lx\n", value);
@@ -1996,16 +1997,16 @@ int hvm_set_cr0(unsigned long value)
             hvm_update_guest_efer(v);
         }
 
-        if ( !paging_mode_hap(v->domain) )
+        if ( !paging_mode_hap(d) )
         {
             /* The guest CR3 must be pointing to the guest physical. */
             gfn = v->arch.hvm_vcpu.guest_cr[3]>>PAGE_SHIFT;
-            page = get_page_from_gfn(v->domain, gfn, NULL, P2M_ALLOC);
+            page = get_page_from_gfn(d, gfn, NULL, P2M_ALLOC);
             if ( !page )
             {
                 gdprintk(XENLOG_ERR, "Invalid CR3 value = %lx\n",
                          v->arch.hvm_vcpu.guest_cr[3]);
-                domain_crash(v->domain);
+                domain_crash(d);
                 return X86EMUL_UNHANDLEABLE;
             }
 
@@ -2032,24 +2033,18 @@ int hvm_set_cr0(unsigned long value)
             hvm_update_guest_efer(v);
         }
 
-        if ( !paging_mode_hap(v->domain) )
+        if ( !paging_mode_hap(d) )
         {
             put_page(pagetable_get_page(v->arch.guest_table));
             v->arch.guest_table = pagetable_null();
         }
     }
 
-    /*
-     * When cr0.cd setting
-     * 1. For guest w/o VT-d, and for guest with VT-d but snooped, Xen need not
-     * do anything, since hardware snoop mechanism has ensured cache coherency;
-     * 2. For guest with VT-d but non-snooped, cache coherency cannot be
-     * guaranteed by h/w so need emulate UC memory type to guest.
-     */
     if ( ((value ^ old_value) & X86_CR0_CD) &&
-           has_arch_pdevs(v->domain) &&
-           iommu_enabled && !iommu_snoop &&
-           hvm_funcs.handle_cd )
+         iommu_enabled && hvm_funcs.handle_cd &&
+         (!rangeset_is_empty(d->iomem_caps) ||
+          !rangeset_is_empty(d->arch.ioport_caps) ||
+          has_arch_pdevs(d)) )
         hvm_funcs.handle_cd(v, value);
 
     hvm_update_cr(v, 0, value);
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index dde70a6..9562726 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -713,7 +713,7 @@ HVM_REGISTER_SAVE_RESTORE(MTRR, hvm_save_mtrr_msr, hvm_load_mtrr_msr,
 
 void memory_type_changed(struct domain *d)
 {
-    if ( iommu_enabled && !iommu_snoop && d->vcpu && d->vcpu[0] )
+    if ( iommu_enabled && d->vcpu && d->vcpu[0] )
         p2m_memory_type_changed(d);
 }
 
@@ -754,12 +754,6 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
-    if ( iommu_snoop )
-    {
-        *ipat = 1;
-        return MTRR_TYPE_WRBACK;
-    }
-
     gmtrr_mtype = is_hvm_domain(d) && v ?
                   get_mtrr_type(&v->arch.hvm_vcpu.mtrr,
                                 gfn << PAGE_SHIFT, order) :
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:00:56 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:00:56 +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 1WaNaK-0007BY-Tg; Wed, 16 Apr 2014 11:00:56 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaJ-0007Av-0B
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:55 +0000
Received: from [85.158.139.211:56747] by server-17.bemta-5.messagelabs.com id
	43/2B-09046-6E26E435; Wed, 16 Apr 2014 11:00:54 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1397646052!7815716!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24257 invoked from network); 16 Apr 2014 11:00:53 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:00:53 -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 1WaNaG-0000jq-6f
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:52 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaG-0000a8-0V
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:00:52 +0000
Date: Wed, 16 Apr 2014 11:00:52 +0000
Message-Id: <E1WaNaG-0000a8-0V@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: IOMMU snoop capability should
	not affect memory type selection
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 6afff051a28bb873f9ad4d8ca678b8f0d1b4f089
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:06:09 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:06:09 2014 +0200

    x86/EPT: IOMMU snoop capability should not affect memory type selection
    
    This capability solely makes a statement on cache coherency guarantees
    by the IOMMU. It does specifically not imply any further guarantees
    implied by certain memory types (cachability, ordering).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/hvm.c  |   27 +++++++++++----------------
 xen/arch/x86/hvm/mtrr.c |    8 +-------
 2 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 46634cd..ae7a645 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -1950,6 +1950,7 @@ static void hvm_update_cr(struct vcpu *v, unsigned int cr, unsigned long value)
 int hvm_set_cr0(unsigned long value)
 {
     struct vcpu *v = current;
+    struct domain *d = v->domain;
     unsigned long gfn, old_value = v->arch.hvm_vcpu.guest_cr[0];
     struct page_info *page;
 
@@ -1973,8 +1974,8 @@ int hvm_set_cr0(unsigned long value)
         goto gpf;
 
     /* A pvh is not expected to change to real mode. */
-    if ( is_pvh_vcpu(v)
-         && (value & (X86_CR0_PE | X86_CR0_PG)) != (X86_CR0_PG | X86_CR0_PE) )
+    if ( is_pvh_domain(d) &&
+         (value & (X86_CR0_PE | X86_CR0_PG)) != (X86_CR0_PG | X86_CR0_PE) )
     {
         printk(XENLOG_G_WARNING
                "PVH attempting to turn off PE/PG. CR0:%lx\n", value);
@@ -1996,16 +1997,16 @@ int hvm_set_cr0(unsigned long value)
             hvm_update_guest_efer(v);
         }
 
-        if ( !paging_mode_hap(v->domain) )
+        if ( !paging_mode_hap(d) )
         {
             /* The guest CR3 must be pointing to the guest physical. */
             gfn = v->arch.hvm_vcpu.guest_cr[3]>>PAGE_SHIFT;
-            page = get_page_from_gfn(v->domain, gfn, NULL, P2M_ALLOC);
+            page = get_page_from_gfn(d, gfn, NULL, P2M_ALLOC);
             if ( !page )
             {
                 gdprintk(XENLOG_ERR, "Invalid CR3 value = %lx\n",
                          v->arch.hvm_vcpu.guest_cr[3]);
-                domain_crash(v->domain);
+                domain_crash(d);
                 return X86EMUL_UNHANDLEABLE;
             }
 
@@ -2032,24 +2033,18 @@ int hvm_set_cr0(unsigned long value)
             hvm_update_guest_efer(v);
         }
 
-        if ( !paging_mode_hap(v->domain) )
+        if ( !paging_mode_hap(d) )
         {
             put_page(pagetable_get_page(v->arch.guest_table));
             v->arch.guest_table = pagetable_null();
         }
     }
 
-    /*
-     * When cr0.cd setting
-     * 1. For guest w/o VT-d, and for guest with VT-d but snooped, Xen need not
-     * do anything, since hardware snoop mechanism has ensured cache coherency;
-     * 2. For guest with VT-d but non-snooped, cache coherency cannot be
-     * guaranteed by h/w so need emulate UC memory type to guest.
-     */
     if ( ((value ^ old_value) & X86_CR0_CD) &&
-           has_arch_pdevs(v->domain) &&
-           iommu_enabled && !iommu_snoop &&
-           hvm_funcs.handle_cd )
+         iommu_enabled && hvm_funcs.handle_cd &&
+         (!rangeset_is_empty(d->iomem_caps) ||
+          !rangeset_is_empty(d->arch.ioport_caps) ||
+          has_arch_pdevs(d)) )
         hvm_funcs.handle_cd(v, value);
 
     hvm_update_cr(v, 0, value);
diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index dde70a6..9562726 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -713,7 +713,7 @@ HVM_REGISTER_SAVE_RESTORE(MTRR, hvm_save_mtrr_msr, hvm_load_mtrr_msr,
 
 void memory_type_changed(struct domain *d)
 {
-    if ( iommu_enabled && !iommu_snoop && d->vcpu && d->vcpu[0] )
+    if ( iommu_enabled && d->vcpu && d->vcpu[0] )
         p2m_memory_type_changed(d);
 }
 
@@ -754,12 +754,6 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
         return MTRR_TYPE_WRBACK;
     }
 
-    if ( iommu_snoop )
-    {
-        *ipat = 1;
-        return MTRR_TYPE_WRBACK;
-    }
-
     gmtrr_mtype = is_hvm_domain(d) && v ?
                   get_mtrr_type(&v->arch.hvm_vcpu.mtrr,
                                 gfn << PAGE_SHIFT, order) :
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01: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 1WaNak-0007Dv-5u; Wed, 16 Apr 2014 11:01:22 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaT-0007D1-Mh
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:19 +0000
Received: from [85.158.139.211:27453] by server-5.bemta-5.messagelabs.com id
	6C/FD-06049-0F26E435; Wed, 16 Apr 2014 11:01:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-206.messagelabs.com!1397646062!7853476!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1288 invoked from network); 16 Apr 2014 11:01:03 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:01:03 -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 1WaNaQ-0000kS-Kg
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaQ-0000ak-BY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:02 +0000
Date: Wed, 16 Apr 2014 11:01:02 +0000
Message-Id: <E1WaNaQ-0000ak-BY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: fix pinned cache attribute
	handling
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 4d66f069d6abacd392f1301714fdfc64dc92917b
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:07:17 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:07:17 2014 +0200

    x86: fix pinned cache attribute handling
    
    - make sure UC- is only used for PAT purposes (MTRRs and hence EPT
      don't have this type)
    - add order input to "get", and properly handle conflict case (forcing
      an EPT page split)
    - properly detect (and refuse) overlaps during "set"
    - properly use RCU constructs
    - support deleting ranges through a special type input to "set"
    - set ignore-PAT flag in epte_get_entry_emt() when "get" succeeds
    - set "get" output to ~0 (invalid) rather than 0 (UC) on error (the
      caller shouldn't be looking at it anyway)
    - move struct hvm_mem_pinned_cacheattr_range from header to C file
      (used only there)
    
    Note that the code (before and after this change) implies the GFN
    ranges passed to the hypercall to be inclusive, which is in contrast
    to the sole current user in qemu (all variants). It is not clear to me
    at which layer (qemu, libxc, hypervisor) this would best be fixed.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/mtrr.c             |   89 ++++++++++++++++++++++++++++++++---
 xen/arch/x86/mm/shadow/multi.c      |    2 +-
 xen/include/asm-x86/hvm/cacheattr.h |   12 ++---
 xen/include/public/domctl.h         |    1 +
 4 files changed, 88 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 9562726..d494fed 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -551,6 +551,15 @@ bool_t mtrr_pat_not_equal(struct vcpu *vd, struct vcpu *vs)
     return 0;
 }
 
+struct hvm_mem_pinned_cacheattr_range {
+    struct list_head list;
+    uint64_t start, end;
+    uint32_t type;
+    struct rcu_head rcu;
+};
+
+static DEFINE_RCU_READ_LOCK(pinned_cacheattr_rcu_lock);
+
 void hvm_init_cacheattr_region_list(
     struct domain *d)
 {
@@ -573,30 +582,47 @@ void hvm_destroy_cacheattr_region_list(
     }
 }
 
-int32_t hvm_get_mem_pinned_cacheattr(
+int hvm_get_mem_pinned_cacheattr(
     struct domain *d,
     uint64_t guest_fn,
+    unsigned int order,
     uint32_t *type)
 {
     struct hvm_mem_pinned_cacheattr_range *range;
+    int rc = 0;
 
-    *type = 0;
+    *type = ~0;
 
     if ( !is_hvm_domain(d) )
         return 0;
 
+    rcu_read_lock(&pinned_cacheattr_rcu_lock);
     list_for_each_entry_rcu ( range,
                               &d->arch.hvm_domain.pinned_cacheattr_ranges,
                               list )
     {
-        if ( (guest_fn >= range->start) && (guest_fn <= range->end) )
+        if ( (guest_fn >= range->start) &&
+             (guest_fn + (1UL << order) - 1 <= range->end) )
         {
             *type = range->type;
-            return 1;
+            rc = 1;
+            break;
+        }
+        if ( (guest_fn <= range->end) &&
+             (range->start <= guest_fn + (1UL << order) - 1) )
+        {
+            rc = -1;
+            break;
         }
     }
+    rcu_read_unlock(&pinned_cacheattr_rcu_lock);
 
-    return 0;
+    return rc;
+}
+
+static void free_pinned_cacheattr_entry(struct rcu_head *rcu)
+{
+    xfree(container_of(rcu, struct hvm_mem_pinned_cacheattr_range, rcu));
 }
 
 int32_t hvm_set_mem_pinned_cacheattr(
@@ -606,6 +632,28 @@ int32_t hvm_set_mem_pinned_cacheattr(
     uint32_t  type)
 {
     struct hvm_mem_pinned_cacheattr_range *range;
+    int rc = 1;
+
+    if ( !is_hvm_domain(d) || gfn_end < gfn_start )
+        return 0;
+
+    if ( type == XEN_DOMCTL_DELETE_MEM_CACHEATTR )
+    {
+        /* Remove the requested range. */
+        rcu_read_lock(&pinned_cacheattr_rcu_lock);
+        list_for_each_entry_rcu ( range,
+                                  &d->arch.hvm_domain.pinned_cacheattr_ranges,
+                                  list )
+            if ( range->start == gfn_start && range->end == gfn_end )
+            {
+                rcu_read_unlock(&pinned_cacheattr_rcu_lock);
+                list_del_rcu(&range->list);
+                call_rcu(&range->rcu, free_pinned_cacheattr_entry);
+                return 0;
+            }
+        rcu_read_unlock(&pinned_cacheattr_rcu_lock);
+        return -ENOENT;
+    }
 
     if ( !((type == PAT_TYPE_UNCACHABLE) ||
            (type == PAT_TYPE_WRCOMB) ||
@@ -616,6 +664,27 @@ int32_t hvm_set_mem_pinned_cacheattr(
          !is_hvm_domain(d) )
         return -EINVAL;
 
+    rcu_read_lock(&pinned_cacheattr_rcu_lock);
+    list_for_each_entry_rcu ( range,
+                              &d->arch.hvm_domain.pinned_cacheattr_ranges,
+                              list )
+    {
+        if ( range->start == gfn_start && range->end == gfn_end )
+        {
+            range->type = type;
+            rc = 0;
+            break;
+        }
+        if ( range->start <= gfn_end && gfn_start <= range->end )
+        {
+            rc = -EBUSY;
+            break;
+        }
+    }
+    rcu_read_unlock(&pinned_cacheattr_rcu_lock);
+    if ( rc <= 0 )
+        return rc;
+
     range = xzalloc(struct hvm_mem_pinned_cacheattr_range);
     if ( range == NULL )
         return -ENOMEM;
@@ -732,8 +801,14 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     if ( !mfn_valid(mfn_x(mfn)) )
         return MTRR_TYPE_UNCACHABLE;
 
-    if ( hvm_get_mem_pinned_cacheattr(d, gfn, &type) )
-        return type;
+    switch ( hvm_get_mem_pinned_cacheattr(d, gfn, order, &type) )
+    {
+    case 1:
+        *ipat = 1;
+        return type != PAT_TYPE_UC_MINUS ? type : PAT_TYPE_UNCACHABLE;
+    case -1:
+        return -1;
+    }
 
     if ( !iommu_enabled ||
          (rangeset_is_empty(d->iomem_caps) &&
diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index 9dfa345..dc90652 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -601,7 +601,7 @@ _sh_propagate(struct vcpu *v,
          * 3) if disables snoop control, compute the PAT index with
          *    gMTRR and gPAT.
          */
-        if ( hvm_get_mem_pinned_cacheattr(d, gfn_x(target_gfn), &type) )
+        if ( hvm_get_mem_pinned_cacheattr(d, gfn_x(target_gfn), 0, &type) )
             sflags |= pat_type_2_pte_flags(type);
         else if ( d->arch.hvm_domain.is_in_uc_mode )
             sflags |= pat_type_2_pte_flags(PAT_TYPE_UNCACHABLE);
diff --git a/xen/include/asm-x86/hvm/cacheattr.h b/xen/include/asm-x86/hvm/cacheattr.h
index 371ce95..ab1ccef 100644
--- a/xen/include/asm-x86/hvm/cacheattr.h
+++ b/xen/include/asm-x86/hvm/cacheattr.h
@@ -1,12 +1,6 @@
 #ifndef __HVM_CACHEATTR_H__
 #define __HVM_CACHEATTR_H__
 
-struct hvm_mem_pinned_cacheattr_range {
-    struct list_head list;
-    uint64_t start, end;
-    uint32_t type;
-};
-
 void hvm_init_cacheattr_region_list(
     struct domain *d);
 void hvm_destroy_cacheattr_region_list(
@@ -15,11 +9,13 @@ void hvm_destroy_cacheattr_region_list(
 /*
  * To see guest_fn is in the pinned range or not,
  * if yes, return 1, and set type to value in this range
- * if no,  return 0, and set type to 0
+ * if no,  return 0, setting type to ~0
+ * if ambiguous, return -1, setting type to ~0 (possible only for order > 0)
  */
-int32_t hvm_get_mem_pinned_cacheattr(
+int hvm_get_mem_pinned_cacheattr(
     struct domain *d,
     uint64_t guest_fn,
+    unsigned int order,
     uint32_t *type);
 
 
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index f22fe2e..869ae30 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -555,6 +555,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_mapping_t);
 #define XEN_DOMCTL_MEM_CACHEATTR_WP  5
 #define XEN_DOMCTL_MEM_CACHEATTR_WB  6
 #define XEN_DOMCTL_MEM_CACHEATTR_UCM 7
+#define XEN_DOMCTL_DELETE_MEM_CACHEATTR (~(uint32_t)0)
 struct xen_domctl_pin_mem_cacheattr {
     uint64_aligned_t start, end;
     uint32_t type; /* XEN_DOMCTL_MEM_CACHEATTR_* */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01: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 1WaNak-0007Dv-5u; Wed, 16 Apr 2014 11:01:22 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaT-0007D1-Mh
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:19 +0000
Received: from [85.158.139.211:27453] by server-5.bemta-5.messagelabs.com id
	6C/FD-06049-0F26E435; Wed, 16 Apr 2014 11:01:04 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-206.messagelabs.com!1397646062!7853476!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1288 invoked from network); 16 Apr 2014 11:01:03 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:01:03 -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 1WaNaQ-0000kS-Kg
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:02 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaQ-0000ak-BY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:02 +0000
Date: Wed, 16 Apr 2014 11:01:02 +0000
Message-Id: <E1WaNaQ-0000ak-BY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: fix pinned cache attribute
	handling
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 4d66f069d6abacd392f1301714fdfc64dc92917b
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:07:17 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:07:17 2014 +0200

    x86: fix pinned cache attribute handling
    
    - make sure UC- is only used for PAT purposes (MTRRs and hence EPT
      don't have this type)
    - add order input to "get", and properly handle conflict case (forcing
      an EPT page split)
    - properly detect (and refuse) overlaps during "set"
    - properly use RCU constructs
    - support deleting ranges through a special type input to "set"
    - set ignore-PAT flag in epte_get_entry_emt() when "get" succeeds
    - set "get" output to ~0 (invalid) rather than 0 (UC) on error (the
      caller shouldn't be looking at it anyway)
    - move struct hvm_mem_pinned_cacheattr_range from header to C file
      (used only there)
    
    Note that the code (before and after this change) implies the GFN
    ranges passed to the hypercall to be inclusive, which is in contrast
    to the sole current user in qemu (all variants). It is not clear to me
    at which layer (qemu, libxc, hypervisor) this would best be fixed.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Tim Deegan <tim@xen.org>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/mtrr.c             |   89 ++++++++++++++++++++++++++++++++---
 xen/arch/x86/mm/shadow/multi.c      |    2 +-
 xen/include/asm-x86/hvm/cacheattr.h |   12 ++---
 xen/include/public/domctl.h         |    1 +
 4 files changed, 88 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index 9562726..d494fed 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -551,6 +551,15 @@ bool_t mtrr_pat_not_equal(struct vcpu *vd, struct vcpu *vs)
     return 0;
 }
 
+struct hvm_mem_pinned_cacheattr_range {
+    struct list_head list;
+    uint64_t start, end;
+    uint32_t type;
+    struct rcu_head rcu;
+};
+
+static DEFINE_RCU_READ_LOCK(pinned_cacheattr_rcu_lock);
+
 void hvm_init_cacheattr_region_list(
     struct domain *d)
 {
@@ -573,30 +582,47 @@ void hvm_destroy_cacheattr_region_list(
     }
 }
 
-int32_t hvm_get_mem_pinned_cacheattr(
+int hvm_get_mem_pinned_cacheattr(
     struct domain *d,
     uint64_t guest_fn,
+    unsigned int order,
     uint32_t *type)
 {
     struct hvm_mem_pinned_cacheattr_range *range;
+    int rc = 0;
 
-    *type = 0;
+    *type = ~0;
 
     if ( !is_hvm_domain(d) )
         return 0;
 
+    rcu_read_lock(&pinned_cacheattr_rcu_lock);
     list_for_each_entry_rcu ( range,
                               &d->arch.hvm_domain.pinned_cacheattr_ranges,
                               list )
     {
-        if ( (guest_fn >= range->start) && (guest_fn <= range->end) )
+        if ( (guest_fn >= range->start) &&
+             (guest_fn + (1UL << order) - 1 <= range->end) )
         {
             *type = range->type;
-            return 1;
+            rc = 1;
+            break;
+        }
+        if ( (guest_fn <= range->end) &&
+             (range->start <= guest_fn + (1UL << order) - 1) )
+        {
+            rc = -1;
+            break;
         }
     }
+    rcu_read_unlock(&pinned_cacheattr_rcu_lock);
 
-    return 0;
+    return rc;
+}
+
+static void free_pinned_cacheattr_entry(struct rcu_head *rcu)
+{
+    xfree(container_of(rcu, struct hvm_mem_pinned_cacheattr_range, rcu));
 }
 
 int32_t hvm_set_mem_pinned_cacheattr(
@@ -606,6 +632,28 @@ int32_t hvm_set_mem_pinned_cacheattr(
     uint32_t  type)
 {
     struct hvm_mem_pinned_cacheattr_range *range;
+    int rc = 1;
+
+    if ( !is_hvm_domain(d) || gfn_end < gfn_start )
+        return 0;
+
+    if ( type == XEN_DOMCTL_DELETE_MEM_CACHEATTR )
+    {
+        /* Remove the requested range. */
+        rcu_read_lock(&pinned_cacheattr_rcu_lock);
+        list_for_each_entry_rcu ( range,
+                                  &d->arch.hvm_domain.pinned_cacheattr_ranges,
+                                  list )
+            if ( range->start == gfn_start && range->end == gfn_end )
+            {
+                rcu_read_unlock(&pinned_cacheattr_rcu_lock);
+                list_del_rcu(&range->list);
+                call_rcu(&range->rcu, free_pinned_cacheattr_entry);
+                return 0;
+            }
+        rcu_read_unlock(&pinned_cacheattr_rcu_lock);
+        return -ENOENT;
+    }
 
     if ( !((type == PAT_TYPE_UNCACHABLE) ||
            (type == PAT_TYPE_WRCOMB) ||
@@ -616,6 +664,27 @@ int32_t hvm_set_mem_pinned_cacheattr(
          !is_hvm_domain(d) )
         return -EINVAL;
 
+    rcu_read_lock(&pinned_cacheattr_rcu_lock);
+    list_for_each_entry_rcu ( range,
+                              &d->arch.hvm_domain.pinned_cacheattr_ranges,
+                              list )
+    {
+        if ( range->start == gfn_start && range->end == gfn_end )
+        {
+            range->type = type;
+            rc = 0;
+            break;
+        }
+        if ( range->start <= gfn_end && gfn_start <= range->end )
+        {
+            rc = -EBUSY;
+            break;
+        }
+    }
+    rcu_read_unlock(&pinned_cacheattr_rcu_lock);
+    if ( rc <= 0 )
+        return rc;
+
     range = xzalloc(struct hvm_mem_pinned_cacheattr_range);
     if ( range == NULL )
         return -ENOMEM;
@@ -732,8 +801,14 @@ int epte_get_entry_emt(struct domain *d, unsigned long gfn, mfn_t mfn,
     if ( !mfn_valid(mfn_x(mfn)) )
         return MTRR_TYPE_UNCACHABLE;
 
-    if ( hvm_get_mem_pinned_cacheattr(d, gfn, &type) )
-        return type;
+    switch ( hvm_get_mem_pinned_cacheattr(d, gfn, order, &type) )
+    {
+    case 1:
+        *ipat = 1;
+        return type != PAT_TYPE_UC_MINUS ? type : PAT_TYPE_UNCACHABLE;
+    case -1:
+        return -1;
+    }
 
     if ( !iommu_enabled ||
          (rangeset_is_empty(d->iomem_caps) &&
diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index 9dfa345..dc90652 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -601,7 +601,7 @@ _sh_propagate(struct vcpu *v,
          * 3) if disables snoop control, compute the PAT index with
          *    gMTRR and gPAT.
          */
-        if ( hvm_get_mem_pinned_cacheattr(d, gfn_x(target_gfn), &type) )
+        if ( hvm_get_mem_pinned_cacheattr(d, gfn_x(target_gfn), 0, &type) )
             sflags |= pat_type_2_pte_flags(type);
         else if ( d->arch.hvm_domain.is_in_uc_mode )
             sflags |= pat_type_2_pte_flags(PAT_TYPE_UNCACHABLE);
diff --git a/xen/include/asm-x86/hvm/cacheattr.h b/xen/include/asm-x86/hvm/cacheattr.h
index 371ce95..ab1ccef 100644
--- a/xen/include/asm-x86/hvm/cacheattr.h
+++ b/xen/include/asm-x86/hvm/cacheattr.h
@@ -1,12 +1,6 @@
 #ifndef __HVM_CACHEATTR_H__
 #define __HVM_CACHEATTR_H__
 
-struct hvm_mem_pinned_cacheattr_range {
-    struct list_head list;
-    uint64_t start, end;
-    uint32_t type;
-};
-
 void hvm_init_cacheattr_region_list(
     struct domain *d);
 void hvm_destroy_cacheattr_region_list(
@@ -15,11 +9,13 @@ void hvm_destroy_cacheattr_region_list(
 /*
  * To see guest_fn is in the pinned range or not,
  * if yes, return 1, and set type to value in this range
- * if no,  return 0, and set type to 0
+ * if no,  return 0, setting type to ~0
+ * if ambiguous, return -1, setting type to ~0 (possible only for order > 0)
  */
-int32_t hvm_get_mem_pinned_cacheattr(
+int hvm_get_mem_pinned_cacheattr(
     struct domain *d,
     uint64_t guest_fn,
+    unsigned int order,
     uint32_t *type);
 
 
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index f22fe2e..869ae30 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -555,6 +555,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_ioport_mapping_t);
 #define XEN_DOMCTL_MEM_CACHEATTR_WP  5
 #define XEN_DOMCTL_MEM_CACHEATTR_WB  6
 #define XEN_DOMCTL_MEM_CACHEATTR_UCM 7
+#define XEN_DOMCTL_DELETE_MEM_CACHEATTR (~(uint32_t)0)
 struct xen_domctl_pin_mem_cacheattr {
     uint64_aligned_t start, end;
     uint32_t type; /* XEN_DOMCTL_MEM_CACHEATTR_* */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01: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 1WaNak-0007E4-9t; Wed, 16 Apr 2014 11:01:22 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNae-0007D6-0h
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:20 +0000
Received: from [85.158.137.68:35349] by server-11.bemta-3.messagelabs.com id
	A4/D5-19438-BF26E435; Wed, 16 Apr 2014 11:01:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1397646073!7297147!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16591 invoked from network); 16 Apr 2014 11:01:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:01:14 -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 1WaNaa-0000kV-Ra
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaa-0000bE-Ps
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:12 +0000
Date: Wed, 16 Apr 2014 11:01:12 +0000
Message-Id: <E1WaNaa-0000bE-Ps@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/AMD: support further feature
	masking MSRs
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 e74de9c0b19f9bd16d658a96bf6c9ab9a2a639e9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:16:00 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:16:00 2014 +0200

    x86/AMD: support further feature masking MSRs
    
    Newer AMD CPUs also allow masking CPUID leaf 6 ECX and CPUID leaf 7
    sub-leaf 0 EAX and EBX.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Aravind Gopalakrishnan<aravind.gopalakrishnan@amd.com>
---
 docs/misc/xen-command-line.markdown |   32 +++++++++++++++++-----
 xen/arch/x86/cpu/amd.c              |   51 ++++++++++++++++++++++++++++++++--
 xen/include/asm-x86/msr-index.h     |    2 +
 3 files changed, 75 insertions(+), 10 deletions(-)

diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
index 689ffe6..87de2dc 100644
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -331,24 +331,42 @@ Indicate where the responsibility for driving power states lies.
 ### cpuid\_mask\_cpu (AMD only)
 > `= fam_0f_rev_c | fam_0f_rev_d | fam_0f_rev_e | fam_0f_rev_f | fam_0f_rev_g | fam_10_rev_b | fam_10_rev_c | fam_11_rev_b`
 
-If the other **cpuid\_mask\_{,ext\_}e{c,d}x** options are fully set
-(unspecified on the command line), specify a pre-canned cpuid mask to
-mask the current processor down to appear as the specified processor.
-It is important to ensure that all hosts in a pool appear the same to
-guests to allow successful live migration.
+If the other **cpuid\_mask\_{,ext\_,thermal\_,l7s0\_}e{a,b,c,d}x**
+options are fully set (unspecified on the command line), specify a
+pre-canned cpuid mask to mask the current processor down to appear as
+the specified processor. It is important to ensure that all hosts in a
+pool appear the same to guests to allow successful live migration.
 
-### cpuid\_mask\_ ecx,edx,ext\_ecx,ext\_edx,xsave_eax
+### cpuid\_mask\_{{,ext\_}ecx,edx}
 > `= <integer>`
 
 > Default: `~0` (all bits set)
 
-These five command line parameters are used to specify cpuid masks to
+These four command line parameters are used to specify cpuid masks to
 help with cpuid levelling across a pool of hosts.  Setting a bit in
 the mask indicates that the feature should be enabled, while clearing
 a bit in the mask indicates that the feature should be disabled.  It
 is important to ensure that all hosts in a pool appear the same to
 guests to allow successful live migration.
 
+### cpuid\_mask\_xsave\_eax (Intel only)
+> `= <integer>`
+
+> Default: `~0` (all bits set)
+
+This command line parameter is also used to specify a cpuid mask to
+help with cpuid levelling across a pool of hosts.  See the description
+of the other respective options above.
+
+### cpuid\_mask\_{l7s0\_{eax,ebx},thermal\_ecx} (AMD only)
+> `= <integer>`
+
+> Default: `~0` (all bits set)
+
+These three command line parameters are also used to specify cpuid
+masks to help with cpuid levelling across a pool of hosts.  See the
+description of the other respective options above.
+
 ### cpuidle
 > `= <boolean>`
 
diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index d55c0fd..958eab1 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -30,9 +30,17 @@
  * "fam_10_rev_c"
  * "fam_11_rev_b"
  */
-static char opt_famrev[14];
+static char __initdata opt_famrev[14];
 string_param("cpuid_mask_cpu", opt_famrev);
 
+static unsigned int __initdata opt_cpuid_mask_l7s0_eax = ~0u;
+integer_param("cpuid_mask_l7s0_eax", opt_cpuid_mask_l7s0_eax);
+static unsigned int __initdata opt_cpuid_mask_l7s0_ebx = ~0u;
+integer_param("cpuid_mask_l7s0_ebx", opt_cpuid_mask_l7s0_ebx);
+
+static unsigned int __initdata opt_cpuid_mask_thermal_ecx = ~0u;
+integer_param("cpuid_mask_thermal_ecx", opt_cpuid_mask_thermal_ecx);
+
 /* 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);
@@ -96,7 +104,11 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 {
 	static unsigned int feat_ecx, feat_edx;
 	static unsigned int extfeat_ecx, extfeat_edx;
+	static unsigned int l7s0_eax, l7s0_ebx;
+	static unsigned int thermal_ecx;
+	static bool_t skip_l7s0_eax_ebx, skip_thermal_ecx;
 	static enum { not_parsed, no_mask, set_mask } status;
+	unsigned int eax, ebx, ecx, edx;
 
 	if (status == no_mask)
 		return;
@@ -104,7 +116,7 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 	if (status == set_mask)
 		goto setmask;
 
-	ASSERT((status == not_parsed) && (smp_processor_id() == 0));
+	ASSERT((status == not_parsed) && (c == &boot_cpu_data));
 	status = no_mask;
 
 	/* Fam11 doesn't support masking at all. */
@@ -112,11 +124,16 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 		return;
 
 	if (~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx &
-	      opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) {
+	      opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx &
+	      opt_cpuid_mask_l7s0_eax & opt_cpuid_mask_l7s0_ebx &
+	      opt_cpuid_mask_thermal_ecx)) {
 		feat_ecx = opt_cpuid_mask_ecx;
 		feat_edx = opt_cpuid_mask_edx;
 		extfeat_ecx = opt_cpuid_mask_ext_ecx;
 		extfeat_edx = opt_cpuid_mask_ext_edx;
+		l7s0_eax = opt_cpuid_mask_l7s0_eax;
+		l7s0_ebx = opt_cpuid_mask_l7s0_ebx;
+		thermal_ecx = opt_cpuid_mask_thermal_ecx;
 	} else if (*opt_famrev == '\0') {
 		return;
 	} else if (!strcmp(opt_famrev, "fam_0f_rev_c")) {
@@ -179,11 +196,39 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 	printk("Writing CPUID extended feature mask ECX:EDX -> %08Xh:%08Xh\n", 
 	       extfeat_ecx, extfeat_edx);
 
+	if (c->cpuid_level >= 7)
+		cpuid_count(7, 0, &eax, &ebx, &ecx, &edx);
+	else
+		ebx = eax = 0;
+	if ((eax | ebx) && ~(l7s0_eax & l7s0_ebx)) {
+		if (l7s0_eax > eax)
+			l7s0_eax = eax;
+		l7s0_ebx &= ebx;
+		printk("Writing CPUID leaf 7 subleaf 0 feature mask EAX:EBX -> %08Xh:%08Xh\n",
+		       l7s0_eax, l7s0_ebx);
+	} else
+		skip_l7s0_eax_ebx = 1;
+
+	/* Only Fam15 has the respective MSR. */
+	ecx = c->x86 == 0x15 && c->cpuid_level >= 6 ? cpuid_ecx(6) : 0;
+	if (ecx && ~thermal_ecx) {
+		thermal_ecx &= ecx;
+		printk("Writing CPUID thermal/power feature mask ECX -> %08Xh\n",
+		       thermal_ecx);
+	} else
+		skip_thermal_ecx = 1;
+
  setmask:
 	/* AMD processors prior to family 10h required a 32-bit password */
 	if (c->x86 >= 0x10) {
 		wrmsr(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx);
 		wrmsr(MSR_K8_EXT_FEATURE_MASK, extfeat_edx, extfeat_ecx);
+		if (!skip_l7s0_eax_ebx)
+			wrmsr(MSR_AMD_L7S0_FEATURE_MASK, l7s0_ebx, l7s0_eax);
+		if (!skip_thermal_ecx) {
+			rdmsr(MSR_AMD_THRM_FEATURE_MASK, eax, edx);
+			wrmsr(MSR_AMD_THRM_FEATURE_MASK, thermal_ecx, edx);
+		}
 	} else {
 		wrmsr_amd(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx);
 		wrmsr_amd(MSR_K8_EXT_FEATURE_MASK, extfeat_edx, extfeat_ecx);
diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h
index ff86ed9..7bb69fe 100644
--- a/xen/include/asm-x86/msr-index.h
+++ b/xen/include/asm-x86/msr-index.h
@@ -192,6 +192,8 @@
 #define MSR_AMD_FAM15H_EVNTSEL5		0xc001020a
 #define MSR_AMD_FAM15H_PERFCTR5		0xc001020b
 
+#define MSR_AMD_L7S0_FEATURE_MASK	0xc0011002
+#define MSR_AMD_THRM_FEATURE_MASK	0xc0011003
 #define MSR_K8_FEATURE_MASK		0xc0011004
 #define MSR_K8_EXT_FEATURE_MASK		0xc0011005
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01: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 1WaNak-0007E4-9t; Wed, 16 Apr 2014 11:01:22 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNae-0007D6-0h
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:20 +0000
Received: from [85.158.137.68:35349] by server-11.bemta-3.messagelabs.com id
	A4/D5-19438-BF26E435; Wed, 16 Apr 2014 11:01:15 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-3.tower-31.messagelabs.com!1397646073!7297147!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16591 invoked from network); 16 Apr 2014 11:01:14 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-3.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:01:14 -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 1WaNaa-0000kV-Ra
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:12 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNaa-0000bE-Ps
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:12 +0000
Date: Wed, 16 Apr 2014 11:01:12 +0000
Message-Id: <E1WaNaa-0000bE-Ps@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/AMD: support further feature
	masking MSRs
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 e74de9c0b19f9bd16d658a96bf6c9ab9a2a639e9
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:16:00 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:16:00 2014 +0200

    x86/AMD: support further feature masking MSRs
    
    Newer AMD CPUs also allow masking CPUID leaf 6 ECX and CPUID leaf 7
    sub-leaf 0 EAX and EBX.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Aravind Gopalakrishnan<aravind.gopalakrishnan@amd.com>
---
 docs/misc/xen-command-line.markdown |   32 +++++++++++++++++-----
 xen/arch/x86/cpu/amd.c              |   51 ++++++++++++++++++++++++++++++++--
 xen/include/asm-x86/msr-index.h     |    2 +
 3 files changed, 75 insertions(+), 10 deletions(-)

diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
index 689ffe6..87de2dc 100644
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -331,24 +331,42 @@ Indicate where the responsibility for driving power states lies.
 ### cpuid\_mask\_cpu (AMD only)
 > `= fam_0f_rev_c | fam_0f_rev_d | fam_0f_rev_e | fam_0f_rev_f | fam_0f_rev_g | fam_10_rev_b | fam_10_rev_c | fam_11_rev_b`
 
-If the other **cpuid\_mask\_{,ext\_}e{c,d}x** options are fully set
-(unspecified on the command line), specify a pre-canned cpuid mask to
-mask the current processor down to appear as the specified processor.
-It is important to ensure that all hosts in a pool appear the same to
-guests to allow successful live migration.
+If the other **cpuid\_mask\_{,ext\_,thermal\_,l7s0\_}e{a,b,c,d}x**
+options are fully set (unspecified on the command line), specify a
+pre-canned cpuid mask to mask the current processor down to appear as
+the specified processor. It is important to ensure that all hosts in a
+pool appear the same to guests to allow successful live migration.
 
-### cpuid\_mask\_ ecx,edx,ext\_ecx,ext\_edx,xsave_eax
+### cpuid\_mask\_{{,ext\_}ecx,edx}
 > `= <integer>`
 
 > Default: `~0` (all bits set)
 
-These five command line parameters are used to specify cpuid masks to
+These four command line parameters are used to specify cpuid masks to
 help with cpuid levelling across a pool of hosts.  Setting a bit in
 the mask indicates that the feature should be enabled, while clearing
 a bit in the mask indicates that the feature should be disabled.  It
 is important to ensure that all hosts in a pool appear the same to
 guests to allow successful live migration.
 
+### cpuid\_mask\_xsave\_eax (Intel only)
+> `= <integer>`
+
+> Default: `~0` (all bits set)
+
+This command line parameter is also used to specify a cpuid mask to
+help with cpuid levelling across a pool of hosts.  See the description
+of the other respective options above.
+
+### cpuid\_mask\_{l7s0\_{eax,ebx},thermal\_ecx} (AMD only)
+> `= <integer>`
+
+> Default: `~0` (all bits set)
+
+These three command line parameters are also used to specify cpuid
+masks to help with cpuid levelling across a pool of hosts.  See the
+description of the other respective options above.
+
 ### cpuidle
 > `= <boolean>`
 
diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index d55c0fd..958eab1 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -30,9 +30,17 @@
  * "fam_10_rev_c"
  * "fam_11_rev_b"
  */
-static char opt_famrev[14];
+static char __initdata opt_famrev[14];
 string_param("cpuid_mask_cpu", opt_famrev);
 
+static unsigned int __initdata opt_cpuid_mask_l7s0_eax = ~0u;
+integer_param("cpuid_mask_l7s0_eax", opt_cpuid_mask_l7s0_eax);
+static unsigned int __initdata opt_cpuid_mask_l7s0_ebx = ~0u;
+integer_param("cpuid_mask_l7s0_ebx", opt_cpuid_mask_l7s0_ebx);
+
+static unsigned int __initdata opt_cpuid_mask_thermal_ecx = ~0u;
+integer_param("cpuid_mask_thermal_ecx", opt_cpuid_mask_thermal_ecx);
+
 /* 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);
@@ -96,7 +104,11 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 {
 	static unsigned int feat_ecx, feat_edx;
 	static unsigned int extfeat_ecx, extfeat_edx;
+	static unsigned int l7s0_eax, l7s0_ebx;
+	static unsigned int thermal_ecx;
+	static bool_t skip_l7s0_eax_ebx, skip_thermal_ecx;
 	static enum { not_parsed, no_mask, set_mask } status;
+	unsigned int eax, ebx, ecx, edx;
 
 	if (status == no_mask)
 		return;
@@ -104,7 +116,7 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 	if (status == set_mask)
 		goto setmask;
 
-	ASSERT((status == not_parsed) && (smp_processor_id() == 0));
+	ASSERT((status == not_parsed) && (c == &boot_cpu_data));
 	status = no_mask;
 
 	/* Fam11 doesn't support masking at all. */
@@ -112,11 +124,16 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 		return;
 
 	if (~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx &
-	      opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) {
+	      opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx &
+	      opt_cpuid_mask_l7s0_eax & opt_cpuid_mask_l7s0_ebx &
+	      opt_cpuid_mask_thermal_ecx)) {
 		feat_ecx = opt_cpuid_mask_ecx;
 		feat_edx = opt_cpuid_mask_edx;
 		extfeat_ecx = opt_cpuid_mask_ext_ecx;
 		extfeat_edx = opt_cpuid_mask_ext_edx;
+		l7s0_eax = opt_cpuid_mask_l7s0_eax;
+		l7s0_ebx = opt_cpuid_mask_l7s0_ebx;
+		thermal_ecx = opt_cpuid_mask_thermal_ecx;
 	} else if (*opt_famrev == '\0') {
 		return;
 	} else if (!strcmp(opt_famrev, "fam_0f_rev_c")) {
@@ -179,11 +196,39 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 	printk("Writing CPUID extended feature mask ECX:EDX -> %08Xh:%08Xh\n", 
 	       extfeat_ecx, extfeat_edx);
 
+	if (c->cpuid_level >= 7)
+		cpuid_count(7, 0, &eax, &ebx, &ecx, &edx);
+	else
+		ebx = eax = 0;
+	if ((eax | ebx) && ~(l7s0_eax & l7s0_ebx)) {
+		if (l7s0_eax > eax)
+			l7s0_eax = eax;
+		l7s0_ebx &= ebx;
+		printk("Writing CPUID leaf 7 subleaf 0 feature mask EAX:EBX -> %08Xh:%08Xh\n",
+		       l7s0_eax, l7s0_ebx);
+	} else
+		skip_l7s0_eax_ebx = 1;
+
+	/* Only Fam15 has the respective MSR. */
+	ecx = c->x86 == 0x15 && c->cpuid_level >= 6 ? cpuid_ecx(6) : 0;
+	if (ecx && ~thermal_ecx) {
+		thermal_ecx &= ecx;
+		printk("Writing CPUID thermal/power feature mask ECX -> %08Xh\n",
+		       thermal_ecx);
+	} else
+		skip_thermal_ecx = 1;
+
  setmask:
 	/* AMD processors prior to family 10h required a 32-bit password */
 	if (c->x86 >= 0x10) {
 		wrmsr(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx);
 		wrmsr(MSR_K8_EXT_FEATURE_MASK, extfeat_edx, extfeat_ecx);
+		if (!skip_l7s0_eax_ebx)
+			wrmsr(MSR_AMD_L7S0_FEATURE_MASK, l7s0_ebx, l7s0_eax);
+		if (!skip_thermal_ecx) {
+			rdmsr(MSR_AMD_THRM_FEATURE_MASK, eax, edx);
+			wrmsr(MSR_AMD_THRM_FEATURE_MASK, thermal_ecx, edx);
+		}
 	} else {
 		wrmsr_amd(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx);
 		wrmsr_amd(MSR_K8_EXT_FEATURE_MASK, extfeat_edx, extfeat_ecx);
diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h
index ff86ed9..7bb69fe 100644
--- a/xen/include/asm-x86/msr-index.h
+++ b/xen/include/asm-x86/msr-index.h
@@ -192,6 +192,8 @@
 #define MSR_AMD_FAM15H_EVNTSEL5		0xc001020a
 #define MSR_AMD_FAM15H_PERFCTR5		0xc001020b
 
+#define MSR_AMD_L7S0_FEATURE_MASK	0xc0011002
+#define MSR_AMD_THRM_FEATURE_MASK	0xc0011003
 #define MSR_K8_FEATURE_MASK		0xc0011004
 #define MSR_K8_EXT_FEATURE_MASK		0xc0011005
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01: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 1WaNap-0007GQ-7S; Wed, 16 Apr 2014 11:01:27 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNan-0007Fj-SN
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:26 +0000
Received: from [85.158.139.211:64167] by server-12.bemta-5.messagelabs.com id
	BC/9E-03824-5036E435; Wed, 16 Apr 2014 11:01:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1397646083!6010025!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7969 invoked from network); 16 Apr 2014 11:01:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:01:24 -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 1WaNal-0000kY-2k
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNak-0000cJ-W9
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:23 +0000
Date: Wed, 16 Apr 2014 11:01:22 +0000
Message-Id: <E1WaNak-0000cJ-W9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/AMD: clean up pre-canned
	family/revision handling for CPUID masking
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 7c6c8cca60534041ea8078845d88cc2e40f2c336
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:16:46 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:16:46 2014 +0200

    x86/AMD: clean up pre-canned family/revision handling for CPUID masking
    
    Make it so this is easier to extend, and move the parsing code/data
    into .init.* sections.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Aravind Gopalakrishnan<aravind.gopalakrishnan@amd.com>
---
 xen/arch/x86/cpu/amd.c |   99 +++++++++++++++++++++++++++---------------------
 1 files changed, 56 insertions(+), 43 deletions(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 958eab1..ea158cb 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -91,6 +91,51 @@ static inline int wrmsr_amd_safe(unsigned int msr, unsigned int lo,
 	return err;
 }
 
+static const struct cpuidmask {
+	uint16_t fam;
+	char rev[2];
+	unsigned int ecx, edx, ext_ecx, ext_edx;
+} pre_canned[] __initconst = {
+#define CAN(fam, id, rev) { \
+		fam, #rev, \
+		AMD_FEATURES_##id##_REV_##rev##_ECX, \
+		AMD_FEATURES_##id##_REV_##rev##_EDX, \
+		AMD_EXTFEATURES_##id##_REV_##rev##_ECX, \
+		AMD_EXTFEATURES_##id##_REV_##rev##_EDX \
+	}
+#define CAN_FAM(fam, rev) CAN(0x##fam, FAM##fam##h, rev)
+#define CAN_K8(rev)       CAN(0x0f,    K8,          rev)
+	CAN_FAM(11, B),
+	CAN_FAM(10, C),
+	CAN_FAM(10, B),
+	CAN_K8(G),
+	CAN_K8(F),
+	CAN_K8(E),
+	CAN_K8(D),
+	CAN_K8(C)
+#undef CAN
+};
+
+static const struct cpuidmask *__init noinline get_cpuidmask(const char *opt)
+{
+	unsigned long fam;
+	char rev;
+	unsigned int i;
+
+	if (strncmp(opt, "fam_", 4))
+		return NULL;
+	fam = simple_strtoul(opt + 4, &opt, 16);
+	if (strncmp(opt, "_rev_", 5) || !opt[5] || opt[6])
+		return NULL;
+	rev = toupper(opt[5]);
+
+	for (i = 0; i < ARRAY_SIZE(pre_canned); ++i)
+		if (fam == pre_canned[i].fam && rev == *pre_canned[i].rev)
+			return &pre_canned[i];
+
+	return NULL;
+}
+
 /*
  * Mask the features and extended features returned by CPUID.  Parameters are
  * set from the boot line via two methods:
@@ -136,50 +181,18 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 		thermal_ecx = opt_cpuid_mask_thermal_ecx;
 	} else if (*opt_famrev == '\0') {
 		return;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_c")) {
-		feat_ecx = AMD_FEATURES_K8_REV_C_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_C_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_C_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_C_EDX;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_d")) {
-		feat_ecx = AMD_FEATURES_K8_REV_D_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_D_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_D_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_D_EDX;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_e")) {
-		feat_ecx = AMD_FEATURES_K8_REV_E_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_E_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_E_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_E_EDX;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_f")) {
-		feat_ecx = AMD_FEATURES_K8_REV_F_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_F_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_F_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_F_EDX;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_g")) {
-		feat_ecx = AMD_FEATURES_K8_REV_G_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_G_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_G_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_G_EDX;
-	} else if (!strcmp(opt_famrev, "fam_10_rev_b")) {
-		feat_ecx = AMD_FEATURES_FAM10h_REV_B_ECX;
-		feat_edx = AMD_FEATURES_FAM10h_REV_B_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_FAM10h_REV_B_ECX;
-		extfeat_edx = AMD_EXTFEATURES_FAM10h_REV_B_EDX;
-	} else if (!strcmp(opt_famrev, "fam_10_rev_c")) {
-		feat_ecx = AMD_FEATURES_FAM10h_REV_C_ECX;
-		feat_edx = AMD_FEATURES_FAM10h_REV_C_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_FAM10h_REV_C_ECX;
-		extfeat_edx = AMD_EXTFEATURES_FAM10h_REV_C_EDX;
-	} else if (!strcmp(opt_famrev, "fam_11_rev_b")) {
-		feat_ecx = AMD_FEATURES_FAM11h_REV_B_ECX;
-		feat_edx = AMD_FEATURES_FAM11h_REV_B_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_FAM11h_REV_B_ECX;
-		extfeat_edx = AMD_EXTFEATURES_FAM11h_REV_B_EDX;
 	} else {
-		printk("Invalid processor string: %s\n", opt_famrev);
-		printk("CPUID will not be masked\n");
-		return;
+		const struct cpuidmask *m = get_cpuidmask(opt_famrev);
+
+		if (!m) {
+			printk("Invalid processor string: %s\n", opt_famrev);
+			printk("CPUID will not be masked\n");
+			return;
+		}
+		feat_ecx = m->ecx;
+		feat_edx = m->edx;
+		extfeat_ecx = m->ext_ecx;
+		extfeat_edx = m->ext_edx;
 	}
 
         /* Setting bits in the CPUID mask MSR that are not set in the
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01: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 1WaNap-0007GQ-7S; Wed, 16 Apr 2014 11:01:27 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNan-0007Fj-SN
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:26 +0000
Received: from [85.158.139.211:64167] by server-12.bemta-5.messagelabs.com id
	BC/9E-03824-5036E435; Wed, 16 Apr 2014 11:01:25 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1397646083!6010025!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7969 invoked from network); 16 Apr 2014 11:01:24 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:01:24 -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 1WaNal-0000kY-2k
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:23 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNak-0000cJ-W9
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:23 +0000
Date: Wed, 16 Apr 2014 11:01:22 +0000
Message-Id: <E1WaNak-0000cJ-W9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/AMD: clean up pre-canned
	family/revision handling for CPUID masking
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 7c6c8cca60534041ea8078845d88cc2e40f2c336
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Apr 10 16:16:46 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 16:16:46 2014 +0200

    x86/AMD: clean up pre-canned family/revision handling for CPUID masking
    
    Make it so this is easier to extend, and move the parsing code/data
    into .init.* sections.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Aravind Gopalakrishnan<aravind.gopalakrishnan@amd.com>
---
 xen/arch/x86/cpu/amd.c |   99 +++++++++++++++++++++++++++---------------------
 1 files changed, 56 insertions(+), 43 deletions(-)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 958eab1..ea158cb 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -91,6 +91,51 @@ static inline int wrmsr_amd_safe(unsigned int msr, unsigned int lo,
 	return err;
 }
 
+static const struct cpuidmask {
+	uint16_t fam;
+	char rev[2];
+	unsigned int ecx, edx, ext_ecx, ext_edx;
+} pre_canned[] __initconst = {
+#define CAN(fam, id, rev) { \
+		fam, #rev, \
+		AMD_FEATURES_##id##_REV_##rev##_ECX, \
+		AMD_FEATURES_##id##_REV_##rev##_EDX, \
+		AMD_EXTFEATURES_##id##_REV_##rev##_ECX, \
+		AMD_EXTFEATURES_##id##_REV_##rev##_EDX \
+	}
+#define CAN_FAM(fam, rev) CAN(0x##fam, FAM##fam##h, rev)
+#define CAN_K8(rev)       CAN(0x0f,    K8,          rev)
+	CAN_FAM(11, B),
+	CAN_FAM(10, C),
+	CAN_FAM(10, B),
+	CAN_K8(G),
+	CAN_K8(F),
+	CAN_K8(E),
+	CAN_K8(D),
+	CAN_K8(C)
+#undef CAN
+};
+
+static const struct cpuidmask *__init noinline get_cpuidmask(const char *opt)
+{
+	unsigned long fam;
+	char rev;
+	unsigned int i;
+
+	if (strncmp(opt, "fam_", 4))
+		return NULL;
+	fam = simple_strtoul(opt + 4, &opt, 16);
+	if (strncmp(opt, "_rev_", 5) || !opt[5] || opt[6])
+		return NULL;
+	rev = toupper(opt[5]);
+
+	for (i = 0; i < ARRAY_SIZE(pre_canned); ++i)
+		if (fam == pre_canned[i].fam && rev == *pre_canned[i].rev)
+			return &pre_canned[i];
+
+	return NULL;
+}
+
 /*
  * Mask the features and extended features returned by CPUID.  Parameters are
  * set from the boot line via two methods:
@@ -136,50 +181,18 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
 		thermal_ecx = opt_cpuid_mask_thermal_ecx;
 	} else if (*opt_famrev == '\0') {
 		return;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_c")) {
-		feat_ecx = AMD_FEATURES_K8_REV_C_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_C_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_C_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_C_EDX;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_d")) {
-		feat_ecx = AMD_FEATURES_K8_REV_D_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_D_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_D_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_D_EDX;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_e")) {
-		feat_ecx = AMD_FEATURES_K8_REV_E_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_E_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_E_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_E_EDX;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_f")) {
-		feat_ecx = AMD_FEATURES_K8_REV_F_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_F_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_F_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_F_EDX;
-	} else if (!strcmp(opt_famrev, "fam_0f_rev_g")) {
-		feat_ecx = AMD_FEATURES_K8_REV_G_ECX;
-		feat_edx = AMD_FEATURES_K8_REV_G_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_K8_REV_G_ECX;
-		extfeat_edx = AMD_EXTFEATURES_K8_REV_G_EDX;
-	} else if (!strcmp(opt_famrev, "fam_10_rev_b")) {
-		feat_ecx = AMD_FEATURES_FAM10h_REV_B_ECX;
-		feat_edx = AMD_FEATURES_FAM10h_REV_B_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_FAM10h_REV_B_ECX;
-		extfeat_edx = AMD_EXTFEATURES_FAM10h_REV_B_EDX;
-	} else if (!strcmp(opt_famrev, "fam_10_rev_c")) {
-		feat_ecx = AMD_FEATURES_FAM10h_REV_C_ECX;
-		feat_edx = AMD_FEATURES_FAM10h_REV_C_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_FAM10h_REV_C_ECX;
-		extfeat_edx = AMD_EXTFEATURES_FAM10h_REV_C_EDX;
-	} else if (!strcmp(opt_famrev, "fam_11_rev_b")) {
-		feat_ecx = AMD_FEATURES_FAM11h_REV_B_ECX;
-		feat_edx = AMD_FEATURES_FAM11h_REV_B_EDX;
-		extfeat_ecx = AMD_EXTFEATURES_FAM11h_REV_B_ECX;
-		extfeat_edx = AMD_EXTFEATURES_FAM11h_REV_B_EDX;
 	} else {
-		printk("Invalid processor string: %s\n", opt_famrev);
-		printk("CPUID will not be masked\n");
-		return;
+		const struct cpuidmask *m = get_cpuidmask(opt_famrev);
+
+		if (!m) {
+			printk("Invalid processor string: %s\n", opt_famrev);
+			printk("CPUID will not be masked\n");
+			return;
+		}
+		feat_ecx = m->ecx;
+		feat_edx = m->edx;
+		extfeat_ecx = m->ext_ecx;
+		extfeat_edx = m->ext_edx;
 	}
 
         /* Setting bits in the CPUID mask MSR that are not set in the
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:37 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01:37 +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 1WaNaz-0007J4-BX; Wed, 16 Apr 2014 11:01:37 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNay-0007Ig-9g
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:36 +0000
Received: from [193.109.254.147:12124] by server-9.bemta-14.messagelabs.com id
	A2/79-03644-F036E435; Wed, 16 Apr 2014 11:01:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1397646093!8697313!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29173 invoked from network); 16 Apr 2014 11:01:34 -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;
	16 Apr 2014 11:01:34 -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 1WaNav-0000km-CG
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNav-0000cn-73
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:33 +0000
Date: Wed, 16 Apr 2014 11:01:33 +0000
Message-Id: <E1WaNav-0000cn-73@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] serial: expand the PCIe params for an
	Oxford two port serial cards
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 c8f077c7962efd64dd42ccf70fab6db239f940fa
Author:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
AuthorDate: Thu Apr 10 17:59:20 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 17:59:20 2014 +0200

    serial: expand the PCIe params for an Oxford two port serial cards
    
    Which of course has a different model number and sports two
    serial outputs.
    
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/drivers/char/ns16550.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 44e13b7..5952de1 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -105,6 +105,7 @@ enum {
     param_default = 0,
     param_trumanage,
     param_oxford,
+    param_oxford_2port,
 };
 /*
  * Create lookup tables for specific MMIO devices..
@@ -130,6 +131,16 @@ static const struct ns16550_config_param __initconst uart_param[] = {
         .fifo_size = 16,
         .lsr_mask = UART_LSR_THRE,
         .max_bars = 1, /* It can do more, but we would need more custom code.*/
+    },
+    [param_oxford_2port] = {
+        .base_baud = 4000000,
+        .uart_offset = 0x200,
+        .first_offset = 0x1000,
+        .reg_width = 1,
+        .reg_shift = 0,
+        .fifo_size = 16,
+        .lsr_mask = UART_LSR_THRE,
+        .max_bars = 2,
     }
 };
 static const struct ns16550_config_mmio __initconst uart_config[] =
@@ -158,12 +169,24 @@ static const struct ns16550_config_mmio __initconst uart_config[] =
         .dev_id = 0xc138,
         .param = param_oxford,
     },
+    /* OXPCIe952 2 Native UART  */
+    {
+        .vendor_id = PCI_VENDOR_ID_OXSEMI,
+        .dev_id = 0xc158,
+        .param = param_oxford_2port,
+    },
     /* OXPCIe952 1 Native UART  */
     {
         .vendor_id = PCI_VENDOR_ID_OXSEMI,
         .dev_id = 0xc13d,
         .param = param_oxford,
     },
+    /* OXPCIe952 2 Native UART  */
+    {
+        .vendor_id = PCI_VENDOR_ID_OXSEMI,
+        .dev_id = 0xc15d,
+        .param = param_oxford_2port,
+    },
     /* OXPCIe952 1 Native UART  */
     {
         .vendor_id = PCI_VENDOR_ID_OXSEMI,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:37 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01:37 +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 1WaNaz-0007J4-BX; Wed, 16 Apr 2014 11:01:37 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNay-0007Ig-9g
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:36 +0000
Received: from [193.109.254.147:12124] by server-9.bemta-14.messagelabs.com id
	A2/79-03644-F036E435; Wed, 16 Apr 2014 11:01:35 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1397646093!8697313!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29173 invoked from network); 16 Apr 2014 11:01:34 -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;
	16 Apr 2014 11:01:34 -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 1WaNav-0000km-CG
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:33 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNav-0000cn-73
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:33 +0000
Date: Wed, 16 Apr 2014 11:01:33 +0000
Message-Id: <E1WaNav-0000cn-73@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] serial: expand the PCIe params for an
	Oxford two port serial cards
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 c8f077c7962efd64dd42ccf70fab6db239f940fa
Author:     Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
AuthorDate: Thu Apr 10 17:59:20 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 10 17:59:20 2014 +0200

    serial: expand the PCIe params for an Oxford two port serial cards
    
    Which of course has a different model number and sports two
    serial outputs.
    
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/drivers/char/ns16550.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 44e13b7..5952de1 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -105,6 +105,7 @@ enum {
     param_default = 0,
     param_trumanage,
     param_oxford,
+    param_oxford_2port,
 };
 /*
  * Create lookup tables for specific MMIO devices..
@@ -130,6 +131,16 @@ static const struct ns16550_config_param __initconst uart_param[] = {
         .fifo_size = 16,
         .lsr_mask = UART_LSR_THRE,
         .max_bars = 1, /* It can do more, but we would need more custom code.*/
+    },
+    [param_oxford_2port] = {
+        .base_baud = 4000000,
+        .uart_offset = 0x200,
+        .first_offset = 0x1000,
+        .reg_width = 1,
+        .reg_shift = 0,
+        .fifo_size = 16,
+        .lsr_mask = UART_LSR_THRE,
+        .max_bars = 2,
     }
 };
 static const struct ns16550_config_mmio __initconst uart_config[] =
@@ -158,12 +169,24 @@ static const struct ns16550_config_mmio __initconst uart_config[] =
         .dev_id = 0xc138,
         .param = param_oxford,
     },
+    /* OXPCIe952 2 Native UART  */
+    {
+        .vendor_id = PCI_VENDOR_ID_OXSEMI,
+        .dev_id = 0xc158,
+        .param = param_oxford_2port,
+    },
     /* OXPCIe952 1 Native UART  */
     {
         .vendor_id = PCI_VENDOR_ID_OXSEMI,
         .dev_id = 0xc13d,
         .param = param_oxford,
     },
+    /* OXPCIe952 2 Native UART  */
+    {
+        .vendor_id = PCI_VENDOR_ID_OXSEMI,
+        .dev_id = 0xc15d,
+        .param = param_oxford_2port,
+    },
     /* OXPCIe952 1 Native UART  */
     {
         .vendor_id = PCI_VENDOR_ID_OXSEMI,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01:49 +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 1WaNbB-0007M3-ER; Wed, 16 Apr 2014 11:01:49 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNb9-0007Le-BD
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:47 +0000
Received: from [85.158.137.68:62762] by server-13.bemta-3.messagelabs.com id
	44/FD-18692-A136E435; Wed, 16 Apr 2014 11:01:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397646103!7292971!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20864 invoked from network); 16 Apr 2014 11:01:44 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:01:44 -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 1WaNb5-0000ks-KG
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNb5-0000d9-Ip
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:43 +0000
Date: Wed, 16 Apr 2014 11:01:43 +0000
Message-Id: <E1WaNb5-0000d9-Ip@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] use domid check in is_hardware_domain
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 97587d01b36b1e8f406c7c93e5ae9c50646bcaeb
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:16:52 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:16:52 2014 +0200

    use domid check in is_hardware_domain
    
    Instead of checking is_privileged to determine if a domain should
    control the hardware, check that the domain_id is equal to zero (which
    is currently the only domain for which is_privileged is true).  This
    allows other places where domain_id is checked for zero to be replaced
    with is_hardware_domain.
    
    The distinction between is_hardware_domain, is_control_domain, and
    domain 0 is based on the following disaggregation model:
    
    Domain 0 bootstraps the system.  It may remain to perform requested
    builds of domains that need a minimal trust chain (i.e. vTPM domains).
    Other than being built by the hypervisor, nothing is special about this
    domain - although it may be useful to have is_control_domain() return
    true depending on the toolstack it uses to build other domains.
    
    The hardware domain manages devices for PCI pass-through to driver
    domains or can act as a driver domain itself, depending on the desired
    degree of disaggregation.  It is also the domain managing devices that
    do not support pass-through: PCI configuration space access, parsing the
    hardware ACPI tables and system power or machine check events.  This is
    the only domain where is_hardware_domain() is true.  The return of
    is_control_domain() may be false for this domain.
    
    The control domain manages other domains, controls guest launch and
    shutdown, and manages resource constraints; is_control_domain() returns
    true.  The functionality guarded by is_control_domain may in the future
    be adapted to use explicit hypercalls, eliminating the special treatment
    of this domain.  It may be reasonable to have multiple control domains
    on a multi-tenant system.
    
    Guest domains and other service or driver domains are all treated
    identically by the hypervisor; the security policy may further constrain
    administrative actions on or communication between these domains.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/arm/domain.c                       |    6 +++---
 xen/arch/arm/gic.c                          |    4 ++--
 xen/arch/arm/vgic.c                         |    2 +-
 xen/arch/arm/vtimer.c                       |    5 +++--
 xen/arch/arm/vuart.c                        |    2 +-
 xen/arch/x86/cpu/mcheck/vmce.c              |    2 +-
 xen/arch/x86/domain.c                       |    3 ++-
 xen/arch/x86/hvm/i8254.c                    |    2 +-
 xen/arch/x86/mm.c                           |    2 +-
 xen/arch/x86/time.c                         |    4 ++--
 xen/arch/x86/traps.c                        |   21 +++++++++++----------
 xen/common/domain.c                         |    6 +++---
 xen/common/kernel.c                         |    2 +-
 xen/common/xenoprof.c                       |    8 +++++++-
 xen/drivers/passthrough/amd/pci_amd_iommu.c |    2 +-
 xen/drivers/passthrough/iommu.c             |    2 +-
 xen/drivers/passthrough/vtd/iommu.c         |   11 ++++++-----
 xen/drivers/passthrough/vtd/x86/vtd.c       |    2 +-
 xen/include/xen/sched.h                     |    4 ++--
 19 files changed, 50 insertions(+), 40 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index b125857..ccccb77 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -525,10 +525,10 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags)
 
     /*
      * Virtual UART is only used by linux early printk and decompress code.
-     * Only use it for dom0 because the linux kernel may not support
-     * multi-platform.
+     * Only use it for the hardware domain because the linux kernel may not
+     * support multi-platform.
      */
-    if ( (d->domain_id == 0) && (rc = domain_vuart_init(d)) )
+    if ( is_hardware_domain(d) && (rc = domain_vuart_init(d)) )
         goto fail;
 
     return 0;
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 0095b97..8168b7b 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -865,10 +865,10 @@ int gicv_setup(struct domain *d)
     int ret;
 
     /*
-     * Domain 0 gets the hardware address.
+     * The hardware domain gets the hardware address.
      * Guests get the virtual platform layout.
      */
-    if ( d->domain_id == 0 )
+    if ( is_hardware_domain(d) )
     {
         d->arch.vgic.dbase = gic.dbase;
         d->arch.vgic.cbase = gic.cbase;
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index 9fc9586..4a7f8c0 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -82,7 +82,7 @@ int domain_vgic_init(struct domain *d)
     /* Currently nr_lines in vgic and gic doesn't have the same meanings
      * Here nr_lines = number of SPIs
      */
-    if ( d->domain_id == 0 )
+    if ( is_hardware_domain(d) )
         d->arch.vgic.nr_lines = gic_number_lines() - 32;
     else
         d->arch.vgic.nr_lines = 0; /* We don't need SPIs for the guest */
diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
index 3d6a721..cb690bb 100644
--- a/xen/arch/arm/vtimer.c
+++ b/xen/arch/arm/vtimer.c
@@ -54,10 +54,11 @@ int vcpu_domain_init(struct domain *d)
 int vcpu_vtimer_init(struct vcpu *v)
 {
     struct vtimer *t = &v->arch.phys_timer;
-    bool_t d0 = (v->domain == dom0);
+    bool_t d0 = is_hardware_domain(v->domain);
 
     /*
-     * Domain 0 uses the hardware interrupts, guests get the virtual platform.
+     * Hardware domain uses the hardware interrupts, guests get the virtual
+     * platform.
      */
 
     init_timer(&t->timer, phys_timer_expired, t, v->processor);
diff --git a/xen/arch/arm/vuart.c b/xen/arch/arm/vuart.c
index b9d3ced..c02a8a9 100644
--- a/xen/arch/arm/vuart.c
+++ b/xen/arch/arm/vuart.c
@@ -46,7 +46,7 @@
 
 int domain_vuart_init(struct domain *d)
 {
-    ASSERT( !d->domain_id );
+    ASSERT( is_hardware_domain(d) );
 
     d->arch.vuart.info = serial_vuart_info(SERHND_DTUART);
     if ( !d->arch.vuart.info )
diff --git a/xen/arch/x86/cpu/mcheck/vmce.c b/xen/arch/x86/cpu/mcheck/vmce.c
index ed00f7c..c83375e 100644
--- a/xen/arch/x86/cpu/mcheck/vmce.c
+++ b/xen/arch/x86/cpu/mcheck/vmce.c
@@ -430,7 +430,7 @@ int unmmap_broken_page(struct domain *d, mfn_t mfn, unsigned long gfn)
     int rc;
 
     /* Always trust dom0's MCE handler will prevent future access */
-    if ( d == dom0 )
+    if ( is_hardware_domain(d) )
         return 0;
 
     if (!mfn_valid(mfn_x(mfn)))
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 8d9c883..f8eb33f 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1529,7 +1529,8 @@ void context_switch(struct vcpu *prev, struct vcpu *next)
         }
 
         set_cpuid_faulting(is_pv_vcpu(next) &&
-                           (next->domain->domain_id != 0));
+                           !is_control_domain(next->domain) &&
+                           !is_hardware_domain(next->domain));
     }
 
     if (is_hvm_vcpu(next) && (prev != next) )
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index c4f7527..dc5b78c 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -549,7 +549,7 @@ int pv_pit_handler(int port, int data, int write)
         .data = data
     };
 
-    if ( (current->domain->domain_id == 0) && dom0_pit_access(&ioreq) )
+    if ( is_hardware_domain(current->domain) && dom0_pit_access(&ioreq) )
     {
         /* nothing to do */;
     }
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index fdc5ed3..ad48acc 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -4787,7 +4787,7 @@ long arch_memory_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg)
             .max_mfn = MACH2PHYS_NR_ENTRIES - 1
         };
 
-        if ( !mem_hotplug && current->domain == dom0 )
+        if ( !mem_hotplug && is_hardware_domain(current->domain) )
             mapping.max_mfn = max_page - 1;
         if ( copy_to_guest(arg, &mapping, 1) )
             return -EFAULT;
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index f904af2..89308bd 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1839,7 +1839,7 @@ void tsc_set_info(struct domain *d,
                   uint32_t tsc_mode, uint64_t elapsed_nsec,
                   uint32_t gtsc_khz, uint32_t incarnation)
 {
-    if ( is_idle_domain(d) || (d->domain_id == 0) )
+    if ( is_idle_domain(d) || is_hardware_domain(d) )
     {
         d->arch.vtsc = 0;
         return;
@@ -1943,7 +1943,7 @@ static void dump_softtsc(unsigned char key)
                "warp=%lu (count=%lu)\n", tsc_max_warp, tsc_check_count);
     for_each_domain ( d )
     {
-        if ( d->domain_id == 0 && d->arch.tsc_mode == TSC_MODE_DEFAULT )
+        if ( is_hardware_domain(d) && d->arch.tsc_mode == TSC_MODE_DEFAULT )
             continue;
         printk("dom%u%s: mode=%d",d->domain_id,
                 is_hvm_domain(d) ? "(hvm)" : "", d->arch.tsc_mode);
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index ed4ae2d..21c8b63 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -732,18 +732,19 @@ int cpuid_hypervisor_leaves( uint32_t idx, uint32_t sub_idx,
 void pv_cpuid(struct cpu_user_regs *regs)
 {
     uint32_t a, b, c, d;
+    struct vcpu *curr = current;
 
     a = regs->eax;
     b = regs->ebx;
     c = regs->ecx;
     d = regs->edx;
 
-    if ( current->domain->domain_id != 0 )
+    if ( !is_control_domain(curr->domain) && !is_hardware_domain(curr->domain) )
     {
         unsigned int cpuid_leaf = a, sub_leaf = c;
 
         if ( !cpuid_hypervisor_leaves(a, c, &a, &b, &c, &d) )
-            domain_cpuid(current->domain, a, c, &a, &b, &c, &d);
+            domain_cpuid(curr->domain, a, c, &a, &b, &c, &d);
 
         switch ( cpuid_leaf )
         {
@@ -751,15 +752,15 @@ void pv_cpuid(struct cpu_user_regs *regs)
         {
             unsigned int _eax, _ebx, _ecx, _edx;
             /* EBX value of main leaf 0 depends on enabled xsave features */
-            if ( sub_leaf == 0 && current->arch.xcr0 )
+            if ( sub_leaf == 0 && curr->arch.xcr0 )
             {
                 /* reset EBX to default value first */
                 b = XSTATE_AREA_MIN_SIZE;
                 for ( sub_leaf = 2; sub_leaf < 63; sub_leaf++ )
                 {
-                    if ( !(current->arch.xcr0 & (1ULL << sub_leaf)) )
+                    if ( !(curr->arch.xcr0 & (1ULL << sub_leaf)) )
                         continue;
-                    domain_cpuid(current->domain, cpuid_leaf, sub_leaf,
+                    domain_cpuid(curr->domain, cpuid_leaf, sub_leaf,
                                  &_eax, &_ebx, &_ecx, &_edx);
                     if ( (_eax + _ebx) > b )
                         b = _eax + _ebx;
@@ -796,7 +797,7 @@ void pv_cpuid(struct cpu_user_regs *regs)
         __clear_bit(X86_FEATURE_DS, &d);
         __clear_bit(X86_FEATURE_ACC, &d);
         __clear_bit(X86_FEATURE_PBE, &d);
-        if ( is_pvh_vcpu(current) )
+        if ( is_pvh_vcpu(curr) )
             __clear_bit(X86_FEATURE_MTRR, &d);
 
         __clear_bit(X86_FEATURE_DTES64 % 32, &c);
@@ -805,7 +806,7 @@ void pv_cpuid(struct cpu_user_regs *regs)
         __clear_bit(X86_FEATURE_VMXE % 32, &c);
         __clear_bit(X86_FEATURE_SMXE % 32, &c);
         __clear_bit(X86_FEATURE_TM2 % 32, &c);
-        if ( is_pv_32bit_vcpu(current) )
+        if ( is_pv_32bit_vcpu(curr) )
             __clear_bit(X86_FEATURE_CX16 % 32, &c);
         __clear_bit(X86_FEATURE_XTPR % 32, &c);
         __clear_bit(X86_FEATURE_PDCM % 32, &c);
@@ -844,12 +845,12 @@ void pv_cpuid(struct cpu_user_regs *regs)
 
     case 0x80000001:
         /* Modify Feature Information. */
-        if ( is_pv_32bit_vcpu(current) )
+        if ( is_pv_32bit_vcpu(curr) )
         {
             __clear_bit(X86_FEATURE_LM % 32, &d);
             __clear_bit(X86_FEATURE_LAHF_LM % 32, &c);
         }
-        if ( is_pv_32on64_vcpu(current) &&
+        if ( is_pv_32on64_vcpu(curr) &&
              boot_cpu_data.x86_vendor != X86_VENDOR_AMD )
             __clear_bit(X86_FEATURE_SYSCALL % 32, &d);
         __clear_bit(X86_FEATURE_PAGE1GB % 32, &d);
@@ -1860,7 +1861,7 @@ static inline uint64_t guest_misc_enable(uint64_t val)
 static int is_cpufreq_controller(struct domain *d)
 {
     return ((cpufreq_controller == FREQCTL_dom0_kernel) &&
-            (d->domain_id == 0));
+            is_hardware_domain(d));
 }
 
 #include "x86_64/mmconfig.h"
diff --git a/xen/common/domain.c b/xen/common/domain.c
index b414a7d..ccd159e 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -237,7 +237,7 @@ struct domain *domain_create(
     else if ( domcr_flags & DOMCRF_pvh )
         d->guest_type = guest_type_pvh;
 
-    if ( domid == 0 )
+    if ( is_hardware_domain(d) )
     {
         d->is_pinned = opt_dom0_vcpus_pin;
         d->disable_migrate = 1;
@@ -262,7 +262,7 @@ struct domain *domain_create(
         d->is_paused_by_controller = 1;
         atomic_inc(&d->pause_count);
 
-        if ( domid )
+        if ( !is_hardware_domain(d) )
             d->nr_pirqs = nr_static_irqs + extra_domU_irqs;
         else
             d->nr_pirqs = nr_static_irqs + extra_dom0_irqs;
@@ -594,7 +594,7 @@ void domain_shutdown(struct domain *d, u8 reason)
         d->shutdown_code = reason;
     reason = d->shutdown_code;
 
-    if ( d->domain_id == 0 )
+    if ( is_hardware_domain(d) )
         dom0_shutdown(reason);
 
     if ( d->is_shutting_down )
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index b371f8f..7e83353 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -303,7 +303,7 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
                     (1U << XENFEAT_auto_translated_physmap);
             if ( supervisor_mode_kernel )
                 fi.submap |= 1U << XENFEAT_supervisor_mode_kernel;
-            if ( current->domain == dom0 )
+            if ( is_hardware_domain(current->domain) )
                 fi.submap |= 1U << XENFEAT_dom0;
 #ifdef CONFIG_X86
             switch ( d->guest_type )
diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c
index 52ab00d..3c30c3e 100644
--- a/xen/common/xenoprof.c
+++ b/xen/common/xenoprof.c
@@ -601,9 +601,15 @@ static int xenoprof_op_init(XEN_GUEST_HANDLE_PARAM(void) arg)
                                    xenoprof_init.cpu_type)) )
         return ret;
 
+    /* Only the hardware domain may become the primary profiler here because
+     * there is currently no cleanup of xenoprof_primary_profiler or associated
+     * profiling state when the primary profiling domain is shut down or
+     * crashes.  Once a better cleanup method is present, it will be possible to
+     * allow another domain to be the primary profiler.
+     */
     xenoprof_init.is_primary = 
         ((xenoprof_primary_profiler == d) ||
-         ((xenoprof_primary_profiler == NULL) && (d->domain_id == 0)));
+         ((xenoprof_primary_profiler == NULL) && is_hardware_domain(d)));
     if ( xenoprof_init.is_primary )
         xenoprof_primary_profiler = current->domain;
 
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index c26aabc..cf67494 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -122,7 +122,7 @@ static void amd_iommu_setup_domain_device(
 
     BUG_ON( !hd->root_table || !hd->paging_mode || !iommu->dev_table.buffer );
 
-    if ( iommu_passthrough && (domain->domain_id == 0) )
+    if ( iommu_passthrough && is_hardware_domain(domain) )
         valid = 0;
 
     if ( ats_enabled )
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 0cf0748..54d891f 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -817,7 +817,7 @@ static void iommu_dump_p2m_table(unsigned char key)
     ops = iommu_get_ops();
     for_each_domain(d)
     {
-        if ( !d->domain_id )
+        if ( is_hardware_domain(d) )
             continue;
 
         if ( iommu_use_hap_pt(d) )
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index beb3723..9c8e4a3 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1327,7 +1327,7 @@ int domain_context_mapping_one(
         return res;
     }
 
-    if ( iommu_passthrough && (domain->domain_id == 0) )
+    if ( iommu_passthrough && is_hardware_domain(domain) )
     {
         context_set_translation_type(*context, CONTEXT_TT_PASS_THRU);
         agaw = level_to_agaw(iommu->nr_pt_levels);
@@ -1723,7 +1723,7 @@ static int intel_iommu_map_page(
         return 0;
 
     /* do nothing if dom0 and iommu supports pass thru */
-    if ( iommu_passthrough && (d->domain_id == 0) )
+    if ( iommu_passthrough && is_hardware_domain(d) )
         return 0;
 
     spin_lock(&hd->mapping_lock);
@@ -1767,7 +1767,7 @@ static int intel_iommu_map_page(
 static int intel_iommu_unmap_page(struct domain *d, unsigned long gfn)
 {
     /* Do nothing if dom0 and iommu supports pass thru. */
-    if ( iommu_passthrough && (d->domain_id == 0) )
+    if ( iommu_passthrough && is_hardware_domain(d) )
         return 0;
 
     dma_pte_clear_one(d, (paddr_t)gfn << PAGE_SHIFT_4K);
@@ -1950,8 +1950,9 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
             continue;
 
         /*
-         * If the device belongs to dom0, and it has RMRR, don't remove
-         * it from dom0, because BIOS may use RMRR at booting time.
+         * If the device belongs to the hardware domain, and it has RMRR, don't
+         * remove it from the hardware domain, because BIOS may use RMRR at
+         * booting time.
          */
         if ( is_hardware_domain(pdev->domain) )
             return 0;
diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c
index ca17cb1..f271a42 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -111,7 +111,7 @@ void __init iommu_set_dom0_mapping(struct domain *d)
 {
     unsigned long i, j, tmp, top;
 
-    BUG_ON(d->domain_id != 0);
+    BUG_ON(!is_hardware_domain(d));
 
     top = max(max_pdx, pfn_to_pdx(0xffffffffUL >> PAGE_SHIFT) + 1);
 
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index a925776..3d33a90 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -794,10 +794,10 @@ void watchdog_domain_destroy(struct domain *d);
 /* 
  * Use this check when the following are both true:
  *  - Using this feature or interface requires full access to the hardware
- *    (that is, this is would not be suitable for a driver domain)
+ *    (that is, this would not be suitable for a driver domain)
  *  - There is never a reason to deny dom0 access to this
  */
-#define is_hardware_domain(_d) ((_d)->is_privileged)
+#define is_hardware_domain(_d) ((_d)->domain_id == 0)
 
 /* This check is for functionality specific to a control domain */
 #define is_control_domain(_d) ((_d)->is_privileged)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01:49 +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 1WaNbB-0007M3-ER; Wed, 16 Apr 2014 11:01:49 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNb9-0007Le-BD
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:47 +0000
Received: from [85.158.137.68:62762] by server-13.bemta-3.messagelabs.com id
	44/FD-18692-A136E435; Wed, 16 Apr 2014 11:01:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-9.tower-31.messagelabs.com!1397646103!7292971!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20864 invoked from network); 16 Apr 2014 11:01:44 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-9.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:01:44 -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 1WaNb5-0000ks-KG
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:43 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNb5-0000d9-Ip
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:43 +0000
Date: Wed, 16 Apr 2014 11:01:43 +0000
Message-Id: <E1WaNb5-0000d9-Ip@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] use domid check in is_hardware_domain
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 97587d01b36b1e8f406c7c93e5ae9c50646bcaeb
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:16:52 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:16:52 2014 +0200

    use domid check in is_hardware_domain
    
    Instead of checking is_privileged to determine if a domain should
    control the hardware, check that the domain_id is equal to zero (which
    is currently the only domain for which is_privileged is true).  This
    allows other places where domain_id is checked for zero to be replaced
    with is_hardware_domain.
    
    The distinction between is_hardware_domain, is_control_domain, and
    domain 0 is based on the following disaggregation model:
    
    Domain 0 bootstraps the system.  It may remain to perform requested
    builds of domains that need a minimal trust chain (i.e. vTPM domains).
    Other than being built by the hypervisor, nothing is special about this
    domain - although it may be useful to have is_control_domain() return
    true depending on the toolstack it uses to build other domains.
    
    The hardware domain manages devices for PCI pass-through to driver
    domains or can act as a driver domain itself, depending on the desired
    degree of disaggregation.  It is also the domain managing devices that
    do not support pass-through: PCI configuration space access, parsing the
    hardware ACPI tables and system power or machine check events.  This is
    the only domain where is_hardware_domain() is true.  The return of
    is_control_domain() may be false for this domain.
    
    The control domain manages other domains, controls guest launch and
    shutdown, and manages resource constraints; is_control_domain() returns
    true.  The functionality guarded by is_control_domain may in the future
    be adapted to use explicit hypercalls, eliminating the special treatment
    of this domain.  It may be reasonable to have multiple control domains
    on a multi-tenant system.
    
    Guest domains and other service or driver domains are all treated
    identically by the hypervisor; the security policy may further constrain
    administrative actions on or communication between these domains.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/arm/domain.c                       |    6 +++---
 xen/arch/arm/gic.c                          |    4 ++--
 xen/arch/arm/vgic.c                         |    2 +-
 xen/arch/arm/vtimer.c                       |    5 +++--
 xen/arch/arm/vuart.c                        |    2 +-
 xen/arch/x86/cpu/mcheck/vmce.c              |    2 +-
 xen/arch/x86/domain.c                       |    3 ++-
 xen/arch/x86/hvm/i8254.c                    |    2 +-
 xen/arch/x86/mm.c                           |    2 +-
 xen/arch/x86/time.c                         |    4 ++--
 xen/arch/x86/traps.c                        |   21 +++++++++++----------
 xen/common/domain.c                         |    6 +++---
 xen/common/kernel.c                         |    2 +-
 xen/common/xenoprof.c                       |    8 +++++++-
 xen/drivers/passthrough/amd/pci_amd_iommu.c |    2 +-
 xen/drivers/passthrough/iommu.c             |    2 +-
 xen/drivers/passthrough/vtd/iommu.c         |   11 ++++++-----
 xen/drivers/passthrough/vtd/x86/vtd.c       |    2 +-
 xen/include/xen/sched.h                     |    4 ++--
 19 files changed, 50 insertions(+), 40 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index b125857..ccccb77 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -525,10 +525,10 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags)
 
     /*
      * Virtual UART is only used by linux early printk and decompress code.
-     * Only use it for dom0 because the linux kernel may not support
-     * multi-platform.
+     * Only use it for the hardware domain because the linux kernel may not
+     * support multi-platform.
      */
-    if ( (d->domain_id == 0) && (rc = domain_vuart_init(d)) )
+    if ( is_hardware_domain(d) && (rc = domain_vuart_init(d)) )
         goto fail;
 
     return 0;
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 0095b97..8168b7b 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -865,10 +865,10 @@ int gicv_setup(struct domain *d)
     int ret;
 
     /*
-     * Domain 0 gets the hardware address.
+     * The hardware domain gets the hardware address.
      * Guests get the virtual platform layout.
      */
-    if ( d->domain_id == 0 )
+    if ( is_hardware_domain(d) )
     {
         d->arch.vgic.dbase = gic.dbase;
         d->arch.vgic.cbase = gic.cbase;
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index 9fc9586..4a7f8c0 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -82,7 +82,7 @@ int domain_vgic_init(struct domain *d)
     /* Currently nr_lines in vgic and gic doesn't have the same meanings
      * Here nr_lines = number of SPIs
      */
-    if ( d->domain_id == 0 )
+    if ( is_hardware_domain(d) )
         d->arch.vgic.nr_lines = gic_number_lines() - 32;
     else
         d->arch.vgic.nr_lines = 0; /* We don't need SPIs for the guest */
diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
index 3d6a721..cb690bb 100644
--- a/xen/arch/arm/vtimer.c
+++ b/xen/arch/arm/vtimer.c
@@ -54,10 +54,11 @@ int vcpu_domain_init(struct domain *d)
 int vcpu_vtimer_init(struct vcpu *v)
 {
     struct vtimer *t = &v->arch.phys_timer;
-    bool_t d0 = (v->domain == dom0);
+    bool_t d0 = is_hardware_domain(v->domain);
 
     /*
-     * Domain 0 uses the hardware interrupts, guests get the virtual platform.
+     * Hardware domain uses the hardware interrupts, guests get the virtual
+     * platform.
      */
 
     init_timer(&t->timer, phys_timer_expired, t, v->processor);
diff --git a/xen/arch/arm/vuart.c b/xen/arch/arm/vuart.c
index b9d3ced..c02a8a9 100644
--- a/xen/arch/arm/vuart.c
+++ b/xen/arch/arm/vuart.c
@@ -46,7 +46,7 @@
 
 int domain_vuart_init(struct domain *d)
 {
-    ASSERT( !d->domain_id );
+    ASSERT( is_hardware_domain(d) );
 
     d->arch.vuart.info = serial_vuart_info(SERHND_DTUART);
     if ( !d->arch.vuart.info )
diff --git a/xen/arch/x86/cpu/mcheck/vmce.c b/xen/arch/x86/cpu/mcheck/vmce.c
index ed00f7c..c83375e 100644
--- a/xen/arch/x86/cpu/mcheck/vmce.c
+++ b/xen/arch/x86/cpu/mcheck/vmce.c
@@ -430,7 +430,7 @@ int unmmap_broken_page(struct domain *d, mfn_t mfn, unsigned long gfn)
     int rc;
 
     /* Always trust dom0's MCE handler will prevent future access */
-    if ( d == dom0 )
+    if ( is_hardware_domain(d) )
         return 0;
 
     if (!mfn_valid(mfn_x(mfn)))
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 8d9c883..f8eb33f 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1529,7 +1529,8 @@ void context_switch(struct vcpu *prev, struct vcpu *next)
         }
 
         set_cpuid_faulting(is_pv_vcpu(next) &&
-                           (next->domain->domain_id != 0));
+                           !is_control_domain(next->domain) &&
+                           !is_hardware_domain(next->domain));
     }
 
     if (is_hvm_vcpu(next) && (prev != next) )
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index c4f7527..dc5b78c 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -549,7 +549,7 @@ int pv_pit_handler(int port, int data, int write)
         .data = data
     };
 
-    if ( (current->domain->domain_id == 0) && dom0_pit_access(&ioreq) )
+    if ( is_hardware_domain(current->domain) && dom0_pit_access(&ioreq) )
     {
         /* nothing to do */;
     }
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index fdc5ed3..ad48acc 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -4787,7 +4787,7 @@ long arch_memory_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg)
             .max_mfn = MACH2PHYS_NR_ENTRIES - 1
         };
 
-        if ( !mem_hotplug && current->domain == dom0 )
+        if ( !mem_hotplug && is_hardware_domain(current->domain) )
             mapping.max_mfn = max_page - 1;
         if ( copy_to_guest(arg, &mapping, 1) )
             return -EFAULT;
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index f904af2..89308bd 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1839,7 +1839,7 @@ void tsc_set_info(struct domain *d,
                   uint32_t tsc_mode, uint64_t elapsed_nsec,
                   uint32_t gtsc_khz, uint32_t incarnation)
 {
-    if ( is_idle_domain(d) || (d->domain_id == 0) )
+    if ( is_idle_domain(d) || is_hardware_domain(d) )
     {
         d->arch.vtsc = 0;
         return;
@@ -1943,7 +1943,7 @@ static void dump_softtsc(unsigned char key)
                "warp=%lu (count=%lu)\n", tsc_max_warp, tsc_check_count);
     for_each_domain ( d )
     {
-        if ( d->domain_id == 0 && d->arch.tsc_mode == TSC_MODE_DEFAULT )
+        if ( is_hardware_domain(d) && d->arch.tsc_mode == TSC_MODE_DEFAULT )
             continue;
         printk("dom%u%s: mode=%d",d->domain_id,
                 is_hvm_domain(d) ? "(hvm)" : "", d->arch.tsc_mode);
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index ed4ae2d..21c8b63 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -732,18 +732,19 @@ int cpuid_hypervisor_leaves( uint32_t idx, uint32_t sub_idx,
 void pv_cpuid(struct cpu_user_regs *regs)
 {
     uint32_t a, b, c, d;
+    struct vcpu *curr = current;
 
     a = regs->eax;
     b = regs->ebx;
     c = regs->ecx;
     d = regs->edx;
 
-    if ( current->domain->domain_id != 0 )
+    if ( !is_control_domain(curr->domain) && !is_hardware_domain(curr->domain) )
     {
         unsigned int cpuid_leaf = a, sub_leaf = c;
 
         if ( !cpuid_hypervisor_leaves(a, c, &a, &b, &c, &d) )
-            domain_cpuid(current->domain, a, c, &a, &b, &c, &d);
+            domain_cpuid(curr->domain, a, c, &a, &b, &c, &d);
 
         switch ( cpuid_leaf )
         {
@@ -751,15 +752,15 @@ void pv_cpuid(struct cpu_user_regs *regs)
         {
             unsigned int _eax, _ebx, _ecx, _edx;
             /* EBX value of main leaf 0 depends on enabled xsave features */
-            if ( sub_leaf == 0 && current->arch.xcr0 )
+            if ( sub_leaf == 0 && curr->arch.xcr0 )
             {
                 /* reset EBX to default value first */
                 b = XSTATE_AREA_MIN_SIZE;
                 for ( sub_leaf = 2; sub_leaf < 63; sub_leaf++ )
                 {
-                    if ( !(current->arch.xcr0 & (1ULL << sub_leaf)) )
+                    if ( !(curr->arch.xcr0 & (1ULL << sub_leaf)) )
                         continue;
-                    domain_cpuid(current->domain, cpuid_leaf, sub_leaf,
+                    domain_cpuid(curr->domain, cpuid_leaf, sub_leaf,
                                  &_eax, &_ebx, &_ecx, &_edx);
                     if ( (_eax + _ebx) > b )
                         b = _eax + _ebx;
@@ -796,7 +797,7 @@ void pv_cpuid(struct cpu_user_regs *regs)
         __clear_bit(X86_FEATURE_DS, &d);
         __clear_bit(X86_FEATURE_ACC, &d);
         __clear_bit(X86_FEATURE_PBE, &d);
-        if ( is_pvh_vcpu(current) )
+        if ( is_pvh_vcpu(curr) )
             __clear_bit(X86_FEATURE_MTRR, &d);
 
         __clear_bit(X86_FEATURE_DTES64 % 32, &c);
@@ -805,7 +806,7 @@ void pv_cpuid(struct cpu_user_regs *regs)
         __clear_bit(X86_FEATURE_VMXE % 32, &c);
         __clear_bit(X86_FEATURE_SMXE % 32, &c);
         __clear_bit(X86_FEATURE_TM2 % 32, &c);
-        if ( is_pv_32bit_vcpu(current) )
+        if ( is_pv_32bit_vcpu(curr) )
             __clear_bit(X86_FEATURE_CX16 % 32, &c);
         __clear_bit(X86_FEATURE_XTPR % 32, &c);
         __clear_bit(X86_FEATURE_PDCM % 32, &c);
@@ -844,12 +845,12 @@ void pv_cpuid(struct cpu_user_regs *regs)
 
     case 0x80000001:
         /* Modify Feature Information. */
-        if ( is_pv_32bit_vcpu(current) )
+        if ( is_pv_32bit_vcpu(curr) )
         {
             __clear_bit(X86_FEATURE_LM % 32, &d);
             __clear_bit(X86_FEATURE_LAHF_LM % 32, &c);
         }
-        if ( is_pv_32on64_vcpu(current) &&
+        if ( is_pv_32on64_vcpu(curr) &&
              boot_cpu_data.x86_vendor != X86_VENDOR_AMD )
             __clear_bit(X86_FEATURE_SYSCALL % 32, &d);
         __clear_bit(X86_FEATURE_PAGE1GB % 32, &d);
@@ -1860,7 +1861,7 @@ static inline uint64_t guest_misc_enable(uint64_t val)
 static int is_cpufreq_controller(struct domain *d)
 {
     return ((cpufreq_controller == FREQCTL_dom0_kernel) &&
-            (d->domain_id == 0));
+            is_hardware_domain(d));
 }
 
 #include "x86_64/mmconfig.h"
diff --git a/xen/common/domain.c b/xen/common/domain.c
index b414a7d..ccd159e 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -237,7 +237,7 @@ struct domain *domain_create(
     else if ( domcr_flags & DOMCRF_pvh )
         d->guest_type = guest_type_pvh;
 
-    if ( domid == 0 )
+    if ( is_hardware_domain(d) )
     {
         d->is_pinned = opt_dom0_vcpus_pin;
         d->disable_migrate = 1;
@@ -262,7 +262,7 @@ struct domain *domain_create(
         d->is_paused_by_controller = 1;
         atomic_inc(&d->pause_count);
 
-        if ( domid )
+        if ( !is_hardware_domain(d) )
             d->nr_pirqs = nr_static_irqs + extra_domU_irqs;
         else
             d->nr_pirqs = nr_static_irqs + extra_dom0_irqs;
@@ -594,7 +594,7 @@ void domain_shutdown(struct domain *d, u8 reason)
         d->shutdown_code = reason;
     reason = d->shutdown_code;
 
-    if ( d->domain_id == 0 )
+    if ( is_hardware_domain(d) )
         dom0_shutdown(reason);
 
     if ( d->is_shutting_down )
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index b371f8f..7e83353 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -303,7 +303,7 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
                     (1U << XENFEAT_auto_translated_physmap);
             if ( supervisor_mode_kernel )
                 fi.submap |= 1U << XENFEAT_supervisor_mode_kernel;
-            if ( current->domain == dom0 )
+            if ( is_hardware_domain(current->domain) )
                 fi.submap |= 1U << XENFEAT_dom0;
 #ifdef CONFIG_X86
             switch ( d->guest_type )
diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c
index 52ab00d..3c30c3e 100644
--- a/xen/common/xenoprof.c
+++ b/xen/common/xenoprof.c
@@ -601,9 +601,15 @@ static int xenoprof_op_init(XEN_GUEST_HANDLE_PARAM(void) arg)
                                    xenoprof_init.cpu_type)) )
         return ret;
 
+    /* Only the hardware domain may become the primary profiler here because
+     * there is currently no cleanup of xenoprof_primary_profiler or associated
+     * profiling state when the primary profiling domain is shut down or
+     * crashes.  Once a better cleanup method is present, it will be possible to
+     * allow another domain to be the primary profiler.
+     */
     xenoprof_init.is_primary = 
         ((xenoprof_primary_profiler == d) ||
-         ((xenoprof_primary_profiler == NULL) && (d->domain_id == 0)));
+         ((xenoprof_primary_profiler == NULL) && is_hardware_domain(d)));
     if ( xenoprof_init.is_primary )
         xenoprof_primary_profiler = current->domain;
 
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index c26aabc..cf67494 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -122,7 +122,7 @@ static void amd_iommu_setup_domain_device(
 
     BUG_ON( !hd->root_table || !hd->paging_mode || !iommu->dev_table.buffer );
 
-    if ( iommu_passthrough && (domain->domain_id == 0) )
+    if ( iommu_passthrough && is_hardware_domain(domain) )
         valid = 0;
 
     if ( ats_enabled )
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 0cf0748..54d891f 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -817,7 +817,7 @@ static void iommu_dump_p2m_table(unsigned char key)
     ops = iommu_get_ops();
     for_each_domain(d)
     {
-        if ( !d->domain_id )
+        if ( is_hardware_domain(d) )
             continue;
 
         if ( iommu_use_hap_pt(d) )
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index beb3723..9c8e4a3 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1327,7 +1327,7 @@ int domain_context_mapping_one(
         return res;
     }
 
-    if ( iommu_passthrough && (domain->domain_id == 0) )
+    if ( iommu_passthrough && is_hardware_domain(domain) )
     {
         context_set_translation_type(*context, CONTEXT_TT_PASS_THRU);
         agaw = level_to_agaw(iommu->nr_pt_levels);
@@ -1723,7 +1723,7 @@ static int intel_iommu_map_page(
         return 0;
 
     /* do nothing if dom0 and iommu supports pass thru */
-    if ( iommu_passthrough && (d->domain_id == 0) )
+    if ( iommu_passthrough && is_hardware_domain(d) )
         return 0;
 
     spin_lock(&hd->mapping_lock);
@@ -1767,7 +1767,7 @@ static int intel_iommu_map_page(
 static int intel_iommu_unmap_page(struct domain *d, unsigned long gfn)
 {
     /* Do nothing if dom0 and iommu supports pass thru. */
-    if ( iommu_passthrough && (d->domain_id == 0) )
+    if ( iommu_passthrough && is_hardware_domain(d) )
         return 0;
 
     dma_pte_clear_one(d, (paddr_t)gfn << PAGE_SHIFT_4K);
@@ -1950,8 +1950,9 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
             continue;
 
         /*
-         * If the device belongs to dom0, and it has RMRR, don't remove
-         * it from dom0, because BIOS may use RMRR at booting time.
+         * If the device belongs to the hardware domain, and it has RMRR, don't
+         * remove it from the hardware domain, because BIOS may use RMRR at
+         * booting time.
          */
         if ( is_hardware_domain(pdev->domain) )
             return 0;
diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c
index ca17cb1..f271a42 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -111,7 +111,7 @@ void __init iommu_set_dom0_mapping(struct domain *d)
 {
     unsigned long i, j, tmp, top;
 
-    BUG_ON(d->domain_id != 0);
+    BUG_ON(!is_hardware_domain(d));
 
     top = max(max_pdx, pfn_to_pdx(0xffffffffUL >> PAGE_SHIFT) + 1);
 
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index a925776..3d33a90 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -794,10 +794,10 @@ void watchdog_domain_destroy(struct domain *d);
 /* 
  * Use this check when the following are both true:
  *  - Using this feature or interface requires full access to the hardware
- *    (that is, this is would not be suitable for a driver domain)
+ *    (that is, this would not be suitable for a driver domain)
  *  - There is never a reason to deny dom0 access to this
  */
-#define is_hardware_domain(_d) ((_d)->is_privileged)
+#define is_hardware_domain(_d) ((_d)->domain_id == 0)
 
 /* This check is for functionality specific to a control domain */
 #define is_control_domain(_d) ((_d)->is_privileged)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01:58 +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 1WaNbK-0007OF-Jy; Wed, 16 Apr 2014 11:01:58 +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 1WaNbI-0007Nu-QO
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:57 +0000
Received: from [85.158.143.35:23388] by server-1.bemta-4.messagelabs.com id
	8D/FB-09853-4236E435; Wed, 16 Apr 2014 11:01:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-21.messagelabs.com!1397646114!9455948!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 463 invoked from network); 16 Apr 2014 11:01:55 -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;
	16 Apr 2014 11:01:55 -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 1WaNbF-0000l1-Q9
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:53 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbF-0000dV-Oi
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:53 +0000
Date: Wed, 16 Apr 2014 11:01:53 +0000
Message-Id: <E1WaNbF-0000dV-Oi@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] iommu: Move dom0 setup code to
	__hwdom_init
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 0a1c4db2481b13b2212d43923e996da3a379c26a
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:19:16 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:19:16 2014 +0200

    iommu: Move dom0 setup code to __hwdom_init
    
    When the hardware domain is split from domain 0, the initialization code
    for the hardware domain cannot be in the __init section, since the
    actual domain creation happens after these sections have been discarded.
    Create a __hwdom_init section designator to annotate these functions,
    and control it using the XSM configuration option for now (since XSM is
    required to take advantage of the security benefits of disaggregation).
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/x86/setup.c                        |    4 ++--
 xen/drivers/passthrough/amd/pci_amd_iommu.c |    5 +++--
 xen/drivers/passthrough/iommu.c             |    6 +++---
 xen/drivers/passthrough/pci.c               |    4 ++--
 xen/drivers/passthrough/vtd/iommu.c         |    6 +++---
 xen/drivers/passthrough/vtd/quirks.c        |    2 +-
 xen/drivers/passthrough/vtd/x86/vtd.c       |    4 ++--
 xen/include/asm-x86/config.h                |    4 ++++
 xen/include/xen/init.h                      |    8 ++++++++
 9 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index e9c2c51..1fd70ec 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1438,7 +1438,7 @@ void arch_get_xen_caps(xen_capabilities_info_t *info)
     }
 }
 
-int __init xen_in_range(unsigned long mfn)
+int __hwdom_init xen_in_range(unsigned long mfn)
 {
     paddr_t start, end;
     int i;
@@ -1446,7 +1446,7 @@ int __init xen_in_range(unsigned long mfn)
     enum { region_s3, region_text, region_bss, nr_regions };
     static struct {
         paddr_t s, e;
-    } xen_regions[nr_regions] __initdata;
+    } xen_regions[nr_regions] __hwdom_initdata;
 
     /* initialize first time */
     if ( !xen_regions[0].s )
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index cf67494..ff5f06e 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -169,7 +169,8 @@ static void amd_iommu_setup_domain_device(
     }
 }
 
-static int __init amd_iommu_setup_dom0_device(u8 devfn, struct pci_dev *pdev)
+static int __hwdom_init amd_iommu_setup_dom0_device(
+    u8 devfn, struct pci_dev *pdev)
 {
     int bdf = PCI_BDF2(pdev->bus, pdev->devfn);
     struct amd_iommu *iommu = find_iommu_for_device(pdev->seg, bdf);
@@ -280,7 +281,7 @@ static int amd_iommu_domain_init(struct domain *d)
     return 0;
 }
 
-static void __init amd_iommu_dom0_init(struct domain *d)
+static void __hwdom_init amd_iommu_dom0_init(struct domain *d)
 {
     unsigned long i; 
 
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 54d891f..3e5635c 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -45,7 +45,7 @@ custom_param("iommu", parse_iommu_param);
 bool_t __initdata iommu_enable = 1;
 bool_t __read_mostly iommu_enabled;
 bool_t __read_mostly force_iommu;
-bool_t __initdata iommu_dom0_strict;
+bool_t __hwdom_initdata iommu_dom0_strict;
 bool_t __read_mostly iommu_verbose;
 bool_t __read_mostly iommu_workaround_bios_bug;
 bool_t __read_mostly iommu_passthrough;
@@ -130,7 +130,7 @@ int iommu_domain_init(struct domain *d)
     return hd->platform_ops->init(d);
 }
 
-static __init void check_dom0_pvh_reqs(struct domain *d)
+static void __hwdom_init check_dom0_pvh_reqs(struct domain *d)
 {
     if ( !iommu_enabled )
         panic("Presently, iommu must be enabled for pvh dom0\n");
@@ -141,7 +141,7 @@ static __init void check_dom0_pvh_reqs(struct domain *d)
     iommu_dom0_strict = 1;
 }
 
-void __init iommu_dom0_init(struct domain *d)
+void __hwdom_init iommu_dom0_init(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
 
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index ff78142..dfa195a 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -893,7 +893,7 @@ static void setup_one_dom0_device(const struct setup_dom0 *ctxt,
               PCI_SLOT(devfn) == PCI_SLOT(pdev->devfn) );
 }
 
-static int __init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
+static int __hwdom_init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
 {
     struct setup_dom0 *ctxt = arg;
     int bus, devfn;
@@ -943,7 +943,7 @@ static int __init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
     return 0;
 }
 
-void __init setup_dom0_pci_devices(
+void __hwdom_init setup_dom0_pci_devices(
     struct domain *d, int (*handler)(u8 devfn, struct pci_dev *))
 {
     struct setup_dom0 ctxt = { .d = d, .handler = handler };
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index 9c8e4a3..d22d518 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1242,7 +1242,7 @@ static int intel_iommu_domain_init(struct domain *d)
     return 0;
 }
 
-static void __init intel_iommu_dom0_init(struct domain *d)
+static void __hwdom_init intel_iommu_dom0_init(struct domain *d)
 {
     struct acpi_drhd_unit *drhd;
 
@@ -1992,7 +1992,7 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
     return domain_context_unmap(pdev->domain, devfn, pdev);
 }
 
-static int __init setup_dom0_device(u8 devfn, struct pci_dev *pdev)
+static int __hwdom_init setup_dom0_device(u8 devfn, struct pci_dev *pdev)
 {
     int err;
 
@@ -2140,7 +2140,7 @@ static int init_vtd_hw(void)
     return 0;
 }
 
-static void __init setup_dom0_rmrr(struct domain *d)
+static void __hwdom_init setup_dom0_rmrr(struct domain *d)
 {
     struct acpi_rmrr_unit *rmrr;
     u16 bdf;
diff --git a/xen/drivers/passthrough/vtd/quirks.c b/xen/drivers/passthrough/vtd/quirks.c
index 7f6c3a7..fbba23b 100644
--- a/xen/drivers/passthrough/vtd/quirks.c
+++ b/xen/drivers/passthrough/vtd/quirks.c
@@ -384,7 +384,7 @@ void me_wifi_quirk(struct domain *domain, u8 bus, u8 devfn, int map)
  *   - This can cause system failure upon non-fatal VT-d faults
  *   - Potential security issue if malicious guest trigger VT-d faults
  */
-void __init pci_vtd_quirk(struct pci_dev *pdev)
+void __hwdom_init pci_vtd_quirk(struct pci_dev *pdev)
 {
     int seg = pdev->seg;
     int bus = pdev->bus;
diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c
index f271a42..00131b3 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -36,7 +36,7 @@
  * iommu_inclusive_mapping: when set, all memory below 4GB is included in dom0
  * 1:1 iommu mappings except xen and unusable regions.
  */
-static bool_t __initdata iommu_inclusive_mapping = 1;
+static bool_t __hwdom_initdata iommu_inclusive_mapping = 1;
 boolean_param("iommu_inclusive_mapping", iommu_inclusive_mapping);
 
 void *map_vtd_domain_page(u64 maddr)
@@ -107,7 +107,7 @@ void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq)
     spin_unlock(&d->event_lock);
 }
 
-void __init iommu_set_dom0_mapping(struct domain *d)
+void __hwdom_init iommu_set_dom0_mapping(struct domain *d)
 {
     unsigned long i, j, tmp, top;
 
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 24f95a3..02ab1fc 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -54,6 +54,10 @@
 
 #define CONFIG_MULTIBOOT 1
 
+#ifdef XSM_ENABLE
+#define CONFIG_LATE_HWDOM 1
+#endif
+
 #define HZ 100
 
 #define OPT_CONSOLE_STR "vga"
diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h
index 9d481b3..b3bced3 100644
--- a/xen/include/xen/init.h
+++ b/xen/include/xen/init.h
@@ -129,4 +129,12 @@ extern struct kernel_param __setup_start, __setup_end;
 #define __devexitdata __exitdata
 #endif
 
+#ifdef CONFIG_LATE_HWDOM
+#define __hwdom_init
+#define __hwdom_initdata  __read_mostly
+#else
+#define __hwdom_init      __init
+#define __hwdom_initdata  __initdata
+#endif
+
 #endif /* _LINUX_INIT_H */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:01:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:01:58 +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 1WaNbK-0007OF-Jy; Wed, 16 Apr 2014 11:01:58 +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 1WaNbI-0007Nu-QO
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:57 +0000
Received: from [85.158.143.35:23388] by server-1.bemta-4.messagelabs.com id
	8D/FB-09853-4236E435; Wed, 16 Apr 2014 11:01:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-21.messagelabs.com!1397646114!9455948!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 463 invoked from network); 16 Apr 2014 11:01:55 -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;
	16 Apr 2014 11:01:55 -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 1WaNbF-0000l1-Q9
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:53 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbF-0000dV-Oi
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:01:53 +0000
Date: Wed, 16 Apr 2014 11:01:53 +0000
Message-Id: <E1WaNbF-0000dV-Oi@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] iommu: Move dom0 setup code to
	__hwdom_init
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 0a1c4db2481b13b2212d43923e996da3a379c26a
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:19:16 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:19:16 2014 +0200

    iommu: Move dom0 setup code to __hwdom_init
    
    When the hardware domain is split from domain 0, the initialization code
    for the hardware domain cannot be in the __init section, since the
    actual domain creation happens after these sections have been discarded.
    Create a __hwdom_init section designator to annotate these functions,
    and control it using the XSM configuration option for now (since XSM is
    required to take advantage of the security benefits of disaggregation).
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/x86/setup.c                        |    4 ++--
 xen/drivers/passthrough/amd/pci_amd_iommu.c |    5 +++--
 xen/drivers/passthrough/iommu.c             |    6 +++---
 xen/drivers/passthrough/pci.c               |    4 ++--
 xen/drivers/passthrough/vtd/iommu.c         |    6 +++---
 xen/drivers/passthrough/vtd/quirks.c        |    2 +-
 xen/drivers/passthrough/vtd/x86/vtd.c       |    4 ++--
 xen/include/asm-x86/config.h                |    4 ++++
 xen/include/xen/init.h                      |    8 ++++++++
 9 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index e9c2c51..1fd70ec 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1438,7 +1438,7 @@ void arch_get_xen_caps(xen_capabilities_info_t *info)
     }
 }
 
-int __init xen_in_range(unsigned long mfn)
+int __hwdom_init xen_in_range(unsigned long mfn)
 {
     paddr_t start, end;
     int i;
@@ -1446,7 +1446,7 @@ int __init xen_in_range(unsigned long mfn)
     enum { region_s3, region_text, region_bss, nr_regions };
     static struct {
         paddr_t s, e;
-    } xen_regions[nr_regions] __initdata;
+    } xen_regions[nr_regions] __hwdom_initdata;
 
     /* initialize first time */
     if ( !xen_regions[0].s )
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index cf67494..ff5f06e 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -169,7 +169,8 @@ static void amd_iommu_setup_domain_device(
     }
 }
 
-static int __init amd_iommu_setup_dom0_device(u8 devfn, struct pci_dev *pdev)
+static int __hwdom_init amd_iommu_setup_dom0_device(
+    u8 devfn, struct pci_dev *pdev)
 {
     int bdf = PCI_BDF2(pdev->bus, pdev->devfn);
     struct amd_iommu *iommu = find_iommu_for_device(pdev->seg, bdf);
@@ -280,7 +281,7 @@ static int amd_iommu_domain_init(struct domain *d)
     return 0;
 }
 
-static void __init amd_iommu_dom0_init(struct domain *d)
+static void __hwdom_init amd_iommu_dom0_init(struct domain *d)
 {
     unsigned long i; 
 
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 54d891f..3e5635c 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -45,7 +45,7 @@ custom_param("iommu", parse_iommu_param);
 bool_t __initdata iommu_enable = 1;
 bool_t __read_mostly iommu_enabled;
 bool_t __read_mostly force_iommu;
-bool_t __initdata iommu_dom0_strict;
+bool_t __hwdom_initdata iommu_dom0_strict;
 bool_t __read_mostly iommu_verbose;
 bool_t __read_mostly iommu_workaround_bios_bug;
 bool_t __read_mostly iommu_passthrough;
@@ -130,7 +130,7 @@ int iommu_domain_init(struct domain *d)
     return hd->platform_ops->init(d);
 }
 
-static __init void check_dom0_pvh_reqs(struct domain *d)
+static void __hwdom_init check_dom0_pvh_reqs(struct domain *d)
 {
     if ( !iommu_enabled )
         panic("Presently, iommu must be enabled for pvh dom0\n");
@@ -141,7 +141,7 @@ static __init void check_dom0_pvh_reqs(struct domain *d)
     iommu_dom0_strict = 1;
 }
 
-void __init iommu_dom0_init(struct domain *d)
+void __hwdom_init iommu_dom0_init(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
 
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index ff78142..dfa195a 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -893,7 +893,7 @@ static void setup_one_dom0_device(const struct setup_dom0 *ctxt,
               PCI_SLOT(devfn) == PCI_SLOT(pdev->devfn) );
 }
 
-static int __init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
+static int __hwdom_init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
 {
     struct setup_dom0 *ctxt = arg;
     int bus, devfn;
@@ -943,7 +943,7 @@ static int __init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
     return 0;
 }
 
-void __init setup_dom0_pci_devices(
+void __hwdom_init setup_dom0_pci_devices(
     struct domain *d, int (*handler)(u8 devfn, struct pci_dev *))
 {
     struct setup_dom0 ctxt = { .d = d, .handler = handler };
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index 9c8e4a3..d22d518 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1242,7 +1242,7 @@ static int intel_iommu_domain_init(struct domain *d)
     return 0;
 }
 
-static void __init intel_iommu_dom0_init(struct domain *d)
+static void __hwdom_init intel_iommu_dom0_init(struct domain *d)
 {
     struct acpi_drhd_unit *drhd;
 
@@ -1992,7 +1992,7 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
     return domain_context_unmap(pdev->domain, devfn, pdev);
 }
 
-static int __init setup_dom0_device(u8 devfn, struct pci_dev *pdev)
+static int __hwdom_init setup_dom0_device(u8 devfn, struct pci_dev *pdev)
 {
     int err;
 
@@ -2140,7 +2140,7 @@ static int init_vtd_hw(void)
     return 0;
 }
 
-static void __init setup_dom0_rmrr(struct domain *d)
+static void __hwdom_init setup_dom0_rmrr(struct domain *d)
 {
     struct acpi_rmrr_unit *rmrr;
     u16 bdf;
diff --git a/xen/drivers/passthrough/vtd/quirks.c b/xen/drivers/passthrough/vtd/quirks.c
index 7f6c3a7..fbba23b 100644
--- a/xen/drivers/passthrough/vtd/quirks.c
+++ b/xen/drivers/passthrough/vtd/quirks.c
@@ -384,7 +384,7 @@ void me_wifi_quirk(struct domain *domain, u8 bus, u8 devfn, int map)
  *   - This can cause system failure upon non-fatal VT-d faults
  *   - Potential security issue if malicious guest trigger VT-d faults
  */
-void __init pci_vtd_quirk(struct pci_dev *pdev)
+void __hwdom_init pci_vtd_quirk(struct pci_dev *pdev)
 {
     int seg = pdev->seg;
     int bus = pdev->bus;
diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c
index f271a42..00131b3 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -36,7 +36,7 @@
  * iommu_inclusive_mapping: when set, all memory below 4GB is included in dom0
  * 1:1 iommu mappings except xen and unusable regions.
  */
-static bool_t __initdata iommu_inclusive_mapping = 1;
+static bool_t __hwdom_initdata iommu_inclusive_mapping = 1;
 boolean_param("iommu_inclusive_mapping", iommu_inclusive_mapping);
 
 void *map_vtd_domain_page(u64 maddr)
@@ -107,7 +107,7 @@ void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq)
     spin_unlock(&d->event_lock);
 }
 
-void __init iommu_set_dom0_mapping(struct domain *d)
+void __hwdom_init iommu_set_dom0_mapping(struct domain *d)
 {
     unsigned long i, j, tmp, top;
 
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 24f95a3..02ab1fc 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -54,6 +54,10 @@
 
 #define CONFIG_MULTIBOOT 1
 
+#ifdef XSM_ENABLE
+#define CONFIG_LATE_HWDOM 1
+#endif
+
 #define HZ 100
 
 #define OPT_CONSOLE_STR "vga"
diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h
index 9d481b3..b3bced3 100644
--- a/xen/include/xen/init.h
+++ b/xen/include/xen/init.h
@@ -129,4 +129,12 @@ extern struct kernel_param __setup_start, __setup_end;
 #define __devexitdata __exitdata
 #endif
 
+#ifdef CONFIG_LATE_HWDOM
+#define __hwdom_init
+#define __hwdom_initdata  __read_mostly
+#else
+#define __hwdom_init      __init
+#define __hwdom_initdata  __initdata
+#endif
+
 #endif /* _LINUX_INIT_H */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:07 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02:07 +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 1WaNbT-0007Q3-Ma; Wed, 16 Apr 2014 11:02:07 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbS-0007Ph-D5
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:06 +0000
Received: from [85.158.139.211:58509] by server-14.bemta-5.messagelabs.com id
	87/61-15696-D236E435; Wed, 16 Apr 2014 11:02:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1397646124!7818213!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23136 invoked from network); 16 Apr 2014 11:02:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:02:05 -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 1WaNbP-0000lb-Vn
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbP-0000e1-Tk
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:03 +0000
Date: Wed, 16 Apr 2014 11:02:03 +0000
Message-Id: <E1WaNbP-0000e1-Tk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] prevent 0 from being used as a dynamic
	domid
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 920641d9c4a9216952c2200cd4a10938ec90e0f0
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:20:08 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:20:08 2014 +0200

    prevent 0 from being used as a dynamic domid
    
    When the hardware domain is made distinct from dom0, it becomes possible
    to shut down and destroy domain 0 while leaving the hypervisor running.
    If this happens, prevent this domain ID from being considered for
    allocation to a new guest.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/domctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 5e807ab..af3614b 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -436,7 +436,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
             for ( dom = rover + 1; dom != rover; dom++ )
             {
                 if ( dom == DOMID_FIRST_RESERVED )
-                    dom = 0;
+                    dom = 1;
                 if ( is_free_domid(dom) )
                     break;
             }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:07 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02:07 +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 1WaNbT-0007Q3-Ma; Wed, 16 Apr 2014 11:02:07 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbS-0007Ph-D5
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:06 +0000
Received: from [85.158.139.211:58509] by server-14.bemta-5.messagelabs.com id
	87/61-15696-D236E435; Wed, 16 Apr 2014 11:02:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1397646124!7818213!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23136 invoked from network); 16 Apr 2014 11:02:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:02:05 -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 1WaNbP-0000lb-Vn
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbP-0000e1-Tk
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:03 +0000
Date: Wed, 16 Apr 2014 11:02:03 +0000
Message-Id: <E1WaNbP-0000e1-Tk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] prevent 0 from being used as a dynamic
	domid
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 920641d9c4a9216952c2200cd4a10938ec90e0f0
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:20:08 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:20:08 2014 +0200

    prevent 0 from being used as a dynamic domid
    
    When the hardware domain is made distinct from dom0, it becomes possible
    to shut down and destroy domain 0 while leaving the hypervisor running.
    If this happens, prevent this domain ID from being considered for
    allocation to a new guest.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/domctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 5e807ab..af3614b 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -436,7 +436,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
             for ( dom = rover + 1; dom != rover; dom++ )
             {
                 if ( dom == DOMID_FIRST_RESERVED )
-                    dom = 0;
+                    dom = 1;
                 if ( is_free_domid(dom) )
                     break;
             }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02: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 1WaNbg-0007SA-PP; Wed, 16 Apr 2014 11:02:20 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbe-0007Rs-9g
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:18 +0000
Received: from [85.158.139.211:2277] by server-11.bemta-5.messagelabs.com id
	2B/E8-30804-9336E435; Wed, 16 Apr 2014 11:02:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1397646134!4877204!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9931 invoked from network); 16 Apr 2014 11:02:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:02:15 -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 1WaNba-0000lk-B1
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNba-0000eQ-5v
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:14 +0000
Date: Wed, 16 Apr 2014 11:02:14 +0000
Message-Id: <E1WaNba-0000eQ-5v@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] rename dom0 to hardware_domain
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 c86ccbf0b7976ac0093bef4e4e43005771c0f829
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:20:55 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:20:55 2014 +0200

    rename dom0 to hardware_domain
    
    This should not change any functionality other than renaming the global
    variable.  In a few cases (primarily the domain building code), a local
    variable or argument named dom0 was created and used instead of the
    global hardware_domain to clarify that the domain being used in this
    case is actually domain 0.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Christoph Egger <chegger@amazon.de>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/arm/domain_build.c                 |    2 +-
 xen/arch/arm/setup.c                        |    5 ++-
 xen/arch/x86/acpi/cpu_idle.c                |    2 +-
 xen/arch/x86/cpu/mcheck/vmce.h              |    5 ++-
 xen/arch/x86/crash.c                        |    2 +-
 xen/arch/x86/domain_build.c                 |   37 ++++++++++++++-------------
 xen/arch/x86/io_apic.c                      |    8 +++---
 xen/arch/x86/irq.c                          |    8 +++---
 xen/arch/x86/mm.c                           |    2 +-
 xen/arch/x86/nmi.c                          |    2 +-
 xen/arch/x86/setup.c                        |    5 ++-
 xen/arch/x86/traps.c                        |    2 +-
 xen/arch/x86/x86_64/mm.c                    |    6 ++--
 xen/common/domain.c                         |    2 +-
 xen/common/event_channel.c                  |    2 +-
 xen/common/kexec.c                          |    2 +-
 xen/common/keyhandler.c                     |    4 +-
 xen/common/xenoprof.c                       |    2 +-
 xen/drivers/char/ns16550.c                  |    4 ++-
 xen/drivers/passthrough/amd/pci_amd_iommu.c |    2 +-
 xen/drivers/passthrough/iommu.c             |   10 +++---
 xen/drivers/passthrough/pci.c               |    4 +-
 xen/drivers/passthrough/vtd/iommu.c         |    4 +-
 xen/include/asm-arm/domain.h                |    2 +-
 xen/include/xen/domain.h                    |    2 +-
 xen/include/xen/sched.h                     |    4 +-
 26 files changed, 68 insertions(+), 62 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 502db84..fede5c0 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -50,7 +50,7 @@ custom_param("dom0_mem", parse_dom0_mem);
  */
 #define DOM0_FDT_EXTRA_SIZE (128 + sizeof(struct fdt_reserve_entry))
 
-struct vcpu *__init alloc_dom0_vcpu0(void)
+struct vcpu *__init alloc_dom0_vcpu0(struct domain *dom0)
 {
     if ( opt_dom0_max_vcpus == 0 )
         opt_dom0_max_vcpus = num_online_cpus();
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 0892a54..358eafb 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -663,6 +663,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     size_t fdt_size;
     int cpus, i;
     const char *cmdline;
+    struct domain *dom0;
 
     setup_cache();
 
@@ -760,8 +761,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     do_initcalls();
 
     /* Create initial domain 0. */
-    dom0 = domain_create(0, 0, 0);
-    if ( IS_ERR(dom0) || (alloc_dom0_vcpu0() == NULL) )
+    hardware_domain = dom0 = domain_create(0, 0, 0);
+    if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
             panic("Error creating domain 0");
 
     dom0->is_privileged = 1;
diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index d2119e2..b05fb39 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -972,7 +972,7 @@ static void set_cx(
             cx->entry_method = ACPI_CSTATE_EM_HALT;
         break;
     case ACPI_ADR_SPACE_SYSTEM_IO:
-        if ( ioports_deny_access(dom0, cx->address, cx->address) )
+        if ( ioports_deny_access(hardware_domain, cx->address, cx->address) )
             printk(XENLOG_WARNING "Could not deny access to port %04x\n",
                    cx->address);
         cx->entry_method = ACPI_CSTATE_EM_SYSIO;
diff --git a/xen/arch/x86/cpu/mcheck/vmce.h b/xen/arch/x86/cpu/mcheck/vmce.h
index 6b2c95a..163ce3c 100644
--- a/xen/arch/x86/cpu/mcheck/vmce.h
+++ b/xen/arch/x86/cpu/mcheck/vmce.h
@@ -5,8 +5,9 @@
 
 int vmce_init(struct cpuinfo_x86 *c);
 
-#define dom0_vmce_enabled() (dom0 && dom0->max_vcpus && dom0->vcpu[0] \
-        && guest_enabled_event(dom0->vcpu[0], VIRQ_MCA))
+#define dom0_vmce_enabled() (hardware_domain && hardware_domain->max_vcpus \
+        && hardware_domain->vcpu[0] \
+        && guest_enabled_event(hardware_domain->vcpu[0], VIRQ_MCA))
 
 int unmmap_broken_page(struct domain *d, mfn_t mfn, unsigned long gfn);
 
diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
index ec586bd..aed3b3e 100644
--- a/xen/arch/x86/crash.c
+++ b/xen/arch/x86/crash.c
@@ -205,7 +205,7 @@ void machine_crash_shutdown(void)
     info = kexec_crash_save_info();
     info->xen_phys_start = xen_phys_start;
     info->dom0_pfn_to_mfn_frame_list_list =
-        arch_get_pfn_to_mfn_frame_list_list(dom0);
+        arch_get_pfn_to_mfn_frame_list_list(hardware_domain);
 }
 
 /*
diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index 84ce392..b2411b0 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -100,7 +100,7 @@ static void __init parse_dom0_max_vcpus(const char *s)
 }
 custom_param("dom0_max_vcpus", parse_dom0_max_vcpus);
 
-struct vcpu *__init alloc_dom0_vcpu0(void)
+struct vcpu *__init alloc_dom0_vcpu0(struct domain *dom0)
 {
     unsigned max_vcpus;
 
@@ -302,7 +302,7 @@ static void __init process_dom0_ioports_disable(void)
         printk("Disabling dom0 access to ioport range %04lx-%04lx\n",
             io_from, io_to);
 
-        if ( ioports_deny_access(dom0, io_from, io_to) != 0 )
+        if ( ioports_deny_access(hardware_domain, io_from, io_to) != 0 )
             BUG();
     }
 }
@@ -1082,27 +1082,28 @@ int __init construct_dom0(
 
     rc = 0;
 
-    /* DOM0 is permitted full I/O capabilities. */
-    rc |= ioports_permit_access(dom0, 0, 0xFFFF);
-    rc |= iomem_permit_access(dom0, 0UL, ~0UL);
-    rc |= irqs_permit_access(dom0, 1, nr_irqs_gsi - 1);
+    /* The hardware domain is initially permitted full I/O capabilities. */
+    rc |= ioports_permit_access(hardware_domain, 0, 0xFFFF);
+    rc |= iomem_permit_access(hardware_domain, 0UL, ~0UL);
+    rc |= irqs_permit_access(hardware_domain, 1, nr_irqs_gsi - 1);
 
     /*
      * Modify I/O port access permissions.
      */
     /* Master Interrupt Controller (PIC). */
-    rc |= ioports_deny_access(dom0, 0x20, 0x21);
+    rc |= ioports_deny_access(hardware_domain, 0x20, 0x21);
     /* Slave Interrupt Controller (PIC). */
-    rc |= ioports_deny_access(dom0, 0xA0, 0xA1);
+    rc |= ioports_deny_access(hardware_domain, 0xA0, 0xA1);
     /* Interval Timer (PIT). */
-    rc |= ioports_deny_access(dom0, 0x40, 0x43);
+    rc |= ioports_deny_access(hardware_domain, 0x40, 0x43);
     /* PIT Channel 2 / PC Speaker Control. */
-    rc |= ioports_deny_access(dom0, 0x61, 0x61);
+    rc |= ioports_deny_access(hardware_domain, 0x61, 0x61);
     /* ACPI PM Timer. */
     if ( pmtmr_ioport )
-        rc |= ioports_deny_access(dom0, pmtmr_ioport, pmtmr_ioport + 3);
+        rc |= ioports_deny_access(hardware_domain, pmtmr_ioport,
+		                          pmtmr_ioport + 3);
     /* PCI configuration space (NB. 0xcf8 has special treatment). */
-    rc |= ioports_deny_access(dom0, 0xcfc, 0xcff);
+    rc |= ioports_deny_access(hardware_domain, 0xcfc, 0xcff);
     /* Command-line I/O ranges. */
     process_dom0_ioports_disable();
 
@@ -1113,22 +1114,22 @@ int __init construct_dom0(
     if ( mp_lapic_addr != 0 )
     {
         mfn = paddr_to_pfn(mp_lapic_addr);
-        rc |= iomem_deny_access(dom0, mfn, mfn);
+        rc |= iomem_deny_access(hardware_domain, mfn, mfn);
     }
     /* I/O APICs. */
     for ( i = 0; i < nr_ioapics; i++ )
     {
         mfn = paddr_to_pfn(mp_ioapics[i].mpc_apicaddr);
         if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn) )
-            rc |= iomem_deny_access(dom0, mfn, mfn);
+            rc |= iomem_deny_access(hardware_domain, mfn, mfn);
     }
     /* MSI range. */
-    rc |= iomem_deny_access(dom0, paddr_to_pfn(MSI_ADDR_BASE_LO),
+    rc |= iomem_deny_access(hardware_domain, paddr_to_pfn(MSI_ADDR_BASE_LO),
                             paddr_to_pfn(MSI_ADDR_BASE_LO +
                                          MSI_ADDR_DEST_ID_MASK));
     /* HyperTransport range. */
     if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
-        rc |= iomem_deny_access(dom0, paddr_to_pfn(0xfdULL << 32),
+        rc |= iomem_deny_access(hardware_domain, paddr_to_pfn(0xfdULL << 32),
                                 paddr_to_pfn((1ULL << 40) - 1));
 
     /* Remove access to E820_UNUSABLE I/O regions above 1MB. */
@@ -1140,7 +1141,7 @@ int __init construct_dom0(
         if ( (e820.map[i].type == E820_UNUSABLE) &&
              (e820.map[i].size != 0) &&
              (sfn <= efn) )
-            rc |= iomem_deny_access(dom0, sfn, efn);
+            rc |= iomem_deny_access(hardware_domain, sfn, efn);
     }
 
     BUG_ON(rc != 0);
@@ -1149,7 +1150,7 @@ int __init construct_dom0(
         printk(" Xen warning: dom0 kernel broken ELF: %s\n",
                elf_check_broken(&elf));
 
-    iommu_dom0_init(dom0);
+    iommu_dom0_init(hardware_domain);
     return 0;
 
 out:
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index bddc588..4e6fe2b 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -2363,7 +2363,7 @@ int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val)
      * that dom0 pirq == irq.
      */
     pirq = (irq >= 256) ? irq : rte.vector;
-    if ( (pirq < 0) || (pirq >= dom0->nr_pirqs) )
+    if ( (pirq < 0) || (pirq >= hardware_domain->nr_pirqs) )
         return -EINVAL;
     
     if ( desc->action )
@@ -2399,10 +2399,10 @@ int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val)
 
         printk(XENLOG_INFO "allocated vector %02x for irq %d\n", ret, irq);
     }
-    spin_lock(&dom0->event_lock);
-    ret = map_domain_pirq(dom0, pirq, irq,
+    spin_lock(&hardware_domain->event_lock);
+    ret = map_domain_pirq(hardware_domain, pirq, irq,
             MAP_PIRQ_TYPE_GSI, NULL);
-    spin_unlock(&dom0->event_lock);
+    spin_unlock(&hardware_domain->event_lock);
     if ( ret < 0 )
         return ret;
 
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 60b1a506..5b5b169 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -185,9 +185,9 @@ int create_irq(int node)
         desc->arch.used = IRQ_UNUSED;
         irq = ret;
     }
-    else if ( dom0 )
+    else if ( hardware_domain )
     {
-        ret = irq_permit_access(dom0, irq);
+        ret = irq_permit_access(hardware_domain, irq);
         if ( ret )
             printk(XENLOG_G_ERR
                    "Could not grant Dom0 access to IRQ%d (error %d)\n",
@@ -205,9 +205,9 @@ void destroy_irq(unsigned int irq)
 
     BUG_ON(!MSI_IRQ(irq));
 
-    if ( dom0 )
+    if ( hardware_domain )
     {
-        int err = irq_deny_access(dom0, irq);
+        int err = irq_deny_access(hardware_domain, irq);
 
         if ( err )
             printk(XENLOG_G_ERR
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index ad48acc..b9a54a5 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -5222,7 +5222,7 @@ void *alloc_xen_pagetable(void)
     {
         void *ptr = alloc_xenheap_page();
 
-        BUG_ON(!dom0 && !ptr);
+        BUG_ON(!hardware_domain && !ptr);
         return ptr;
     }
 
diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c
index c67a9c3..526020b 100644
--- a/xen/arch/x86/nmi.c
+++ b/xen/arch/x86/nmi.c
@@ -519,7 +519,7 @@ static void do_nmi_stats(unsigned char key)
     for_each_online_cpu ( i )
         printk("%3d\t%3d\n", i, nmi_count(i));
 
-    if ( ((d = dom0) == NULL) || (d->vcpu == NULL) ||
+    if ( ((d = hardware_domain) == NULL) || (d->vcpu == NULL) ||
          ((v = d->vcpu[0]) == NULL) )
         return;
 
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 1fd70ec..11c95fc 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -547,6 +547,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
     unsigned long nr_pages, raw_max_page, modules_headroom, *module_map;
     int i, j, e820_warn = 0, bytes = 0;
     bool_t acpi_boot_table_init_done = 0;
+    struct domain *dom0;
     struct ns16550_defaults ns16550 = {
         .data_bits = 8,
         .parity    = 'n',
@@ -1338,8 +1339,8 @@ void __init noreturn __start_xen(unsigned long mbi_p)
         panic("Could not protect TXT memory regions");
 
     /* Create initial domain 0. */
-    dom0 = domain_create(0, DOMCRF_s3_integrity, 0);
-    if ( IS_ERR(dom0) || (alloc_dom0_vcpu0() == NULL) )
+    hardware_domain = dom0 = domain_create(0, DOMCRF_s3_integrity, 0);
+    if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
         panic("Error creating domain 0");
 
     dom0->is_privileged = 1;
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 21c8b63..e5c1269 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3152,7 +3152,7 @@ void async_exception_cleanup(struct vcpu *curr)
 
 static void nmi_dom0_report(unsigned int reason_idx)
 {
-    struct domain *d = dom0;
+    struct domain *d = hardware_domain;
 
     if ( (d == NULL) || (d->vcpu == NULL) || (d->vcpu[0] == NULL) )
         return;
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index f6ea012..71ae519 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -1447,15 +1447,15 @@ int memory_add(unsigned long spfn, unsigned long epfn, unsigned int pxm)
     if ( ret )
         goto destroy_m2p;
 
-    if ( !need_iommu(dom0) )
+    if ( !need_iommu(hardware_domain) )
     {
         for ( i = spfn; i < epfn; i++ )
-            if ( iommu_map_page(dom0, i, i, IOMMUF_readable|IOMMUF_writable) )
+            if ( iommu_map_page(hardware_domain, i, i, IOMMUF_readable|IOMMUF_writable) )
                 break;
         if ( i != epfn )
         {
             while (i-- > old_max)
-                iommu_unmap_page(dom0, i);
+                iommu_unmap_page(hardware_domain, i);
             goto destroy_m2p;
         }
     }
diff --git a/xen/common/domain.c b/xen/common/domain.c
index ccd159e..ccf7933 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -59,7 +59,7 @@ DEFINE_RCU_READ_LOCK(domlist_read_lock);
 static struct domain *domain_hash[DOMAIN_HASH_SIZE];
 struct domain *domain_list;
 
-struct domain *dom0;
+struct domain *hardware_domain __read_mostly;
 
 struct vcpu *idle_vcpu[NR_CPUS] __read_mostly;
 
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index 83bc7df..cbd495d 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -743,7 +743,7 @@ void send_global_virq(uint32_t virq)
     ASSERT(virq < NR_VIRQS);
     ASSERT(virq_is_global(virq));
 
-    send_guest_global_virq(global_virq_handlers[virq] ?: dom0, virq);
+    send_guest_global_virq(global_virq_handlers[virq] ?: hardware_domain, virq);
 }
 
 int set_global_virq_handler(struct domain *d, uint32_t virq)
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 23d964e..2239ee8 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -872,7 +872,7 @@ static int kexec_load_slot(struct kexec_image *kimage)
 static uint16_t kexec_load_v1_arch(void)
 {
 #ifdef CONFIG_X86
-    return is_pv_32on64_domain(dom0) ? EM_386 : EM_X86_64;
+    return is_pv_32on64_domain(hardware_domain) ? EM_386 : EM_X86_64;
 #else
     return EM_NONE;
 #endif
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 5a974b1..627ef99 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -172,12 +172,12 @@ static void dump_dom0_registers(unsigned char key)
 {
     struct vcpu *v;
 
-    if ( dom0 == NULL )
+    if ( hardware_domain == NULL )
         return;
 
     printk("'%c' pressed -> dumping Dom0's registers\n", key);
 
-    for_each_vcpu ( dom0, v )
+    for_each_vcpu ( hardware_domain, v )
     {
         if ( alt_key_handling && softirq_pending(smp_processor_id()) )
         {
diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c
index 3c30c3e..3de20b8 100644
--- a/xen/common/xenoprof.c
+++ b/xen/common/xenoprof.c
@@ -219,7 +219,7 @@ static int alloc_xenoprof_struct(
     bufsize = sizeof(struct xenoprof_buf);
     i = sizeof(struct event_log);
 #ifdef CONFIG_COMPAT
-    d->xenoprof->is_compat = is_pv_32on64_domain(is_passive ? dom0 : d);
+    d->xenoprof->is_compat = is_pv_32on64_domain(is_passive ? hardware_domain : d);
     if ( XENOPROF_COMPAT(d->xenoprof) )
     {
         bufsize = sizeof(struct compat_oprof_buf);
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 5952de1..4aa33d5 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -726,10 +726,12 @@ static void __init ns16550_endboot(struct serial_port *port)
 {
 #ifdef HAS_IOPORTS
     struct ns16550 *uart = port->uart;
+    int rv;
 
     if ( uart->remapped_io_base )
         return;
-    if ( ioports_deny_access(dom0, uart->io_base, uart->io_base + 7) != 0 )
+    rv = ioports_deny_access(hardware_domain, uart->io_base, uart->io_base + 7);
+    if ( rv != 0 )
         BUG();
 #endif
 }
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index ff5f06e..031480f 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -403,7 +403,7 @@ static int amd_iommu_assign_device(struct domain *d, u8 devfn,
             ivrs_mappings[req_id].read_permission);
     }
 
-    return reassign_device(dom0, d, devfn, pdev);
+    return reassign_device(hardware_domain, d, devfn, pdev);
 }
 
 static void deallocate_next_page_table(struct page_info *pg, int level)
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 3e5635c..25d9af9 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -265,7 +265,7 @@ static void iommu_teardown(struct domain *d)
 }
 
 /*
- * If the device isn't owned by dom0, it means it already
+ * If the device isn't owned by the hardware domain, it means it already
  * has been assigned to other domain, or it doesn't exist.
  */
 static int device_assigned(u16 seg, u8 bus, u8 devfn)
@@ -273,7 +273,7 @@ static int device_assigned(u16 seg, u8 bus, u8 devfn)
     struct pci_dev *pdev;
 
     spin_lock(&pcidevs_lock);
-    pdev = pci_get_pdev_by_domain(dom0, seg, bus, devfn);
+    pdev = pci_get_pdev_by_domain(hardware_domain, seg, bus, devfn);
     spin_unlock(&pcidevs_lock);
 
     return pdev ? 0 : -EBUSY;
@@ -312,7 +312,7 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
         d->need_iommu = 1;
     }
 
-    pdev = pci_get_pdev_by_domain(dom0, seg, bus, devfn);
+    pdev = pci_get_pdev_by_domain(hardware_domain, seg, bus, devfn);
     if ( !pdev )
     {
         rc = pci_get_pdev(seg, bus, devfn) ? -EBUSY : -ENODEV;
@@ -507,7 +507,7 @@ int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
         devfn += pdev->phantom_stride;
         if ( PCI_SLOT(devfn) != PCI_SLOT(pdev->devfn) )
             break;
-        ret = hd->platform_ops->reassign_device(d, dom0, devfn, pdev);
+        ret = hd->platform_ops->reassign_device(d, hardware_domain, devfn, pdev);
         if ( !ret )
             continue;
 
@@ -517,7 +517,7 @@ int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
     }
 
     devfn = pdev->devfn;
-    ret = hd->platform_ops->reassign_device(d, dom0, devfn, pdev);
+    ret = hd->platform_ops->reassign_device(d, hardware_domain, devfn, pdev);
     if ( ret )
     {
         dprintk(XENLOG_G_ERR,
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index dfa195a..fbc777c 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -569,7 +569,7 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, const struct pci_dev_info *info)
     ret = 0;
     if ( !pdev->domain )
     {
-        pdev->domain = dom0;
+        pdev->domain = hardware_domain;
         ret = iommu_add_device(pdev);
         if ( ret )
         {
@@ -577,7 +577,7 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, const struct pci_dev_info *info)
             goto out;
         }
 
-        list_add(&pdev->domain_list, &dom0->arch.pdev_list);
+        list_add(&pdev->domain_list, &hardware_domain->arch.pdev_list);
     }
     else
         iommu_enable_device(pdev);
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index d22d518..263448d 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1667,7 +1667,7 @@ static int reassign_device_ownership(
      * can attempt to send arbitrary LAPIC/MSI messages. We are unprotected
      * by the root complex unless interrupt remapping is enabled.
      */
-    if ( (target != dom0) && !iommu_intremap )
+    if ( (target != hardware_domain) && !iommu_intremap )
         untrusted_msi = 1;
 
     ret = domain_context_unmap(source, devfn, pdev);
@@ -2270,7 +2270,7 @@ static int intel_iommu_assign_device(
     if ( list_empty(&acpi_drhd_units) )
         return -ENODEV;
 
-    ret = reassign_device_ownership(dom0, d, devfn, pdev);
+    ret = reassign_device_ownership(hardware_domain, d, devfn, pdev);
     if ( ret )
         goto done;
 
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index 28c359a..ec66a4e 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -87,7 +87,7 @@ enum domain_type {
 #endif
 
 extern int dom0_11_mapping;
-#define is_domain_direct_mapped(d) ((d) == dom0 && dom0_11_mapping)
+#define is_domain_direct_mapped(d) ((d) == hardware_domain && dom0_11_mapping)
 
 struct vtimer {
         struct vcpu *v;
diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h
index a057069..bb1c398 100644
--- a/xen/include/xen/domain.h
+++ b/xen/include/xen/domain.h
@@ -12,7 +12,7 @@ typedef union {
 
 struct vcpu *alloc_vcpu(
     struct domain *d, unsigned int vcpu_id, unsigned int cpu_id);
-struct vcpu *alloc_dom0_vcpu0(void);
+struct vcpu *alloc_dom0_vcpu0(struct domain *dom0);
 int vcpu_reset(struct vcpu *);
 
 struct xen_domctl_getdomaininfo;
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 3d33a90..cbbe8a4 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -43,8 +43,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t);
 
 #define SCHED_STAT_CRANK(_X)                (perfc_incr(_X))
 
-/* A global pointer to the initial domain (DOM0). */
-extern struct domain *dom0;
+/* A global pointer to the hardware domain (usually DOM0). */
+extern struct domain *hardware_domain;
 
 #ifndef CONFIG_COMPAT
 #define BITS_PER_EVTCHN_WORD(d) BITS_PER_XEN_ULONG
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02: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 1WaNbg-0007SA-PP; Wed, 16 Apr 2014 11:02:20 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbe-0007Rs-9g
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:18 +0000
Received: from [85.158.139.211:2277] by server-11.bemta-5.messagelabs.com id
	2B/E8-30804-9336E435; Wed, 16 Apr 2014 11:02:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-206.messagelabs.com!1397646134!4877204!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 9931 invoked from network); 16 Apr 2014 11:02:15 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:02:15 -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 1WaNba-0000lk-B1
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNba-0000eQ-5v
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:14 +0000
Date: Wed, 16 Apr 2014 11:02:14 +0000
Message-Id: <E1WaNba-0000eQ-5v@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] rename dom0 to hardware_domain
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 c86ccbf0b7976ac0093bef4e4e43005771c0f829
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:20:55 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:20:55 2014 +0200

    rename dom0 to hardware_domain
    
    This should not change any functionality other than renaming the global
    variable.  In a few cases (primarily the domain building code), a local
    variable or argument named dom0 was created and used instead of the
    global hardware_domain to clarify that the domain being used in this
    case is actually domain 0.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Christoph Egger <chegger@amazon.de>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/arm/domain_build.c                 |    2 +-
 xen/arch/arm/setup.c                        |    5 ++-
 xen/arch/x86/acpi/cpu_idle.c                |    2 +-
 xen/arch/x86/cpu/mcheck/vmce.h              |    5 ++-
 xen/arch/x86/crash.c                        |    2 +-
 xen/arch/x86/domain_build.c                 |   37 ++++++++++++++-------------
 xen/arch/x86/io_apic.c                      |    8 +++---
 xen/arch/x86/irq.c                          |    8 +++---
 xen/arch/x86/mm.c                           |    2 +-
 xen/arch/x86/nmi.c                          |    2 +-
 xen/arch/x86/setup.c                        |    5 ++-
 xen/arch/x86/traps.c                        |    2 +-
 xen/arch/x86/x86_64/mm.c                    |    6 ++--
 xen/common/domain.c                         |    2 +-
 xen/common/event_channel.c                  |    2 +-
 xen/common/kexec.c                          |    2 +-
 xen/common/keyhandler.c                     |    4 +-
 xen/common/xenoprof.c                       |    2 +-
 xen/drivers/char/ns16550.c                  |    4 ++-
 xen/drivers/passthrough/amd/pci_amd_iommu.c |    2 +-
 xen/drivers/passthrough/iommu.c             |   10 +++---
 xen/drivers/passthrough/pci.c               |    4 +-
 xen/drivers/passthrough/vtd/iommu.c         |    4 +-
 xen/include/asm-arm/domain.h                |    2 +-
 xen/include/xen/domain.h                    |    2 +-
 xen/include/xen/sched.h                     |    4 +-
 26 files changed, 68 insertions(+), 62 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 502db84..fede5c0 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -50,7 +50,7 @@ custom_param("dom0_mem", parse_dom0_mem);
  */
 #define DOM0_FDT_EXTRA_SIZE (128 + sizeof(struct fdt_reserve_entry))
 
-struct vcpu *__init alloc_dom0_vcpu0(void)
+struct vcpu *__init alloc_dom0_vcpu0(struct domain *dom0)
 {
     if ( opt_dom0_max_vcpus == 0 )
         opt_dom0_max_vcpus = num_online_cpus();
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 0892a54..358eafb 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -663,6 +663,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     size_t fdt_size;
     int cpus, i;
     const char *cmdline;
+    struct domain *dom0;
 
     setup_cache();
 
@@ -760,8 +761,8 @@ void __init start_xen(unsigned long boot_phys_offset,
     do_initcalls();
 
     /* Create initial domain 0. */
-    dom0 = domain_create(0, 0, 0);
-    if ( IS_ERR(dom0) || (alloc_dom0_vcpu0() == NULL) )
+    hardware_domain = dom0 = domain_create(0, 0, 0);
+    if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
             panic("Error creating domain 0");
 
     dom0->is_privileged = 1;
diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index d2119e2..b05fb39 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -972,7 +972,7 @@ static void set_cx(
             cx->entry_method = ACPI_CSTATE_EM_HALT;
         break;
     case ACPI_ADR_SPACE_SYSTEM_IO:
-        if ( ioports_deny_access(dom0, cx->address, cx->address) )
+        if ( ioports_deny_access(hardware_domain, cx->address, cx->address) )
             printk(XENLOG_WARNING "Could not deny access to port %04x\n",
                    cx->address);
         cx->entry_method = ACPI_CSTATE_EM_SYSIO;
diff --git a/xen/arch/x86/cpu/mcheck/vmce.h b/xen/arch/x86/cpu/mcheck/vmce.h
index 6b2c95a..163ce3c 100644
--- a/xen/arch/x86/cpu/mcheck/vmce.h
+++ b/xen/arch/x86/cpu/mcheck/vmce.h
@@ -5,8 +5,9 @@
 
 int vmce_init(struct cpuinfo_x86 *c);
 
-#define dom0_vmce_enabled() (dom0 && dom0->max_vcpus && dom0->vcpu[0] \
-        && guest_enabled_event(dom0->vcpu[0], VIRQ_MCA))
+#define dom0_vmce_enabled() (hardware_domain && hardware_domain->max_vcpus \
+        && hardware_domain->vcpu[0] \
+        && guest_enabled_event(hardware_domain->vcpu[0], VIRQ_MCA))
 
 int unmmap_broken_page(struct domain *d, mfn_t mfn, unsigned long gfn);
 
diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
index ec586bd..aed3b3e 100644
--- a/xen/arch/x86/crash.c
+++ b/xen/arch/x86/crash.c
@@ -205,7 +205,7 @@ void machine_crash_shutdown(void)
     info = kexec_crash_save_info();
     info->xen_phys_start = xen_phys_start;
     info->dom0_pfn_to_mfn_frame_list_list =
-        arch_get_pfn_to_mfn_frame_list_list(dom0);
+        arch_get_pfn_to_mfn_frame_list_list(hardware_domain);
 }
 
 /*
diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index 84ce392..b2411b0 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -100,7 +100,7 @@ static void __init parse_dom0_max_vcpus(const char *s)
 }
 custom_param("dom0_max_vcpus", parse_dom0_max_vcpus);
 
-struct vcpu *__init alloc_dom0_vcpu0(void)
+struct vcpu *__init alloc_dom0_vcpu0(struct domain *dom0)
 {
     unsigned max_vcpus;
 
@@ -302,7 +302,7 @@ static void __init process_dom0_ioports_disable(void)
         printk("Disabling dom0 access to ioport range %04lx-%04lx\n",
             io_from, io_to);
 
-        if ( ioports_deny_access(dom0, io_from, io_to) != 0 )
+        if ( ioports_deny_access(hardware_domain, io_from, io_to) != 0 )
             BUG();
     }
 }
@@ -1082,27 +1082,28 @@ int __init construct_dom0(
 
     rc = 0;
 
-    /* DOM0 is permitted full I/O capabilities. */
-    rc |= ioports_permit_access(dom0, 0, 0xFFFF);
-    rc |= iomem_permit_access(dom0, 0UL, ~0UL);
-    rc |= irqs_permit_access(dom0, 1, nr_irqs_gsi - 1);
+    /* The hardware domain is initially permitted full I/O capabilities. */
+    rc |= ioports_permit_access(hardware_domain, 0, 0xFFFF);
+    rc |= iomem_permit_access(hardware_domain, 0UL, ~0UL);
+    rc |= irqs_permit_access(hardware_domain, 1, nr_irqs_gsi - 1);
 
     /*
      * Modify I/O port access permissions.
      */
     /* Master Interrupt Controller (PIC). */
-    rc |= ioports_deny_access(dom0, 0x20, 0x21);
+    rc |= ioports_deny_access(hardware_domain, 0x20, 0x21);
     /* Slave Interrupt Controller (PIC). */
-    rc |= ioports_deny_access(dom0, 0xA0, 0xA1);
+    rc |= ioports_deny_access(hardware_domain, 0xA0, 0xA1);
     /* Interval Timer (PIT). */
-    rc |= ioports_deny_access(dom0, 0x40, 0x43);
+    rc |= ioports_deny_access(hardware_domain, 0x40, 0x43);
     /* PIT Channel 2 / PC Speaker Control. */
-    rc |= ioports_deny_access(dom0, 0x61, 0x61);
+    rc |= ioports_deny_access(hardware_domain, 0x61, 0x61);
     /* ACPI PM Timer. */
     if ( pmtmr_ioport )
-        rc |= ioports_deny_access(dom0, pmtmr_ioport, pmtmr_ioport + 3);
+        rc |= ioports_deny_access(hardware_domain, pmtmr_ioport,
+		                          pmtmr_ioport + 3);
     /* PCI configuration space (NB. 0xcf8 has special treatment). */
-    rc |= ioports_deny_access(dom0, 0xcfc, 0xcff);
+    rc |= ioports_deny_access(hardware_domain, 0xcfc, 0xcff);
     /* Command-line I/O ranges. */
     process_dom0_ioports_disable();
 
@@ -1113,22 +1114,22 @@ int __init construct_dom0(
     if ( mp_lapic_addr != 0 )
     {
         mfn = paddr_to_pfn(mp_lapic_addr);
-        rc |= iomem_deny_access(dom0, mfn, mfn);
+        rc |= iomem_deny_access(hardware_domain, mfn, mfn);
     }
     /* I/O APICs. */
     for ( i = 0; i < nr_ioapics; i++ )
     {
         mfn = paddr_to_pfn(mp_ioapics[i].mpc_apicaddr);
         if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn) )
-            rc |= iomem_deny_access(dom0, mfn, mfn);
+            rc |= iomem_deny_access(hardware_domain, mfn, mfn);
     }
     /* MSI range. */
-    rc |= iomem_deny_access(dom0, paddr_to_pfn(MSI_ADDR_BASE_LO),
+    rc |= iomem_deny_access(hardware_domain, paddr_to_pfn(MSI_ADDR_BASE_LO),
                             paddr_to_pfn(MSI_ADDR_BASE_LO +
                                          MSI_ADDR_DEST_ID_MASK));
     /* HyperTransport range. */
     if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
-        rc |= iomem_deny_access(dom0, paddr_to_pfn(0xfdULL << 32),
+        rc |= iomem_deny_access(hardware_domain, paddr_to_pfn(0xfdULL << 32),
                                 paddr_to_pfn((1ULL << 40) - 1));
 
     /* Remove access to E820_UNUSABLE I/O regions above 1MB. */
@@ -1140,7 +1141,7 @@ int __init construct_dom0(
         if ( (e820.map[i].type == E820_UNUSABLE) &&
              (e820.map[i].size != 0) &&
              (sfn <= efn) )
-            rc |= iomem_deny_access(dom0, sfn, efn);
+            rc |= iomem_deny_access(hardware_domain, sfn, efn);
     }
 
     BUG_ON(rc != 0);
@@ -1149,7 +1150,7 @@ int __init construct_dom0(
         printk(" Xen warning: dom0 kernel broken ELF: %s\n",
                elf_check_broken(&elf));
 
-    iommu_dom0_init(dom0);
+    iommu_dom0_init(hardware_domain);
     return 0;
 
 out:
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index bddc588..4e6fe2b 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -2363,7 +2363,7 @@ int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val)
      * that dom0 pirq == irq.
      */
     pirq = (irq >= 256) ? irq : rte.vector;
-    if ( (pirq < 0) || (pirq >= dom0->nr_pirqs) )
+    if ( (pirq < 0) || (pirq >= hardware_domain->nr_pirqs) )
         return -EINVAL;
     
     if ( desc->action )
@@ -2399,10 +2399,10 @@ int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val)
 
         printk(XENLOG_INFO "allocated vector %02x for irq %d\n", ret, irq);
     }
-    spin_lock(&dom0->event_lock);
-    ret = map_domain_pirq(dom0, pirq, irq,
+    spin_lock(&hardware_domain->event_lock);
+    ret = map_domain_pirq(hardware_domain, pirq, irq,
             MAP_PIRQ_TYPE_GSI, NULL);
-    spin_unlock(&dom0->event_lock);
+    spin_unlock(&hardware_domain->event_lock);
     if ( ret < 0 )
         return ret;
 
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 60b1a506..5b5b169 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -185,9 +185,9 @@ int create_irq(int node)
         desc->arch.used = IRQ_UNUSED;
         irq = ret;
     }
-    else if ( dom0 )
+    else if ( hardware_domain )
     {
-        ret = irq_permit_access(dom0, irq);
+        ret = irq_permit_access(hardware_domain, irq);
         if ( ret )
             printk(XENLOG_G_ERR
                    "Could not grant Dom0 access to IRQ%d (error %d)\n",
@@ -205,9 +205,9 @@ void destroy_irq(unsigned int irq)
 
     BUG_ON(!MSI_IRQ(irq));
 
-    if ( dom0 )
+    if ( hardware_domain )
     {
-        int err = irq_deny_access(dom0, irq);
+        int err = irq_deny_access(hardware_domain, irq);
 
         if ( err )
             printk(XENLOG_G_ERR
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index ad48acc..b9a54a5 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -5222,7 +5222,7 @@ void *alloc_xen_pagetable(void)
     {
         void *ptr = alloc_xenheap_page();
 
-        BUG_ON(!dom0 && !ptr);
+        BUG_ON(!hardware_domain && !ptr);
         return ptr;
     }
 
diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c
index c67a9c3..526020b 100644
--- a/xen/arch/x86/nmi.c
+++ b/xen/arch/x86/nmi.c
@@ -519,7 +519,7 @@ static void do_nmi_stats(unsigned char key)
     for_each_online_cpu ( i )
         printk("%3d\t%3d\n", i, nmi_count(i));
 
-    if ( ((d = dom0) == NULL) || (d->vcpu == NULL) ||
+    if ( ((d = hardware_domain) == NULL) || (d->vcpu == NULL) ||
          ((v = d->vcpu[0]) == NULL) )
         return;
 
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 1fd70ec..11c95fc 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -547,6 +547,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
     unsigned long nr_pages, raw_max_page, modules_headroom, *module_map;
     int i, j, e820_warn = 0, bytes = 0;
     bool_t acpi_boot_table_init_done = 0;
+    struct domain *dom0;
     struct ns16550_defaults ns16550 = {
         .data_bits = 8,
         .parity    = 'n',
@@ -1338,8 +1339,8 @@ void __init noreturn __start_xen(unsigned long mbi_p)
         panic("Could not protect TXT memory regions");
 
     /* Create initial domain 0. */
-    dom0 = domain_create(0, DOMCRF_s3_integrity, 0);
-    if ( IS_ERR(dom0) || (alloc_dom0_vcpu0() == NULL) )
+    hardware_domain = dom0 = domain_create(0, DOMCRF_s3_integrity, 0);
+    if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
         panic("Error creating domain 0");
 
     dom0->is_privileged = 1;
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 21c8b63..e5c1269 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3152,7 +3152,7 @@ void async_exception_cleanup(struct vcpu *curr)
 
 static void nmi_dom0_report(unsigned int reason_idx)
 {
-    struct domain *d = dom0;
+    struct domain *d = hardware_domain;
 
     if ( (d == NULL) || (d->vcpu == NULL) || (d->vcpu[0] == NULL) )
         return;
diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index f6ea012..71ae519 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -1447,15 +1447,15 @@ int memory_add(unsigned long spfn, unsigned long epfn, unsigned int pxm)
     if ( ret )
         goto destroy_m2p;
 
-    if ( !need_iommu(dom0) )
+    if ( !need_iommu(hardware_domain) )
     {
         for ( i = spfn; i < epfn; i++ )
-            if ( iommu_map_page(dom0, i, i, IOMMUF_readable|IOMMUF_writable) )
+            if ( iommu_map_page(hardware_domain, i, i, IOMMUF_readable|IOMMUF_writable) )
                 break;
         if ( i != epfn )
         {
             while (i-- > old_max)
-                iommu_unmap_page(dom0, i);
+                iommu_unmap_page(hardware_domain, i);
             goto destroy_m2p;
         }
     }
diff --git a/xen/common/domain.c b/xen/common/domain.c
index ccd159e..ccf7933 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -59,7 +59,7 @@ DEFINE_RCU_READ_LOCK(domlist_read_lock);
 static struct domain *domain_hash[DOMAIN_HASH_SIZE];
 struct domain *domain_list;
 
-struct domain *dom0;
+struct domain *hardware_domain __read_mostly;
 
 struct vcpu *idle_vcpu[NR_CPUS] __read_mostly;
 
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index 83bc7df..cbd495d 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -743,7 +743,7 @@ void send_global_virq(uint32_t virq)
     ASSERT(virq < NR_VIRQS);
     ASSERT(virq_is_global(virq));
 
-    send_guest_global_virq(global_virq_handlers[virq] ?: dom0, virq);
+    send_guest_global_virq(global_virq_handlers[virq] ?: hardware_domain, virq);
 }
 
 int set_global_virq_handler(struct domain *d, uint32_t virq)
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index 23d964e..2239ee8 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -872,7 +872,7 @@ static int kexec_load_slot(struct kexec_image *kimage)
 static uint16_t kexec_load_v1_arch(void)
 {
 #ifdef CONFIG_X86
-    return is_pv_32on64_domain(dom0) ? EM_386 : EM_X86_64;
+    return is_pv_32on64_domain(hardware_domain) ? EM_386 : EM_X86_64;
 #else
     return EM_NONE;
 #endif
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 5a974b1..627ef99 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -172,12 +172,12 @@ static void dump_dom0_registers(unsigned char key)
 {
     struct vcpu *v;
 
-    if ( dom0 == NULL )
+    if ( hardware_domain == NULL )
         return;
 
     printk("'%c' pressed -> dumping Dom0's registers\n", key);
 
-    for_each_vcpu ( dom0, v )
+    for_each_vcpu ( hardware_domain, v )
     {
         if ( alt_key_handling && softirq_pending(smp_processor_id()) )
         {
diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c
index 3c30c3e..3de20b8 100644
--- a/xen/common/xenoprof.c
+++ b/xen/common/xenoprof.c
@@ -219,7 +219,7 @@ static int alloc_xenoprof_struct(
     bufsize = sizeof(struct xenoprof_buf);
     i = sizeof(struct event_log);
 #ifdef CONFIG_COMPAT
-    d->xenoprof->is_compat = is_pv_32on64_domain(is_passive ? dom0 : d);
+    d->xenoprof->is_compat = is_pv_32on64_domain(is_passive ? hardware_domain : d);
     if ( XENOPROF_COMPAT(d->xenoprof) )
     {
         bufsize = sizeof(struct compat_oprof_buf);
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 5952de1..4aa33d5 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -726,10 +726,12 @@ static void __init ns16550_endboot(struct serial_port *port)
 {
 #ifdef HAS_IOPORTS
     struct ns16550 *uart = port->uart;
+    int rv;
 
     if ( uart->remapped_io_base )
         return;
-    if ( ioports_deny_access(dom0, uart->io_base, uart->io_base + 7) != 0 )
+    rv = ioports_deny_access(hardware_domain, uart->io_base, uart->io_base + 7);
+    if ( rv != 0 )
         BUG();
 #endif
 }
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index ff5f06e..031480f 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -403,7 +403,7 @@ static int amd_iommu_assign_device(struct domain *d, u8 devfn,
             ivrs_mappings[req_id].read_permission);
     }
 
-    return reassign_device(dom0, d, devfn, pdev);
+    return reassign_device(hardware_domain, d, devfn, pdev);
 }
 
 static void deallocate_next_page_table(struct page_info *pg, int level)
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 3e5635c..25d9af9 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -265,7 +265,7 @@ static void iommu_teardown(struct domain *d)
 }
 
 /*
- * If the device isn't owned by dom0, it means it already
+ * If the device isn't owned by the hardware domain, it means it already
  * has been assigned to other domain, or it doesn't exist.
  */
 static int device_assigned(u16 seg, u8 bus, u8 devfn)
@@ -273,7 +273,7 @@ static int device_assigned(u16 seg, u8 bus, u8 devfn)
     struct pci_dev *pdev;
 
     spin_lock(&pcidevs_lock);
-    pdev = pci_get_pdev_by_domain(dom0, seg, bus, devfn);
+    pdev = pci_get_pdev_by_domain(hardware_domain, seg, bus, devfn);
     spin_unlock(&pcidevs_lock);
 
     return pdev ? 0 : -EBUSY;
@@ -312,7 +312,7 @@ static int assign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
         d->need_iommu = 1;
     }
 
-    pdev = pci_get_pdev_by_domain(dom0, seg, bus, devfn);
+    pdev = pci_get_pdev_by_domain(hardware_domain, seg, bus, devfn);
     if ( !pdev )
     {
         rc = pci_get_pdev(seg, bus, devfn) ? -EBUSY : -ENODEV;
@@ -507,7 +507,7 @@ int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
         devfn += pdev->phantom_stride;
         if ( PCI_SLOT(devfn) != PCI_SLOT(pdev->devfn) )
             break;
-        ret = hd->platform_ops->reassign_device(d, dom0, devfn, pdev);
+        ret = hd->platform_ops->reassign_device(d, hardware_domain, devfn, pdev);
         if ( !ret )
             continue;
 
@@ -517,7 +517,7 @@ int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn)
     }
 
     devfn = pdev->devfn;
-    ret = hd->platform_ops->reassign_device(d, dom0, devfn, pdev);
+    ret = hd->platform_ops->reassign_device(d, hardware_domain, devfn, pdev);
     if ( ret )
     {
         dprintk(XENLOG_G_ERR,
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index dfa195a..fbc777c 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -569,7 +569,7 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, const struct pci_dev_info *info)
     ret = 0;
     if ( !pdev->domain )
     {
-        pdev->domain = dom0;
+        pdev->domain = hardware_domain;
         ret = iommu_add_device(pdev);
         if ( ret )
         {
@@ -577,7 +577,7 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, const struct pci_dev_info *info)
             goto out;
         }
 
-        list_add(&pdev->domain_list, &dom0->arch.pdev_list);
+        list_add(&pdev->domain_list, &hardware_domain->arch.pdev_list);
     }
     else
         iommu_enable_device(pdev);
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index d22d518..263448d 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1667,7 +1667,7 @@ static int reassign_device_ownership(
      * can attempt to send arbitrary LAPIC/MSI messages. We are unprotected
      * by the root complex unless interrupt remapping is enabled.
      */
-    if ( (target != dom0) && !iommu_intremap )
+    if ( (target != hardware_domain) && !iommu_intremap )
         untrusted_msi = 1;
 
     ret = domain_context_unmap(source, devfn, pdev);
@@ -2270,7 +2270,7 @@ static int intel_iommu_assign_device(
     if ( list_empty(&acpi_drhd_units) )
         return -ENODEV;
 
-    ret = reassign_device_ownership(dom0, d, devfn, pdev);
+    ret = reassign_device_ownership(hardware_domain, d, devfn, pdev);
     if ( ret )
         goto done;
 
diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
index 28c359a..ec66a4e 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -87,7 +87,7 @@ enum domain_type {
 #endif
 
 extern int dom0_11_mapping;
-#define is_domain_direct_mapped(d) ((d) == dom0 && dom0_11_mapping)
+#define is_domain_direct_mapped(d) ((d) == hardware_domain && dom0_11_mapping)
 
 struct vtimer {
         struct vcpu *v;
diff --git a/xen/include/xen/domain.h b/xen/include/xen/domain.h
index a057069..bb1c398 100644
--- a/xen/include/xen/domain.h
+++ b/xen/include/xen/domain.h
@@ -12,7 +12,7 @@ typedef union {
 
 struct vcpu *alloc_vcpu(
     struct domain *d, unsigned int vcpu_id, unsigned int cpu_id);
-struct vcpu *alloc_dom0_vcpu0(void);
+struct vcpu *alloc_dom0_vcpu0(struct domain *dom0);
 int vcpu_reset(struct vcpu *);
 
 struct xen_domctl_getdomaininfo;
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 3d33a90..cbbe8a4 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -43,8 +43,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t);
 
 #define SCHED_STAT_CRANK(_X)                (perfc_incr(_X))
 
-/* A global pointer to the initial domain (DOM0). */
-extern struct domain *dom0;
+/* A global pointer to the hardware domain (usually DOM0). */
+extern struct domain *hardware_domain;
 
 #ifndef CONFIG_COMPAT
 #define BITS_PER_EVTCHN_WORD(d) BITS_PER_XEN_ULONG
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02: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 1WaNbo-0007Ts-UV; Wed, 16 Apr 2014 11:02:28 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbn-0007Tb-RR
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:28 +0000
Received: from [85.158.139.211:31938] by server-3.bemta-5.messagelabs.com id
	68/F2-28132-3436E435; Wed, 16 Apr 2014 11:02:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1397646144!7818331!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26275 invoked from network); 16 Apr 2014 11:02:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:02:25 -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 1WaNbk-0000lp-Hs
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbk-0000fL-GB
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:24 +0000
Date: Wed, 16 Apr 2014 11:02:24 +0000
Message-Id: <E1WaNbk-0000fL-GB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] rename various functions referencing
	dom0
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 c248d4264bb9148600a1b9fb813eaa812544ee82
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:21:54 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:21:54 2014 +0200

    rename various functions referencing dom0
    
    Most of these functions actually act on the hardware domain, so change
    their names to reflect this.
    
    Command line parameters and variables based on those parameters are
    excluded since those changes would be user-visible, as are any public
    headers.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/x86/domain_build.c                 |    2 +-
 xen/arch/x86/hvm/i8254.c                    |    2 +-
 xen/arch/x86/time.c                         |    2 +-
 xen/arch/x86/traps.c                        |    8 ++++----
 xen/common/domain.c                         |    2 +-
 xen/common/keyhandler.c                     |   22 +++++++++++-----------
 xen/common/shutdown.c                       |    2 +-
 xen/drivers/passthrough/amd/pci_amd_iommu.c |    8 ++++----
 xen/drivers/passthrough/iommu.c             |    8 ++++----
 xen/drivers/passthrough/pci.c               |   18 +++++++++---------
 xen/drivers/passthrough/vtd/iommu.c         |   18 +++++++++---------
 xen/drivers/passthrough/vtd/x86/vtd.c       |    2 +-
 xen/include/asm-x86/time.h                  |    2 +-
 xen/include/xen/iommu.h                     |    6 +++---
 xen/include/xen/pci.h                       |    2 +-
 xen/include/xen/shutdown.h                  |    2 +-
 16 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index b2411b0..f75f6e7 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -1150,7 +1150,7 @@ int __init construct_dom0(
         printk(" Xen warning: dom0 kernel broken ELF: %s\n",
                elf_check_broken(&elf));
 
-    iommu_dom0_init(hardware_domain);
+    iommu_hwdom_init(hardware_domain);
     return 0;
 
 out:
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index dc5b78c..3ec01c0 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -549,7 +549,7 @@ int pv_pit_handler(int port, int data, int write)
         .data = data
     };
 
-    if ( is_hardware_domain(current->domain) && dom0_pit_access(&ioreq) )
+    if ( is_hardware_domain(current->domain) && hwdom_pit_access(&ioreq) )
     {
         /* nothing to do */;
     }
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 89308bd..07bceda 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1602,7 +1602,7 @@ int time_resume(void)
     return 0;
 }
 
-int dom0_pit_access(struct ioreq *ioreq)
+int hwdom_pit_access(struct ioreq *ioreq)
 {
     /* Is Xen using Channel 2? Then disallow direct dom0 access. */
     if ( using_pit )
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index e5c1269..b7303d7 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3150,7 +3150,7 @@ void async_exception_cleanup(struct vcpu *curr)
     curr->async_exception_mask = curr->async_exception_state(trap).old_mask;
 }
 
-static void nmi_dom0_report(unsigned int reason_idx)
+static void nmi_hwdom_report(unsigned int reason_idx)
 {
     struct domain *d = hardware_domain;
 
@@ -3169,7 +3169,7 @@ static void pci_serr_error(struct cpu_user_regs *regs)
     switch ( opt_nmi[0] )
     {
     case 'd': /* 'dom0' */
-        nmi_dom0_report(_XEN_NMIREASON_pci_serr);
+        nmi_hwdom_report(_XEN_NMIREASON_pci_serr);
     case 'i': /* 'ignore' */
         /* Would like to print a diagnostic here but can't call printk()
            from NMI context -- raise a softirq instead. */
@@ -3187,7 +3187,7 @@ static void io_check_error(struct cpu_user_regs *regs)
     switch ( opt_nmi[0] )
     {
     case 'd': /* 'dom0' */
-        nmi_dom0_report(_XEN_NMIREASON_io_error);
+        nmi_hwdom_report(_XEN_NMIREASON_io_error);
     case 'i': /* 'ignore' */
         break;
     default:  /* 'fatal' */
@@ -3206,7 +3206,7 @@ static void unknown_nmi_error(struct cpu_user_regs *regs, unsigned char reason)
     switch ( opt_nmi[0] )
     {
     case 'd': /* 'dom0' */
-        nmi_dom0_report(_XEN_NMIREASON_unknown);
+        nmi_hwdom_report(_XEN_NMIREASON_unknown);
     case 'i': /* 'ignore' */
         break;
     default:  /* 'fatal' */
diff --git a/xen/common/domain.c b/xen/common/domain.c
index ccf7933..c4720a9 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -595,7 +595,7 @@ void domain_shutdown(struct domain *d, u8 reason)
     reason = d->shutdown_code;
 
     if ( is_hardware_domain(d) )
-        dom0_shutdown(reason);
+        hwdom_shutdown(reason);
 
     if ( d->is_shutting_down )
     {
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 627ef99..5afcfef 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -148,9 +148,9 @@ static struct keyhandler dump_registers_keyhandler = {
     .desc = "dump registers"
 };
 
-static DECLARE_TASKLET(dump_dom0_tasklet, NULL, 0);
+static DECLARE_TASKLET(dump_hwdom_tasklet, NULL, 0);
 
-static void dump_dom0_action(unsigned long arg)
+static void dump_hwdom_action(unsigned long arg)
 {
     struct vcpu *v = (void *)arg;
 
@@ -161,14 +161,14 @@ static void dump_dom0_action(unsigned long arg)
             break;
         if ( softirq_pending(smp_processor_id()) )
         {
-            dump_dom0_tasklet.data = (unsigned long)v;
-            tasklet_schedule_on_cpu(&dump_dom0_tasklet, v->processor);
+            dump_hwdom_tasklet.data = (unsigned long)v;
+            tasklet_schedule_on_cpu(&dump_hwdom_tasklet, v->processor);
             break;
         }
     }
 }
 
-static void dump_dom0_registers(unsigned char key)
+static void dump_hwdom_registers(unsigned char key)
 {
     struct vcpu *v;
 
@@ -181,19 +181,19 @@ static void dump_dom0_registers(unsigned char key)
     {
         if ( alt_key_handling && softirq_pending(smp_processor_id()) )
         {
-            tasklet_kill(&dump_dom0_tasklet);
-            tasklet_init(&dump_dom0_tasklet, dump_dom0_action,
+            tasklet_kill(&dump_hwdom_tasklet);
+            tasklet_init(&dump_hwdom_tasklet, dump_hwdom_action,
                          (unsigned long)v);
-            tasklet_schedule_on_cpu(&dump_dom0_tasklet, v->processor);
+            tasklet_schedule_on_cpu(&dump_hwdom_tasklet, v->processor);
             return;
         }
         vcpu_show_execution_state(v);
     }
 }
 
-static struct keyhandler dump_dom0_registers_keyhandler = {
+static struct keyhandler dump_hwdom_registers_keyhandler = {
     .diagnostic = 1,
-    .u.fn = dump_dom0_registers,
+    .u.fn = dump_hwdom_registers,
     .desc = "dump Dom0 registers"
 };
 
@@ -543,7 +543,7 @@ void __init initialize_keytable(void)
     register_keyhandler('r', &dump_runq_keyhandler);
     register_keyhandler('R', &reboot_machine_keyhandler);
     register_keyhandler('t', &read_clocks_keyhandler);
-    register_keyhandler('0', &dump_dom0_registers_keyhandler);
+    register_keyhandler('0', &dump_hwdom_registers_keyhandler);
     register_keyhandler('%', &do_debug_key_keyhandler);
     register_keyhandler('*', &run_all_keyhandlers_keyhandler);
 
diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c
index fadb69b..94d4c53 100644
--- a/xen/common/shutdown.c
+++ b/xen/common/shutdown.c
@@ -32,7 +32,7 @@ static void noreturn maybe_reboot(void)
     }
 }
 
-void dom0_shutdown(u8 reason)
+void hwdom_shutdown(u8 reason)
 {
     switch ( reason )
     {
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 031480f..366c750 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -169,7 +169,7 @@ static void amd_iommu_setup_domain_device(
     }
 }
 
-static int __hwdom_init amd_iommu_setup_dom0_device(
+static int __hwdom_init amd_iommu_setup_hwdom_device(
     u8 devfn, struct pci_dev *pdev)
 {
     int bdf = PCI_BDF2(pdev->bus, pdev->devfn);
@@ -281,7 +281,7 @@ static int amd_iommu_domain_init(struct domain *d)
     return 0;
 }
 
-static void __hwdom_init amd_iommu_dom0_init(struct domain *d)
+static void __hwdom_init amd_iommu_hwdom_init(struct domain *d)
 {
     unsigned long i; 
 
@@ -305,7 +305,7 @@ static void __hwdom_init amd_iommu_dom0_init(struct domain *d)
         }
     }
 
-    setup_dom0_pci_devices(d, amd_iommu_setup_dom0_device);
+    setup_hwdom_pci_devices(d, amd_iommu_setup_hwdom_device);
 }
 
 void amd_iommu_disable_domain_device(struct domain *domain,
@@ -603,7 +603,7 @@ static void amd_dump_p2m_table(struct domain *d)
 
 const struct iommu_ops amd_iommu_ops = {
     .init = amd_iommu_domain_init,
-    .dom0_init = amd_iommu_dom0_init,
+    .hwdom_init = amd_iommu_hwdom_init,
     .add_device = amd_iommu_add_device,
     .remove_device = amd_iommu_remove_device,
     .assign_device  = amd_iommu_assign_device,
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 25d9af9..96a79ce 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -130,7 +130,7 @@ int iommu_domain_init(struct domain *d)
     return hd->platform_ops->init(d);
 }
 
-static void __hwdom_init check_dom0_pvh_reqs(struct domain *d)
+static void __hwdom_init check_hwdom_pvh_reqs(struct domain *d)
 {
     if ( !iommu_enabled )
         panic("Presently, iommu must be enabled for pvh dom0\n");
@@ -141,12 +141,12 @@ static void __hwdom_init check_dom0_pvh_reqs(struct domain *d)
     iommu_dom0_strict = 1;
 }
 
-void __hwdom_init iommu_dom0_init(struct domain *d)
+void __hwdom_init iommu_hwdom_init(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
 
     if ( is_pvh_domain(d) )
-        check_dom0_pvh_reqs(d);
+        check_hwdom_pvh_reqs(d);
 
     if ( !iommu_enabled )
         return;
@@ -173,7 +173,7 @@ void __hwdom_init iommu_dom0_init(struct domain *d)
         }
     }
 
-    return hd->platform_ops->dom0_init(d);
+    return hd->platform_ops->hwdom_init(d);
 }
 
 int iommu_add_device(struct pci_dev *pdev)
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index fbc777c..0794eaf 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -867,12 +867,12 @@ int __init scan_pci_devices(void)
     return ret;
 }
 
-struct setup_dom0 {
+struct setup_hwdom {
     struct domain *d;
     int (*handler)(u8 devfn, struct pci_dev *);
 };
 
-static void setup_one_dom0_device(const struct setup_dom0 *ctxt,
+static void setup_one_hwdom_device(const struct setup_hwdom *ctxt,
                                   struct pci_dev *pdev)
 {
     u8 devfn = pdev->devfn;
@@ -893,9 +893,9 @@ static void setup_one_dom0_device(const struct setup_dom0 *ctxt,
               PCI_SLOT(devfn) == PCI_SLOT(pdev->devfn) );
 }
 
-static int __hwdom_init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
+static int __hwdom_init _setup_hwdom_pci_devices(struct pci_seg *pseg, void *arg)
 {
-    struct setup_dom0 *ctxt = arg;
+    struct setup_hwdom *ctxt = arg;
     int bus, devfn;
 
     for ( bus = 0; bus < 256; bus++ )
@@ -911,12 +911,12 @@ static int __hwdom_init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
             {
                 pdev->domain = ctxt->d;
                 list_add(&pdev->domain_list, &ctxt->d->arch.pdev_list);
-                setup_one_dom0_device(ctxt, pdev);
+                setup_one_hwdom_device(ctxt, pdev);
             }
             else if ( pdev->domain == dom_xen )
             {
                 pdev->domain = ctxt->d;
-                setup_one_dom0_device(ctxt, pdev);
+                setup_one_hwdom_device(ctxt, pdev);
                 pdev->domain = dom_xen;
             }
             else if ( pdev->domain != ctxt->d )
@@ -943,13 +943,13 @@ static int __hwdom_init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
     return 0;
 }
 
-void __hwdom_init setup_dom0_pci_devices(
+void __hwdom_init setup_hwdom_pci_devices(
     struct domain *d, int (*handler)(u8 devfn, struct pci_dev *))
 {
-    struct setup_dom0 ctxt = { .d = d, .handler = handler };
+    struct setup_hwdom ctxt = { .d = d, .handler = handler };
 
     spin_lock(&pcidevs_lock);
-    pci_segments_iterate(_setup_dom0_pci_devices, &ctxt);
+    pci_segments_iterate(_setup_hwdom_pci_devices, &ctxt);
     spin_unlock(&pcidevs_lock);
 }
 
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index 263448d..abaa8c9 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -55,8 +55,8 @@ int nr_iommus;
 
 static struct tasklet vtd_fault_tasklet;
 
-static int setup_dom0_device(u8 devfn, struct pci_dev *);
-static void setup_dom0_rmrr(struct domain *d);
+static int setup_hwdom_device(u8 devfn, struct pci_dev *);
+static void setup_hwdom_rmrr(struct domain *d);
 
 static int domain_iommu_domid(struct domain *d,
                               struct iommu *iommu)
@@ -1242,18 +1242,18 @@ static int intel_iommu_domain_init(struct domain *d)
     return 0;
 }
 
-static void __hwdom_init intel_iommu_dom0_init(struct domain *d)
+static void __hwdom_init intel_iommu_hwdom_init(struct domain *d)
 {
     struct acpi_drhd_unit *drhd;
 
     if ( !iommu_passthrough && !need_iommu(d) )
     {
         /* Set up 1:1 page table for dom0 */
-        iommu_set_dom0_mapping(d);
+        iommu_set_hwdom_mapping(d);
     }
 
-    setup_dom0_pci_devices(d, setup_dom0_device);
-    setup_dom0_rmrr(d);
+    setup_hwdom_pci_devices(d, setup_hwdom_device);
+    setup_hwdom_rmrr(d);
 
     iommu_flush_all();
 
@@ -1992,7 +1992,7 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
     return domain_context_unmap(pdev->domain, devfn, pdev);
 }
 
-static int __hwdom_init setup_dom0_device(u8 devfn, struct pci_dev *pdev)
+static int __hwdom_init setup_hwdom_device(u8 devfn, struct pci_dev *pdev)
 {
     int err;
 
@@ -2140,7 +2140,7 @@ static int init_vtd_hw(void)
     return 0;
 }
 
-static void __hwdom_init setup_dom0_rmrr(struct domain *d)
+static void __hwdom_init setup_hwdom_rmrr(struct domain *d)
 {
     struct acpi_rmrr_unit *rmrr;
     u16 bdf;
@@ -2464,7 +2464,7 @@ static void vtd_dump_p2m_table(struct domain *d)
 
 const struct iommu_ops intel_iommu_ops = {
     .init = intel_iommu_domain_init,
-    .dom0_init = intel_iommu_dom0_init,
+    .hwdom_init = intel_iommu_hwdom_init,
     .add_device = intel_iommu_add_device,
     .enable_device = intel_iommu_enable_device,
     .remove_device = intel_iommu_remove_device,
diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c
index 00131b3..218e223 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -107,7 +107,7 @@ void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq)
     spin_unlock(&d->event_lock);
 }
 
-void __hwdom_init iommu_set_dom0_mapping(struct domain *d)
+void __hwdom_init iommu_set_hwdom_mapping(struct domain *d)
 {
     unsigned long i, j, tmp, top;
 
diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h
index c01b0a2..0631baa 100644
--- a/xen/include/asm-x86/time.h
+++ b/xen/include/asm-x86/time.h
@@ -44,7 +44,7 @@ int time_resume(void);
 void init_percpu_time(void);
 
 struct ioreq;
-int dom0_pit_access(struct ioreq *ioreq);
+int hwdom_pit_access(struct ioreq *ioreq);
 
 int cpu_frequency_change(u64 freq);
 
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 4f534ed..f8da9f2 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -55,7 +55,7 @@ int iommu_add_device(struct pci_dev *pdev);
 int iommu_enable_device(struct pci_dev *pdev);
 int iommu_remove_device(struct pci_dev *pdev);
 int iommu_domain_init(struct domain *d);
-void iommu_dom0_init(struct domain *d);
+void iommu_hwdom_init(struct domain *d);
 void iommu_domain_destroy(struct domain *d);
 int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn);
 
@@ -90,7 +90,7 @@ struct page_info;
 
 struct iommu_ops {
     int (*init)(struct domain *d);
-    void (*dom0_init)(struct domain *d);
+    void (*hwdom_init)(struct domain *d);
     int (*add_device)(u8 devfn, struct pci_dev *);
     int (*enable_device)(struct pci_dev *pdev);
     int (*remove_device)(u8 devfn, struct pci_dev *);
@@ -127,7 +127,7 @@ void iommu_suspend(void);
 void iommu_resume(void);
 void iommu_crash_shutdown(void);
 
-void iommu_set_dom0_mapping(struct domain *d);
+void iommu_set_hwdom_mapping(struct domain *d);
 void iommu_share_p2m_table(struct domain *d);
 
 int iommu_do_domctl(struct xen_domctl *, struct domain *d,
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index cadb525..edafa20 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -97,7 +97,7 @@ struct pci_dev *pci_lock_pdev(int seg, int bus, int devfn);
 struct pci_dev *pci_lock_domain_pdev(
     struct domain *, int seg, int bus, int devfn);
 
-void setup_dom0_pci_devices(struct domain *,
+void setup_hwdom_pci_devices(struct domain *,
                             int (*)(u8 devfn, struct pci_dev *));
 void pci_release_devices(struct domain *d);
 int pci_add_segment(u16 seg);
diff --git a/xen/include/xen/shutdown.h b/xen/include/xen/shutdown.h
index a00bfef..b3f7e30 100644
--- a/xen/include/xen/shutdown.h
+++ b/xen/include/xen/shutdown.h
@@ -6,7 +6,7 @@
 /* opt_noreboot: If true, machine will need manual reset on error. */
 extern bool_t opt_noreboot;
 
-void noreturn dom0_shutdown(u8 reason);
+void noreturn hwdom_shutdown(u8 reason);
 
 void noreturn machine_restart(unsigned int delay_millisecs);
 void noreturn machine_halt(void);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:29 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02: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 1WaNbo-0007Ts-UV; Wed, 16 Apr 2014 11:02:28 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbn-0007Tb-RR
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:28 +0000
Received: from [85.158.139.211:31938] by server-3.bemta-5.messagelabs.com id
	68/F2-28132-3436E435; Wed, 16 Apr 2014 11:02:27 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-206.messagelabs.com!1397646144!7818331!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26275 invoked from network); 16 Apr 2014 11:02:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:02:25 -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 1WaNbk-0000lp-Hs
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbk-0000fL-GB
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:24 +0000
Date: Wed, 16 Apr 2014 11:02:24 +0000
Message-Id: <E1WaNbk-0000fL-GB@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] rename various functions referencing
	dom0
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 c248d4264bb9148600a1b9fb813eaa812544ee82
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:21:54 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:21:54 2014 +0200

    rename various functions referencing dom0
    
    Most of these functions actually act on the hardware domain, so change
    their names to reflect this.
    
    Command line parameters and variables based on those parameters are
    excluded since those changes would be user-visible, as are any public
    headers.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/arch/x86/domain_build.c                 |    2 +-
 xen/arch/x86/hvm/i8254.c                    |    2 +-
 xen/arch/x86/time.c                         |    2 +-
 xen/arch/x86/traps.c                        |    8 ++++----
 xen/common/domain.c                         |    2 +-
 xen/common/keyhandler.c                     |   22 +++++++++++-----------
 xen/common/shutdown.c                       |    2 +-
 xen/drivers/passthrough/amd/pci_amd_iommu.c |    8 ++++----
 xen/drivers/passthrough/iommu.c             |    8 ++++----
 xen/drivers/passthrough/pci.c               |   18 +++++++++---------
 xen/drivers/passthrough/vtd/iommu.c         |   18 +++++++++---------
 xen/drivers/passthrough/vtd/x86/vtd.c       |    2 +-
 xen/include/asm-x86/time.h                  |    2 +-
 xen/include/xen/iommu.h                     |    6 +++---
 xen/include/xen/pci.h                       |    2 +-
 xen/include/xen/shutdown.h                  |    2 +-
 16 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index b2411b0..f75f6e7 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -1150,7 +1150,7 @@ int __init construct_dom0(
         printk(" Xen warning: dom0 kernel broken ELF: %s\n",
                elf_check_broken(&elf));
 
-    iommu_dom0_init(hardware_domain);
+    iommu_hwdom_init(hardware_domain);
     return 0;
 
 out:
diff --git a/xen/arch/x86/hvm/i8254.c b/xen/arch/x86/hvm/i8254.c
index dc5b78c..3ec01c0 100644
--- a/xen/arch/x86/hvm/i8254.c
+++ b/xen/arch/x86/hvm/i8254.c
@@ -549,7 +549,7 @@ int pv_pit_handler(int port, int data, int write)
         .data = data
     };
 
-    if ( is_hardware_domain(current->domain) && dom0_pit_access(&ioreq) )
+    if ( is_hardware_domain(current->domain) && hwdom_pit_access(&ioreq) )
     {
         /* nothing to do */;
     }
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 89308bd..07bceda 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1602,7 +1602,7 @@ int time_resume(void)
     return 0;
 }
 
-int dom0_pit_access(struct ioreq *ioreq)
+int hwdom_pit_access(struct ioreq *ioreq)
 {
     /* Is Xen using Channel 2? Then disallow direct dom0 access. */
     if ( using_pit )
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index e5c1269..b7303d7 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3150,7 +3150,7 @@ void async_exception_cleanup(struct vcpu *curr)
     curr->async_exception_mask = curr->async_exception_state(trap).old_mask;
 }
 
-static void nmi_dom0_report(unsigned int reason_idx)
+static void nmi_hwdom_report(unsigned int reason_idx)
 {
     struct domain *d = hardware_domain;
 
@@ -3169,7 +3169,7 @@ static void pci_serr_error(struct cpu_user_regs *regs)
     switch ( opt_nmi[0] )
     {
     case 'd': /* 'dom0' */
-        nmi_dom0_report(_XEN_NMIREASON_pci_serr);
+        nmi_hwdom_report(_XEN_NMIREASON_pci_serr);
     case 'i': /* 'ignore' */
         /* Would like to print a diagnostic here but can't call printk()
            from NMI context -- raise a softirq instead. */
@@ -3187,7 +3187,7 @@ static void io_check_error(struct cpu_user_regs *regs)
     switch ( opt_nmi[0] )
     {
     case 'd': /* 'dom0' */
-        nmi_dom0_report(_XEN_NMIREASON_io_error);
+        nmi_hwdom_report(_XEN_NMIREASON_io_error);
     case 'i': /* 'ignore' */
         break;
     default:  /* 'fatal' */
@@ -3206,7 +3206,7 @@ static void unknown_nmi_error(struct cpu_user_regs *regs, unsigned char reason)
     switch ( opt_nmi[0] )
     {
     case 'd': /* 'dom0' */
-        nmi_dom0_report(_XEN_NMIREASON_unknown);
+        nmi_hwdom_report(_XEN_NMIREASON_unknown);
     case 'i': /* 'ignore' */
         break;
     default:  /* 'fatal' */
diff --git a/xen/common/domain.c b/xen/common/domain.c
index ccf7933..c4720a9 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -595,7 +595,7 @@ void domain_shutdown(struct domain *d, u8 reason)
     reason = d->shutdown_code;
 
     if ( is_hardware_domain(d) )
-        dom0_shutdown(reason);
+        hwdom_shutdown(reason);
 
     if ( d->is_shutting_down )
     {
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 627ef99..5afcfef 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -148,9 +148,9 @@ static struct keyhandler dump_registers_keyhandler = {
     .desc = "dump registers"
 };
 
-static DECLARE_TASKLET(dump_dom0_tasklet, NULL, 0);
+static DECLARE_TASKLET(dump_hwdom_tasklet, NULL, 0);
 
-static void dump_dom0_action(unsigned long arg)
+static void dump_hwdom_action(unsigned long arg)
 {
     struct vcpu *v = (void *)arg;
 
@@ -161,14 +161,14 @@ static void dump_dom0_action(unsigned long arg)
             break;
         if ( softirq_pending(smp_processor_id()) )
         {
-            dump_dom0_tasklet.data = (unsigned long)v;
-            tasklet_schedule_on_cpu(&dump_dom0_tasklet, v->processor);
+            dump_hwdom_tasklet.data = (unsigned long)v;
+            tasklet_schedule_on_cpu(&dump_hwdom_tasklet, v->processor);
             break;
         }
     }
 }
 
-static void dump_dom0_registers(unsigned char key)
+static void dump_hwdom_registers(unsigned char key)
 {
     struct vcpu *v;
 
@@ -181,19 +181,19 @@ static void dump_dom0_registers(unsigned char key)
     {
         if ( alt_key_handling && softirq_pending(smp_processor_id()) )
         {
-            tasklet_kill(&dump_dom0_tasklet);
-            tasklet_init(&dump_dom0_tasklet, dump_dom0_action,
+            tasklet_kill(&dump_hwdom_tasklet);
+            tasklet_init(&dump_hwdom_tasklet, dump_hwdom_action,
                          (unsigned long)v);
-            tasklet_schedule_on_cpu(&dump_dom0_tasklet, v->processor);
+            tasklet_schedule_on_cpu(&dump_hwdom_tasklet, v->processor);
             return;
         }
         vcpu_show_execution_state(v);
     }
 }
 
-static struct keyhandler dump_dom0_registers_keyhandler = {
+static struct keyhandler dump_hwdom_registers_keyhandler = {
     .diagnostic = 1,
-    .u.fn = dump_dom0_registers,
+    .u.fn = dump_hwdom_registers,
     .desc = "dump Dom0 registers"
 };
 
@@ -543,7 +543,7 @@ void __init initialize_keytable(void)
     register_keyhandler('r', &dump_runq_keyhandler);
     register_keyhandler('R', &reboot_machine_keyhandler);
     register_keyhandler('t', &read_clocks_keyhandler);
-    register_keyhandler('0', &dump_dom0_registers_keyhandler);
+    register_keyhandler('0', &dump_hwdom_registers_keyhandler);
     register_keyhandler('%', &do_debug_key_keyhandler);
     register_keyhandler('*', &run_all_keyhandlers_keyhandler);
 
diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c
index fadb69b..94d4c53 100644
--- a/xen/common/shutdown.c
+++ b/xen/common/shutdown.c
@@ -32,7 +32,7 @@ static void noreturn maybe_reboot(void)
     }
 }
 
-void dom0_shutdown(u8 reason)
+void hwdom_shutdown(u8 reason)
 {
     switch ( reason )
     {
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c
index 031480f..366c750 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c
@@ -169,7 +169,7 @@ static void amd_iommu_setup_domain_device(
     }
 }
 
-static int __hwdom_init amd_iommu_setup_dom0_device(
+static int __hwdom_init amd_iommu_setup_hwdom_device(
     u8 devfn, struct pci_dev *pdev)
 {
     int bdf = PCI_BDF2(pdev->bus, pdev->devfn);
@@ -281,7 +281,7 @@ static int amd_iommu_domain_init(struct domain *d)
     return 0;
 }
 
-static void __hwdom_init amd_iommu_dom0_init(struct domain *d)
+static void __hwdom_init amd_iommu_hwdom_init(struct domain *d)
 {
     unsigned long i; 
 
@@ -305,7 +305,7 @@ static void __hwdom_init amd_iommu_dom0_init(struct domain *d)
         }
     }
 
-    setup_dom0_pci_devices(d, amd_iommu_setup_dom0_device);
+    setup_hwdom_pci_devices(d, amd_iommu_setup_hwdom_device);
 }
 
 void amd_iommu_disable_domain_device(struct domain *domain,
@@ -603,7 +603,7 @@ static void amd_dump_p2m_table(struct domain *d)
 
 const struct iommu_ops amd_iommu_ops = {
     .init = amd_iommu_domain_init,
-    .dom0_init = amd_iommu_dom0_init,
+    .hwdom_init = amd_iommu_hwdom_init,
     .add_device = amd_iommu_add_device,
     .remove_device = amd_iommu_remove_device,
     .assign_device  = amd_iommu_assign_device,
diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c
index 25d9af9..96a79ce 100644
--- a/xen/drivers/passthrough/iommu.c
+++ b/xen/drivers/passthrough/iommu.c
@@ -130,7 +130,7 @@ int iommu_domain_init(struct domain *d)
     return hd->platform_ops->init(d);
 }
 
-static void __hwdom_init check_dom0_pvh_reqs(struct domain *d)
+static void __hwdom_init check_hwdom_pvh_reqs(struct domain *d)
 {
     if ( !iommu_enabled )
         panic("Presently, iommu must be enabled for pvh dom0\n");
@@ -141,12 +141,12 @@ static void __hwdom_init check_dom0_pvh_reqs(struct domain *d)
     iommu_dom0_strict = 1;
 }
 
-void __hwdom_init iommu_dom0_init(struct domain *d)
+void __hwdom_init iommu_hwdom_init(struct domain *d)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(d);
 
     if ( is_pvh_domain(d) )
-        check_dom0_pvh_reqs(d);
+        check_hwdom_pvh_reqs(d);
 
     if ( !iommu_enabled )
         return;
@@ -173,7 +173,7 @@ void __hwdom_init iommu_dom0_init(struct domain *d)
         }
     }
 
-    return hd->platform_ops->dom0_init(d);
+    return hd->platform_ops->hwdom_init(d);
 }
 
 int iommu_add_device(struct pci_dev *pdev)
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index fbc777c..0794eaf 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -867,12 +867,12 @@ int __init scan_pci_devices(void)
     return ret;
 }
 
-struct setup_dom0 {
+struct setup_hwdom {
     struct domain *d;
     int (*handler)(u8 devfn, struct pci_dev *);
 };
 
-static void setup_one_dom0_device(const struct setup_dom0 *ctxt,
+static void setup_one_hwdom_device(const struct setup_hwdom *ctxt,
                                   struct pci_dev *pdev)
 {
     u8 devfn = pdev->devfn;
@@ -893,9 +893,9 @@ static void setup_one_dom0_device(const struct setup_dom0 *ctxt,
               PCI_SLOT(devfn) == PCI_SLOT(pdev->devfn) );
 }
 
-static int __hwdom_init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
+static int __hwdom_init _setup_hwdom_pci_devices(struct pci_seg *pseg, void *arg)
 {
-    struct setup_dom0 *ctxt = arg;
+    struct setup_hwdom *ctxt = arg;
     int bus, devfn;
 
     for ( bus = 0; bus < 256; bus++ )
@@ -911,12 +911,12 @@ static int __hwdom_init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
             {
                 pdev->domain = ctxt->d;
                 list_add(&pdev->domain_list, &ctxt->d->arch.pdev_list);
-                setup_one_dom0_device(ctxt, pdev);
+                setup_one_hwdom_device(ctxt, pdev);
             }
             else if ( pdev->domain == dom_xen )
             {
                 pdev->domain = ctxt->d;
-                setup_one_dom0_device(ctxt, pdev);
+                setup_one_hwdom_device(ctxt, pdev);
                 pdev->domain = dom_xen;
             }
             else if ( pdev->domain != ctxt->d )
@@ -943,13 +943,13 @@ static int __hwdom_init _setup_dom0_pci_devices(struct pci_seg *pseg, void *arg)
     return 0;
 }
 
-void __hwdom_init setup_dom0_pci_devices(
+void __hwdom_init setup_hwdom_pci_devices(
     struct domain *d, int (*handler)(u8 devfn, struct pci_dev *))
 {
-    struct setup_dom0 ctxt = { .d = d, .handler = handler };
+    struct setup_hwdom ctxt = { .d = d, .handler = handler };
 
     spin_lock(&pcidevs_lock);
-    pci_segments_iterate(_setup_dom0_pci_devices, &ctxt);
+    pci_segments_iterate(_setup_hwdom_pci_devices, &ctxt);
     spin_unlock(&pcidevs_lock);
 }
 
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index 263448d..abaa8c9 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -55,8 +55,8 @@ int nr_iommus;
 
 static struct tasklet vtd_fault_tasklet;
 
-static int setup_dom0_device(u8 devfn, struct pci_dev *);
-static void setup_dom0_rmrr(struct domain *d);
+static int setup_hwdom_device(u8 devfn, struct pci_dev *);
+static void setup_hwdom_rmrr(struct domain *d);
 
 static int domain_iommu_domid(struct domain *d,
                               struct iommu *iommu)
@@ -1242,18 +1242,18 @@ static int intel_iommu_domain_init(struct domain *d)
     return 0;
 }
 
-static void __hwdom_init intel_iommu_dom0_init(struct domain *d)
+static void __hwdom_init intel_iommu_hwdom_init(struct domain *d)
 {
     struct acpi_drhd_unit *drhd;
 
     if ( !iommu_passthrough && !need_iommu(d) )
     {
         /* Set up 1:1 page table for dom0 */
-        iommu_set_dom0_mapping(d);
+        iommu_set_hwdom_mapping(d);
     }
 
-    setup_dom0_pci_devices(d, setup_dom0_device);
-    setup_dom0_rmrr(d);
+    setup_hwdom_pci_devices(d, setup_hwdom_device);
+    setup_hwdom_rmrr(d);
 
     iommu_flush_all();
 
@@ -1992,7 +1992,7 @@ static int intel_iommu_remove_device(u8 devfn, struct pci_dev *pdev)
     return domain_context_unmap(pdev->domain, devfn, pdev);
 }
 
-static int __hwdom_init setup_dom0_device(u8 devfn, struct pci_dev *pdev)
+static int __hwdom_init setup_hwdom_device(u8 devfn, struct pci_dev *pdev)
 {
     int err;
 
@@ -2140,7 +2140,7 @@ static int init_vtd_hw(void)
     return 0;
 }
 
-static void __hwdom_init setup_dom0_rmrr(struct domain *d)
+static void __hwdom_init setup_hwdom_rmrr(struct domain *d)
 {
     struct acpi_rmrr_unit *rmrr;
     u16 bdf;
@@ -2464,7 +2464,7 @@ static void vtd_dump_p2m_table(struct domain *d)
 
 const struct iommu_ops intel_iommu_ops = {
     .init = intel_iommu_domain_init,
-    .dom0_init = intel_iommu_dom0_init,
+    .hwdom_init = intel_iommu_hwdom_init,
     .add_device = intel_iommu_add_device,
     .enable_device = intel_iommu_enable_device,
     .remove_device = intel_iommu_remove_device,
diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c
index 00131b3..218e223 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -107,7 +107,7 @@ void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq)
     spin_unlock(&d->event_lock);
 }
 
-void __hwdom_init iommu_set_dom0_mapping(struct domain *d)
+void __hwdom_init iommu_set_hwdom_mapping(struct domain *d)
 {
     unsigned long i, j, tmp, top;
 
diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h
index c01b0a2..0631baa 100644
--- a/xen/include/asm-x86/time.h
+++ b/xen/include/asm-x86/time.h
@@ -44,7 +44,7 @@ int time_resume(void);
 void init_percpu_time(void);
 
 struct ioreq;
-int dom0_pit_access(struct ioreq *ioreq);
+int hwdom_pit_access(struct ioreq *ioreq);
 
 int cpu_frequency_change(u64 freq);
 
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 4f534ed..f8da9f2 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -55,7 +55,7 @@ int iommu_add_device(struct pci_dev *pdev);
 int iommu_enable_device(struct pci_dev *pdev);
 int iommu_remove_device(struct pci_dev *pdev);
 int iommu_domain_init(struct domain *d);
-void iommu_dom0_init(struct domain *d);
+void iommu_hwdom_init(struct domain *d);
 void iommu_domain_destroy(struct domain *d);
 int deassign_device(struct domain *d, u16 seg, u8 bus, u8 devfn);
 
@@ -90,7 +90,7 @@ struct page_info;
 
 struct iommu_ops {
     int (*init)(struct domain *d);
-    void (*dom0_init)(struct domain *d);
+    void (*hwdom_init)(struct domain *d);
     int (*add_device)(u8 devfn, struct pci_dev *);
     int (*enable_device)(struct pci_dev *pdev);
     int (*remove_device)(u8 devfn, struct pci_dev *);
@@ -127,7 +127,7 @@ void iommu_suspend(void);
 void iommu_resume(void);
 void iommu_crash_shutdown(void);
 
-void iommu_set_dom0_mapping(struct domain *d);
+void iommu_set_hwdom_mapping(struct domain *d);
 void iommu_share_p2m_table(struct domain *d);
 
 int iommu_do_domctl(struct xen_domctl *, struct domain *d,
diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h
index cadb525..edafa20 100644
--- a/xen/include/xen/pci.h
+++ b/xen/include/xen/pci.h
@@ -97,7 +97,7 @@ struct pci_dev *pci_lock_pdev(int seg, int bus, int devfn);
 struct pci_dev *pci_lock_domain_pdev(
     struct domain *, int seg, int bus, int devfn);
 
-void setup_dom0_pci_devices(struct domain *,
+void setup_hwdom_pci_devices(struct domain *,
                             int (*)(u8 devfn, struct pci_dev *));
 void pci_release_devices(struct domain *d);
 int pci_add_segment(u16 seg);
diff --git a/xen/include/xen/shutdown.h b/xen/include/xen/shutdown.h
index a00bfef..b3f7e30 100644
--- a/xen/include/xen/shutdown.h
+++ b/xen/include/xen/shutdown.h
@@ -6,7 +6,7 @@
 /* opt_noreboot: If true, machine will need manual reset on error. */
 extern bool_t opt_noreboot;
 
-void noreturn dom0_shutdown(u8 reason);
+void noreturn hwdom_shutdown(u8 reason);
 
 void noreturn machine_restart(unsigned int delay_millisecs);
 void noreturn machine_halt(void);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02: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 1WaNby-0007VO-2M; Wed, 16 Apr 2014 11:02:38 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbx-0007VC-Cz
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:37 +0000
Received: from [193.109.254.147:11573] by server-2.bemta-14.messagelabs.com id
	42/F8-21684-C436E435; Wed, 16 Apr 2014 11:02:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1397646154!7917683!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7766 invoked from network); 16 Apr 2014 11:02:35 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:02:35 -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 1WaNbu-0000ly-Nk
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbu-0000fp-ME
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:34 +0000
Date: Wed, 16 Apr 2014 11:02:34 +0000
Message-Id: <E1WaNbu-0000fp-ME@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: allow dom0 to be destroyed
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 708aea1af1933de6b1334c31c509feac1d838bfc
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:22:49 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:22:49 2014 +0200

    libxl: allow dom0 to be destroyed
    
    When dom0 is not the hardware domain, it can be destroyed in the same
    way as any other service domain.  To avoid accidental use when a domain
    is not resolved, destroying domain 0 requires passing -f to xl destroy.
    Since the hypervisor already prevents a domain from destroying itself,
    this patch is only useful in a disaggregated environment.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 docs/man/xl.pod.1         |   14 +++++++++++++-
 tools/libxl/xl_cmdimpl.c  |   17 +++++++++++------
 tools/libxl/xl_cmdtable.c |    5 ++++-
 3 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1
index dae0718..7c03de6 100644
--- a/docs/man/xl.pod.1
+++ b/docs/man/xl.pod.1
@@ -217,13 +217,25 @@ Connect to console number I<NUM>. Console numbers start from 0.
 
 =back
 
-=item B<destroy> I<domain-id>
+=item B<destroy> [I<OPTIONS>] I<domain-id>
 
 Immediately terminate the domain I<domain-id>.  This doesn't give the
 domain OS any chance to react, and is the equivalent of ripping the
 power cord out on a physical machine.  In most cases you will want to
 use the B<shutdown> command instead.
 
+B<OPTIONS>
+
+=over 4
+
+=item I<-f>
+
+Allow domain 0 to be destroyed.  Because domain cannot destroy itself, this is
+only possible when using a disaggregated toolstack, and is most useful when
+using a hardware domain separated from domain 0.
+
+=back
+
 =item B<domid> I<domain-name>
 
 Converts a domain name to a domain id.
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 8389468..0b38b32 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3053,12 +3053,14 @@ static void unpause_domain(uint32_t domid)
     libxl_domain_unpause(ctx, domid);
 }
 
-static void destroy_domain(uint32_t domid)
+static void destroy_domain(uint32_t domid, int force)
 {
     int rc;
 
-    if (domid == 0) {
-        fprintf(stderr, "Cannot destroy privileged domain 0.\n\n");
+    if (domid == 0 && !force) {
+        fprintf(stderr, "Not destroying domain 0; use -f to force.\n"
+                        "This can only be done when using a disaggregated "
+                        "hardware domain and toolstack.\n\n");
         exit(-1);
     }
     rc = libxl_domain_destroy(ctx, domid, 0);
@@ -4157,12 +4159,15 @@ int main_unpause(int argc, char **argv)
 int main_destroy(int argc, char **argv)
 {
     int opt;
+    int force = 0;
 
-    SWITCH_FOREACH_OPT(opt, "", NULL, "destroy", 1) {
-        /* No options */
+    SWITCH_FOREACH_OPT(opt, "f", NULL, "destroy", 1) {
+    case 'f':
+        force = 1;
+        break;
     }
 
-    destroy_domain(find_domain(argv[optind]));
+    destroy_domain(find_domain(argv[optind]), force);
     return 0;
 }
 
diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c
index e8ab93a..4279b9f 100644
--- a/tools/libxl/xl_cmdtable.c
+++ b/tools/libxl/xl_cmdtable.c
@@ -56,7 +56,10 @@ struct cmd_spec cmd_table[] = {
     { "destroy",
       &main_destroy, 0, 1,
       "Terminate a domain immediately",
-      "<Domain>",
+      "[options] <Domain>\n",
+      "-f                      Permit destroying domain 0, which will only succeed\n"
+      "                        when run from disaggregated toolstack domain with a\n"
+      "                        hardware domain distinct from domain 0."
     },
     { "shutdown",
       &main_shutdown, 0, 1,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02: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 1WaNby-0007VO-2M; Wed, 16 Apr 2014 11:02:38 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbx-0007VC-Cz
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:37 +0000
Received: from [193.109.254.147:11573] by server-2.bemta-14.messagelabs.com id
	42/F8-21684-C436E435; Wed, 16 Apr 2014 11:02:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1397646154!7917683!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7766 invoked from network); 16 Apr 2014 11:02:35 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:02:35 -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 1WaNbu-0000ly-Nk
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNbu-0000fp-ME
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:34 +0000
Date: Wed, 16 Apr 2014 11:02:34 +0000
Message-Id: <E1WaNbu-0000fp-ME@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl: allow dom0 to be destroyed
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 708aea1af1933de6b1334c31c509feac1d838bfc
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Fri Apr 11 11:22:49 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:22:49 2014 +0200

    libxl: allow dom0 to be destroyed
    
    When dom0 is not the hardware domain, it can be destroyed in the same
    way as any other service domain.  To avoid accidental use when a domain
    is not resolved, destroying domain 0 requires passing -f to xl destroy.
    Since the hypervisor already prevents a domain from destroying itself,
    this patch is only useful in a disaggregated environment.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 docs/man/xl.pod.1         |   14 +++++++++++++-
 tools/libxl/xl_cmdimpl.c  |   17 +++++++++++------
 tools/libxl/xl_cmdtable.c |    5 ++++-
 3 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1
index dae0718..7c03de6 100644
--- a/docs/man/xl.pod.1
+++ b/docs/man/xl.pod.1
@@ -217,13 +217,25 @@ Connect to console number I<NUM>. Console numbers start from 0.
 
 =back
 
-=item B<destroy> I<domain-id>
+=item B<destroy> [I<OPTIONS>] I<domain-id>
 
 Immediately terminate the domain I<domain-id>.  This doesn't give the
 domain OS any chance to react, and is the equivalent of ripping the
 power cord out on a physical machine.  In most cases you will want to
 use the B<shutdown> command instead.
 
+B<OPTIONS>
+
+=over 4
+
+=item I<-f>
+
+Allow domain 0 to be destroyed.  Because domain cannot destroy itself, this is
+only possible when using a disaggregated toolstack, and is most useful when
+using a hardware domain separated from domain 0.
+
+=back
+
 =item B<domid> I<domain-name>
 
 Converts a domain name to a domain id.
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 8389468..0b38b32 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -3053,12 +3053,14 @@ static void unpause_domain(uint32_t domid)
     libxl_domain_unpause(ctx, domid);
 }
 
-static void destroy_domain(uint32_t domid)
+static void destroy_domain(uint32_t domid, int force)
 {
     int rc;
 
-    if (domid == 0) {
-        fprintf(stderr, "Cannot destroy privileged domain 0.\n\n");
+    if (domid == 0 && !force) {
+        fprintf(stderr, "Not destroying domain 0; use -f to force.\n"
+                        "This can only be done when using a disaggregated "
+                        "hardware domain and toolstack.\n\n");
         exit(-1);
     }
     rc = libxl_domain_destroy(ctx, domid, 0);
@@ -4157,12 +4159,15 @@ int main_unpause(int argc, char **argv)
 int main_destroy(int argc, char **argv)
 {
     int opt;
+    int force = 0;
 
-    SWITCH_FOREACH_OPT(opt, "", NULL, "destroy", 1) {
-        /* No options */
+    SWITCH_FOREACH_OPT(opt, "f", NULL, "destroy", 1) {
+    case 'f':
+        force = 1;
+        break;
     }
 
-    destroy_domain(find_domain(argv[optind]));
+    destroy_domain(find_domain(argv[optind]), force);
     return 0;
 }
 
diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c
index e8ab93a..4279b9f 100644
--- a/tools/libxl/xl_cmdtable.c
+++ b/tools/libxl/xl_cmdtable.c
@@ -56,7 +56,10 @@ struct cmd_spec cmd_table[] = {
     { "destroy",
       &main_destroy, 0, 1,
       "Terminate a domain immediately",
-      "<Domain>",
+      "[options] <Domain>\n",
+      "-f                      Permit destroying domain 0, which will only succeed\n"
+      "                        when run from disaggregated toolstack domain with a\n"
+      "                        hardware domain distinct from domain 0."
     },
     { "shutdown",
       &main_shutdown, 0, 1,
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02:59 +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 1WaNc9-0007XA-53; Wed, 16 Apr 2014 11:02:49 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNc8-0007X2-KG
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:48 +0000
Received: from [193.109.254.147:17095] by server-16.bemta-14.messagelabs.com
	id 8A/42-16986-7536E435; Wed, 16 Apr 2014 11:02:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1397646165!8644318!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17794 invoked from network); 16 Apr 2014 11:02:46 -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;
	16 Apr 2014 11:02:46 -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 1WaNc4-0000m4-TB
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNc4-0000gB-Rf
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:44 +0000
Date: Wed, 16 Apr 2014 11:02:44 +0000
Message-Id: <E1WaNc4-0000gB-Rf@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] evtchn: eliminate 64k ports limitation
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 8f7f6ab879a9ad9d2bf66b8c6b46a0653086b79f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 11 11:25:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:25:56 2014 +0200

    evtchn: eliminate 64k ports limitation
    
    The introduction of FIFO event channels claimed to support over 100k
    ports, but failed to widen a number of 16-bit variables/operations.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/event_channel.c |    4 ++--
 xen/include/xen/sched.h    |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index cbd495d..6853842 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -275,12 +275,12 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
         goto out;
 
     lchn->u.interdomain.remote_dom  = rd;
-    lchn->u.interdomain.remote_port = (u16)rport;
+    lchn->u.interdomain.remote_port = rport;
     lchn->state                     = ECS_INTERDOMAIN;
     evtchn_port_init(ld, lchn);
     
     rchn->u.interdomain.remote_dom  = ld;
-    rchn->u.interdomain.remote_port = (u16)lport;
+    rchn->u.interdomain.remote_port = lport;
     rchn->state                     = ECS_INTERDOMAIN;
 
     /*
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index cbbe8a4..b080c9e 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -90,13 +90,13 @@ struct evtchn
             domid_t remote_domid;
         } unbound;     /* state == ECS_UNBOUND */
         struct {
-            u16            remote_port;
+            evtchn_port_t  remote_port;
             struct domain *remote_dom;
         } interdomain; /* state == ECS_INTERDOMAIN */
         struct {
-            u16            irq;
-            u16            next_port;
-            u16            prev_port;
+            u32            irq;
+            evtchn_port_t  next_port;
+            evtchn_port_t  prev_port;
         } pirq;        /* state == ECS_PIRQ */
         u16 virq;      /* state == ECS_VIRQ */
     } u;
@@ -209,7 +209,7 @@ struct vcpu
     atomic_t         pause_count;
 
     /* IRQ-safe virq_lock protects against delivering VIRQ to stale evtchn. */
-    u16              virq_to_evtchn[NR_VIRQS];
+    evtchn_port_t    virq_to_evtchn[NR_VIRQS];
     spinlock_t       virq_lock;
 
     /* Bitmask of CPUs on which this VCPU may run. */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02:59 +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 1WaNcI-0007Yb-9P; Wed, 16 Apr 2014 11:02:58 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcH-0007YR-Hv
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:57 +0000
Received: from [193.109.254.147:29476] by server-9.bemta-14.messagelabs.com id
	E6/4C-03644-0636E435; Wed, 16 Apr 2014 11:02:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1397646175!8688045!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26607 invoked from network); 16 Apr 2014 11:02:56 -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;
	16 Apr 2014 11:02:56 -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 1WaNcF-0000mA-2o
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcF-0000gX-18
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:55 +0000
Date: Wed, 16 Apr 2014 11:02:55 +0000
Message-Id: <E1WaNcF-0000gX-18@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] further prefetch 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

commit 29ded52bd4c47a2d3b11afe1f96844b6dfdb23e1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 11 11:27:04 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:27:04 2014 +0200

    further prefetch cleanup
    
    - commit 630017f4 ("xen: x86 & generic: change to __builtin_prefetch()")
      removed the ARCH_HAS_PREFETCH{,W} defines, but left the
      ARCH_HAS_SPINLOCK_PREFETCH one in place
    - the x86 special casing code has always been dead due to the two
      respective CONFIG_* settings not getting defined anywhere
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/include/asm-x86/processor.h |   28 ----------------------------
 xen/include/xen/prefetch.h      |    1 -
 2 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h
index f5e9eda..ca37167 100644
--- a/xen/include/asm-x86/processor.h
+++ b/xen/include/asm-x86/processor.h
@@ -481,34 +481,6 @@ static always_inline void rep_nop(void)
 
 #define cpu_relax() rep_nop()
 
-/* Prefetch instructions for Pentium III and AMD Athlon */
-#ifdef 	CONFIG_MPENTIUMIII
-
-#define ARCH_HAS_PREFETCH
-extern always_inline void prefetch(const void *x)
-{
-    asm volatile ( "prefetchnta (%0)" : : "r"(x) );
-}
-
-#elif CONFIG_X86_USE_3DNOW
-
-#define ARCH_HAS_PREFETCH
-#define ARCH_HAS_PREFETCHW
-#define ARCH_HAS_SPINLOCK_PREFETCH
-
-extern always_inline void prefetch(const void *x)
-{
-    asm volatile ( "prefetch (%0)" : : "r"(x) );
-}
-
-extern always_inline void prefetchw(const void *x)
-{
-    asm volatile ( "prefetchw (%0)" : : "r"(x) );
-}
-#define spin_lock_prefetch(x)	prefetchw(x)
-
-#endif
-
 void show_stack(struct cpu_user_regs *regs);
 void show_stack_overflow(unsigned int cpu, const struct cpu_user_regs *regs);
 void show_registers(struct cpu_user_regs *regs);
diff --git a/xen/include/xen/prefetch.h b/xen/include/xen/prefetch.h
index ba73998..85831f9 100644
--- a/xen/include/xen/prefetch.h
+++ b/xen/include/xen/prefetch.h
@@ -42,7 +42,6 @@
 #endif
 
 #ifndef ARCH_HAS_SPINLOCK_PREFETCH
-#define ARCH_HAS_SPINLOCK_PREFETCH
 #define spin_lock_prefetch(x) prefetchw(x)
 #endif
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02:59 +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 1WaNc9-0007XA-53; Wed, 16 Apr 2014 11:02:49 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNc8-0007X2-KG
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:48 +0000
Received: from [193.109.254.147:17095] by server-16.bemta-14.messagelabs.com
	id 8A/42-16986-7536E435; Wed, 16 Apr 2014 11:02:47 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-27.messagelabs.com!1397646165!8644318!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 17794 invoked from network); 16 Apr 2014 11:02:46 -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;
	16 Apr 2014 11:02:46 -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 1WaNc4-0000m4-TB
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNc4-0000gB-Rf
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:44 +0000
Date: Wed, 16 Apr 2014 11:02:44 +0000
Message-Id: <E1WaNc4-0000gB-Rf@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] evtchn: eliminate 64k ports limitation
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 8f7f6ab879a9ad9d2bf66b8c6b46a0653086b79f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 11 11:25:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:25:56 2014 +0200

    evtchn: eliminate 64k ports limitation
    
    The introduction of FIFO event channels claimed to support over 100k
    ports, but failed to widen a number of 16-bit variables/operations.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/common/event_channel.c |    4 ++--
 xen/include/xen/sched.h    |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index cbd495d..6853842 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -275,12 +275,12 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
         goto out;
 
     lchn->u.interdomain.remote_dom  = rd;
-    lchn->u.interdomain.remote_port = (u16)rport;
+    lchn->u.interdomain.remote_port = rport;
     lchn->state                     = ECS_INTERDOMAIN;
     evtchn_port_init(ld, lchn);
     
     rchn->u.interdomain.remote_dom  = ld;
-    rchn->u.interdomain.remote_port = (u16)lport;
+    rchn->u.interdomain.remote_port = lport;
     rchn->state                     = ECS_INTERDOMAIN;
 
     /*
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index cbbe8a4..b080c9e 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -90,13 +90,13 @@ struct evtchn
             domid_t remote_domid;
         } unbound;     /* state == ECS_UNBOUND */
         struct {
-            u16            remote_port;
+            evtchn_port_t  remote_port;
             struct domain *remote_dom;
         } interdomain; /* state == ECS_INTERDOMAIN */
         struct {
-            u16            irq;
-            u16            next_port;
-            u16            prev_port;
+            u32            irq;
+            evtchn_port_t  next_port;
+            evtchn_port_t  prev_port;
         } pirq;        /* state == ECS_PIRQ */
         u16 virq;      /* state == ECS_VIRQ */
     } u;
@@ -209,7 +209,7 @@ struct vcpu
     atomic_t         pause_count;
 
     /* IRQ-safe virq_lock protects against delivering VIRQ to stale evtchn. */
-    u16              virq_to_evtchn[NR_VIRQS];
+    evtchn_port_t    virq_to_evtchn[NR_VIRQS];
     spinlock_t       virq_lock;
 
     /* Bitmask of CPUs on which this VCPU may run. */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:02:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:02:59 +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 1WaNcI-0007Yb-9P; Wed, 16 Apr 2014 11:02:58 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcH-0007YR-Hv
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:57 +0000
Received: from [193.109.254.147:29476] by server-9.bemta-14.messagelabs.com id
	E6/4C-03644-0636E435; Wed, 16 Apr 2014 11:02:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-27.messagelabs.com!1397646175!8688045!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26607 invoked from network); 16 Apr 2014 11:02:56 -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;
	16 Apr 2014 11:02:56 -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 1WaNcF-0000mA-2o
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:55 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcF-0000gX-18
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:02:55 +0000
Date: Wed, 16 Apr 2014 11:02:55 +0000
Message-Id: <E1WaNcF-0000gX-18@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] further prefetch 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

commit 29ded52bd4c47a2d3b11afe1f96844b6dfdb23e1
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Fri Apr 11 11:27:04 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Fri Apr 11 11:27:04 2014 +0200

    further prefetch cleanup
    
    - commit 630017f4 ("xen: x86 & generic: change to __builtin_prefetch()")
      removed the ARCH_HAS_PREFETCH{,W} defines, but left the
      ARCH_HAS_SPINLOCK_PREFETCH one in place
    - the x86 special casing code has always been dead due to the two
      respective CONFIG_* settings not getting defined anywhere
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Keir Fraser <keir@xen.org>
---
 xen/include/asm-x86/processor.h |   28 ----------------------------
 xen/include/xen/prefetch.h      |    1 -
 2 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h
index f5e9eda..ca37167 100644
--- a/xen/include/asm-x86/processor.h
+++ b/xen/include/asm-x86/processor.h
@@ -481,34 +481,6 @@ static always_inline void rep_nop(void)
 
 #define cpu_relax() rep_nop()
 
-/* Prefetch instructions for Pentium III and AMD Athlon */
-#ifdef 	CONFIG_MPENTIUMIII
-
-#define ARCH_HAS_PREFETCH
-extern always_inline void prefetch(const void *x)
-{
-    asm volatile ( "prefetchnta (%0)" : : "r"(x) );
-}
-
-#elif CONFIG_X86_USE_3DNOW
-
-#define ARCH_HAS_PREFETCH
-#define ARCH_HAS_PREFETCHW
-#define ARCH_HAS_SPINLOCK_PREFETCH
-
-extern always_inline void prefetch(const void *x)
-{
-    asm volatile ( "prefetch (%0)" : : "r"(x) );
-}
-
-extern always_inline void prefetchw(const void *x)
-{
-    asm volatile ( "prefetchw (%0)" : : "r"(x) );
-}
-#define spin_lock_prefetch(x)	prefetchw(x)
-
-#endif
-
 void show_stack(struct cpu_user_regs *regs);
 void show_stack_overflow(unsigned int cpu, const struct cpu_user_regs *regs);
 void show_registers(struct cpu_user_regs *regs);
diff --git a/xen/include/xen/prefetch.h b/xen/include/xen/prefetch.h
index ba73998..85831f9 100644
--- a/xen/include/xen/prefetch.h
+++ b/xen/include/xen/prefetch.h
@@ -42,7 +42,6 @@
 #endif
 
 #ifndef ARCH_HAS_SPINLOCK_PREFETCH
-#define ARCH_HAS_SPINLOCK_PREFETCH
 #define spin_lock_prefetch(x) prefetchw(x)
 #endif
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03: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 1WaNcT-0007ao-C7; Wed, 16 Apr 2014 11:03:09 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcS-0007aR-1R
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:08 +0000
Received: from [193.109.254.147:30552] by server-15.bemta-14.messagelabs.com
	id 30/28-15813-B636E435; Wed, 16 Apr 2014 11:03:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1397646185!7917851!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.7 required=7.0 tests=BIZ_TLD
X-StarScan-Received: 
X-StarScan-Version: 6.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12287 invoked from network); 16 Apr 2014 11:03:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:03: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 1WaNcP-0000mm-7h
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcP-0000h3-6h
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:05 +0000
Date: Wed, 16 Apr 2014 11:03:05 +0000
Message-Id: <E1WaNcP-0000h3-6h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: improve make debball
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 074535021b71cb8d205ca854d908f15dc7cea214
Author:     Fabio Fantoni <fabio.fantoni@m2r.biz>
AuthorDate: Fri Apr 11 13:13:19 2014 +0200
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 11 15:46:30 2014 +0100

    tools: improve make debball
    
    - Remove version from installed package name, to make "upgrades" work
    - Add conffiles to manage files in /etc on package install/update/remove
    - Added in description that this is a .deb for testing only
    
    Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/misc/mkdeb |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/tools/misc/mkdeb b/tools/misc/mkdeb
index 2e40747..3bbf881 100644
--- a/tools/misc/mkdeb
+++ b/tools/misc/mkdeb
@@ -33,7 +33,7 @@ fi
 # Fill in the debian boilerplate
 mkdir -p deb/DEBIAN
 cat >deb/DEBIAN/control <<EOF
-Package: xen-upstream-$version
+Package: xen-upstream
 Source: xen-upstream
 Version: $version
 Architecture: $arch
@@ -41,12 +41,15 @@ Maintainer: Unmaintained snapshot
 Section: admin
 Priority: optional
 Installed-Size: $(du -ks deb | cut -f1)
-Description: Xen hypervisor and tools, version $version
- This package contains the Xen hypervisor and associated tools, built
- from a source tree.  It is not a fully packaged and supported Xen, just
- the output of a xen "make dist" wrapped in a .deb to make it easy to
- uninstall.
+Description: Xen upstream testing build snapshot
+ Warning: This is a custom testing build of Xen; it is not an
+ officially supported Debian package. Please not distribute.
+ It is just the output of a xen "make dist" wrapped in a .deb
+ to make it easy to update and uninstall.
 EOF
+# Find all /etc files and add them to conffiles
+find deb/etc -type f -printf /etc/%P\\n >deb/DEBIAN/conffiles
+
 
 # Package it up
 chown -R root:root deb
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03: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 1WaNcT-0007ao-C7; Wed, 16 Apr 2014 11:03:09 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcS-0007aR-1R
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:08 +0000
Received: from [193.109.254.147:30552] by server-15.bemta-14.messagelabs.com
	id 30/28-15813-B636E435; Wed, 16 Apr 2014 11:03:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-16.tower-27.messagelabs.com!1397646185!7917851!1
X-Originating-IP: [50.57.168.107]
X-SpamReason: No, hits=1.7 required=7.0 tests=BIZ_TLD
X-StarScan-Received: 
X-StarScan-Version: 6.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12287 invoked from network); 16 Apr 2014 11:03:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-16.tower-27.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:03: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 1WaNcP-0000mm-7h
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:05 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcP-0000h3-6h
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:05 +0000
Date: Wed, 16 Apr 2014 11:03:05 +0000
Message-Id: <E1WaNcP-0000h3-6h@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools: improve make debball
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 074535021b71cb8d205ca854d908f15dc7cea214
Author:     Fabio Fantoni <fabio.fantoni@m2r.biz>
AuthorDate: Fri Apr 11 13:13:19 2014 +0200
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Fri Apr 11 15:46:30 2014 +0100

    tools: improve make debball
    
    - Remove version from installed package name, to make "upgrades" work
    - Add conffiles to manage files in /etc on package install/update/remove
    - Added in description that this is a .deb for testing only
    
    Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
    Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
    Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/misc/mkdeb |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/tools/misc/mkdeb b/tools/misc/mkdeb
index 2e40747..3bbf881 100644
--- a/tools/misc/mkdeb
+++ b/tools/misc/mkdeb
@@ -33,7 +33,7 @@ fi
 # Fill in the debian boilerplate
 mkdir -p deb/DEBIAN
 cat >deb/DEBIAN/control <<EOF
-Package: xen-upstream-$version
+Package: xen-upstream
 Source: xen-upstream
 Version: $version
 Architecture: $arch
@@ -41,12 +41,15 @@ Maintainer: Unmaintained snapshot
 Section: admin
 Priority: optional
 Installed-Size: $(du -ks deb | cut -f1)
-Description: Xen hypervisor and tools, version $version
- This package contains the Xen hypervisor and associated tools, built
- from a source tree.  It is not a fully packaged and supported Xen, just
- the output of a xen "make dist" wrapped in a .deb to make it easy to
- uninstall.
+Description: Xen upstream testing build snapshot
+ Warning: This is a custom testing build of Xen; it is not an
+ officially supported Debian package. Please not distribute.
+ It is just the output of a xen "make dist" wrapped in a .deb
+ to make it easy to update and uninstall.
 EOF
+# Find all /etc files and add them to conffiles
+find deb/etc -type f -printf /etc/%P\\n >deb/DEBIAN/conffiles
+
 
 # Package it up
 chown -R root:root deb
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03: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 1WaNcd-0007by-Fv; Wed, 16 Apr 2014 11:03:19 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcb-0007bo-Um
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:18 +0000
Received: from [193.109.254.147:31703] by server-16.bemta-14.messagelabs.com
	id 73/33-16986-5736E435; Wed, 16 Apr 2014 11:03:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-27.messagelabs.com!1397646195!8656747!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3461 invoked from network); 16 Apr 2014 11:03:16 -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;
	16 Apr 2014 11:03:16 -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 1WaNcZ-0000ms-Co
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcZ-0000hU-BJ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:15 +0000
Date: Wed, 16 Apr 2014 11:03:15 +0000
Message-Id: <E1WaNcZ-0000hU-BJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: fix up mem_access.h
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 b144a816e6333682197324c343ce1a1a46cb1355
Author:     Aravindh Puthiyaparambil <aravindp@cisco.com>
AuthorDate: Mon Apr 14 12:42:26 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:42:26 2014 +0200

    x86: fix up mem_access.h
    
    Fix filename in the description
    Add double inclusion guard
    
    Signed-off-by: Aravindh Puthiyaparambil <aravindp@cisco.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-x86/mem_access.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/include/asm-x86/mem_access.h b/xen/include/asm-x86/mem_access.h
index 88ae3fc..60c2834 100644
--- a/xen/include/asm-x86/mem_access.h
+++ b/xen/include/asm-x86/mem_access.h
@@ -1,5 +1,5 @@
 /******************************************************************************
- * include/asm-x86/mem_paging.h
+ * include/asm-x86/mem_access.h
  *
  * Memory access support.
  *
@@ -20,10 +20,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifndef _XEN_ASM_MEM_ACCESS_H
+#define _XEN_ASM_MEM_ACCESS_H
 
 int mem_access_memop(struct domain *d, xen_mem_event_op_t *meo);
 int mem_access_send_req(struct domain *d, mem_event_request_t *req);
 
+#endif /* _XEN_ASM_MEM_ACCESS_H */
 
 /*
  * Local variables:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:27 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03: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 1WaNcd-0007by-Fv; Wed, 16 Apr 2014 11:03:19 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcb-0007bo-Um
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:18 +0000
Received: from [193.109.254.147:31703] by server-16.bemta-14.messagelabs.com
	id 73/33-16986-5736E435; Wed, 16 Apr 2014 11:03:17 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-27.messagelabs.com!1397646195!8656747!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3461 invoked from network); 16 Apr 2014 11:03:16 -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;
	16 Apr 2014 11:03:16 -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 1WaNcZ-0000ms-Co
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:15 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcZ-0000hU-BJ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:15 +0000
Date: Wed, 16 Apr 2014 11:03:15 +0000
Message-Id: <E1WaNcZ-0000hU-BJ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: fix up mem_access.h
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 b144a816e6333682197324c343ce1a1a46cb1355
Author:     Aravindh Puthiyaparambil <aravindp@cisco.com>
AuthorDate: Mon Apr 14 12:42:26 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:42:26 2014 +0200

    x86: fix up mem_access.h
    
    Fix filename in the description
    Add double inclusion guard
    
    Signed-off-by: Aravindh Puthiyaparambil <aravindp@cisco.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/include/asm-x86/mem_access.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/include/asm-x86/mem_access.h b/xen/include/asm-x86/mem_access.h
index 88ae3fc..60c2834 100644
--- a/xen/include/asm-x86/mem_access.h
+++ b/xen/include/asm-x86/mem_access.h
@@ -1,5 +1,5 @@
 /******************************************************************************
- * include/asm-x86/mem_paging.h
+ * include/asm-x86/mem_access.h
  *
  * Memory access support.
  *
@@ -20,10 +20,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifndef _XEN_ASM_MEM_ACCESS_H
+#define _XEN_ASM_MEM_ACCESS_H
 
 int mem_access_memop(struct domain *d, xen_mem_event_op_t *meo);
 int mem_access_send_req(struct domain *d, mem_event_request_t *req);
 
+#endif /* _XEN_ASM_MEM_ACCESS_H */
 
 /*
  * Local variables:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03: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 1WaNco-0007dr-Iv; Wed, 16 Apr 2014 11:03:30 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcm-0007dW-QZ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:29 +0000
Received: from [193.109.254.147:36895] by server-4.bemta-14.messagelabs.com id
	D0/7B-02781-0836E435; Wed, 16 Apr 2014 11:03:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1397646205!8648573!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2682 invoked from network); 16 Apr 2014 11:03:27 -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;
	16 Apr 2014 11:03:27 -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 1WaNcj-0000my-LQ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcj-0000j1-Jc
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:25 +0000
Date: Wed, 16 Apr 2014 11:03:25 +0000
Message-Id: <E1WaNcj-0000j1-Jc@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: rename public functions in
	p2m-pt.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

commit 50465f37661c395029a4e99160eda85db520cb66
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Mon Apr 14 12:43:36 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:43:36 2014 +0200

    x86: rename public functions in p2m-pt.c
    
    This patch renames "public" functions in p2m-pt.c. In addition to
    making them more descriptive, it also frees up "p2m_set_entry" name
    to be used later.  This patch doesn't change any functionality.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m-pt.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c
index a1d5650..0ad5057 100644
--- a/xen/arch/x86/mm/p2m-pt.c
+++ b/xen/arch/x86/mm/p2m-pt.c
@@ -277,8 +277,8 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
 // Returns 0 on error (out of memory)
 static int
-p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, 
-              unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
+p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
+                 unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
     // XXX -- this might be able to be faster iff current->domain == d
     mfn_t table_mfn = pagetable_get_mfn(p2m_get_pagetable(p2m));
@@ -461,9 +461,9 @@ out:
 }
 
 static mfn_t
-p2m_gfn_to_mfn(struct p2m_domain *p2m, unsigned long gfn, 
-               p2m_type_t *t, p2m_access_t *a, p2m_query_t q,
-               unsigned int *page_order)
+p2m_pt_get_entry(struct p2m_domain *p2m, unsigned long gfn,
+                 p2m_type_t *t, p2m_access_t *a, p2m_query_t q,
+                 unsigned int *page_order)
 {
     mfn_t mfn;
     paddr_t addr = ((paddr_t)gfn) << PAGE_SHIFT;
@@ -604,8 +604,8 @@ pod_retry_l1:
 /* Walk the whole p2m table, changing any entries of the old type
  * to the new type.  This is used in hardware-assisted paging to 
  * quickly enable or diable log-dirty tracking */
-static void p2m_change_type_global(struct p2m_domain *p2m,
-                                   p2m_type_t ot, p2m_type_t nt)
+static void p2m_pt_change_entry_type_global(struct p2m_domain *p2m,
+                                            p2m_type_t ot, p2m_type_t nt)
 {
     unsigned long mfn, gfn, flags;
     l1_pgentry_t l1e_content;
@@ -870,9 +870,9 @@ long p2m_pt_audit_p2m(struct p2m_domain *p2m)
 /* Set up the p2m function pointers for pagetable format */
 void p2m_pt_init(struct p2m_domain *p2m)
 {
-    p2m->set_entry = p2m_set_entry;
-    p2m->get_entry = p2m_gfn_to_mfn;
-    p2m->change_entry_type_global = p2m_change_type_global;
+    p2m->set_entry = p2m_pt_set_entry;
+    p2m->get_entry = p2m_pt_get_entry;
+    p2m->change_entry_type_global = p2m_pt_change_entry_type_global;
     p2m->write_p2m_entry = paging_write_p2m_entry;
 #if P2M_AUDIT
     p2m->audit_p2m = p2m_pt_audit_p2m;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:30 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03: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 1WaNco-0007dr-Iv; Wed, 16 Apr 2014 11:03:30 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcm-0007dW-QZ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:29 +0000
Received: from [193.109.254.147:36895] by server-4.bemta-14.messagelabs.com id
	D0/7B-02781-0836E435; Wed, 16 Apr 2014 11:03:28 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1397646205!8648573!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2682 invoked from network); 16 Apr 2014 11:03:27 -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;
	16 Apr 2014 11:03:27 -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 1WaNcj-0000my-LQ
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNcj-0000j1-Jc
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:25 +0000
Date: Wed, 16 Apr 2014 11:03:25 +0000
Message-Id: <E1WaNcj-0000j1-Jc@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: rename public functions in
	p2m-pt.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

commit 50465f37661c395029a4e99160eda85db520cb66
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Mon Apr 14 12:43:36 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:43:36 2014 +0200

    x86: rename public functions in p2m-pt.c
    
    This patch renames "public" functions in p2m-pt.c. In addition to
    making them more descriptive, it also frees up "p2m_set_entry" name
    to be used later.  This patch doesn't change any functionality.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m-pt.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c
index a1d5650..0ad5057 100644
--- a/xen/arch/x86/mm/p2m-pt.c
+++ b/xen/arch/x86/mm/p2m-pt.c
@@ -277,8 +277,8 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
 // Returns 0 on error (out of memory)
 static int
-p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, 
-              unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
+p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
+                 unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
     // XXX -- this might be able to be faster iff current->domain == d
     mfn_t table_mfn = pagetable_get_mfn(p2m_get_pagetable(p2m));
@@ -461,9 +461,9 @@ out:
 }
 
 static mfn_t
-p2m_gfn_to_mfn(struct p2m_domain *p2m, unsigned long gfn, 
-               p2m_type_t *t, p2m_access_t *a, p2m_query_t q,
-               unsigned int *page_order)
+p2m_pt_get_entry(struct p2m_domain *p2m, unsigned long gfn,
+                 p2m_type_t *t, p2m_access_t *a, p2m_query_t q,
+                 unsigned int *page_order)
 {
     mfn_t mfn;
     paddr_t addr = ((paddr_t)gfn) << PAGE_SHIFT;
@@ -604,8 +604,8 @@ pod_retry_l1:
 /* Walk the whole p2m table, changing any entries of the old type
  * to the new type.  This is used in hardware-assisted paging to 
  * quickly enable or diable log-dirty tracking */
-static void p2m_change_type_global(struct p2m_domain *p2m,
-                                   p2m_type_t ot, p2m_type_t nt)
+static void p2m_pt_change_entry_type_global(struct p2m_domain *p2m,
+                                            p2m_type_t ot, p2m_type_t nt)
 {
     unsigned long mfn, gfn, flags;
     l1_pgentry_t l1e_content;
@@ -870,9 +870,9 @@ long p2m_pt_audit_p2m(struct p2m_domain *p2m)
 /* Set up the p2m function pointers for pagetable format */
 void p2m_pt_init(struct p2m_domain *p2m)
 {
-    p2m->set_entry = p2m_set_entry;
-    p2m->get_entry = p2m_gfn_to_mfn;
-    p2m->change_entry_type_global = p2m_change_type_global;
+    p2m->set_entry = p2m_pt_set_entry;
+    p2m->get_entry = p2m_pt_get_entry;
+    p2m->change_entry_type_global = p2m_pt_change_entry_type_global;
     p2m->write_p2m_entry = paging_write_p2m_entry;
 #if P2M_AUDIT
     p2m->audit_p2m = p2m_pt_audit_p2m;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03:40 +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 1WaNcy-0007fW-LX; Wed, 16 Apr 2014 11:03:40 +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 1WaNcw-0007fJ-W3
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:39 +0000
Received: from [85.158.143.35:21306] by server-3.bemta-4.messagelabs.com id
	C3/5B-13602-A836E435; Wed, 16 Apr 2014 11:03:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1397646216!9450116!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6387 invoked from network); 16 Apr 2014 11:03:37 -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 Apr 2014 11:03:37 -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 1WaNct-0000n9-S8
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNct-0000jR-PA
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:35 +0000
Date: Wed, 16 Apr 2014 11:03:35 +0000
Message-Id: <E1WaNct-0000jR-PA@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Rename "set_p2m_entry" to
	"p2m_set_entry"
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 11f7c1ff85dfb751d53560eef6af3a77d316eec4
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Mon Apr 14 12:44:39 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:44:39 2014 +0200

    Rename "set_p2m_entry" to "p2m_set_entry"
    
    This patch renames set_p2m_entry defined in arch/x86/mm/p2m.c
    to p2m_set_entry which makes it consistent with other functions
    from that file. It also facilitates changing the function signature
    to return approriate errno for failure cases.  This patch doesn't
    change any functionality.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/hap/nested_hap.c |    2 +-
 xen/arch/x86/mm/mem_sharing.c    |    2 +-
 xen/arch/x86/mm/p2m-pod.c        |   32 ++++++++++++++-----------
 xen/arch/x86/mm/p2m.c            |   47 +++++++++++++++++++++-----------------
 xen/include/asm-x86/p2m.h        |    2 +-
 5 files changed, 47 insertions(+), 38 deletions(-)

diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c
index 38e2327..78701dc 100644
--- a/xen/arch/x86/mm/hap/nested_hap.c
+++ b/xen/arch/x86/mm/hap/nested_hap.c
@@ -124,7 +124,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct p2m_domain *p2m,
         gfn = (L2_gpa >> PAGE_SHIFT) & mask;
         mfn = _mfn((L0_gpa >> PAGE_SHIFT) & mask);
 
-        rv = set_p2m_entry(p2m, gfn, mfn, page_order, p2mt, p2ma);
+        rv = p2m_set_entry(p2m, gfn, mfn, page_order, p2mt, p2ma);
     }
 
     p2m_unlock(p2m);
diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 237d346..0968681 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -1092,7 +1092,7 @@ int mem_sharing_add_to_physmap(struct domain *sd, unsigned long sgfn, shr_handle
         goto err_unlock;
     }
 
-    ret = set_p2m_entry(p2m, cgfn, smfn, PAGE_ORDER_4K, p2m_ram_shared, a);
+    ret = p2m_set_entry(p2m, cgfn, smfn, PAGE_ORDER_4K, p2m_ram_shared, a);
 
     /* Tempted to turn this into an assert */
     if ( !ret )
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index d14565d..3c86255 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -556,7 +556,8 @@ recount:
     {
         /* All PoD: Mark the whole region invalid and tell caller
          * we're done. */
-        set_p2m_entry(p2m, gpfn, _mfn(INVALID_MFN), order, p2m_invalid, p2m->default_access);
+        p2m_set_entry(p2m, gpfn, _mfn(INVALID_MFN), order, p2m_invalid,
+                      p2m->default_access);
         p2m->pod.entry_count-=(1<<order);
         BUG_ON(p2m->pod.entry_count < 0);
         ret = 1;
@@ -589,7 +590,8 @@ recount:
         mfn = p2m->get_entry(p2m, gpfn + i, &t, &a, 0, NULL);
         if ( t == p2m_populate_on_demand )
         {
-            set_p2m_entry(p2m, gpfn + i, _mfn(INVALID_MFN), 0, p2m_invalid, p2m->default_access);
+            p2m_set_entry(p2m, gpfn + i, _mfn(INVALID_MFN), 0, p2m_invalid,
+                          p2m->default_access);
             p2m->pod.entry_count--;
             BUG_ON(p2m->pod.entry_count < 0);
             pod--;
@@ -602,7 +604,8 @@ recount:
 
             page = mfn_to_page(mfn);
 
-            set_p2m_entry(p2m, gpfn + i, _mfn(INVALID_MFN), 0, p2m_invalid, p2m->default_access);
+            p2m_set_entry(p2m, gpfn + i, _mfn(INVALID_MFN), 0, p2m_invalid,
+                          p2m->default_access);
             set_gpfn_from_mfn(mfn_x(mfn), INVALID_M2P_ENTRY);
 
             p2m_pod_cache_add(p2m, page, 0);
@@ -721,7 +724,7 @@ p2m_pod_zero_check_superpage(struct p2m_domain *p2m, unsigned long gfn)
     }
 
     /* Try to remove the page, restoring old mapping if it fails. */
-    set_p2m_entry(p2m, gfn, _mfn(0), PAGE_ORDER_2M,
+    p2m_set_entry(p2m, gfn, _mfn(0), PAGE_ORDER_2M,
                   p2m_populate_on_demand, p2m->default_access);
 
     /* Make none of the MFNs are used elsewhere... for example, mapped
@@ -779,7 +782,7 @@ p2m_pod_zero_check_superpage(struct p2m_domain *p2m, unsigned long gfn)
 
 out_reset:
     if ( reset )
-        set_p2m_entry(p2m, gfn, mfn0, 9, type0, p2m->default_access);
+        p2m_set_entry(p2m, gfn, mfn0, 9, type0, p2m->default_access);
     
 out:
     gfn_unlock(p2m, gfn, SUPERPAGE_ORDER);
@@ -837,7 +840,7 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count)
         }
 
         /* Try to remove the page, restoring old mapping if it fails. */
-        set_p2m_entry(p2m, gfns[i], _mfn(0), PAGE_ORDER_4K,
+        p2m_set_entry(p2m, gfns[i], _mfn(0), PAGE_ORDER_4K,
                       p2m_populate_on_demand, p2m->default_access);
 
         /* See if the page was successfully unmapped.  (Allow one refcount
@@ -847,7 +850,7 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count)
             unmap_domain_page(map[i]);
             map[i] = NULL;
 
-            set_p2m_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
+            p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
                 types[i], p2m->default_access);
 
             continue;
@@ -870,7 +873,7 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count)
          * check timing.  */
         if ( j < PAGE_SIZE/sizeof(*map[i]) )
         {
-            set_p2m_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
+            p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
                 types[i], p2m->default_access);
         }
         else
@@ -1000,15 +1003,15 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn,
     {
         pod_unlock(p2m);
         gfn_aligned = (gfn >> order) << order;
-        /* Note that we are supposed to call set_p2m_entry() 512 times to 
+        /* Note that we are supposed to call p2m_set_entry() 512 times to
          * split 1GB into 512 2MB pages here. But We only do once here because
-         * set_p2m_entry() should automatically shatter the 1GB page into 
+         * p2m_set_entry() should automatically shatter the 1GB page into
          * 512 2MB pages. The rest of 511 calls are unnecessary.
          *
          * NOTE: In a fine-grained p2m locking scenario this operation
          * may need to promote its locking from gfn->1g superpage
          */
-        set_p2m_entry(p2m, gfn_aligned, _mfn(0), PAGE_ORDER_2M,
+        p2m_set_entry(p2m, gfn_aligned, _mfn(0), PAGE_ORDER_2M,
                       p2m_populate_on_demand, p2m->default_access);
         return 0;
     }
@@ -1037,7 +1040,8 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn,
 
     gfn_aligned = (gfn >> order) << order;
 
-    set_p2m_entry(p2m, gfn_aligned, mfn, order, p2m_ram_rw, p2m->default_access);
+    p2m_set_entry(p2m, gfn_aligned, mfn, order, p2m_ram_rw,
+                  p2m->default_access);
 
     for( i = 0; i < (1UL << order); i++ )
     {
@@ -1091,7 +1095,7 @@ remap_and_retry:
      * need promoting the gfn lock from gfn->2M superpage */
     gfn_aligned = (gfn>>order)<<order;
     for(i=0; i<(1<<order); i++)
-        set_p2m_entry(p2m, gfn_aligned+i, _mfn(0), PAGE_ORDER_4K,
+        p2m_set_entry(p2m, gfn_aligned+i, _mfn(0), PAGE_ORDER_4K,
                       p2m_populate_on_demand, p2m->default_access);
     if ( tb_init_done )
     {
@@ -1146,7 +1150,7 @@ guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
     }
 
     /* Now, actually do the two-way mapping */
-    if ( !set_p2m_entry(p2m, gfn, _mfn(0), order,
+    if ( !p2m_set_entry(p2m, gfn, _mfn(0), order,
                         p2m_populate_on_demand, p2m->default_access) )
         rc = -EINVAL;
     else
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index d2de237..35f9a29 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -321,7 +321,7 @@ struct page_info *get_page_from_gfn_p2m(
 }
 
 
-int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, 
+int p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                   unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
     struct domain *d = p2m->domain;
@@ -429,7 +429,7 @@ int p2m_alloc_table(struct p2m_domain *p2m)
 
     /* Initialise physmap tables for slot zero. Other code assumes this. */
     p2m->defer_nested_flush = 1;
-    if ( !set_p2m_entry(p2m, 0, _mfn(INVALID_MFN), PAGE_ORDER_4K,
+    if ( !p2m_set_entry(p2m, 0, _mfn(INVALID_MFN), PAGE_ORDER_4K,
                         p2m_invalid, p2m->default_access) )
         goto error;
     p2m->defer_nested_flush = 0;
@@ -508,7 +508,8 @@ p2m_remove_page(struct p2m_domain *p2m, unsigned long gfn, unsigned long mfn,
             ASSERT( !p2m_is_valid(t) || mfn + i == mfn_x(mfn_return) );
         }
     }
-    set_p2m_entry(p2m, gfn, _mfn(INVALID_MFN), page_order, p2m_invalid, p2m->default_access);
+    p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), page_order, p2m_invalid,
+                  p2m->default_access);
 }
 
 void
@@ -647,7 +648,8 @@ guest_physmap_add_entry(struct domain *d, unsigned long gfn,
     /* Now, actually do the two-way mapping */
     if ( mfn_valid(_mfn(mfn)) ) 
     {
-        if ( !set_p2m_entry(p2m, gfn, _mfn(mfn), page_order, t, p2m->default_access) )
+        if ( !p2m_set_entry(p2m, gfn, _mfn(mfn), page_order, t,
+                            p2m->default_access) )
         {
             rc = -EINVAL;
             goto out; /* Failed to update p2m, bail without updating m2p. */
@@ -662,7 +664,7 @@ guest_physmap_add_entry(struct domain *d, unsigned long gfn,
     {
         gdprintk(XENLOG_WARNING, "Adding bad mfn to p2m map (%#lx -> %#lx)\n",
                  gfn, mfn);
-        if ( !set_p2m_entry(p2m, gfn, _mfn(INVALID_MFN), page_order, 
+        if ( !p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), page_order,
                             p2m_invalid, p2m->default_access) )
             rc = -EINVAL;
         else
@@ -697,7 +699,7 @@ p2m_type_t p2m_change_type(struct domain *d, unsigned long gfn,
 
     mfn = p2m->get_entry(p2m, gfn, &pt, &a, 0, NULL);
     if ( pt == ot )
-        set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, nt, p2m->default_access);
+        p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, nt, p2m->default_access);
 
     gfn_unlock(p2m, gfn, 0);
 
@@ -738,7 +740,7 @@ void p2m_change_type_range(struct domain *d,
                 order = PAGE_ORDER_4K;
         }
         if ( pt == ot )
-            set_p2m_entry(p2m, gfn, mfn, order, nt, a);
+            p2m_set_entry(p2m, gfn, mfn, order, nt, a);
         gfn += 1UL << order;
         gfn &= -1UL << order;
         if ( !gfn )
@@ -780,11 +782,12 @@ set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     }
 
     P2M_DEBUG("set mmio %lx %lx\n", gfn, mfn_x(mfn));
-    rc = set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_mmio_direct, p2m->default_access);
+    rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_mmio_direct,
+                       p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
     if ( 0 == rc )
         gdprintk(XENLOG_ERR,
-            "set_mmio_p2m_entry: set_p2m_entry failed! mfn=%08lx\n",
+            "set_mmio_p2m_entry: p2m_set_entry failed! mfn=%08lx\n",
             mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)));
     return rc;
 }
@@ -811,7 +814,8 @@ clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
             "clear_mmio_p2m_entry: gfn_to_mfn failed! gfn=%08lx\n", gfn);
         goto out;
     }
-    rc = set_p2m_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_invalid, p2m->default_access);
+    rc = p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_invalid,
+                       p2m->default_access);
 
 out:
     gfn_unlock(p2m, gfn, 0);
@@ -846,11 +850,12 @@ set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
         set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY);
 
     P2M_DEBUG("set shared %lx %lx\n", gfn, mfn_x(mfn));
-    rc = set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_shared, p2m->default_access);
+    rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_shared,
+                       p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
     if ( 0 == rc )
         gdprintk(XENLOG_ERR,
-            "set_shared_p2m_entry: set_p2m_entry failed! mfn=%08lx\n",
+            "set_shared_p2m_entry: p2m_set_entry failed! mfn=%08lx\n",
             mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)));
     return rc;
 }
@@ -908,7 +913,7 @@ int p2m_mem_paging_nominate(struct domain *d, unsigned long gfn)
         goto out;
 
     /* Fix p2m entry */
-    set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_out, a);
+    p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_out, a);
     ret = 0;
 
  out:
@@ -973,7 +978,7 @@ int p2m_mem_paging_evict(struct domain *d, unsigned long gfn)
         put_page(page);
 
     /* Remove mapping from p2m table */
-    set_p2m_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_ram_paged, a);
+    p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_ram_paged, a);
 
     /* Clear content before returning the page to Xen */
     scrub_one_page(page);
@@ -1082,7 +1087,7 @@ void p2m_mem_paging_populate(struct domain *d, unsigned long gfn)
         if ( p2mt == p2m_ram_paging_out )
             req.flags |= MEM_EVENT_FLAG_EVICT_FAIL;
 
-        set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_in, a);
+        p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_in, a);
     }
     gfn_unlock(p2m, gfn, 0);
 
@@ -1182,9 +1187,9 @@ int p2m_mem_paging_prep(struct domain *d, unsigned long gfn, uint64_t buffer)
     /* Make the page already guest-accessible. If the pager still has a
      * pending resume operation, it will be idempotent p2m entry-wise,
      * but will unpause the vcpu */
-    set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, 
-                    paging_mode_log_dirty(d) ? p2m_ram_logdirty : 
-                    p2m_ram_rw, a);
+    p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K,
+                  paging_mode_log_dirty(d) ? p2m_ram_logdirty :
+                  p2m_ram_rw, a);
     set_gpfn_from_mfn(mfn_x(mfn), gfn);
 
     if ( !page_extant )
@@ -1234,9 +1239,9 @@ void p2m_mem_paging_resume(struct domain *d)
              * were nominated but not evicted */
             if ( mfn_valid(mfn) && (p2mt == p2m_ram_paging_in) )
             {
-                set_p2m_entry(p2m, rsp.gfn, mfn, PAGE_ORDER_4K, 
-                                paging_mode_log_dirty(d) ? p2m_ram_logdirty : 
-                                p2m_ram_rw, a);
+                p2m_set_entry(p2m, rsp.gfn, mfn, PAGE_ORDER_4K,
+                              paging_mode_log_dirty(d) ? p2m_ram_logdirty :
+                              p2m_ram_rw, a);
                 set_gpfn_from_mfn(mfn_x(mfn), rsp.gfn);
             }
             gfn_unlock(p2m, rsp.gfn, 0);
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index c64f3d0..0a87ea6 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -597,7 +597,7 @@ void p2m_free_ptp(struct p2m_domain *p2m, struct page_info *pg);
 
 /* Directly set a p2m entry: only for use by p2m code. Does not need
  * a call to put_gfn afterwards/ */
-int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, 
+int p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                   unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma);
 
 /* Set up function pointers for PT implementation: only for use by p2m code */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:40 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03:40 +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 1WaNcy-0007fW-LX; Wed, 16 Apr 2014 11:03:40 +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 1WaNcw-0007fJ-W3
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:39 +0000
Received: from [85.158.143.35:21306] by server-3.bemta-4.messagelabs.com id
	C3/5B-13602-A836E435; Wed, 16 Apr 2014 11:03:38 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1397646216!9450116!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6387 invoked from network); 16 Apr 2014 11:03:37 -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 Apr 2014 11:03:37 -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 1WaNct-0000n9-S8
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:35 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNct-0000jR-PA
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:35 +0000
Date: Wed, 16 Apr 2014 11:03:35 +0000
Message-Id: <E1WaNct-0000jR-PA@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Rename "set_p2m_entry" to
	"p2m_set_entry"
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 11f7c1ff85dfb751d53560eef6af3a77d316eec4
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Mon Apr 14 12:44:39 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:44:39 2014 +0200

    Rename "set_p2m_entry" to "p2m_set_entry"
    
    This patch renames set_p2m_entry defined in arch/x86/mm/p2m.c
    to p2m_set_entry which makes it consistent with other functions
    from that file. It also facilitates changing the function signature
    to return approriate errno for failure cases.  This patch doesn't
    change any functionality.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/hap/nested_hap.c |    2 +-
 xen/arch/x86/mm/mem_sharing.c    |    2 +-
 xen/arch/x86/mm/p2m-pod.c        |   32 ++++++++++++++-----------
 xen/arch/x86/mm/p2m.c            |   47 +++++++++++++++++++++-----------------
 xen/include/asm-x86/p2m.h        |    2 +-
 5 files changed, 47 insertions(+), 38 deletions(-)

diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c
index 38e2327..78701dc 100644
--- a/xen/arch/x86/mm/hap/nested_hap.c
+++ b/xen/arch/x86/mm/hap/nested_hap.c
@@ -124,7 +124,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct p2m_domain *p2m,
         gfn = (L2_gpa >> PAGE_SHIFT) & mask;
         mfn = _mfn((L0_gpa >> PAGE_SHIFT) & mask);
 
-        rv = set_p2m_entry(p2m, gfn, mfn, page_order, p2mt, p2ma);
+        rv = p2m_set_entry(p2m, gfn, mfn, page_order, p2mt, p2ma);
     }
 
     p2m_unlock(p2m);
diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 237d346..0968681 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -1092,7 +1092,7 @@ int mem_sharing_add_to_physmap(struct domain *sd, unsigned long sgfn, shr_handle
         goto err_unlock;
     }
 
-    ret = set_p2m_entry(p2m, cgfn, smfn, PAGE_ORDER_4K, p2m_ram_shared, a);
+    ret = p2m_set_entry(p2m, cgfn, smfn, PAGE_ORDER_4K, p2m_ram_shared, a);
 
     /* Tempted to turn this into an assert */
     if ( !ret )
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index d14565d..3c86255 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -556,7 +556,8 @@ recount:
     {
         /* All PoD: Mark the whole region invalid and tell caller
          * we're done. */
-        set_p2m_entry(p2m, gpfn, _mfn(INVALID_MFN), order, p2m_invalid, p2m->default_access);
+        p2m_set_entry(p2m, gpfn, _mfn(INVALID_MFN), order, p2m_invalid,
+                      p2m->default_access);
         p2m->pod.entry_count-=(1<<order);
         BUG_ON(p2m->pod.entry_count < 0);
         ret = 1;
@@ -589,7 +590,8 @@ recount:
         mfn = p2m->get_entry(p2m, gpfn + i, &t, &a, 0, NULL);
         if ( t == p2m_populate_on_demand )
         {
-            set_p2m_entry(p2m, gpfn + i, _mfn(INVALID_MFN), 0, p2m_invalid, p2m->default_access);
+            p2m_set_entry(p2m, gpfn + i, _mfn(INVALID_MFN), 0, p2m_invalid,
+                          p2m->default_access);
             p2m->pod.entry_count--;
             BUG_ON(p2m->pod.entry_count < 0);
             pod--;
@@ -602,7 +604,8 @@ recount:
 
             page = mfn_to_page(mfn);
 
-            set_p2m_entry(p2m, gpfn + i, _mfn(INVALID_MFN), 0, p2m_invalid, p2m->default_access);
+            p2m_set_entry(p2m, gpfn + i, _mfn(INVALID_MFN), 0, p2m_invalid,
+                          p2m->default_access);
             set_gpfn_from_mfn(mfn_x(mfn), INVALID_M2P_ENTRY);
 
             p2m_pod_cache_add(p2m, page, 0);
@@ -721,7 +724,7 @@ p2m_pod_zero_check_superpage(struct p2m_domain *p2m, unsigned long gfn)
     }
 
     /* Try to remove the page, restoring old mapping if it fails. */
-    set_p2m_entry(p2m, gfn, _mfn(0), PAGE_ORDER_2M,
+    p2m_set_entry(p2m, gfn, _mfn(0), PAGE_ORDER_2M,
                   p2m_populate_on_demand, p2m->default_access);
 
     /* Make none of the MFNs are used elsewhere... for example, mapped
@@ -779,7 +782,7 @@ p2m_pod_zero_check_superpage(struct p2m_domain *p2m, unsigned long gfn)
 
 out_reset:
     if ( reset )
-        set_p2m_entry(p2m, gfn, mfn0, 9, type0, p2m->default_access);
+        p2m_set_entry(p2m, gfn, mfn0, 9, type0, p2m->default_access);
     
 out:
     gfn_unlock(p2m, gfn, SUPERPAGE_ORDER);
@@ -837,7 +840,7 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count)
         }
 
         /* Try to remove the page, restoring old mapping if it fails. */
-        set_p2m_entry(p2m, gfns[i], _mfn(0), PAGE_ORDER_4K,
+        p2m_set_entry(p2m, gfns[i], _mfn(0), PAGE_ORDER_4K,
                       p2m_populate_on_demand, p2m->default_access);
 
         /* See if the page was successfully unmapped.  (Allow one refcount
@@ -847,7 +850,7 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count)
             unmap_domain_page(map[i]);
             map[i] = NULL;
 
-            set_p2m_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
+            p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
                 types[i], p2m->default_access);
 
             continue;
@@ -870,7 +873,7 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count)
          * check timing.  */
         if ( j < PAGE_SIZE/sizeof(*map[i]) )
         {
-            set_p2m_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
+            p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K,
                 types[i], p2m->default_access);
         }
         else
@@ -1000,15 +1003,15 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn,
     {
         pod_unlock(p2m);
         gfn_aligned = (gfn >> order) << order;
-        /* Note that we are supposed to call set_p2m_entry() 512 times to 
+        /* Note that we are supposed to call p2m_set_entry() 512 times to
          * split 1GB into 512 2MB pages here. But We only do once here because
-         * set_p2m_entry() should automatically shatter the 1GB page into 
+         * p2m_set_entry() should automatically shatter the 1GB page into
          * 512 2MB pages. The rest of 511 calls are unnecessary.
          *
          * NOTE: In a fine-grained p2m locking scenario this operation
          * may need to promote its locking from gfn->1g superpage
          */
-        set_p2m_entry(p2m, gfn_aligned, _mfn(0), PAGE_ORDER_2M,
+        p2m_set_entry(p2m, gfn_aligned, _mfn(0), PAGE_ORDER_2M,
                       p2m_populate_on_demand, p2m->default_access);
         return 0;
     }
@@ -1037,7 +1040,8 @@ p2m_pod_demand_populate(struct p2m_domain *p2m, unsigned long gfn,
 
     gfn_aligned = (gfn >> order) << order;
 
-    set_p2m_entry(p2m, gfn_aligned, mfn, order, p2m_ram_rw, p2m->default_access);
+    p2m_set_entry(p2m, gfn_aligned, mfn, order, p2m_ram_rw,
+                  p2m->default_access);
 
     for( i = 0; i < (1UL << order); i++ )
     {
@@ -1091,7 +1095,7 @@ remap_and_retry:
      * need promoting the gfn lock from gfn->2M superpage */
     gfn_aligned = (gfn>>order)<<order;
     for(i=0; i<(1<<order); i++)
-        set_p2m_entry(p2m, gfn_aligned+i, _mfn(0), PAGE_ORDER_4K,
+        p2m_set_entry(p2m, gfn_aligned+i, _mfn(0), PAGE_ORDER_4K,
                       p2m_populate_on_demand, p2m->default_access);
     if ( tb_init_done )
     {
@@ -1146,7 +1150,7 @@ guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
     }
 
     /* Now, actually do the two-way mapping */
-    if ( !set_p2m_entry(p2m, gfn, _mfn(0), order,
+    if ( !p2m_set_entry(p2m, gfn, _mfn(0), order,
                         p2m_populate_on_demand, p2m->default_access) )
         rc = -EINVAL;
     else
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index d2de237..35f9a29 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -321,7 +321,7 @@ struct page_info *get_page_from_gfn_p2m(
 }
 
 
-int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, 
+int p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                   unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
     struct domain *d = p2m->domain;
@@ -429,7 +429,7 @@ int p2m_alloc_table(struct p2m_domain *p2m)
 
     /* Initialise physmap tables for slot zero. Other code assumes this. */
     p2m->defer_nested_flush = 1;
-    if ( !set_p2m_entry(p2m, 0, _mfn(INVALID_MFN), PAGE_ORDER_4K,
+    if ( !p2m_set_entry(p2m, 0, _mfn(INVALID_MFN), PAGE_ORDER_4K,
                         p2m_invalid, p2m->default_access) )
         goto error;
     p2m->defer_nested_flush = 0;
@@ -508,7 +508,8 @@ p2m_remove_page(struct p2m_domain *p2m, unsigned long gfn, unsigned long mfn,
             ASSERT( !p2m_is_valid(t) || mfn + i == mfn_x(mfn_return) );
         }
     }
-    set_p2m_entry(p2m, gfn, _mfn(INVALID_MFN), page_order, p2m_invalid, p2m->default_access);
+    p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), page_order, p2m_invalid,
+                  p2m->default_access);
 }
 
 void
@@ -647,7 +648,8 @@ guest_physmap_add_entry(struct domain *d, unsigned long gfn,
     /* Now, actually do the two-way mapping */
     if ( mfn_valid(_mfn(mfn)) ) 
     {
-        if ( !set_p2m_entry(p2m, gfn, _mfn(mfn), page_order, t, p2m->default_access) )
+        if ( !p2m_set_entry(p2m, gfn, _mfn(mfn), page_order, t,
+                            p2m->default_access) )
         {
             rc = -EINVAL;
             goto out; /* Failed to update p2m, bail without updating m2p. */
@@ -662,7 +664,7 @@ guest_physmap_add_entry(struct domain *d, unsigned long gfn,
     {
         gdprintk(XENLOG_WARNING, "Adding bad mfn to p2m map (%#lx -> %#lx)\n",
                  gfn, mfn);
-        if ( !set_p2m_entry(p2m, gfn, _mfn(INVALID_MFN), page_order, 
+        if ( !p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), page_order,
                             p2m_invalid, p2m->default_access) )
             rc = -EINVAL;
         else
@@ -697,7 +699,7 @@ p2m_type_t p2m_change_type(struct domain *d, unsigned long gfn,
 
     mfn = p2m->get_entry(p2m, gfn, &pt, &a, 0, NULL);
     if ( pt == ot )
-        set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, nt, p2m->default_access);
+        p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, nt, p2m->default_access);
 
     gfn_unlock(p2m, gfn, 0);
 
@@ -738,7 +740,7 @@ void p2m_change_type_range(struct domain *d,
                 order = PAGE_ORDER_4K;
         }
         if ( pt == ot )
-            set_p2m_entry(p2m, gfn, mfn, order, nt, a);
+            p2m_set_entry(p2m, gfn, mfn, order, nt, a);
         gfn += 1UL << order;
         gfn &= -1UL << order;
         if ( !gfn )
@@ -780,11 +782,12 @@ set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     }
 
     P2M_DEBUG("set mmio %lx %lx\n", gfn, mfn_x(mfn));
-    rc = set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_mmio_direct, p2m->default_access);
+    rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_mmio_direct,
+                       p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
     if ( 0 == rc )
         gdprintk(XENLOG_ERR,
-            "set_mmio_p2m_entry: set_p2m_entry failed! mfn=%08lx\n",
+            "set_mmio_p2m_entry: p2m_set_entry failed! mfn=%08lx\n",
             mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)));
     return rc;
 }
@@ -811,7 +814,8 @@ clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
             "clear_mmio_p2m_entry: gfn_to_mfn failed! gfn=%08lx\n", gfn);
         goto out;
     }
-    rc = set_p2m_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_invalid, p2m->default_access);
+    rc = p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_invalid,
+                       p2m->default_access);
 
 out:
     gfn_unlock(p2m, gfn, 0);
@@ -846,11 +850,12 @@ set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
         set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY);
 
     P2M_DEBUG("set shared %lx %lx\n", gfn, mfn_x(mfn));
-    rc = set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_shared, p2m->default_access);
+    rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_shared,
+                       p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
     if ( 0 == rc )
         gdprintk(XENLOG_ERR,
-            "set_shared_p2m_entry: set_p2m_entry failed! mfn=%08lx\n",
+            "set_shared_p2m_entry: p2m_set_entry failed! mfn=%08lx\n",
             mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)));
     return rc;
 }
@@ -908,7 +913,7 @@ int p2m_mem_paging_nominate(struct domain *d, unsigned long gfn)
         goto out;
 
     /* Fix p2m entry */
-    set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_out, a);
+    p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_out, a);
     ret = 0;
 
  out:
@@ -973,7 +978,7 @@ int p2m_mem_paging_evict(struct domain *d, unsigned long gfn)
         put_page(page);
 
     /* Remove mapping from p2m table */
-    set_p2m_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_ram_paged, a);
+    p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_ram_paged, a);
 
     /* Clear content before returning the page to Xen */
     scrub_one_page(page);
@@ -1082,7 +1087,7 @@ void p2m_mem_paging_populate(struct domain *d, unsigned long gfn)
         if ( p2mt == p2m_ram_paging_out )
             req.flags |= MEM_EVENT_FLAG_EVICT_FAIL;
 
-        set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_in, a);
+        p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_in, a);
     }
     gfn_unlock(p2m, gfn, 0);
 
@@ -1182,9 +1187,9 @@ int p2m_mem_paging_prep(struct domain *d, unsigned long gfn, uint64_t buffer)
     /* Make the page already guest-accessible. If the pager still has a
      * pending resume operation, it will be idempotent p2m entry-wise,
      * but will unpause the vcpu */
-    set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, 
-                    paging_mode_log_dirty(d) ? p2m_ram_logdirty : 
-                    p2m_ram_rw, a);
+    p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K,
+                  paging_mode_log_dirty(d) ? p2m_ram_logdirty :
+                  p2m_ram_rw, a);
     set_gpfn_from_mfn(mfn_x(mfn), gfn);
 
     if ( !page_extant )
@@ -1234,9 +1239,9 @@ void p2m_mem_paging_resume(struct domain *d)
              * were nominated but not evicted */
             if ( mfn_valid(mfn) && (p2mt == p2m_ram_paging_in) )
             {
-                set_p2m_entry(p2m, rsp.gfn, mfn, PAGE_ORDER_4K, 
-                                paging_mode_log_dirty(d) ? p2m_ram_logdirty : 
-                                p2m_ram_rw, a);
+                p2m_set_entry(p2m, rsp.gfn, mfn, PAGE_ORDER_4K,
+                              paging_mode_log_dirty(d) ? p2m_ram_logdirty :
+                              p2m_ram_rw, a);
                 set_gpfn_from_mfn(mfn_x(mfn), rsp.gfn);
             }
             gfn_unlock(p2m, rsp.gfn, 0);
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index c64f3d0..0a87ea6 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -597,7 +597,7 @@ void p2m_free_ptp(struct p2m_domain *p2m, struct page_info *pg);
 
 /* Directly set a p2m entry: only for use by p2m code. Does not need
  * a call to put_gfn afterwards/ */
-int set_p2m_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, 
+int p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                   unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma);
 
 /* Set up function pointers for PT implementation: only for use by p2m code */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03:51 +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 1WaNd8-0007hT-Qc; Wed, 16 Apr 2014 11:03:50 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNd7-0007hD-Ga
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:49 +0000
Received: from [193.109.254.147:39335] by server-1.bemta-14.messagelabs.com id
	9D/88-00839-4936E435; Wed, 16 Apr 2014 11:03:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397646226!8609513!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29847 invoked from network); 16 Apr 2014 11:03:47 -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;
	16 Apr 2014 11:03:47 -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 1WaNd4-0000nF-2k
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNd4-0000jn-0I
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:46 +0000
Date: Wed, 16 Apr 2014 11:03:46 +0000
Message-Id: <E1WaNd4-0000jn-0I@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/p2m: error code propagation
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 561e1dc85e6176c3d5b0a665b8ed4ff9e33cef1f
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Mon Apr 14 12:47:29 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:47:29 2014 +0200

    x86/p2m: error code propagation
    
    Because some of the leaf p2m functions return 0 for failure and
    TRUE for success, the real errno is lost. We change some of those
    functions to return proper -errno. Also, any code in the immediate
    vicinity that is in coding style violation is fixed up.
    
    This patch doesn't change any functionality.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/domctl.c            |   21 +++++---
 xen/arch/x86/mm/hap/nested_hap.c |   11 ++--
 xen/arch/x86/mm/mem_sharing.c    |   10 ++--
 xen/arch/x86/mm/p2m-ept.c        |   17 ++++---
 xen/arch/x86/mm/p2m-pod.c        |    7 +--
 xen/arch/x86/mm/p2m-pt.c         |   53 ++++++++++---------
 xen/arch/x86/mm/p2m.c            |  104 +++++++++++++++++++-------------------
 7 files changed, 116 insertions(+), 107 deletions(-)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index d626e6f..efe9ef2 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -673,13 +673,12 @@ long arch_do_domctl(
             if ( !ret && paging_mode_translate(d) )
             {
                 for ( i = 0; !ret && i < nr_mfns; i++ )
-                    if ( !set_mmio_p2m_entry(d, gfn + i, _mfn(mfn + i)) )
-                        ret = -EIO;
+                    ret = set_mmio_p2m_entry(d, gfn + i, _mfn(mfn + i));
                 if ( ret )
                 {
                     printk(XENLOG_G_WARNING
-                           "memory_map:fail: dom%d gfn=%lx mfn=%lx\n",
-                           d->domain_id, gfn + i, mfn + i);
+                           "memory_map:fail: dom%d gfn=%lx mfn=%lx ret:%ld\n",
+                           d->domain_id, gfn + i, mfn + i, ret);
                     while ( i-- )
                         clear_mmio_p2m_entry(d, gfn + i);
                     if ( iomem_deny_access(d, mfn, mfn + nr_mfns - 1) &&
@@ -692,20 +691,26 @@ long arch_do_domctl(
         }
         else
         {
+            int tmp_rc = 0;
+
             printk(XENLOG_G_INFO
                    "memory_map:remove: dom%d gfn=%lx mfn=%lx nr=%lx\n",
                    d->domain_id, gfn, mfn, nr_mfns);
 
             if ( paging_mode_translate(d) )
                 for ( i = 0; i < nr_mfns; i++ )
-                    add |= !clear_mmio_p2m_entry(d, gfn + i);
+                {
+                    ret = clear_mmio_p2m_entry(d, gfn + i);
+                    if ( ret )
+                        tmp_rc = ret;
+                }
             ret = iomem_deny_access(d, mfn, mfn + nr_mfns - 1);
-            if ( !ret && add )
-                ret = -EIO;
+            if ( !ret )
+                ret = tmp_rc;
             if ( ret && is_hardware_domain(current->domain) )
                 printk(XENLOG_ERR
                        "memory_map: error %ld %s dom%d access to [%lx,%lx]\n",
-                       ret, add ? "removing" : "denying", d->domain_id,
+                       ret, tmp_rc ? "removing" : "denying", d->domain_id,
                        mfn, mfn + nr_mfns - 1);
         }
         /* Do this unconditionally to cover errors on above failure paths. */
diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c
index 78701dc..5c41725 100644
--- a/xen/arch/x86/mm/hap/nested_hap.c
+++ b/xen/arch/x86/mm/hap/nested_hap.c
@@ -103,7 +103,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct p2m_domain *p2m,
                   paddr_t L2_gpa, paddr_t L0_gpa,
                   unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
-    int rv = 1;
+    int rc = 0;
     ASSERT(p2m);
     ASSERT(p2m->set_entry);
 
@@ -124,15 +124,16 @@ nestedhap_fix_p2m(struct vcpu *v, struct p2m_domain *p2m,
         gfn = (L2_gpa >> PAGE_SHIFT) & mask;
         mfn = _mfn((L0_gpa >> PAGE_SHIFT) & mask);
 
-        rv = p2m_set_entry(p2m, gfn, mfn, page_order, p2mt, p2ma);
+        rc = p2m_set_entry(p2m, gfn, mfn, page_order, p2mt, p2ma);
     }
 
     p2m_unlock(p2m);
 
-    if (rv == 0) {
+    if ( rc )
+    {
         gdprintk(XENLOG_ERR,
-		"failed to set entry for %#"PRIx64" -> %#"PRIx64"\n",
-		L2_gpa, L0_gpa);
+                 "failed to set entry for %#"PRIx64" -> %#"PRIx64" rc:%d\n",
+                 L2_gpa, L0_gpa, rc);
         BUG();
     }
 }
diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 0968681..61f0b22 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -1021,7 +1021,7 @@ int mem_sharing_share_pages(struct domain *sd, unsigned long sgfn, shr_handle_t
         put_page_and_type(cpage);
         d = get_domain_by_id(gfn->domain);
         BUG_ON(!d);
-        BUG_ON(set_shared_p2m_entry(d, gfn->gfn, smfn) == 0);
+        BUG_ON(set_shared_p2m_entry(d, gfn->gfn, smfn));
         put_domain(d);
     }
     ASSERT(list_empty(&cpage->sharing->gfns));
@@ -1095,13 +1095,11 @@ int mem_sharing_add_to_physmap(struct domain *sd, unsigned long sgfn, shr_handle
     ret = p2m_set_entry(p2m, cgfn, smfn, PAGE_ORDER_4K, p2m_ram_shared, a);
 
     /* Tempted to turn this into an assert */
-    if ( !ret )
+    if ( ret )
     {
-        ret = -ENOENT;
         mem_sharing_gfn_destroy(spage, cd, gfn_info);
         put_page_and_type(spage);
     } else {
-        ret = 0;
         /* There is a chance we're plugging a hole where a paged out page was */
         if ( p2m_is_paging(cmfn_type) && (cmfn_type != p2m_ram_paging_out) )
         {
@@ -1232,7 +1230,7 @@ int __mem_sharing_unshare_page(struct domain *d,
     unmap_domain_page(s);
     unmap_domain_page(t);
 
-    BUG_ON(set_shared_p2m_entry(d, gfn, page_to_mfn(page)) == 0);
+    BUG_ON(set_shared_p2m_entry(d, gfn, page_to_mfn(page)));
     mem_sharing_gfn_destroy(old_page, d, gfn_info);
     mem_sharing_page_unlock(old_page);
     put_page_and_type(old_page);
@@ -1288,7 +1286,7 @@ int relinquish_shared_pages(struct domain *d)
              * we hold the p2m lock. */
             set_rc = p2m->set_entry(p2m, gfn, _mfn(0), PAGE_ORDER_4K,
                                     p2m_invalid, p2m_access_rwx);
-            ASSERT(set_rc != 0);
+            ASSERT(set_rc == 0);
             count += 0x10;
         }
         else
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 3f84915..eeb95bb 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -405,6 +405,8 @@ bool_t ept_handle_misconfig(uint64_t gpa)
 /*
  * ept_set_entry() computes 'need_modify_vtd_table' for itself,
  * by observing whether any gfn->mfn translations are modified.
+ *
+ * Returns: 0 for success, -errno for failure
  */
 static int
 ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, 
@@ -413,7 +415,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     ept_entry_t *table, *ept_entry = NULL;
     unsigned long gfn_remainder = gfn;
     int i, target = order / EPT_TABLE_ORDER;
-    int rv = 0;
+    int rc = 0;
     int ret = 0;
     bool_t direct_mmio = (p2mt == p2m_mmio_direct);
     uint8_t ipat = 0;
@@ -435,7 +437,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     if ( ((gfn | mfn_x(mfn)) & ((1UL << order) - 1)) ||
          ((u64)gfn >> ((ept_get_wl(ept) + 1) * EPT_TABLE_ORDER)) ||
          (order % EPT_TABLE_ORDER) )
-        return 0;
+        return -EINVAL;
 
     ASSERT((target == 2 && hvm_hap_has_1gb()) ||
            (target == 1 && hvm_hap_has_2mb()) ||
@@ -447,7 +449,10 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     {
         ret = ept_next_level(p2m, 0, &table, &gfn_remainder, i);
         if ( !ret )
+        {
+            rc = -ENOENT;
             goto out;
+        }
         else if ( ret != GUEST_TABLE_NORMAL_PAGE )
             break;
     }
@@ -494,6 +499,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         if ( !ept_split_super_page(p2m, &split_ept_entry, i, target) )
         {
             ept_free_entry(p2m, &split_ept_entry, i);
+            rc = -ENOMEM;
             goto out;
         }
 
@@ -545,9 +551,6 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
          (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) )
         p2m->max_mapped_pfn = gfn + (1UL << order) - 1;
 
-    /* Success */
-    rv = 1;
-
 out:
     unmap_domain_page(table);
 
@@ -555,7 +558,7 @@ out:
         ept_sync_domain(p2m);
 
     /* For non-nested p2m, may need to change VT-d page table.*/
-    if ( rv && !p2m_is_nestedp2m(p2m) && need_iommu(d) &&
+    if ( rc == 0 && !p2m_is_nestedp2m(p2m) && need_iommu(d) &&
          need_modify_vtd_table )
     {
         if ( iommu_hap_pt_share )
@@ -579,7 +582,7 @@ out:
     if ( is_epte_present(&old_entry) )
         ept_free_entry(p2m, &old_entry, target);
 
-    return rv;
+    return rc;
 }
 
 /* Read ept p2m entries */
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 3c86255..68db937 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -1150,10 +1150,9 @@ guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
     }
 
     /* Now, actually do the two-way mapping */
-    if ( !p2m_set_entry(p2m, gfn, _mfn(0), order,
-                        p2m_populate_on_demand, p2m->default_access) )
-        rc = -EINVAL;
-    else
+    rc = p2m_set_entry(p2m, gfn, _mfn(0), order, p2m_populate_on_demand,
+                       p2m->default_access);
+    if ( rc == 0 )
     {
         pod_lock(p2m);
         p2m->pod.entry_count += 1 << order;
diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c
index 0ad5057..7b07240 100644
--- a/xen/arch/x86/mm/p2m-pt.c
+++ b/xen/arch/x86/mm/p2m-pt.c
@@ -154,6 +154,7 @@ static void p2m_add_iommu_flags(l1_pgentry_t *p2m_entry,
         l1e_add_flags(*p2m_entry, iommu_nlevel_to_flags(nlevel, flags));
 }
 
+/* Returns: 0 for success, -errno for failure */
 static int
 p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
                unsigned long *gfn_remainder, unsigned long gfn, u32 shift,
@@ -167,7 +168,7 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
     if ( !(p2m_entry = p2m_find_entry(*table, gfn_remainder, gfn,
                                       shift, max)) )
-        return 0;
+        return -ENOENT;
 
     /* PoD/paging: Not present doesn't imply empty. */
     if ( !l1e_get_flags(*p2m_entry) )
@@ -176,7 +177,7 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
         pg = p2m_alloc_ptp(p2m, type);
         if ( pg == NULL )
-            return 0;
+            return -ENOMEM;
 
         new_entry = l1e_from_pfn(mfn_x(page_to_mfn(pg)),
                                  __PAGE_HYPERVISOR | _PAGE_USER);
@@ -210,7 +211,7 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
         pg = p2m_alloc_ptp(p2m, PGT_l2_page_table);
         if ( pg == NULL )
-            return 0;
+            return -ENOMEM;
 
         flags = l1e_get_flags(*p2m_entry);
         pfn = l1e_get_pfn(*p2m_entry);
@@ -239,7 +240,7 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
         pg = p2m_alloc_ptp(p2m, PGT_l1_page_table);
         if ( pg == NULL )
-            return 0;
+            return -ENOMEM;
 
         /* New splintered mappings inherit the flags of the old superpage, 
          * with a little reorganisation for the _PAGE_PSE_PAT bit. */
@@ -272,23 +273,23 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
     unmap_domain_page(*table);
     *table = next;
 
-    return 1;
+    return 0;
 }
 
-// Returns 0 on error (out of memory)
+/* Returns: 0 for success, -errno for failure */
 static int
 p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                  unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
-    // XXX -- this might be able to be faster iff current->domain == d
+    /* XXX -- this might be able to be faster iff current->domain == d */
     mfn_t table_mfn = pagetable_get_mfn(p2m_get_pagetable(p2m));
-    void *table =map_domain_page(mfn_x(table_mfn));
+    void *table = map_domain_page(mfn_x(table_mfn));
     unsigned long i, gfn_remainder = gfn;
     l1_pgentry_t *p2m_entry;
     l1_pgentry_t entry_content;
     l2_pgentry_t l2e_content;
     l3_pgentry_t l3e_content;
-    int rv=0;
+    int rc;
     unsigned int iommu_pte_flags = (p2mt == p2m_ram_rw) ?
                                    IOMMUF_readable|IOMMUF_writable:
                                    0; 
@@ -311,9 +312,10 @@ p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         __trace_var(TRC_MEM_SET_P2M_ENTRY, 0, sizeof(t), &t);
     }
 
-    if ( !p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
-                         L4_PAGETABLE_SHIFT - PAGE_SHIFT,
-                         L4_PAGETABLE_ENTRIES, PGT_l3_page_table) )
+    rc = p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
+                        L4_PAGETABLE_SHIFT - PAGE_SHIFT,
+                        L4_PAGETABLE_ENTRIES, PGT_l3_page_table);
+    if ( rc )
         goto out;
 
     /*
@@ -354,17 +356,21 @@ p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         if ( l1e_get_flags(old_entry) & _PAGE_PRESENT )
             p2m_free_entry(p2m, &old_entry, page_order);
     }
-    else if ( !p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
-                              L3_PAGETABLE_SHIFT - PAGE_SHIFT,
-                              L3_PAGETABLE_ENTRIES,
-                              PGT_l2_page_table) )
-        goto out;
+    else 
+    {
+        rc = p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder,
+                            gfn, L3_PAGETABLE_SHIFT - PAGE_SHIFT,
+                            L3_PAGETABLE_ENTRIES, PGT_l2_page_table);
+        if ( rc )
+            goto out;
+    }
 
     if ( page_order == PAGE_ORDER_4K )
     {
-        if ( !p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
-                             L2_PAGETABLE_SHIFT - PAGE_SHIFT,
-                             L2_PAGETABLE_ENTRIES, PGT_l1_page_table) )
+        rc = p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
+                            L2_PAGETABLE_SHIFT - PAGE_SHIFT,
+                            L2_PAGETABLE_ENTRIES, PGT_l1_page_table);
+        if ( rc )
             goto out;
 
         p2m_entry = p2m_find_entry(table, &gfn_remainder, gfn,
@@ -452,12 +458,9 @@ p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         }
     }
 
-    /* Success */
-    rv = 1;
-
-out:
+ out:
     unmap_domain_page(table);
-    return rv;
+    return rc;
 }
 
 static mfn_t
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 35f9a29..8440844 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -320,14 +320,14 @@ struct page_info *get_page_from_gfn_p2m(
     return page;
 }
 
-
+/* Returns: 0 for success, -errno for failure */
 int p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                   unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
     struct domain *d = p2m->domain;
     unsigned long todo = 1ul << page_order;
     unsigned int order;
-    int rc = 1;
+    int set_rc, rc = 0;
 
     ASSERT(gfn_locked_by_me(p2m, gfn));
 
@@ -341,8 +341,10 @@ int p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         else
             order = 0;
 
-        if ( !p2m->set_entry(p2m, gfn, mfn, order, p2mt, p2ma) )
-            rc = 0;
+        set_rc = p2m->set_entry(p2m, gfn, mfn, order, p2mt, p2ma);
+        if ( set_rc )
+            rc = set_rc;
+
         gfn += 1ul << order;
         if ( mfn_x(mfn) != INVALID_MFN )
             mfn = _mfn(mfn_x(mfn) + (1ul << order));
@@ -382,17 +384,19 @@ void p2m_free_ptp(struct p2m_domain *p2m, struct page_info *pg)
     return;
 }
 
-// Allocate a new p2m table for a domain.
-//
-// The structure of the p2m table is that of a pagetable for xen (i.e. it is
-// controlled by CONFIG_PAGING_LEVELS).
-//
-// Returns 0 for success or -errno.
-//
+/*
+ * Allocate a new p2m table for a domain.
+ *
+ * The structure of the p2m table is that of a pagetable for xen (i.e. it is
+ * controlled by CONFIG_PAGING_LEVELS).
+ *
+ * Returns 0 for success, -errno for failure.
+ */
 int p2m_alloc_table(struct p2m_domain *p2m)
 {
     struct page_info *p2m_top;
     struct domain *d = p2m->domain;
+    int rc = 0;
 
     p2m_lock(p2m);
 
@@ -429,8 +433,9 @@ int p2m_alloc_table(struct p2m_domain *p2m)
 
     /* Initialise physmap tables for slot zero. Other code assumes this. */
     p2m->defer_nested_flush = 1;
-    if ( !p2m_set_entry(p2m, 0, _mfn(INVALID_MFN), PAGE_ORDER_4K,
-                        p2m_invalid, p2m->default_access) )
+    rc = p2m_set_entry(p2m, 0, _mfn(INVALID_MFN), PAGE_ORDER_4K,
+                       p2m_invalid, p2m->default_access);
+    if ( rc )
         goto error;
     p2m->defer_nested_flush = 0;
 
@@ -440,9 +445,9 @@ int p2m_alloc_table(struct p2m_domain *p2m)
 
     spin_unlock(&p2m->domain->page_alloc_lock);
  error:
-    P2M_PRINTK("failed to initialise p2m table for slot zero\n");
+    P2M_PRINTK("failed to initialise p2m table for slot zero. rc:%d\n", rc);
     p2m_unlock(p2m);
-    return -ENOMEM;
+    return rc;
 }
 
 void p2m_teardown(struct p2m_domain *p2m)
@@ -648,12 +653,11 @@ guest_physmap_add_entry(struct domain *d, unsigned long gfn,
     /* Now, actually do the two-way mapping */
     if ( mfn_valid(_mfn(mfn)) ) 
     {
-        if ( !p2m_set_entry(p2m, gfn, _mfn(mfn), page_order, t,
-                            p2m->default_access) )
-        {
-            rc = -EINVAL;
+        rc = p2m_set_entry(p2m, gfn, _mfn(mfn), page_order, t,
+                           p2m->default_access);
+        if ( rc )
             goto out; /* Failed to update p2m, bail without updating m2p. */
-        }
+
         if ( !p2m_is_grant(t) )
         {
             for ( i = 0; i < (1UL << page_order); i++ )
@@ -664,10 +668,9 @@ guest_physmap_add_entry(struct domain *d, unsigned long gfn,
     {
         gdprintk(XENLOG_WARNING, "Adding bad mfn to p2m map (%#lx -> %#lx)\n",
                  gfn, mfn);
-        if ( !p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), page_order,
-                            p2m_invalid, p2m->default_access) )
-            rc = -EINVAL;
-        else
+        rc = p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), page_order,
+                           p2m_invalid, p2m->default_access);
+        if ( rc == 0 )
         {
             pod_lock(p2m);
             p2m->pod.entry_count -= pod_count;
@@ -754,9 +757,8 @@ void p2m_change_type_range(struct domain *d,
 }
 
 
-
-int
-set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+/* Returns: 0 for success, -errno for failure */
+int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
 {
     int rc = 0;
     p2m_access_t a;
@@ -765,7 +767,7 @@ set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
 
     if ( !paging_mode_translate(d) )
-        return 0;
+        return -EIO;
 
     gfn_lock(p2m, gfn, 0);
     omfn = p2m->get_entry(p2m, gfn, &ot, &a, 0, NULL);
@@ -773,7 +775,7 @@ set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     {
         p2m_unlock(p2m);
         domain_crash(d);
-        return 0;
+        return -ENOENT;
     }
     else if ( p2m_is_ram(ot) )
     {
@@ -785,24 +787,24 @@ set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_mmio_direct,
                        p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
-    if ( 0 == rc )
+    if ( rc )
         gdprintk(XENLOG_ERR,
-            "set_mmio_p2m_entry: p2m_set_entry failed! mfn=%08lx\n",
-            mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)));
+                 "p2m_set_entry failed! mfn=%08lx rc:%d\n",
+                 mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)), rc);
     return rc;
 }
 
-int
-clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
+/* Returns: 0 for success, -errno for failure */
+int clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
 {
-    int rc = 0;
+    int rc = -EINVAL;
     mfn_t mfn;
     p2m_access_t a;
     p2m_type_t t;
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
 
     if ( !paging_mode_translate(d) )
-        return 0;
+        return -EIO;
 
     gfn_lock(p2m, gfn, 0);
     mfn = p2m->get_entry(p2m, gfn, &t, &a, 0, NULL);
@@ -811,20 +813,20 @@ clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
     if ( (INVALID_MFN == mfn_x(mfn)) || (t != p2m_mmio_direct) )
     {
         gdprintk(XENLOG_ERR,
-            "clear_mmio_p2m_entry: gfn_to_mfn failed! gfn=%08lx\n", gfn);
+                 "gfn_to_mfn failed! gfn=%08lx type:%d\n", gfn, t);
         goto out;
     }
     rc = p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_invalid,
                        p2m->default_access);
 
-out:
+ out:
     gfn_unlock(p2m, gfn, 0);
 
     return rc;
 }
 
-int
-set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+/* Returns: 0 for success, -errno for failure */
+int set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
     int rc = 0;
@@ -834,7 +836,7 @@ set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     unsigned long pg_type;
 
     if ( !paging_mode_translate(p2m->domain) )
-        return 0;
+        return -EIO;
 
     gfn_lock(p2m, gfn, 0);
     omfn = p2m->get_entry(p2m, gfn, &ot, &a, 0, NULL);
@@ -853,10 +855,10 @@ set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_shared,
                        p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
-    if ( 0 == rc )
+    if ( rc )
         gdprintk(XENLOG_ERR,
-            "set_shared_p2m_entry: p2m_set_entry failed! mfn=%08lx\n",
-            mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)));
+                 "p2m_set_entry failed! mfn=%08lx rc:%d\n",
+                 mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)), rc);
     return rc;
 }
 
@@ -1275,7 +1277,7 @@ bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla,
     if ( access_w && p2ma == p2m_access_rx2rw ) 
     {
         rc = p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2mt, p2m_access_rw);
-        ASSERT(rc);
+        ASSERT(rc == 0);
         gfn_unlock(p2m, gfn, 0);
         return 1;
     }
@@ -1284,7 +1286,7 @@ bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla,
         ASSERT(access_w || access_r || access_x);
         rc = p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K,
                             p2mt, p2m_access_rwx);
-        ASSERT(rc);
+        ASSERT(rc == 0);
     }
     gfn_unlock(p2m, gfn, 0);
 
@@ -1311,7 +1313,7 @@ bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla,
                  * gfn locked and just did a successful get_entry(). */
                 rc = p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K,
                                     p2mt, p2m_access_rwx);
-                ASSERT(rc);
+                ASSERT(rc == 0);
             }
             gfn_unlock(p2m, gfn, 0);
             return 1;
@@ -1413,13 +1415,11 @@ long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
     for ( pfn += start; nr > start; ++pfn )
     {
         mfn = p2m->get_entry(p2m, pfn, &t, &_a, 0, NULL);
-        if ( p2m->set_entry(p2m, pfn, mfn, PAGE_ORDER_4K, t, a) == 0 )
-        {
-            rc = -ENOMEM;
+        rc = p2m->set_entry(p2m, pfn, mfn, PAGE_ORDER_4K, t, a);
+        if ( rc )
             break;
-        }
 
-        /* Check for continuation if it's not the last interation. */
+        /* Check for continuation if it's not the last iteration. */
         if ( nr > ++start && !(start & mask) && hypercall_preempt_check() )
         {
             rc = start;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:51 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03:51 +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 1WaNd8-0007hT-Qc; Wed, 16 Apr 2014 11:03:50 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNd7-0007hD-Ga
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:49 +0000
Received: from [193.109.254.147:39335] by server-1.bemta-14.messagelabs.com id
	9D/88-00839-4936E435; Wed, 16 Apr 2014 11:03:48 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397646226!8609513!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29847 invoked from network); 16 Apr 2014 11:03:47 -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;
	16 Apr 2014 11:03:47 -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 1WaNd4-0000nF-2k
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:46 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNd4-0000jn-0I
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:46 +0000
Date: Wed, 16 Apr 2014 11:03:46 +0000
Message-Id: <E1WaNd4-0000jn-0I@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/p2m: error code propagation
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 561e1dc85e6176c3d5b0a665b8ed4ff9e33cef1f
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Mon Apr 14 12:47:29 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:47:29 2014 +0200

    x86/p2m: error code propagation
    
    Because some of the leaf p2m functions return 0 for failure and
    TRUE for success, the real errno is lost. We change some of those
    functions to return proper -errno. Also, any code in the immediate
    vicinity that is in coding style violation is fixed up.
    
    This patch doesn't change any functionality.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/domctl.c            |   21 +++++---
 xen/arch/x86/mm/hap/nested_hap.c |   11 ++--
 xen/arch/x86/mm/mem_sharing.c    |   10 ++--
 xen/arch/x86/mm/p2m-ept.c        |   17 ++++---
 xen/arch/x86/mm/p2m-pod.c        |    7 +--
 xen/arch/x86/mm/p2m-pt.c         |   53 ++++++++++---------
 xen/arch/x86/mm/p2m.c            |  104 +++++++++++++++++++-------------------
 7 files changed, 116 insertions(+), 107 deletions(-)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index d626e6f..efe9ef2 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -673,13 +673,12 @@ long arch_do_domctl(
             if ( !ret && paging_mode_translate(d) )
             {
                 for ( i = 0; !ret && i < nr_mfns; i++ )
-                    if ( !set_mmio_p2m_entry(d, gfn + i, _mfn(mfn + i)) )
-                        ret = -EIO;
+                    ret = set_mmio_p2m_entry(d, gfn + i, _mfn(mfn + i));
                 if ( ret )
                 {
                     printk(XENLOG_G_WARNING
-                           "memory_map:fail: dom%d gfn=%lx mfn=%lx\n",
-                           d->domain_id, gfn + i, mfn + i);
+                           "memory_map:fail: dom%d gfn=%lx mfn=%lx ret:%ld\n",
+                           d->domain_id, gfn + i, mfn + i, ret);
                     while ( i-- )
                         clear_mmio_p2m_entry(d, gfn + i);
                     if ( iomem_deny_access(d, mfn, mfn + nr_mfns - 1) &&
@@ -692,20 +691,26 @@ long arch_do_domctl(
         }
         else
         {
+            int tmp_rc = 0;
+
             printk(XENLOG_G_INFO
                    "memory_map:remove: dom%d gfn=%lx mfn=%lx nr=%lx\n",
                    d->domain_id, gfn, mfn, nr_mfns);
 
             if ( paging_mode_translate(d) )
                 for ( i = 0; i < nr_mfns; i++ )
-                    add |= !clear_mmio_p2m_entry(d, gfn + i);
+                {
+                    ret = clear_mmio_p2m_entry(d, gfn + i);
+                    if ( ret )
+                        tmp_rc = ret;
+                }
             ret = iomem_deny_access(d, mfn, mfn + nr_mfns - 1);
-            if ( !ret && add )
-                ret = -EIO;
+            if ( !ret )
+                ret = tmp_rc;
             if ( ret && is_hardware_domain(current->domain) )
                 printk(XENLOG_ERR
                        "memory_map: error %ld %s dom%d access to [%lx,%lx]\n",
-                       ret, add ? "removing" : "denying", d->domain_id,
+                       ret, tmp_rc ? "removing" : "denying", d->domain_id,
                        mfn, mfn + nr_mfns - 1);
         }
         /* Do this unconditionally to cover errors on above failure paths. */
diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c
index 78701dc..5c41725 100644
--- a/xen/arch/x86/mm/hap/nested_hap.c
+++ b/xen/arch/x86/mm/hap/nested_hap.c
@@ -103,7 +103,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct p2m_domain *p2m,
                   paddr_t L2_gpa, paddr_t L0_gpa,
                   unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
-    int rv = 1;
+    int rc = 0;
     ASSERT(p2m);
     ASSERT(p2m->set_entry);
 
@@ -124,15 +124,16 @@ nestedhap_fix_p2m(struct vcpu *v, struct p2m_domain *p2m,
         gfn = (L2_gpa >> PAGE_SHIFT) & mask;
         mfn = _mfn((L0_gpa >> PAGE_SHIFT) & mask);
 
-        rv = p2m_set_entry(p2m, gfn, mfn, page_order, p2mt, p2ma);
+        rc = p2m_set_entry(p2m, gfn, mfn, page_order, p2mt, p2ma);
     }
 
     p2m_unlock(p2m);
 
-    if (rv == 0) {
+    if ( rc )
+    {
         gdprintk(XENLOG_ERR,
-		"failed to set entry for %#"PRIx64" -> %#"PRIx64"\n",
-		L2_gpa, L0_gpa);
+                 "failed to set entry for %#"PRIx64" -> %#"PRIx64" rc:%d\n",
+                 L2_gpa, L0_gpa, rc);
         BUG();
     }
 }
diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index 0968681..61f0b22 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -1021,7 +1021,7 @@ int mem_sharing_share_pages(struct domain *sd, unsigned long sgfn, shr_handle_t
         put_page_and_type(cpage);
         d = get_domain_by_id(gfn->domain);
         BUG_ON(!d);
-        BUG_ON(set_shared_p2m_entry(d, gfn->gfn, smfn) == 0);
+        BUG_ON(set_shared_p2m_entry(d, gfn->gfn, smfn));
         put_domain(d);
     }
     ASSERT(list_empty(&cpage->sharing->gfns));
@@ -1095,13 +1095,11 @@ int mem_sharing_add_to_physmap(struct domain *sd, unsigned long sgfn, shr_handle
     ret = p2m_set_entry(p2m, cgfn, smfn, PAGE_ORDER_4K, p2m_ram_shared, a);
 
     /* Tempted to turn this into an assert */
-    if ( !ret )
+    if ( ret )
     {
-        ret = -ENOENT;
         mem_sharing_gfn_destroy(spage, cd, gfn_info);
         put_page_and_type(spage);
     } else {
-        ret = 0;
         /* There is a chance we're plugging a hole where a paged out page was */
         if ( p2m_is_paging(cmfn_type) && (cmfn_type != p2m_ram_paging_out) )
         {
@@ -1232,7 +1230,7 @@ int __mem_sharing_unshare_page(struct domain *d,
     unmap_domain_page(s);
     unmap_domain_page(t);
 
-    BUG_ON(set_shared_p2m_entry(d, gfn, page_to_mfn(page)) == 0);
+    BUG_ON(set_shared_p2m_entry(d, gfn, page_to_mfn(page)));
     mem_sharing_gfn_destroy(old_page, d, gfn_info);
     mem_sharing_page_unlock(old_page);
     put_page_and_type(old_page);
@@ -1288,7 +1286,7 @@ int relinquish_shared_pages(struct domain *d)
              * we hold the p2m lock. */
             set_rc = p2m->set_entry(p2m, gfn, _mfn(0), PAGE_ORDER_4K,
                                     p2m_invalid, p2m_access_rwx);
-            ASSERT(set_rc != 0);
+            ASSERT(set_rc == 0);
             count += 0x10;
         }
         else
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 3f84915..eeb95bb 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -405,6 +405,8 @@ bool_t ept_handle_misconfig(uint64_t gpa)
 /*
  * ept_set_entry() computes 'need_modify_vtd_table' for itself,
  * by observing whether any gfn->mfn translations are modified.
+ *
+ * Returns: 0 for success, -errno for failure
  */
 static int
 ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, 
@@ -413,7 +415,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     ept_entry_t *table, *ept_entry = NULL;
     unsigned long gfn_remainder = gfn;
     int i, target = order / EPT_TABLE_ORDER;
-    int rv = 0;
+    int rc = 0;
     int ret = 0;
     bool_t direct_mmio = (p2mt == p2m_mmio_direct);
     uint8_t ipat = 0;
@@ -435,7 +437,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     if ( ((gfn | mfn_x(mfn)) & ((1UL << order) - 1)) ||
          ((u64)gfn >> ((ept_get_wl(ept) + 1) * EPT_TABLE_ORDER)) ||
          (order % EPT_TABLE_ORDER) )
-        return 0;
+        return -EINVAL;
 
     ASSERT((target == 2 && hvm_hap_has_1gb()) ||
            (target == 1 && hvm_hap_has_2mb()) ||
@@ -447,7 +449,10 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
     {
         ret = ept_next_level(p2m, 0, &table, &gfn_remainder, i);
         if ( !ret )
+        {
+            rc = -ENOENT;
             goto out;
+        }
         else if ( ret != GUEST_TABLE_NORMAL_PAGE )
             break;
     }
@@ -494,6 +499,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         if ( !ept_split_super_page(p2m, &split_ept_entry, i, target) )
         {
             ept_free_entry(p2m, &split_ept_entry, i);
+            rc = -ENOMEM;
             goto out;
         }
 
@@ -545,9 +551,6 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
          (gfn + (1UL << order) - 1 > p2m->max_mapped_pfn) )
         p2m->max_mapped_pfn = gfn + (1UL << order) - 1;
 
-    /* Success */
-    rv = 1;
-
 out:
     unmap_domain_page(table);
 
@@ -555,7 +558,7 @@ out:
         ept_sync_domain(p2m);
 
     /* For non-nested p2m, may need to change VT-d page table.*/
-    if ( rv && !p2m_is_nestedp2m(p2m) && need_iommu(d) &&
+    if ( rc == 0 && !p2m_is_nestedp2m(p2m) && need_iommu(d) &&
          need_modify_vtd_table )
     {
         if ( iommu_hap_pt_share )
@@ -579,7 +582,7 @@ out:
     if ( is_epte_present(&old_entry) )
         ept_free_entry(p2m, &old_entry, target);
 
-    return rv;
+    return rc;
 }
 
 /* Read ept p2m entries */
diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c
index 3c86255..68db937 100644
--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -1150,10 +1150,9 @@ guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
     }
 
     /* Now, actually do the two-way mapping */
-    if ( !p2m_set_entry(p2m, gfn, _mfn(0), order,
-                        p2m_populate_on_demand, p2m->default_access) )
-        rc = -EINVAL;
-    else
+    rc = p2m_set_entry(p2m, gfn, _mfn(0), order, p2m_populate_on_demand,
+                       p2m->default_access);
+    if ( rc == 0 )
     {
         pod_lock(p2m);
         p2m->pod.entry_count += 1 << order;
diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c
index 0ad5057..7b07240 100644
--- a/xen/arch/x86/mm/p2m-pt.c
+++ b/xen/arch/x86/mm/p2m-pt.c
@@ -154,6 +154,7 @@ static void p2m_add_iommu_flags(l1_pgentry_t *p2m_entry,
         l1e_add_flags(*p2m_entry, iommu_nlevel_to_flags(nlevel, flags));
 }
 
+/* Returns: 0 for success, -errno for failure */
 static int
 p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
                unsigned long *gfn_remainder, unsigned long gfn, u32 shift,
@@ -167,7 +168,7 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
     if ( !(p2m_entry = p2m_find_entry(*table, gfn_remainder, gfn,
                                       shift, max)) )
-        return 0;
+        return -ENOENT;
 
     /* PoD/paging: Not present doesn't imply empty. */
     if ( !l1e_get_flags(*p2m_entry) )
@@ -176,7 +177,7 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
         pg = p2m_alloc_ptp(p2m, type);
         if ( pg == NULL )
-            return 0;
+            return -ENOMEM;
 
         new_entry = l1e_from_pfn(mfn_x(page_to_mfn(pg)),
                                  __PAGE_HYPERVISOR | _PAGE_USER);
@@ -210,7 +211,7 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
         pg = p2m_alloc_ptp(p2m, PGT_l2_page_table);
         if ( pg == NULL )
-            return 0;
+            return -ENOMEM;
 
         flags = l1e_get_flags(*p2m_entry);
         pfn = l1e_get_pfn(*p2m_entry);
@@ -239,7 +240,7 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
 
         pg = p2m_alloc_ptp(p2m, PGT_l1_page_table);
         if ( pg == NULL )
-            return 0;
+            return -ENOMEM;
 
         /* New splintered mappings inherit the flags of the old superpage, 
          * with a little reorganisation for the _PAGE_PSE_PAT bit. */
@@ -272,23 +273,23 @@ p2m_next_level(struct p2m_domain *p2m, mfn_t *table_mfn, void **table,
     unmap_domain_page(*table);
     *table = next;
 
-    return 1;
+    return 0;
 }
 
-// Returns 0 on error (out of memory)
+/* Returns: 0 for success, -errno for failure */
 static int
 p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                  unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
-    // XXX -- this might be able to be faster iff current->domain == d
+    /* XXX -- this might be able to be faster iff current->domain == d */
     mfn_t table_mfn = pagetable_get_mfn(p2m_get_pagetable(p2m));
-    void *table =map_domain_page(mfn_x(table_mfn));
+    void *table = map_domain_page(mfn_x(table_mfn));
     unsigned long i, gfn_remainder = gfn;
     l1_pgentry_t *p2m_entry;
     l1_pgentry_t entry_content;
     l2_pgentry_t l2e_content;
     l3_pgentry_t l3e_content;
-    int rv=0;
+    int rc;
     unsigned int iommu_pte_flags = (p2mt == p2m_ram_rw) ?
                                    IOMMUF_readable|IOMMUF_writable:
                                    0; 
@@ -311,9 +312,10 @@ p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         __trace_var(TRC_MEM_SET_P2M_ENTRY, 0, sizeof(t), &t);
     }
 
-    if ( !p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
-                         L4_PAGETABLE_SHIFT - PAGE_SHIFT,
-                         L4_PAGETABLE_ENTRIES, PGT_l3_page_table) )
+    rc = p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
+                        L4_PAGETABLE_SHIFT - PAGE_SHIFT,
+                        L4_PAGETABLE_ENTRIES, PGT_l3_page_table);
+    if ( rc )
         goto out;
 
     /*
@@ -354,17 +356,21 @@ p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         if ( l1e_get_flags(old_entry) & _PAGE_PRESENT )
             p2m_free_entry(p2m, &old_entry, page_order);
     }
-    else if ( !p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
-                              L3_PAGETABLE_SHIFT - PAGE_SHIFT,
-                              L3_PAGETABLE_ENTRIES,
-                              PGT_l2_page_table) )
-        goto out;
+    else 
+    {
+        rc = p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder,
+                            gfn, L3_PAGETABLE_SHIFT - PAGE_SHIFT,
+                            L3_PAGETABLE_ENTRIES, PGT_l2_page_table);
+        if ( rc )
+            goto out;
+    }
 
     if ( page_order == PAGE_ORDER_4K )
     {
-        if ( !p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
-                             L2_PAGETABLE_SHIFT - PAGE_SHIFT,
-                             L2_PAGETABLE_ENTRIES, PGT_l1_page_table) )
+        rc = p2m_next_level(p2m, &table_mfn, &table, &gfn_remainder, gfn,
+                            L2_PAGETABLE_SHIFT - PAGE_SHIFT,
+                            L2_PAGETABLE_ENTRIES, PGT_l1_page_table);
+        if ( rc )
             goto out;
 
         p2m_entry = p2m_find_entry(table, &gfn_remainder, gfn,
@@ -452,12 +458,9 @@ p2m_pt_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         }
     }
 
-    /* Success */
-    rv = 1;
-
-out:
+ out:
     unmap_domain_page(table);
-    return rv;
+    return rc;
 }
 
 static mfn_t
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 35f9a29..8440844 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -320,14 +320,14 @@ struct page_info *get_page_from_gfn_p2m(
     return page;
 }
 
-
+/* Returns: 0 for success, -errno for failure */
 int p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
                   unsigned int page_order, p2m_type_t p2mt, p2m_access_t p2ma)
 {
     struct domain *d = p2m->domain;
     unsigned long todo = 1ul << page_order;
     unsigned int order;
-    int rc = 1;
+    int set_rc, rc = 0;
 
     ASSERT(gfn_locked_by_me(p2m, gfn));
 
@@ -341,8 +341,10 @@ int p2m_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
         else
             order = 0;
 
-        if ( !p2m->set_entry(p2m, gfn, mfn, order, p2mt, p2ma) )
-            rc = 0;
+        set_rc = p2m->set_entry(p2m, gfn, mfn, order, p2mt, p2ma);
+        if ( set_rc )
+            rc = set_rc;
+
         gfn += 1ul << order;
         if ( mfn_x(mfn) != INVALID_MFN )
             mfn = _mfn(mfn_x(mfn) + (1ul << order));
@@ -382,17 +384,19 @@ void p2m_free_ptp(struct p2m_domain *p2m, struct page_info *pg)
     return;
 }
 
-// Allocate a new p2m table for a domain.
-//
-// The structure of the p2m table is that of a pagetable for xen (i.e. it is
-// controlled by CONFIG_PAGING_LEVELS).
-//
-// Returns 0 for success or -errno.
-//
+/*
+ * Allocate a new p2m table for a domain.
+ *
+ * The structure of the p2m table is that of a pagetable for xen (i.e. it is
+ * controlled by CONFIG_PAGING_LEVELS).
+ *
+ * Returns 0 for success, -errno for failure.
+ */
 int p2m_alloc_table(struct p2m_domain *p2m)
 {
     struct page_info *p2m_top;
     struct domain *d = p2m->domain;
+    int rc = 0;
 
     p2m_lock(p2m);
 
@@ -429,8 +433,9 @@ int p2m_alloc_table(struct p2m_domain *p2m)
 
     /* Initialise physmap tables for slot zero. Other code assumes this. */
     p2m->defer_nested_flush = 1;
-    if ( !p2m_set_entry(p2m, 0, _mfn(INVALID_MFN), PAGE_ORDER_4K,
-                        p2m_invalid, p2m->default_access) )
+    rc = p2m_set_entry(p2m, 0, _mfn(INVALID_MFN), PAGE_ORDER_4K,
+                       p2m_invalid, p2m->default_access);
+    if ( rc )
         goto error;
     p2m->defer_nested_flush = 0;
 
@@ -440,9 +445,9 @@ int p2m_alloc_table(struct p2m_domain *p2m)
 
     spin_unlock(&p2m->domain->page_alloc_lock);
  error:
-    P2M_PRINTK("failed to initialise p2m table for slot zero\n");
+    P2M_PRINTK("failed to initialise p2m table for slot zero. rc:%d\n", rc);
     p2m_unlock(p2m);
-    return -ENOMEM;
+    return rc;
 }
 
 void p2m_teardown(struct p2m_domain *p2m)
@@ -648,12 +653,11 @@ guest_physmap_add_entry(struct domain *d, unsigned long gfn,
     /* Now, actually do the two-way mapping */
     if ( mfn_valid(_mfn(mfn)) ) 
     {
-        if ( !p2m_set_entry(p2m, gfn, _mfn(mfn), page_order, t,
-                            p2m->default_access) )
-        {
-            rc = -EINVAL;
+        rc = p2m_set_entry(p2m, gfn, _mfn(mfn), page_order, t,
+                           p2m->default_access);
+        if ( rc )
             goto out; /* Failed to update p2m, bail without updating m2p. */
-        }
+
         if ( !p2m_is_grant(t) )
         {
             for ( i = 0; i < (1UL << page_order); i++ )
@@ -664,10 +668,9 @@ guest_physmap_add_entry(struct domain *d, unsigned long gfn,
     {
         gdprintk(XENLOG_WARNING, "Adding bad mfn to p2m map (%#lx -> %#lx)\n",
                  gfn, mfn);
-        if ( !p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), page_order,
-                            p2m_invalid, p2m->default_access) )
-            rc = -EINVAL;
-        else
+        rc = p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), page_order,
+                           p2m_invalid, p2m->default_access);
+        if ( rc == 0 )
         {
             pod_lock(p2m);
             p2m->pod.entry_count -= pod_count;
@@ -754,9 +757,8 @@ void p2m_change_type_range(struct domain *d,
 }
 
 
-
-int
-set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+/* Returns: 0 for success, -errno for failure */
+int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
 {
     int rc = 0;
     p2m_access_t a;
@@ -765,7 +767,7 @@ set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
 
     if ( !paging_mode_translate(d) )
-        return 0;
+        return -EIO;
 
     gfn_lock(p2m, gfn, 0);
     omfn = p2m->get_entry(p2m, gfn, &ot, &a, 0, NULL);
@@ -773,7 +775,7 @@ set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     {
         p2m_unlock(p2m);
         domain_crash(d);
-        return 0;
+        return -ENOENT;
     }
     else if ( p2m_is_ram(ot) )
     {
@@ -785,24 +787,24 @@ set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_mmio_direct,
                        p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
-    if ( 0 == rc )
+    if ( rc )
         gdprintk(XENLOG_ERR,
-            "set_mmio_p2m_entry: p2m_set_entry failed! mfn=%08lx\n",
-            mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)));
+                 "p2m_set_entry failed! mfn=%08lx rc:%d\n",
+                 mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)), rc);
     return rc;
 }
 
-int
-clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
+/* Returns: 0 for success, -errno for failure */
+int clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
 {
-    int rc = 0;
+    int rc = -EINVAL;
     mfn_t mfn;
     p2m_access_t a;
     p2m_type_t t;
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
 
     if ( !paging_mode_translate(d) )
-        return 0;
+        return -EIO;
 
     gfn_lock(p2m, gfn, 0);
     mfn = p2m->get_entry(p2m, gfn, &t, &a, 0, NULL);
@@ -811,20 +813,20 @@ clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
     if ( (INVALID_MFN == mfn_x(mfn)) || (t != p2m_mmio_direct) )
     {
         gdprintk(XENLOG_ERR,
-            "clear_mmio_p2m_entry: gfn_to_mfn failed! gfn=%08lx\n", gfn);
+                 "gfn_to_mfn failed! gfn=%08lx type:%d\n", gfn, t);
         goto out;
     }
     rc = p2m_set_entry(p2m, gfn, _mfn(INVALID_MFN), PAGE_ORDER_4K, p2m_invalid,
                        p2m->default_access);
 
-out:
+ out:
     gfn_unlock(p2m, gfn, 0);
 
     return rc;
 }
 
-int
-set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+/* Returns: 0 for success, -errno for failure */
+int set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
     int rc = 0;
@@ -834,7 +836,7 @@ set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     unsigned long pg_type;
 
     if ( !paging_mode_translate(p2m->domain) )
-        return 0;
+        return -EIO;
 
     gfn_lock(p2m, gfn, 0);
     omfn = p2m->get_entry(p2m, gfn, &ot, &a, 0, NULL);
@@ -853,10 +855,10 @@ set_shared_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_shared,
                        p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
-    if ( 0 == rc )
+    if ( rc )
         gdprintk(XENLOG_ERR,
-            "set_shared_p2m_entry: p2m_set_entry failed! mfn=%08lx\n",
-            mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)));
+                 "p2m_set_entry failed! mfn=%08lx rc:%d\n",
+                 mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)), rc);
     return rc;
 }
 
@@ -1275,7 +1277,7 @@ bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla,
     if ( access_w && p2ma == p2m_access_rx2rw ) 
     {
         rc = p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2mt, p2m_access_rw);
-        ASSERT(rc);
+        ASSERT(rc == 0);
         gfn_unlock(p2m, gfn, 0);
         return 1;
     }
@@ -1284,7 +1286,7 @@ bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla,
         ASSERT(access_w || access_r || access_x);
         rc = p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K,
                             p2mt, p2m_access_rwx);
-        ASSERT(rc);
+        ASSERT(rc == 0);
     }
     gfn_unlock(p2m, gfn, 0);
 
@@ -1311,7 +1313,7 @@ bool_t p2m_mem_access_check(paddr_t gpa, bool_t gla_valid, unsigned long gla,
                  * gfn locked and just did a successful get_entry(). */
                 rc = p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K,
                                     p2mt, p2m_access_rwx);
-                ASSERT(rc);
+                ASSERT(rc == 0);
             }
             gfn_unlock(p2m, gfn, 0);
             return 1;
@@ -1413,13 +1415,11 @@ long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr,
     for ( pfn += start; nr > start; ++pfn )
     {
         mfn = p2m->get_entry(p2m, pfn, &t, &_a, 0, NULL);
-        if ( p2m->set_entry(p2m, pfn, mfn, PAGE_ORDER_4K, t, a) == 0 )
-        {
-            rc = -ENOMEM;
+        rc = p2m->set_entry(p2m, pfn, mfn, PAGE_ORDER_4K, t, a);
+        if ( rc )
             break;
-        }
 
-        /* Check for continuation if it's not the last interation. */
+        /* Check for continuation if it's not the last iteration. */
         if ( nr > ++start && !(start & mask) && hypercall_preempt_check() )
         {
             rc = start;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03:59 +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 1WaNdH-0007j0-TS; Wed, 16 Apr 2014 11:03:59 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdG-0007im-Tp
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:59 +0000
Received: from [85.158.139.211:53899] by server-16.bemta-5.messagelabs.com id
	6D/48-19700-E936E435; Wed, 16 Apr 2014 11:03:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1397646236!7816771!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19718 invoked from network); 16 Apr 2014 11:03:57 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:03:57 -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 1WaNdE-0000nO-7u
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdE-0000kO-6H
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:56 +0000
Date: Wed, 16 Apr 2014 11:03:56 +0000
Message-Id: <E1WaNdE-0000kO-6H@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/nested HAP: don't BUG() on
	legitimate 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

commit 1ca73aaf51eba14256794bf045c2eb01e88e1324
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Apr 14 12:50:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:50:56 2014 +0200

    x86/nested HAP: don't BUG() on legitimate error
    
    p2m_set_entry() can fail without there being a bug in the code - crash
    the domain rather than the host in that case.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/hap/nested_hap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c
index 5c41725..9d8bfc8 100644
--- a/xen/arch/x86/mm/hap/nested_hap.c
+++ b/xen/arch/x86/mm/hap/nested_hap.c
@@ -134,7 +134,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct p2m_domain *p2m,
         gdprintk(XENLOG_ERR,
                  "failed to set entry for %#"PRIx64" -> %#"PRIx64" rc:%d\n",
                  L2_gpa, L0_gpa, rc);
-        BUG();
+        domain_crash(p2m->domain);
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:03:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:03:59 +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 1WaNdH-0007j0-TS; Wed, 16 Apr 2014 11:03:59 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdG-0007im-Tp
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:59 +0000
Received: from [85.158.139.211:53899] by server-16.bemta-5.messagelabs.com id
	6D/48-19700-E936E435; Wed, 16 Apr 2014 11:03:58 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-206.messagelabs.com!1397646236!7816771!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19718 invoked from network); 16 Apr 2014 11:03:57 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:03:57 -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 1WaNdE-0000nO-7u
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:56 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdE-0000kO-6H
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:03:56 +0000
Date: Wed, 16 Apr 2014 11:03:56 +0000
Message-Id: <E1WaNdE-0000kO-6H@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/nested HAP: don't BUG() on
	legitimate 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

commit 1ca73aaf51eba14256794bf045c2eb01e88e1324
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Apr 14 12:50:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 12:50:56 2014 +0200

    x86/nested HAP: don't BUG() on legitimate error
    
    p2m_set_entry() can fail without there being a bug in the code - crash
    the domain rather than the host in that case.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/hap/nested_hap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c
index 5c41725..9d8bfc8 100644
--- a/xen/arch/x86/mm/hap/nested_hap.c
+++ b/xen/arch/x86/mm/hap/nested_hap.c
@@ -134,7 +134,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct p2m_domain *p2m,
         gdprintk(XENLOG_ERR,
                  "failed to set entry for %#"PRIx64" -> %#"PRIx64" rc:%d\n",
                  L2_gpa, L0_gpa, rc);
-        BUG();
+        domain_crash(p2m->domain);
     }
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:04:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:04:11 +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 1WaNdS-0007ke-W7; Wed, 16 Apr 2014 11:04:10 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdR-0007kM-5x
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:09 +0000
Received: from [85.158.137.68:36352] by server-11.bemta-3.messagelabs.com id
	4C/FB-19438-8A36E435; Wed, 16 Apr 2014 11:04:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1397646246!7307927!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1267 invoked from network); 16 Apr 2014 11:04:07 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:04:07 -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 1WaNdO-0000nx-GF
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdO-0000l9-Cv
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:06 +0000
Date: Wed, 16 Apr 2014 11:04:06 +0000
Message-Id: <E1WaNdO-0000l9-Cv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] MAINTAINERS: extend coverage for "THE
	REST"
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 f73e225ac5d3f1428e6b55721b9d97a7383d9444
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Apr 14 15:13:33 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 15:13:33 2014 +0200

    MAINTAINERS: extend coverage for "THE REST"
    
    As agreed upon in offlist discussion among the committers, make all
    committers eligible to approve changes to code not having its
    maintainership covered explicitly. (For committers to make changes to
    such code, generally an ack from a second committer is going to be
    required.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 MAINTAINERS |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 06d2368..3508f18 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -347,7 +347,11 @@ F:  xen/xsm/
 F:  docs/misc/xsm-flask.txt
 
 THE REST
+M:	Ian Campbell <ian.campbell@citrix.com>
+M:	Ian Jackson <ian.jackson@eu.citrix.com>
+M:	Jan Beulich <jbeulich@suse.com>
 M:	Keir Fraser <keir@xen.org>
+M:	Tim Deegan <tim@xen.org>
 L:	xen-devel@lists.xen.org
 S:	Supported
 F:	*
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:04:11 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:04:11 +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 1WaNdS-0007ke-W7; Wed, 16 Apr 2014 11:04:10 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdR-0007kM-5x
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:09 +0000
Received: from [85.158.137.68:36352] by server-11.bemta-3.messagelabs.com id
	4C/FB-19438-8A36E435; Wed, 16 Apr 2014 11:04:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-31.messagelabs.com!1397646246!7307927!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 1267 invoked from network); 16 Apr 2014 11:04:07 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:04:07 -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 1WaNdO-0000nx-GF
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdO-0000l9-Cv
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:06 +0000
Date: Wed, 16 Apr 2014 11:04:06 +0000
Message-Id: <E1WaNdO-0000l9-Cv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] MAINTAINERS: extend coverage for "THE
	REST"
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 f73e225ac5d3f1428e6b55721b9d97a7383d9444
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Apr 14 15:13:33 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 15:13:33 2014 +0200

    MAINTAINERS: extend coverage for "THE REST"
    
    As agreed upon in offlist discussion among the committers, make all
    committers eligible to approve changes to code not having its
    maintainership covered explicitly. (For committers to make changes to
    such code, generally an ack from a second committer is going to be
    required.)
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 MAINTAINERS |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 06d2368..3508f18 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -347,7 +347,11 @@ F:  xen/xsm/
 F:  docs/misc/xsm-flask.txt
 
 THE REST
+M:	Ian Campbell <ian.campbell@citrix.com>
+M:	Ian Jackson <ian.jackson@eu.citrix.com>
+M:	Jan Beulich <jbeulich@suse.com>
 M:	Keir Fraser <keir@xen.org>
+M:	Tim Deegan <tim@xen.org>
 L:	xen-devel@lists.xen.org
 S:	Supported
 F:	*
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:04:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:04: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 1WaNdd-0007mc-4W; Wed, 16 Apr 2014 11:04:21 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdb-0007mH-Au
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:19 +0000
Received: from [85.158.137.68:37324] by server-12.bemta-3.messagelabs.com id
	FC/07-14831-2B36E435; Wed, 16 Apr 2014 11:04:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1397646256!7344649!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12367 invoked from network); 16 Apr 2014 11:04:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:04:17 -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 1WaNdY-0000o3-LY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdY-0000lp-KA
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:16 +0000
Date: Wed, 16 Apr 2014 11:04:16 +0000
Message-Id: <E1WaNdY-0000lp-KA@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HAP: also flush TLB when altering
	a present 1G or intermediate entry
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 c82fbfe6ec8be597218eb943641d1f7a81c4c01e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Apr 14 15:14:47 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 15:14:47 2014 +0200

    x86/HAP: also flush TLB when altering a present 1G or intermediate entry
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/hap/hap.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index b8c5422..71227ef 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -711,9 +711,8 @@ hap_write_p2m_entry(struct vcpu *v, unsigned long gfn, l1_pgentry_t *p,
     }
 
     safe_write_pte(p, new);
-    if ( (old_flags & _PAGE_PRESENT)
-         && (level == 1 || (level == 2 && (old_flags & _PAGE_PSE))) )
-             flush_tlb_mask(d->domain_dirty_cpumask);
+    if ( old_flags & _PAGE_PRESENT )
+        flush_tlb_mask(d->domain_dirty_cpumask);
 
     paging_unlock(d);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 16 11:04:21 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 16 Apr 2014 11:04: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 1WaNdd-0007mc-4W; Wed, 16 Apr 2014 11:04:21 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdb-0007mH-Au
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:19 +0000
Received: from [85.158.137.68:37324] by server-12.bemta-3.messagelabs.com id
	FC/07-14831-2B36E435; Wed, 16 Apr 2014 11:04:18 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1397646256!7344649!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12367 invoked from network); 16 Apr 2014 11:04:17 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	16 Apr 2014 11:04:17 -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 1WaNdY-0000o3-LY
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:16 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1WaNdY-0000lp-KA
	for xen-changelog@lists.xensource.com; Wed, 16 Apr 2014 11:04:16 +0000
Date: Wed, 16 Apr 2014 11:04:16 +0000
Message-Id: <E1WaNdY-0000lp-KA@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HAP: also flush TLB when altering
	a present 1G or intermediate entry
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 c82fbfe6ec8be597218eb943641d1f7a81c4c01e
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Apr 14 15:14:47 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Apr 14 15:14:47 2014 +0200

    x86/HAP: also flush TLB when altering a present 1G or intermediate entry
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/hap/hap.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index b8c5422..71227ef 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -711,9 +711,8 @@ hap_write_p2m_entry(struct vcpu *v, unsigned long gfn, l1_pgentry_t *p,
     }
 
     safe_write_pte(p, new);
-    if ( (old_flags & _PAGE_PRESENT)
-         && (level == 1 || (level == 2 && (old_flags & _PAGE_PSE))) )
-             flush_tlb_mask(d->domain_dirty_cpumask);
+    if ( old_flags & _PAGE_PRESENT )
+        flush_tlb_mask(d->domain_dirty_cpumask);
 
     paging_unlock(d);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08: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 1Wb4P3-0005qV-4Y; Fri, 18 Apr 2014 08:44:09 +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 1Wb4P1-0005qL-J0
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:07 +0000
Received: from [85.158.143.35:55957] by server-2.bemta-4.messagelabs.com id
	F4/03-06539-6D5E0535; Fri, 18 Apr 2014 08:44:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-21.messagelabs.com!1397810643!9915641!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20501 invoked from network); 18 Apr 2014 08:44:04 -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;
	18 Apr 2014 08:44: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 1Wb4Ox-0005Ll-JI
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Ox-0003M9-Fv
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:03 +0000
Date: Fri, 18 Apr 2014 08:44:03 +0000
Message-Id: <E1Wb4Ox-0003M9-Fv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: refactor struct kernel_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

commit 315b7a0c8fa5ba2e8cd0c78893f9cdb37070171f
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Apr 4 13:56:57 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 16:20:16 2014 +0100

    xen: arm: refactor struct kernel_info
    
    The kernel_order and kernel_image fields are ELF specific.
    
    Also add a few comments about what things are.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/kernel.c |   14 +++++++-------
 xen/arch/arm/kernel.h |   14 ++++++++------
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 1102392..7554479 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -297,7 +297,7 @@ static void kernel_elf_load(struct kernel_info *info)
     elf_load_binary(&info->elf.elf);
 
     printk("Free temporary kernel buffer\n");
-    free_xenheap_pages(info->kernel_img, info->kernel_order);
+    free_xenheap_pages(info->elf.kernel_img, info->elf.kernel_order);
 }
 
 static int kernel_try_elf_prepare(struct kernel_info *info,
@@ -307,14 +307,14 @@ static int kernel_try_elf_prepare(struct kernel_info *info,
 
     memset(&info->elf.elf, 0, sizeof(info->elf.elf));
 
-    info->kernel_order = get_order_from_bytes(size);
-    info->kernel_img = alloc_xenheap_pages(info->kernel_order, 0);
-    if ( info->kernel_img == NULL )
+    info->elf.kernel_order = get_order_from_bytes(size);
+    info->elf.kernel_img = alloc_xenheap_pages(info->elf.kernel_order, 0);
+    if ( info->elf.kernel_img == NULL )
         panic("Cannot allocate temporary buffer for kernel");
 
-    copy_from_paddr(info->kernel_img, addr, size);
+    copy_from_paddr(info->elf.kernel_img, addr, size);
 
-    if ( (rc = elf_init(&info->elf.elf, info->kernel_img, size )) != 0 )
+    if ( (rc = elf_init(&info->elf.elf, info->elf.kernel_img, size )) != 0 )
         goto err;
 #ifdef VERBOSE
     elf_set_verbose(&info->elf.elf);
@@ -353,7 +353,7 @@ err:
         printk("Xen: ELF kernel broken: %s\n",
                elf_check_broken(&info->elf.elf));
 
-    free_xenheap_pages(info->kernel_img, info->kernel_order);
+    free_xenheap_pages(info->elf.kernel_img, info->elf.kernel_order);
     return rc;
 }
 
diff --git a/xen/arch/arm/kernel.h b/xen/arch/arm/kernel.h
index ad2956b..2c27c64 100644
--- a/xen/arch/arm/kernel.h
+++ b/xen/arch/arm/kernel.h
@@ -18,14 +18,16 @@ struct kernel_info {
     paddr_t unassigned_mem; /* RAM not (yet) assigned to a bank */
     struct dt_mem_info mem;
 
-    paddr_t dtb_paddr;
+    /* kernel entry point */
     paddr_t entry;
 
+    /* boot blob load addresses */
+    paddr_t dtb_paddr;
     paddr_t initrd_paddr;
 
-    void *kernel_img;
-    unsigned kernel_order;
-
+    /* loader to use for this kernel */
+    void (*load)(struct kernel_info *info);
+    /* loader specific state */
     union {
         struct {
             paddr_t kernel_addr;
@@ -36,10 +38,10 @@ struct kernel_info {
         struct {
             struct elf_binary elf;
             struct elf_dom_parms parms;
+            unsigned kernel_order;
+            void *kernel_img;
         } elf;
     };
-
-    void (*load)(struct kernel_info *info);
 };
 
 int kernel_prepare(struct kernel_info *info);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:22 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08: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 1Wb4P3-0005qV-4Y; Fri, 18 Apr 2014 08:44:09 +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 1Wb4P1-0005qL-J0
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:07 +0000
Received: from [85.158.143.35:55957] by server-2.bemta-4.messagelabs.com id
	F4/03-06539-6D5E0535; Fri, 18 Apr 2014 08:44:06 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-14.tower-21.messagelabs.com!1397810643!9915641!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 20501 invoked from network); 18 Apr 2014 08:44:04 -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;
	18 Apr 2014 08:44: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 1Wb4Ox-0005Ll-JI
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Ox-0003M9-Fv
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:03 +0000
Date: Fri, 18 Apr 2014 08:44:03 +0000
Message-Id: <E1Wb4Ox-0003M9-Fv@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: refactor struct kernel_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

commit 315b7a0c8fa5ba2e8cd0c78893f9cdb37070171f
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Apr 4 13:56:57 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 16:20:16 2014 +0100

    xen: arm: refactor struct kernel_info
    
    The kernel_order and kernel_image fields are ELF specific.
    
    Also add a few comments about what things are.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/kernel.c |   14 +++++++-------
 xen/arch/arm/kernel.h |   14 ++++++++------
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 1102392..7554479 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -297,7 +297,7 @@ static void kernel_elf_load(struct kernel_info *info)
     elf_load_binary(&info->elf.elf);
 
     printk("Free temporary kernel buffer\n");
-    free_xenheap_pages(info->kernel_img, info->kernel_order);
+    free_xenheap_pages(info->elf.kernel_img, info->elf.kernel_order);
 }
 
 static int kernel_try_elf_prepare(struct kernel_info *info,
@@ -307,14 +307,14 @@ static int kernel_try_elf_prepare(struct kernel_info *info,
 
     memset(&info->elf.elf, 0, sizeof(info->elf.elf));
 
-    info->kernel_order = get_order_from_bytes(size);
-    info->kernel_img = alloc_xenheap_pages(info->kernel_order, 0);
-    if ( info->kernel_img == NULL )
+    info->elf.kernel_order = get_order_from_bytes(size);
+    info->elf.kernel_img = alloc_xenheap_pages(info->elf.kernel_order, 0);
+    if ( info->elf.kernel_img == NULL )
         panic("Cannot allocate temporary buffer for kernel");
 
-    copy_from_paddr(info->kernel_img, addr, size);
+    copy_from_paddr(info->elf.kernel_img, addr, size);
 
-    if ( (rc = elf_init(&info->elf.elf, info->kernel_img, size )) != 0 )
+    if ( (rc = elf_init(&info->elf.elf, info->elf.kernel_img, size )) != 0 )
         goto err;
 #ifdef VERBOSE
     elf_set_verbose(&info->elf.elf);
@@ -353,7 +353,7 @@ err:
         printk("Xen: ELF kernel broken: %s\n",
                elf_check_broken(&info->elf.elf));
 
-    free_xenheap_pages(info->kernel_img, info->kernel_order);
+    free_xenheap_pages(info->elf.kernel_img, info->elf.kernel_order);
     return rc;
 }
 
diff --git a/xen/arch/arm/kernel.h b/xen/arch/arm/kernel.h
index ad2956b..2c27c64 100644
--- a/xen/arch/arm/kernel.h
+++ b/xen/arch/arm/kernel.h
@@ -18,14 +18,16 @@ struct kernel_info {
     paddr_t unassigned_mem; /* RAM not (yet) assigned to a bank */
     struct dt_mem_info mem;
 
-    paddr_t dtb_paddr;
+    /* kernel entry point */
     paddr_t entry;
 
+    /* boot blob load addresses */
+    paddr_t dtb_paddr;
     paddr_t initrd_paddr;
 
-    void *kernel_img;
-    unsigned kernel_order;
-
+    /* loader to use for this kernel */
+    void (*load)(struct kernel_info *info);
+    /* loader specific state */
     union {
         struct {
             paddr_t kernel_addr;
@@ -36,10 +38,10 @@ struct kernel_info {
         struct {
             struct elf_binary elf;
             struct elf_dom_parms parms;
+            unsigned kernel_order;
+            void *kernel_img;
         } elf;
     };
-
-    void (*load)(struct kernel_info *info);
 };
 
 int kernel_prepare(struct kernel_info *info);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:44: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 1Wb4PC-0005r0-7B; Fri, 18 Apr 2014 08:44:18 +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 1Wb4PB-0005qs-2o
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:17 +0000
Received: from [85.158.143.35:56332] by server-3.bemta-4.messagelabs.com id
	CD/7E-13602-0E5E0535; Fri, 18 Apr 2014 08:44:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1397810654!9878768!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14874 invoked from network); 18 Apr 2014 08:44:15 -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;
	18 Apr 2014 08:44:15 -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 1Wb4P7-0005Ls-Ti
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4P7-0003MX-MZ
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:13 +0000
Date: Fri, 18 Apr 2014 08:44:13 +0000
Message-Id: <E1Wb4P7-0003MX-MZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: probe the kernel to
	determine the guest type earlier
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 a8e15b7550f9c575559dd2dc193f0614b5837799
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Apr 4 13:56:58 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 16:21:19 2014 +0100

    xen: arm: probe the kernel to determine the guest type earlier
    
    We need to know if the kernel is 32- or 64- bit capable sooner so that we know
    what sort of domain we are building when allocating memory to it (so we can
    place appropriate limits when allocating RAM to the guest). At the moment
    kernel_prepare() decides this but it needs the memory to have already been
    allocated.
    
    Therefore split the probing functionality of kernel_prepare() and call it much
    earlier. The remainder of kernel_prepare() deals with where to place the
    kernel in RAM which can be deferred until kernel_load() so do so.
    
    Document the input and output of kernel_probe() and _load().
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- whitespace fixes ]
---
 xen/arch/arm/domain_build.c |   10 ++--
 xen/arch/arm/kernel.c       |   95 ++++++++++++++++++++++++------------------
 xen/arch/arm/kernel.h       |   27 +++++++++++-
 3 files changed, 84 insertions(+), 48 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index fede5c0..083bf2d 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1002,9 +1002,7 @@ int construct_dom0(struct domain *d)
 
     kinfo.unassigned_mem = dom0_mem;
 
-    allocate_memory(d, &kinfo);
-
-    rc = kernel_prepare(&kinfo);
+    rc = kernel_probe(&kinfo);
     if ( rc < 0 )
         return rc;
 
@@ -1012,6 +1010,8 @@ int construct_dom0(struct domain *d)
     d->arch.type = kinfo.type;
 #endif
 
+    allocate_memory(d, &kinfo);
+
     rc = prepare_dtb(d, &kinfo);
     if ( rc < 0 )
         return rc;
@@ -1024,8 +1024,8 @@ int construct_dom0(struct domain *d)
     p2m_restore_state(v);
 
     /*
-     * kernel_load will determine the placement of the initrd & fdt in
-     * RAM, so call it first.
+     * kernel_load will determine the placement of the kernel as well
+     * as the initrd & fdt in RAM, so call it first.
      */
     kernel_load(&kinfo);
     /* initrd_load will fix up the fdt, so call it before dtb_load */
diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 7554479..c82906f 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -118,13 +118,47 @@ static void place_modules(struct kernel_info *info,
     info->initrd_paddr = info->dtb_paddr + dtb_len;
 }
 
+static paddr_t kernel_zimage_place(struct kernel_info *info)
+{
+    paddr_t load_addr;
+
+#ifdef CONFIG_ARM_64
+    if ( info->type == DOMAIN_64BIT )
+        return info->mem.bank[0].start + info->zimage.text_offset;
+#endif
+
+    /*
+     * If start is zero, the zImage is position independent, in this
+     * case Documentation/arm/Booting recommends loading below 128MiB
+     * and above 32MiB. Load it as high as possible within these
+     * constraints, while also avoiding the DTB.
+     */
+    if ( info->zimage.start == 0 )
+    {
+        paddr_t load_end;
+
+        load_end = info->mem.bank[0].start + info->mem.bank[0].size;
+        load_end = MIN(info->mem.bank[0].start + MB(128), load_end);
+
+        load_addr = load_end - info->zimage.len;
+        /* Align to 2MB */
+        load_addr &= ~((2 << 20) - 1);
+    }
+    else
+        load_addr = info->zimage.start;
+
+    return load_addr;
+}
+
 static void kernel_zimage_load(struct kernel_info *info)
 {
-    paddr_t load_addr = info->zimage.load_addr;
+    paddr_t load_addr = kernel_zimage_place(info);
     paddr_t paddr = info->zimage.kernel_addr;
     paddr_t len = info->zimage.len;
     unsigned long offs;
 
+    info->entry = load_addr;
+
     place_modules(info, load_addr, load_addr + len);
 
     printk("Loading zImage from %"PRIpaddr" to %"PRIpaddr"-%"PRIpaddr"\n",
@@ -156,10 +190,10 @@ static void kernel_zimage_load(struct kernel_info *info)
 
 #ifdef CONFIG_ARM_64
 /*
- * Check if the image is a 64-bit zImage and setup kernel_info
+ * Check if the image is a 64-bit Image.
  */
-static int kernel_try_zimage64_prepare(struct kernel_info *info,
-                                     paddr_t addr, paddr_t size)
+static int kernel_zimage64_probe(struct kernel_info *info,
+                                 paddr_t addr, paddr_t size)
 {
     /* linux/Documentation/arm64/booting.txt */
     struct {
@@ -198,12 +232,9 @@ static int kernel_try_zimage64_prepare(struct kernel_info *info,
         return -EINVAL;
 
     info->zimage.kernel_addr = addr;
-
-    info->zimage.load_addr = info->mem.bank[0].start
-        + zimage.text_offset;
     info->zimage.len = end - start;
+    info->zimage.text_offset = zimage.text_offset;
 
-    info->entry = info->zimage.load_addr;
     info->load = kernel_zimage_load;
 
     info->type = DOMAIN_64BIT;
@@ -215,8 +246,8 @@ static int kernel_try_zimage64_prepare(struct kernel_info *info,
 /*
  * Check if the image is a 32-bit zImage and setup kernel_info
  */
-static int kernel_try_zimage32_prepare(struct kernel_info *info,
-                                     paddr_t addr, paddr_t size)
+static int kernel_zimage32_probe(struct kernel_info *info,
+                                 paddr_t addr, paddr_t size)
 {
     uint32_t zimage[ZIMAGE32_HEADER_LEN/4];
     uint32_t start, end;
@@ -252,28 +283,9 @@ static int kernel_try_zimage32_prepare(struct kernel_info *info,
 
     info->zimage.kernel_addr = addr;
 
-    /*
-     * If start is zero, the zImage is position independent, in this
-     * case Documentation/arm/Booting recommends loading below 128MiB
-     * and above 32MiB. Load it as high as possible within these
-     * constraints, while also avoiding the DTB.
-     */
-    if (start == 0)
-    {
-        paddr_t load_end;
-
-        load_end = info->mem.bank[0].start + info->mem.bank[0].size;
-        load_end = MIN(info->mem.bank[0].start + MB(128), load_end);
-
-        info->zimage.load_addr = load_end - end;
-        /* Align to 2MB */
-        info->zimage.load_addr &= ~((2 << 20) - 1);
-    }
-    else
-        info->zimage.load_addr = start;
+    info->zimage.start = start;
     info->zimage.len = end - start;
 
-    info->entry = info->zimage.load_addr;
     info->load = kernel_zimage_load;
 
 #ifdef CONFIG_ARM_64
@@ -285,6 +297,12 @@ static int kernel_try_zimage32_prepare(struct kernel_info *info,
 
 static void kernel_elf_load(struct kernel_info *info)
 {
+    /*
+     * TODO: can the ELF header be used to find the physical address
+     * to load the image to?  Instead of assuming virt == phys.
+     */
+    info->entry = info->elf.parms.virt_entry;
+
     place_modules(info,
                   info->elf.parms.virt_kstart,
                   info->elf.parms.virt_kend);
@@ -300,8 +318,8 @@ static void kernel_elf_load(struct kernel_info *info)
     free_xenheap_pages(info->elf.kernel_img, info->elf.kernel_order);
 }
 
-static int kernel_try_elf_prepare(struct kernel_info *info,
-                                  paddr_t addr, paddr_t size)
+static int kernel_elf_probe(struct kernel_info *info,
+                            paddr_t addr, paddr_t size)
 {
     int rc;
 
@@ -336,11 +354,6 @@ static int kernel_try_elf_prepare(struct kernel_info *info,
     }
 #endif
 
-    /*
-     * TODO: can the ELF header be used to find the physical address
-     * to load the image to?  Instead of assuming virt == phys.
-     */
-    info->entry = info->elf.parms.virt_entry;
     info->load = kernel_elf_load;
 
     if ( elf_check_broken(&info->elf.elf) )
@@ -357,7 +370,7 @@ err:
     return rc;
 }
 
-int kernel_prepare(struct kernel_info *info)
+int kernel_probe(struct kernel_info *info)
 {
     int rc;
 
@@ -375,12 +388,12 @@ int kernel_prepare(struct kernel_info *info)
     printk("Loading kernel from boot module %d\n", MOD_KERNEL);
 
 #ifdef CONFIG_ARM_64
-    rc = kernel_try_zimage64_prepare(info, start, size);
+    rc = kernel_zimage64_probe(info, start, size);
     if (rc < 0)
 #endif
-        rc = kernel_try_zimage32_prepare(info, start, size);
+        rc = kernel_zimage32_probe(info, start, size);
     if (rc < 0)
-        rc = kernel_try_elf_prepare(info, start, size);
+        rc = kernel_elf_probe(info, start, size);
 
     return rc;
 }
diff --git a/xen/arch/arm/kernel.h b/xen/arch/arm/kernel.h
index 2c27c64..fd2f61d 100644
--- a/xen/arch/arm/kernel.h
+++ b/xen/arch/arm/kernel.h
@@ -31,8 +31,11 @@ struct kernel_info {
     union {
         struct {
             paddr_t kernel_addr;
-            paddr_t load_addr;
             paddr_t len;
+#ifdef CONFIG_ARM_64
+            paddr_t text_offset; /* 64-bit Image only */
+#endif
+            paddr_t start; /* 32-bit zImage only */
         } zimage;
 
         struct {
@@ -44,7 +47,27 @@ struct kernel_info {
     };
 };
 
-int kernel_prepare(struct kernel_info *info);
+/*
+ * Probe the kernel to detemine its type and select a loader.
+ *
+ * Sets in info:
+ *  ->type
+ *  ->load hook, and sets loader specific variables ->{zimage,elf}
+ */
+int kernel_probe(struct kernel_info *info);
+
+/*
+ * Loads the kernel into guest RAM.
+ *
+ * Expects to be set in info when called:
+ *  ->mem
+ *  ->fdt
+ *
+ * Sets in info:
+ *  ->entry
+ *  ->dtb_paddr
+ *  ->initrd_paddr
+ */
 void kernel_load(struct kernel_info *info);
 
 #endif /* #ifdef __ARCH_ARM_KERNEL_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:44: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 1Wb4PC-0005r0-7B; Fri, 18 Apr 2014 08:44:18 +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 1Wb4PB-0005qs-2o
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:17 +0000
Received: from [85.158.143.35:56332] by server-3.bemta-4.messagelabs.com id
	CD/7E-13602-0E5E0535; Fri, 18 Apr 2014 08:44:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-21.messagelabs.com!1397810654!9878768!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 14874 invoked from network); 18 Apr 2014 08:44:15 -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;
	18 Apr 2014 08:44:15 -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 1Wb4P7-0005Ls-Ti
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4P7-0003MX-MZ
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:13 +0000
Date: Fri, 18 Apr 2014 08:44:13 +0000
Message-Id: <E1Wb4P7-0003MX-MZ@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen: arm: probe the kernel to
	determine the guest type earlier
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 a8e15b7550f9c575559dd2dc193f0614b5837799
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Apr 4 13:56:58 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 16:21:19 2014 +0100

    xen: arm: probe the kernel to determine the guest type earlier
    
    We need to know if the kernel is 32- or 64- bit capable sooner so that we know
    what sort of domain we are building when allocating memory to it (so we can
    place appropriate limits when allocating RAM to the guest). At the moment
    kernel_prepare() decides this but it needs the memory to have already been
    allocated.
    
    Therefore split the probing functionality of kernel_prepare() and call it much
    earlier. The remainder of kernel_prepare() deals with where to place the
    kernel in RAM which can be deferred until kernel_load() so do so.
    
    Document the input and output of kernel_probe() and _load().
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- whitespace fixes ]
---
 xen/arch/arm/domain_build.c |   10 ++--
 xen/arch/arm/kernel.c       |   95 ++++++++++++++++++++++++------------------
 xen/arch/arm/kernel.h       |   27 +++++++++++-
 3 files changed, 84 insertions(+), 48 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index fede5c0..083bf2d 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1002,9 +1002,7 @@ int construct_dom0(struct domain *d)
 
     kinfo.unassigned_mem = dom0_mem;
 
-    allocate_memory(d, &kinfo);
-
-    rc = kernel_prepare(&kinfo);
+    rc = kernel_probe(&kinfo);
     if ( rc < 0 )
         return rc;
 
@@ -1012,6 +1010,8 @@ int construct_dom0(struct domain *d)
     d->arch.type = kinfo.type;
 #endif
 
+    allocate_memory(d, &kinfo);
+
     rc = prepare_dtb(d, &kinfo);
     if ( rc < 0 )
         return rc;
@@ -1024,8 +1024,8 @@ int construct_dom0(struct domain *d)
     p2m_restore_state(v);
 
     /*
-     * kernel_load will determine the placement of the initrd & fdt in
-     * RAM, so call it first.
+     * kernel_load will determine the placement of the kernel as well
+     * as the initrd & fdt in RAM, so call it first.
      */
     kernel_load(&kinfo);
     /* initrd_load will fix up the fdt, so call it before dtb_load */
diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 7554479..c82906f 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -118,13 +118,47 @@ static void place_modules(struct kernel_info *info,
     info->initrd_paddr = info->dtb_paddr + dtb_len;
 }
 
+static paddr_t kernel_zimage_place(struct kernel_info *info)
+{
+    paddr_t load_addr;
+
+#ifdef CONFIG_ARM_64
+    if ( info->type == DOMAIN_64BIT )
+        return info->mem.bank[0].start + info->zimage.text_offset;
+#endif
+
+    /*
+     * If start is zero, the zImage is position independent, in this
+     * case Documentation/arm/Booting recommends loading below 128MiB
+     * and above 32MiB. Load it as high as possible within these
+     * constraints, while also avoiding the DTB.
+     */
+    if ( info->zimage.start == 0 )
+    {
+        paddr_t load_end;
+
+        load_end = info->mem.bank[0].start + info->mem.bank[0].size;
+        load_end = MIN(info->mem.bank[0].start + MB(128), load_end);
+
+        load_addr = load_end - info->zimage.len;
+        /* Align to 2MB */
+        load_addr &= ~((2 << 20) - 1);
+    }
+    else
+        load_addr = info->zimage.start;
+
+    return load_addr;
+}
+
 static void kernel_zimage_load(struct kernel_info *info)
 {
-    paddr_t load_addr = info->zimage.load_addr;
+    paddr_t load_addr = kernel_zimage_place(info);
     paddr_t paddr = info->zimage.kernel_addr;
     paddr_t len = info->zimage.len;
     unsigned long offs;
 
+    info->entry = load_addr;
+
     place_modules(info, load_addr, load_addr + len);
 
     printk("Loading zImage from %"PRIpaddr" to %"PRIpaddr"-%"PRIpaddr"\n",
@@ -156,10 +190,10 @@ static void kernel_zimage_load(struct kernel_info *info)
 
 #ifdef CONFIG_ARM_64
 /*
- * Check if the image is a 64-bit zImage and setup kernel_info
+ * Check if the image is a 64-bit Image.
  */
-static int kernel_try_zimage64_prepare(struct kernel_info *info,
-                                     paddr_t addr, paddr_t size)
+static int kernel_zimage64_probe(struct kernel_info *info,
+                                 paddr_t addr, paddr_t size)
 {
     /* linux/Documentation/arm64/booting.txt */
     struct {
@@ -198,12 +232,9 @@ static int kernel_try_zimage64_prepare(struct kernel_info *info,
         return -EINVAL;
 
     info->zimage.kernel_addr = addr;
-
-    info->zimage.load_addr = info->mem.bank[0].start
-        + zimage.text_offset;
     info->zimage.len = end - start;
+    info->zimage.text_offset = zimage.text_offset;
 
-    info->entry = info->zimage.load_addr;
     info->load = kernel_zimage_load;
 
     info->type = DOMAIN_64BIT;
@@ -215,8 +246,8 @@ static int kernel_try_zimage64_prepare(struct kernel_info *info,
 /*
  * Check if the image is a 32-bit zImage and setup kernel_info
  */
-static int kernel_try_zimage32_prepare(struct kernel_info *info,
-                                     paddr_t addr, paddr_t size)
+static int kernel_zimage32_probe(struct kernel_info *info,
+                                 paddr_t addr, paddr_t size)
 {
     uint32_t zimage[ZIMAGE32_HEADER_LEN/4];
     uint32_t start, end;
@@ -252,28 +283,9 @@ static int kernel_try_zimage32_prepare(struct kernel_info *info,
 
     info->zimage.kernel_addr = addr;
 
-    /*
-     * If start is zero, the zImage is position independent, in this
-     * case Documentation/arm/Booting recommends loading below 128MiB
-     * and above 32MiB. Load it as high as possible within these
-     * constraints, while also avoiding the DTB.
-     */
-    if (start == 0)
-    {
-        paddr_t load_end;
-
-        load_end = info->mem.bank[0].start + info->mem.bank[0].size;
-        load_end = MIN(info->mem.bank[0].start + MB(128), load_end);
-
-        info->zimage.load_addr = load_end - end;
-        /* Align to 2MB */
-        info->zimage.load_addr &= ~((2 << 20) - 1);
-    }
-    else
-        info->zimage.load_addr = start;
+    info->zimage.start = start;
     info->zimage.len = end - start;
 
-    info->entry = info->zimage.load_addr;
     info->load = kernel_zimage_load;
 
 #ifdef CONFIG_ARM_64
@@ -285,6 +297,12 @@ static int kernel_try_zimage32_prepare(struct kernel_info *info,
 
 static void kernel_elf_load(struct kernel_info *info)
 {
+    /*
+     * TODO: can the ELF header be used to find the physical address
+     * to load the image to?  Instead of assuming virt == phys.
+     */
+    info->entry = info->elf.parms.virt_entry;
+
     place_modules(info,
                   info->elf.parms.virt_kstart,
                   info->elf.parms.virt_kend);
@@ -300,8 +318,8 @@ static void kernel_elf_load(struct kernel_info *info)
     free_xenheap_pages(info->elf.kernel_img, info->elf.kernel_order);
 }
 
-static int kernel_try_elf_prepare(struct kernel_info *info,
-                                  paddr_t addr, paddr_t size)
+static int kernel_elf_probe(struct kernel_info *info,
+                            paddr_t addr, paddr_t size)
 {
     int rc;
 
@@ -336,11 +354,6 @@ static int kernel_try_elf_prepare(struct kernel_info *info,
     }
 #endif
 
-    /*
-     * TODO: can the ELF header be used to find the physical address
-     * to load the image to?  Instead of assuming virt == phys.
-     */
-    info->entry = info->elf.parms.virt_entry;
     info->load = kernel_elf_load;
 
     if ( elf_check_broken(&info->elf.elf) )
@@ -357,7 +370,7 @@ err:
     return rc;
 }
 
-int kernel_prepare(struct kernel_info *info)
+int kernel_probe(struct kernel_info *info)
 {
     int rc;
 
@@ -375,12 +388,12 @@ int kernel_prepare(struct kernel_info *info)
     printk("Loading kernel from boot module %d\n", MOD_KERNEL);
 
 #ifdef CONFIG_ARM_64
-    rc = kernel_try_zimage64_prepare(info, start, size);
+    rc = kernel_zimage64_probe(info, start, size);
     if (rc < 0)
 #endif
-        rc = kernel_try_zimage32_prepare(info, start, size);
+        rc = kernel_zimage32_probe(info, start, size);
     if (rc < 0)
-        rc = kernel_try_elf_prepare(info, start, size);
+        rc = kernel_elf_probe(info, start, size);
 
     return rc;
 }
diff --git a/xen/arch/arm/kernel.h b/xen/arch/arm/kernel.h
index 2c27c64..fd2f61d 100644
--- a/xen/arch/arm/kernel.h
+++ b/xen/arch/arm/kernel.h
@@ -31,8 +31,11 @@ struct kernel_info {
     union {
         struct {
             paddr_t kernel_addr;
-            paddr_t load_addr;
             paddr_t len;
+#ifdef CONFIG_ARM_64
+            paddr_t text_offset; /* 64-bit Image only */
+#endif
+            paddr_t start; /* 32-bit zImage only */
         } zimage;
 
         struct {
@@ -44,7 +47,27 @@ struct kernel_info {
     };
 };
 
-int kernel_prepare(struct kernel_info *info);
+/*
+ * Probe the kernel to detemine its type and select a loader.
+ *
+ * Sets in info:
+ *  ->type
+ *  ->load hook, and sets loader specific variables ->{zimage,elf}
+ */
+int kernel_probe(struct kernel_info *info);
+
+/*
+ * Loads the kernel into guest RAM.
+ *
+ * Expects to be set in info when called:
+ *  ->mem
+ *  ->fdt
+ *
+ * Sets in info:
+ *  ->entry
+ *  ->dtb_paddr
+ *  ->initrd_paddr
+ */
 void kernel_load(struct kernel_info *info);
 
 #endif /* #ifdef __ARCH_ARM_KERNEL_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:44: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 1Wb4PM-0005sN-9z; Fri, 18 Apr 2014 08:44:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4PK-0005rw-P3
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:26 +0000
Received: from [193.109.254.147:48899] by server-12.bemta-14.messagelabs.com
	id ED/82-27473-AE5E0535; Fri, 18 Apr 2014 08:44:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1397810664!9072446!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3513 invoked from network); 18 Apr 2014 08:44: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;
	18 Apr 2014 08:44:25 -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 1Wb4PI-0005Lv-1x
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4PI-0003Mt-0W
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:24 +0000
Date: Fri, 18 Apr 2014 08:44:24 +0000
Message-Id: <E1Wb4PI-0003Mt-0W@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "xen/arm: Allocate memory for
	dom0 from the bottom with the 1:1 Workaround"
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 34f21f9d2b1f806fc15e66d6dff9138ec45f5565
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Apr 4 13:56:59 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 16:23:15 2014 +0100

    Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround"
    
    This reverts commit 6c21cb36e263de2db8716b477157a5b6cd531e1e.
    
    The Linux = issue which this works around was fixed in v3.13 via f52bb722547f
    "ARM: mm: Correct virt_to_phys patching for 64 bit physical addresses".
    
    This is the second attempt to revert this. Now that we have fixed
    allocate_memory_11 to allocate accessible memory on 32-bit this is safe to do.
    This is not quite a straight revert since we need to ensure that for 32-bit
    domain 0 we do not allocate dom0's memory above 4GB where the domain cannot
    access it without paging (which is disabled at start of day) and LPAE (which
    the kernel may not support) enabled.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- dropped debug code ]
---
 xen/arch/arm/domain_build.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 083bf2d..df34c6d 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -69,19 +69,15 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo)
 {
     paddr_t start;
     paddr_t size;
-    struct page_info *pg = NULL;
+    struct page_info *pg;
     unsigned int order = get_order_from_bytes(dom0_mem);
     int res;
     paddr_t spfn;
-    unsigned int bits;
-
-    for ( bits = PAGE_SHIFT + 1; bits < PADDR_BITS; bits++ )
-    {
-        pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
-        if ( pg != NULL )
-            break;
-    }
 
+    if ( is_32bit_domain(d) )
+        pg = alloc_domheap_pages(d, order, MEMF_bits(32));
+    else
+        pg = alloc_domheap_pages(d, order, 0);
     if ( !pg )
         panic("Failed to allocate contiguous memory for dom0");
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:38 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:44: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 1Wb4PM-0005sN-9z; Fri, 18 Apr 2014 08:44:28 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4PK-0005rw-P3
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:26 +0000
Received: from [193.109.254.147:48899] by server-12.bemta-14.messagelabs.com
	id ED/82-27473-AE5E0535; Fri, 18 Apr 2014 08:44:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-27.messagelabs.com!1397810664!9072446!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 3513 invoked from network); 18 Apr 2014 08:44: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;
	18 Apr 2014 08:44:25 -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 1Wb4PI-0005Lv-1x
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4PI-0003Mt-0W
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:24 +0000
Date: Fri, 18 Apr 2014 08:44:24 +0000
Message-Id: <E1Wb4PI-0003Mt-0W@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Revert "xen/arm: Allocate memory for
	dom0 from the bottom with the 1:1 Workaround"
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 34f21f9d2b1f806fc15e66d6dff9138ec45f5565
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Fri Apr 4 13:56:59 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 16:23:15 2014 +0100

    Revert "xen/arm: Allocate memory for dom0 from the bottom with the 1:1 Workaround"
    
    This reverts commit 6c21cb36e263de2db8716b477157a5b6cd531e1e.
    
    The Linux = issue which this works around was fixed in v3.13 via f52bb722547f
    "ARM: mm: Correct virt_to_phys patching for 64 bit physical addresses".
    
    This is the second attempt to revert this. Now that we have fixed
    allocate_memory_11 to allocate accessible memory on 32-bit this is safe to do.
    This is not quite a straight revert since we need to ensure that for 32-bit
    domain 0 we do not allocate dom0's memory above 4GB where the domain cannot
    access it without paging (which is disabled at start of day) and LPAE (which
    the kernel may not support) enabled.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Julien Grall <julien.grall@linaro.org>
    [ ijc -- dropped debug code ]
---
 xen/arch/arm/domain_build.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 083bf2d..df34c6d 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -69,19 +69,15 @@ static void allocate_memory_11(struct domain *d, struct kernel_info *kinfo)
 {
     paddr_t start;
     paddr_t size;
-    struct page_info *pg = NULL;
+    struct page_info *pg;
     unsigned int order = get_order_from_bytes(dom0_mem);
     int res;
     paddr_t spfn;
-    unsigned int bits;
-
-    for ( bits = PAGE_SHIFT + 1; bits < PADDR_BITS; bits++ )
-    {
-        pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
-        if ( pg != NULL )
-            break;
-    }
 
+    if ( is_32bit_domain(d) )
+        pg = alloc_domheap_pages(d, order, MEMF_bits(32));
+    else
+        pg = alloc_domheap_pages(d, order, 0);
     if ( !pg )
         panic("Failed to allocate contiguous memory for dom0");
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:44:41 +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 1Wb4PW-0005tn-DG; Fri, 18 Apr 2014 08:44:38 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4PV-0005tR-42
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:37 +0000
Received: from [85.158.137.68:10845] by server-1.bemta-3.messagelabs.com id
	6C/4F-11134-4F5E0535; Fri, 18 Apr 2014 08:44:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1397810674!7731163!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28777 invoked from network); 18 Apr 2014 08:44:35 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:44:35 -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 1Wb4PS-0005M6-Bd
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4PS-0003NK-4Z
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:34 +0000
Date: Fri, 18 Apr 2014 08:44:34 +0000
Message-Id: <E1Wb4PS-0003NK-4Z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm64: Correctly align VFP regs
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 9b4e96724eeb916f2cd311d9133f00c216caa321
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Apr 10 12:43:57 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:00:47 2014 +0100

    xen/arm64: Correctly align VFP regs
    
    On arm64, VFP instructions requires vfpregs to be 128-byte aligned.
    
    By chance, the field is already correctly aligned. In the case if someone
    decides to add a new field before, Xen will receive a data abort as soon as
    it saves/restores VFP.
    
    We are safe on arm32 as the only constraint is to be 32-byte aligned.
    
    Reported-by: Chen Baozi <baozich@gmail.com>
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/asm-arm/arm64/vfp.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/include/asm-arm/arm64/vfp.h b/xen/include/asm-arm/arm64/vfp.h
index 373f156..6ab5d36 100644
--- a/xen/include/asm-arm/arm64/vfp.h
+++ b/xen/include/asm-arm/arm64/vfp.h
@@ -1,9 +1,12 @@
 #ifndef _ARM_ARM64_VFP_H
 #define _ARM_ARM64_VFP_H
 
+/* ARM64 VFP instruction requires fpregs address to be 128-byte aligned */
+#define __vfp_aligned __attribute__((aligned(16)))
+
 struct vfp_state
 {
-    uint64_t fpregs[64];
+    uint64_t fpregs[64] __vfp_aligned;
     uint32_t fpcr;
     uint32_t fpexc32_el2;
     uint32_t fpsr;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:41 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:44:41 +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 1Wb4PW-0005tn-DG; Fri, 18 Apr 2014 08:44:38 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4PV-0005tR-42
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:37 +0000
Received: from [85.158.137.68:10845] by server-1.bemta-3.messagelabs.com id
	6C/4F-11134-4F5E0535; Fri, 18 Apr 2014 08:44:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-15.tower-31.messagelabs.com!1397810674!7731163!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 28777 invoked from network); 18 Apr 2014 08:44:35 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-15.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:44:35 -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 1Wb4PS-0005M6-Bd
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4PS-0003NK-4Z
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:34 +0000
Date: Fri, 18 Apr 2014 08:44:34 +0000
Message-Id: <E1Wb4PS-0003NK-4Z@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm64: Correctly align VFP regs
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 9b4e96724eeb916f2cd311d9133f00c216caa321
Author:     Julien Grall <julien.grall@linaro.org>
AuthorDate: Thu Apr 10 12:43:57 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:00:47 2014 +0100

    xen/arm64: Correctly align VFP regs
    
    On arm64, VFP instructions requires vfpregs to be 128-byte aligned.
    
    By chance, the field is already correctly aligned. In the case if someone
    decides to add a new field before, Xen will receive a data abort as soon as
    it saves/restores VFP.
    
    We are safe on arm32 as the only constraint is to be 32-byte aligned.
    
    Reported-by: Chen Baozi <baozich@gmail.com>
    Signed-off-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/asm-arm/arm64/vfp.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xen/include/asm-arm/arm64/vfp.h b/xen/include/asm-arm/arm64/vfp.h
index 373f156..6ab5d36 100644
--- a/xen/include/asm-arm/arm64/vfp.h
+++ b/xen/include/asm-arm/arm64/vfp.h
@@ -1,9 +1,12 @@
 #ifndef _ARM_ARM64_VFP_H
 #define _ARM_ARM64_VFP_H
 
+/* ARM64 VFP instruction requires fpregs address to be 128-byte aligned */
+#define __vfp_aligned __attribute__((aligned(16)))
+
 struct vfp_state
 {
-    uint64_t fpregs[64];
+    uint64_t fpregs[64] __vfp_aligned;
     uint32_t fpcr;
     uint32_t fpexc32_el2;
     uint32_t fpsr;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:44:58 +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 1Wb4Pg-0005vn-GP; Fri, 18 Apr 2014 08:44:48 +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 1Wb4Pf-0005vX-73
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:47 +0000
Received: from [85.158.143.35:42094] by server-3.bemta-4.messagelabs.com id
	F1/DE-13602-EF5E0535; Fri, 18 Apr 2014 08:44:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-21.messagelabs.com!1397810684!1885923!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19908 invoked from network); 18 Apr 2014 08:44:45 -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;
	18 Apr 2014 08:44:45 -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 1Wb4Pc-0005MD-Jo
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Pc-0003Nl-EY
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:44 +0000
Date: Fri, 18 Apr 2014 08:44:44 +0000
Message-Id: <E1Wb4Pc-0003Nl-EY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl/gentypes.py: don't generate JSON
	for private type(s)
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 172c47d1c85ac1f54805f04dd6bcd62bb35fa3a4
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Apr 10 16:26:31 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:06:36 2014 +0100

    libxl/gentypes.py: don't generate JSON for private type(s)
    
    Private types are only useful inside libxl. They don't have a valid JSON
    generation function by default.
    
    Currently there's only one private type, that's libxl_ev_link. Not
    skipping this field causes testidl to fail as the code generated for
    this type is NULL.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/gentypes.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py
index be06257..1a3b91c 100644
--- a/tools/libxl/gentypes.py
+++ b/tools/libxl/gentypes.py
@@ -226,7 +226,7 @@ def libxl_C_type_gen_json(ty, v, indent = "    ", parent = None):
         s += "s = yajl_gen_map_open(hand);\n"
         s += "if (s != yajl_gen_status_ok)\n"
         s += "    goto out;\n"
-        for f in [f for f in ty.fields if not f.const]:
+        for f in [f for f in ty.fields if not f.const and not f.type.private]:
             (nparent,fexpr) = ty.member(v, f, parent is None)
             s += "s = yajl_gen_string(hand, (const unsigned char *)\"%s\", sizeof(\"%s\")-1);\n" % (f.name, f.name)
             s += "if (s != yajl_gen_status_ok)\n"
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:44:58 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:44:58 +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 1Wb4Pg-0005vn-GP; Fri, 18 Apr 2014 08:44:48 +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 1Wb4Pf-0005vX-73
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:47 +0000
Received: from [85.158.143.35:42094] by server-3.bemta-4.messagelabs.com id
	F1/DE-13602-EF5E0535; Fri, 18 Apr 2014 08:44:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-21.messagelabs.com!1397810684!1885923!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 19908 invoked from network); 18 Apr 2014 08:44:45 -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;
	18 Apr 2014 08:44:45 -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 1Wb4Pc-0005MD-Jo
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Pc-0003Nl-EY
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:44 +0000
Date: Fri, 18 Apr 2014 08:44:44 +0000
Message-Id: <E1Wb4Pc-0003Nl-EY@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl/gentypes.py: don't generate JSON
	for private type(s)
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 172c47d1c85ac1f54805f04dd6bcd62bb35fa3a4
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Apr 10 16:26:31 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:06:36 2014 +0100

    libxl/gentypes.py: don't generate JSON for private type(s)
    
    Private types are only useful inside libxl. They don't have a valid JSON
    generation function by default.
    
    Currently there's only one private type, that's libxl_ev_link. Not
    skipping this field causes testidl to fail as the code generated for
    this type is NULL.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/gentypes.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py
index be06257..1a3b91c 100644
--- a/tools/libxl/gentypes.py
+++ b/tools/libxl/gentypes.py
@@ -226,7 +226,7 @@ def libxl_C_type_gen_json(ty, v, indent = "    ", parent = None):
         s += "s = yajl_gen_map_open(hand);\n"
         s += "if (s != yajl_gen_status_ok)\n"
         s += "    goto out;\n"
-        for f in [f for f in ty.fields if not f.const]:
+        for f in [f for f in ty.fields if not f.const and not f.type.private]:
             (nparent,fexpr) = ty.member(v, f, parent is None)
             s += "s = yajl_gen_string(hand, (const unsigned char *)\"%s\", sizeof(\"%s\")-1);\n" % (f.name, f.name)
             s += "if (s != yajl_gen_status_ok)\n"
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:45:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:45:09 +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 1Wb4Pr-0005xb-JO; Fri, 18 Apr 2014 08:44:59 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Pp-0005x6-Il
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:57 +0000
Received: from [193.109.254.147:54118] by server-11.bemta-14.messagelabs.com
	id 68/FB-09902-806E0535; Fri, 18 Apr 2014 08:44:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1397810695!9088903!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18348 invoked from network); 18 Apr 2014 08:44:56 -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;
	18 Apr 2014 08:44:56 -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 1Wb4Pm-0005ML-TS
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Pm-0003Ou-NM
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:54 +0000
Date: Fri, 18 Apr 2014 08:44:54 +0000
Message-Id: <E1Wb4Pm-0003Ou-NM@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl_json: fix JSON parser debug code
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 b955e8c5b7ceab7a6dde006f50b8dc90c5decf26
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Apr 10 16:26:32 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:06:41 2014 +0100

    libxl_json: fix JSON parser debug code
    
    Two changes included:
    1. implement DEBUG_GEN_ALLOC for YAJL2
    2. use size_t for variable "len"
    
    without these two fixes it fails to compile when DEBUG_ANSWER is
    defined.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_json.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c
index 989ac3f..3ea56a4 100644
--- a/tools/libxl/libxl_json.c
+++ b/tools/libxl/libxl_json.c
@@ -34,11 +34,20 @@ struct libxl__yajl_ctx {
 };
 
 #ifdef DEBUG_ANSWER
-#  define DEBUG_GEN_ALLOC(ctx) \
-    if ((ctx)->g == NULL) { \
-        yajl_gen_config conf = { 1, "  " }; \
+#if YAJL_VERSION < 20000
+#  define DEBUG_GEN_ALLOC(ctx)                  \
+    if ((ctx)->g == NULL) {                     \
+        yajl_gen_config conf = { 1, "  " };     \
         (ctx)->g = yajl_gen_alloc(&conf, NULL); \
     }
+#else  /* YAJL2 */
+#  define DEBUG_GEN_ALLOC(ctx)                                    \
+    if ((ctx)->g == NULL) {                                       \
+        (ctx)->g = yajl_gen_alloc(NULL);                          \
+        yajl_gen_config((ctx)->g, yajl_gen_beautify, 1);          \
+        yajl_gen_config((ctx)->g, yajl_gen_indent_string, "  ");  \
+    }
+#endif
 #  define DEBUG_GEN_FREE(ctx) \
     if ((ctx)->g) yajl_gen_free((ctx)->g)
 #  define DEBUG_GEN(ctx, type)              yajl_gen_##type(ctx->g)
@@ -48,7 +57,7 @@ struct libxl__yajl_ctx {
 #  define DEBUG_GEN_REPORT(yajl_ctx) \
     do { \
         const unsigned char *buf = NULL; \
-        unsigned int len = 0; \
+        size_t len = 0; \
         yajl_gen_get_buf((yajl_ctx)->g, &buf, &len); \
         LIBXL__LOG(libxl__gc_owner((yajl_ctx)->gc), \
                    LIBXL__LOG_DEBUG, "response:\n%s", buf); \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:45:09 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:45:09 +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 1Wb4Pr-0005xb-JO; Fri, 18 Apr 2014 08:44:59 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Pp-0005x6-Il
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:57 +0000
Received: from [193.109.254.147:54118] by server-11.bemta-14.messagelabs.com
	id 68/FB-09902-806E0535; Fri, 18 Apr 2014 08:44:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1397810695!9088903!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 18348 invoked from network); 18 Apr 2014 08:44:56 -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;
	18 Apr 2014 08:44:56 -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 1Wb4Pm-0005ML-TS
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Pm-0003Ou-NM
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:44:54 +0000
Date: Fri, 18 Apr 2014 08:44:54 +0000
Message-Id: <E1Wb4Pm-0003Ou-NM@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl_json: fix JSON parser debug code
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 b955e8c5b7ceab7a6dde006f50b8dc90c5decf26
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Apr 10 16:26:32 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:06:41 2014 +0100

    libxl_json: fix JSON parser debug code
    
    Two changes included:
    1. implement DEBUG_GEN_ALLOC for YAJL2
    2. use size_t for variable "len"
    
    without these two fixes it fails to compile when DEBUG_ANSWER is
    defined.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_json.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c
index 989ac3f..3ea56a4 100644
--- a/tools/libxl/libxl_json.c
+++ b/tools/libxl/libxl_json.c
@@ -34,11 +34,20 @@ struct libxl__yajl_ctx {
 };
 
 #ifdef DEBUG_ANSWER
-#  define DEBUG_GEN_ALLOC(ctx) \
-    if ((ctx)->g == NULL) { \
-        yajl_gen_config conf = { 1, "  " }; \
+#if YAJL_VERSION < 20000
+#  define DEBUG_GEN_ALLOC(ctx)                  \
+    if ((ctx)->g == NULL) {                     \
+        yajl_gen_config conf = { 1, "  " };     \
         (ctx)->g = yajl_gen_alloc(&conf, NULL); \
     }
+#else  /* YAJL2 */
+#  define DEBUG_GEN_ALLOC(ctx)                                    \
+    if ((ctx)->g == NULL) {                                       \
+        (ctx)->g = yajl_gen_alloc(NULL);                          \
+        yajl_gen_config((ctx)->g, yajl_gen_beautify, 1);          \
+        yajl_gen_config((ctx)->g, yajl_gen_indent_string, "  ");  \
+    }
+#endif
 #  define DEBUG_GEN_FREE(ctx) \
     if ((ctx)->g) yajl_gen_free((ctx)->g)
 #  define DEBUG_GEN(ctx, type)              yajl_gen_##type(ctx->g)
@@ -48,7 +57,7 @@ struct libxl__yajl_ctx {
 #  define DEBUG_GEN_REPORT(yajl_ctx) \
     do { \
         const unsigned char *buf = NULL; \
-        unsigned int len = 0; \
+        size_t len = 0; \
         yajl_gen_get_buf((yajl_ctx)->g, &buf, &len); \
         LIBXL__LOG(libxl__gc_owner((yajl_ctx)->gc), \
                    LIBXL__LOG_DEBUG, "response:\n%s", buf); \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:45:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:45: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 1Wb4Q2-0005zA-Nr; Fri, 18 Apr 2014 08:45:10 +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 1Wb4Q1-0005yk-3o
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:09 +0000
Received: from [85.158.143.35:43108] by server-2.bemta-4.messagelabs.com id
	23/D3-06539-416E0535; Fri, 18 Apr 2014 08:45:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1397810706!9920178!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26954 invoked from network); 18 Apr 2014 08:45:07 -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;
	18 Apr 2014 08:45:07 -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 1Wb4Py-0005NK-E2
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Pw-0003PZ-W9
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:06 +0000
Date: Fri, 18 Apr 2014 08:45:04 +0000
Message-Id: <E1Wb4Pw-0003PZ-W9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl/gentypes.py: generate empty map
	for None field in keyed-union
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 5c77003b524af15a4a8a9d33ba0f2786f3a31c2b
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Apr 10 16:18:00 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:06:45 2014 +0100

    libxl/gentypes.py: generate empty map for None field in keyed-union
    
    Without this the generated JSON is malformed.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/gentypes.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py
index 1a3b91c..917e2c2 100644
--- a/tools/libxl/gentypes.py
+++ b/tools/libxl/gentypes.py
@@ -220,6 +220,13 @@ def libxl_C_type_gen_json(ty, v, indent = "    ", parent = None):
             s += "case %s:\n" % f.enumname
             if f.type is not None:
                 s += libxl_C_type_gen_json(f.type, fexpr, indent + "    ", nparent)
+            else:
+                s += "    s = yajl_gen_map_open(hand);\n"
+                s += "    if (s != yajl_gen_status_ok)\n"
+                s += "        goto out;\n"
+                s += "    s = yajl_gen_map_close(hand);\n"
+                s += "    if (s != yajl_gen_status_ok)\n"
+                s += "        goto out;\n"
             s += "    break;\n"
         s += "}\n"
     elif isinstance(ty, idl.Struct) and (parent is None or ty.json_fn is None):
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:45:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:45: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 1Wb4Q2-0005zA-Nr; Fri, 18 Apr 2014 08:45:10 +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 1Wb4Q1-0005yk-3o
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:09 +0000
Received: from [85.158.143.35:43108] by server-2.bemta-4.messagelabs.com id
	23/D3-06539-416E0535; Fri, 18 Apr 2014 08:45:08 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-21.messagelabs.com!1397810706!9920178!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26954 invoked from network); 18 Apr 2014 08:45:07 -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;
	18 Apr 2014 08:45:07 -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 1Wb4Py-0005NK-E2
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:06 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Pw-0003PZ-W9
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:06 +0000
Date: Fri, 18 Apr 2014 08:45:04 +0000
Message-Id: <E1Wb4Pw-0003PZ-W9@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl/gentypes.py: generate empty map
	for None field in keyed-union
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 5c77003b524af15a4a8a9d33ba0f2786f3a31c2b
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Apr 10 16:18:00 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:06:45 2014 +0100

    libxl/gentypes.py: generate empty map for None field in keyed-union
    
    Without this the generated JSON is malformed.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/gentypes.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py
index 1a3b91c..917e2c2 100644
--- a/tools/libxl/gentypes.py
+++ b/tools/libxl/gentypes.py
@@ -220,6 +220,13 @@ def libxl_C_type_gen_json(ty, v, indent = "    ", parent = None):
             s += "case %s:\n" % f.enumname
             if f.type is not None:
                 s += libxl_C_type_gen_json(f.type, fexpr, indent + "    ", nparent)
+            else:
+                s += "    s = yajl_gen_map_open(hand);\n"
+                s += "    if (s != yajl_gen_status_ok)\n"
+                s += "        goto out;\n"
+                s += "    s = yajl_gen_map_close(hand);\n"
+                s += "    if (s != yajl_gen_status_ok)\n"
+                s += "        goto out;\n"
             s += "    break;\n"
         s += "}\n"
     elif isinstance(ty, idl.Struct) and (parent is None or ty.json_fn is None):
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:45:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:45:53 +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 1Wb4QP-00062Y-8F; Fri, 18 Apr 2014 08:45:33 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QN-00062H-KO
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:31 +0000
Received: from [85.158.137.68:5980] by server-13.bemta-3.messagelabs.com id
	12/6F-18692-A26E0535; Fri, 18 Apr 2014 08:45:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1397810729!7748218!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2633 invoked from network); 18 Apr 2014 08:45:30 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:45:30 -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 1Wb4QK-0005Nd-Nw
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:28 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QJ-0003QQ-Lb
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:28 +0000
Date: Fri, 18 Apr 2014 08:45:27 +0000
Message-Id: <E1Wb4QJ-0003QQ-Lb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl/save-helper: Code motion of
	logging functions
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 dd7317a4a24d764d31caf6bc87060b399bfd5648
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Apr 11 16:46:13 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:07:52 2014 +0100

    libxl/save-helper: Code motion of logging functions
    
    ... in preparation for a subsequent functional fix
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_save_helper.c |   58 +++++++++++++++++++-------------------
 1 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/tools/libxl/libxl_save_helper.c b/tools/libxl/libxl_save_helper.c
index 880565e..d6fa5dd 100644
--- a/tools/libxl/libxl_save_helper.c
+++ b/tools/libxl/libxl_save_helper.c
@@ -47,6 +47,35 @@
 #include "xenguest.h"
 #include "_libxl_save_msgs_helper.h"
 
+/*----- logger -----*/
+
+static void tellparent_vmessage(xentoollog_logger *logger_in,
+                                xentoollog_level level,
+                                int errnoval,
+                                const char *context,
+                                const char *format,
+                                va_list al)
+{
+    char *formatted;
+    int r = vasprintf(&formatted, format, al);
+    if (r < 0) { perror("memory allocation failed during logging"); exit(-1); }
+    helper_stub_log(level, errnoval, context, formatted, 0);
+    free(formatted);
+}
+
+static void tellparent_progress(struct xentoollog_logger *logger_in,
+                                const char *context,
+                                const char *doing_what, int percent,
+                                unsigned long done, unsigned long total)
+{
+    helper_stub_progress(context, doing_what, done, total, 0);
+}
+
+static void tellparent_destroy(struct xentoollog_logger *logger_in)
+{
+    abort();
+}
+
 /*----- globals -----*/
 
 static const char *program = "libxl-save-helper";
@@ -86,39 +115,10 @@ static void *xmalloc(size_t sz)
     return r;
 }
 
-/*----- logger -----*/
-
 typedef struct {
     xentoollog_logger vtable;
 } xentoollog_logger_tellparent;
 
-static void tellparent_vmessage(xentoollog_logger *logger_in,
-                                xentoollog_level level,
-                                int errnoval,
-                                const char *context,
-                                const char *format,
-                                va_list al)
-{
-    char *formatted;
-    int r = vasprintf(&formatted, format, al);
-    if (r < 0) { perror("memory allocation failed during logging"); exit(-1); }
-    helper_stub_log(level, errnoval, context, formatted, 0);
-    free(formatted);
-}
-
-static void tellparent_progress(struct xentoollog_logger *logger_in,
-                                const char *context,
-                                const char *doing_what, int percent,
-                                unsigned long done, unsigned long total)
-{
-    helper_stub_progress(context, doing_what, done, total, 0);
-}
-
-static void tellparent_destroy(struct xentoollog_logger *logger_in)
-{
-    abort();
-}
-
 static xentoollog_logger_tellparent *createlogger_tellparent(void)
 {
     xentoollog_logger_tellparent newlogger;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:45:53 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:45:53 +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 1Wb4QP-00062Y-8F; Fri, 18 Apr 2014 08:45:33 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QN-00062H-KO
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:31 +0000
Received: from [85.158.137.68:5980] by server-13.bemta-3.messagelabs.com id
	12/6F-18692-A26E0535; Fri, 18 Apr 2014 08:45:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-6.tower-31.messagelabs.com!1397810729!7748218!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 2633 invoked from network); 18 Apr 2014 08:45:30 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-6.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:45:30 -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 1Wb4QK-0005Nd-Nw
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:28 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QJ-0003QQ-Lb
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:28 +0000
Date: Fri, 18 Apr 2014 08:45:27 +0000
Message-Id: <E1Wb4QJ-0003QQ-Lb@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl/save-helper: Code motion of
	logging functions
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 dd7317a4a24d764d31caf6bc87060b399bfd5648
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Apr 11 16:46:13 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:07:52 2014 +0100

    libxl/save-helper: Code motion of logging functions
    
    ... in preparation for a subsequent functional fix
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_save_helper.c |   58 +++++++++++++++++++-------------------
 1 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/tools/libxl/libxl_save_helper.c b/tools/libxl/libxl_save_helper.c
index 880565e..d6fa5dd 100644
--- a/tools/libxl/libxl_save_helper.c
+++ b/tools/libxl/libxl_save_helper.c
@@ -47,6 +47,35 @@
 #include "xenguest.h"
 #include "_libxl_save_msgs_helper.h"
 
+/*----- logger -----*/
+
+static void tellparent_vmessage(xentoollog_logger *logger_in,
+                                xentoollog_level level,
+                                int errnoval,
+                                const char *context,
+                                const char *format,
+                                va_list al)
+{
+    char *formatted;
+    int r = vasprintf(&formatted, format, al);
+    if (r < 0) { perror("memory allocation failed during logging"); exit(-1); }
+    helper_stub_log(level, errnoval, context, formatted, 0);
+    free(formatted);
+}
+
+static void tellparent_progress(struct xentoollog_logger *logger_in,
+                                const char *context,
+                                const char *doing_what, int percent,
+                                unsigned long done, unsigned long total)
+{
+    helper_stub_progress(context, doing_what, done, total, 0);
+}
+
+static void tellparent_destroy(struct xentoollog_logger *logger_in)
+{
+    abort();
+}
+
 /*----- globals -----*/
 
 static const char *program = "libxl-save-helper";
@@ -86,39 +115,10 @@ static void *xmalloc(size_t sz)
     return r;
 }
 
-/*----- logger -----*/
-
 typedef struct {
     xentoollog_logger vtable;
 } xentoollog_logger_tellparent;
 
-static void tellparent_vmessage(xentoollog_logger *logger_in,
-                                xentoollog_level level,
-                                int errnoval,
-                                const char *context,
-                                const char *format,
-                                va_list al)
-{
-    char *formatted;
-    int r = vasprintf(&formatted, format, al);
-    if (r < 0) { perror("memory allocation failed during logging"); exit(-1); }
-    helper_stub_log(level, errnoval, context, formatted, 0);
-    free(formatted);
-}
-
-static void tellparent_progress(struct xentoollog_logger *logger_in,
-                                const char *context,
-                                const char *doing_what, int percent,
-                                unsigned long done, unsigned long total)
-{
-    helper_stub_progress(context, doing_what, done, total, 0);
-}
-
-static void tellparent_destroy(struct xentoollog_logger *logger_in)
-{
-    abort();
-}
-
 static xentoollog_logger_tellparent *createlogger_tellparent(void)
 {
     xentoollog_logger_tellparent newlogger;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:01 +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 1Wb4QD-00060x-0x; Fri, 18 Apr 2014 08:45:21 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QC-00060U-Bj
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:20 +0000
Received: from [193.109.254.147:45520] by server-4.bemta-14.messagelabs.com id
	0A/C4-02781-F16E0535; Fri, 18 Apr 2014 08:45:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1397810717!9093819!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10881 invoked from network); 18 Apr 2014 08:45:18 -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;
	18 Apr 2014 08:45:18 -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 1Wb4Q9-0005NQ-IX
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Q8-0003Q4-Gq
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:17 +0000
Date: Fri, 18 Apr 2014 08:45:16 +0000
Message-Id: <E1Wb4Q8-0003Q4-Gq@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl_types.idl: replace empty Struct
	with None for libxl_event
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 a842594822716da314a685b148c59089994e4194
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Apr 10 16:20:22 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:06:49 2014 +0100

    libxl_types.idl: replace empty Struct with None for libxl_event
    
    Now we generate empty map for None, the empty Struct trick is not
    necessary anymore.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_types.idl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 612645c..0f7bbf8 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -588,7 +588,7 @@ libxl_event = Struct("event",[
           [("domain_shutdown", Struct(None, [
                                              ("shutdown_reason", uint8),
                                       ])),
-           ("domain_death", Struct(None, [])),
+           ("domain_death", None),
            ("disk_eject", Struct(None, [
                                         ("vdev", string),
                                         ("disk", libxl_device_disk),
@@ -596,5 +596,5 @@ libxl_event = Struct("event",[
            ("operation_complete", Struct(None, [
                                         ("rc", integer),
                                  ])),
-           ("domain_create_console_available", Struct(None, [])),
+           ("domain_create_console_available", None),
            ]))])
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:01 +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 1Wb4QZ-00063a-BU; Fri, 18 Apr 2014 08:45:43 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QX-00063M-Gw
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:41 +0000
Received: from [193.109.254.147:42533] by server-7.bemta-14.messagelabs.com id
	32/B4-17726-436E0535; Fri, 18 Apr 2014 08:45:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1397810739!9089003!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21331 invoked from network); 18 Apr 2014 08:45:40 -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;
	18 Apr 2014 08:45:40 -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 1Wb4QU-0005Ng-T5
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QU-0003Qq-R8
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:38 +0000
Date: Fri, 18 Apr 2014 08:45:38 +0000
Message-Id: <E1Wb4QU-0003Qq-R8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxl: Improvements to
	libxl-save-helper when using valgrind
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 82774acf35575d40bd90606595e8170ae38ded50
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Apr 11 16:46:14 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:08:02 2014 +0100

    tools/libxl: Improvements to libxl-save-helper when using valgrind
    
    Fix two unfree()'d allocations in libxl-save-helper, to get them out of the
    way of other legitimate complaints from valgrind.
    
    The first is easy; close the interface to libxc when done with it.
    
    The second can be fixed by removing the complexity of creating the logging
    instance.  Initialise the global 'logger' in place rather than as an
    allocation, which requires changing the indirection of its use in 5 locations.
    
    struct xentoollog_logger_tellparent and function createlogger_tellparent() are
    now unused and removed.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_save_helper.c |   31 ++++++++++---------------------
 1 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/tools/libxl/libxl_save_helper.c b/tools/libxl/libxl_save_helper.c
index d6fa5dd..c36314c 100644
--- a/tools/libxl/libxl_save_helper.c
+++ b/tools/libxl/libxl_save_helper.c
@@ -79,7 +79,11 @@ static void tellparent_destroy(struct xentoollog_logger *logger_in)
 /*----- globals -----*/
 
 static const char *program = "libxl-save-helper";
-static xentoollog_logger *logger;
+static xentoollog_logger logger = {
+    tellparent_vmessage,
+    tellparent_progress,
+    tellparent_destroy,
+};
 static xc_interface *xch;
 
 /*----- error handling -----*/
@@ -90,7 +94,7 @@ static void fail(int errnoval, const char *fmt, ...)
 {
     va_list al;
     va_start(al,fmt);
-    xtl_logv(logger,XTL_ERROR,errnoval,program,fmt,al);
+    xtl_logv(&logger,XTL_ERROR,errnoval,program,fmt,al);
     exit(-1);
 }
 
@@ -115,16 +119,6 @@ static void *xmalloc(size_t sz)
     return r;
 }
 
-typedef struct {
-    xentoollog_logger vtable;
-} xentoollog_logger_tellparent;
-
-static xentoollog_logger_tellparent *createlogger_tellparent(void)
-{
-    xentoollog_logger_tellparent newlogger;
-    return XTL_NEW_LOGGER(tellparent, newlogger);
-}
-
 /*----- helper functions called by autogenerated stubs -----*/
 
 unsigned char * helper_allocbuf(int len, void *user)
@@ -184,22 +178,17 @@ static int toolstack_save_cb(uint32_t domid, uint8_t **buf,
 }
 
 static void startup(const char *op) {
-    logger = (xentoollog_logger*)createlogger_tellparent();
-    if (!logger) {
-        fprintf(stderr, "%s: cannot initialise logger\n", program);
-        exit(-1);
-    }
-
-    xtl_log(logger,XTL_DEBUG,0,program,"starting %s",op);
+    xtl_log(&logger,XTL_DEBUG,0,program,"starting %s",op);
 
-    xch = xc_interface_open(logger,logger,0);
+    xch = xc_interface_open(&logger,&logger,0);
     if (!xch) fail(errno,"xc_interface_open failed");
 }
 
 static void complete(int retval) {
     int errnoval = retval ? errno : 0; /* suppress irrelevant errnos */
-    xtl_log(logger,XTL_DEBUG,errnoval,program,"complete r=%d",retval);
+    xtl_log(&logger,XTL_DEBUG,errnoval,program,"complete r=%d",retval);
     helper_stub_complete(retval,errnoval,0);
+    xc_interface_close(xch);
     exit(0);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:01 +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 1Wb4QD-00060x-0x; Fri, 18 Apr 2014 08:45:21 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QC-00060U-Bj
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:20 +0000
Received: from [193.109.254.147:45520] by server-4.bemta-14.messagelabs.com id
	0A/C4-02781-F16E0535; Fri, 18 Apr 2014 08:45:19 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-27.messagelabs.com!1397810717!9093819!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10881 invoked from network); 18 Apr 2014 08:45:18 -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;
	18 Apr 2014 08:45:18 -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 1Wb4Q9-0005NQ-IX
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:17 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Q8-0003Q4-Gq
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:17 +0000
Date: Fri, 18 Apr 2014 08:45:16 +0000
Message-Id: <E1Wb4Q8-0003Q4-Gq@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] libxl_types.idl: replace empty Struct
	with None for libxl_event
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 a842594822716da314a685b148c59089994e4194
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Thu Apr 10 16:20:22 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:06:49 2014 +0100

    libxl_types.idl: replace empty Struct with None for libxl_event
    
    Now we generate empty map for None, the empty Struct trick is not
    necessary anymore.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_types.idl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 612645c..0f7bbf8 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -588,7 +588,7 @@ libxl_event = Struct("event",[
           [("domain_shutdown", Struct(None, [
                                              ("shutdown_reason", uint8),
                                       ])),
-           ("domain_death", Struct(None, [])),
+           ("domain_death", None),
            ("disk_eject", Struct(None, [
                                         ("vdev", string),
                                         ("disk", libxl_device_disk),
@@ -596,5 +596,5 @@ libxl_event = Struct("event",[
            ("operation_complete", Struct(None, [
                                         ("rc", integer),
                                  ])),
-           ("domain_create_console_available", Struct(None, [])),
+           ("domain_create_console_available", None),
            ]))])
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:01 +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 1Wb4Qj-00064a-E2; Fri, 18 Apr 2014 08:45:53 +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 1Wb4Qh-00064O-If
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:51 +0000
Received: from [85.158.143.35:3192] by server-3.bemta-4.messagelabs.com id
	60/9F-13602-E36E0535; Fri, 18 Apr 2014 08:45:50 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1397810749!9863122!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26742 invoked from network); 18 Apr 2014 08:45:50 -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;
	18 Apr 2014 08:45:50 -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 1Wb4Qf-0005Nj-2G
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:49 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Qf-0003Rq-02
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:49 +0000
Date: Fri, 18 Apr 2014 08:45:49 +0000
Message-Id: <E1Wb4Qf-0003Rq-02@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxc: Remove valgrind
	conditional sections from libxc
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 b1dfc531d8adbb6a1dfe541b398cb30bf143316f
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 15 19:18:42 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:08:54 2014 +0100

    tools/libxc: Remove valgrind conditional sections from libxc
    
    The ifdef sections are not enabled at all in tree, and their justification is
    out of date now that Xen hypercall support exists upstream in valgrind.
    
    This also removes a commented-out tweak to CFLAGS in the libxc Makefile which
    is not being used, and becomes stale given this patch.  In the unlikely event
    that any developers were using the line, the results can be more easily
    achieved by tweaking APPEND_CFLAGS in the environment.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/Makefile     |    4 ----
 tools/libxc/xc_private.c |    9 ---------
 tools/libxc/xc_private.h |   11 -----------
 tools/libxc/xc_tmem.c    |   10 ----------
 4 files changed, 0 insertions(+), 34 deletions(-)

diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 2cca2b2..a74b19e 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -95,10 +95,6 @@ CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE
 
 CFLAGS	+= $(PTHREAD_CFLAGS)
 
-# Define this to make it possible to run valgrind on code linked with these
-# libraries.
-#CFLAGS   += -DVALGRIND -O0 -ggdb3
-
 CTRL_LIB_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS-y))
 CTRL_PIC_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS-y))
 
diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
index 33ed15b..0e18892 100644
--- a/tools/libxc/xc_private.c
+++ b/tools/libxc/xc_private.c
@@ -588,10 +588,6 @@ int xc_get_pfn_list(xc_interface *xch,
     DECLARE_HYPERCALL_BOUNCE(pfn_buf, max_pfns * sizeof(*pfn_buf), XC_HYPERCALL_BUFFER_BOUNCE_OUT);
     int ret;
 
-#ifdef VALGRIND
-    memset(pfn_buf, 0, max_pfns * sizeof(*pfn_buf));
-#endif
-
     if ( xc_hypercall_bounce_pre(xch, pfn_buf) )
     {
         PERROR("xc_get_pfn_list: pfn_buf bounce failed");
@@ -707,11 +703,6 @@ int xc_version(xc_interface *xch, int cmd, void *arg)
         return -ENOMEM;
     }
 
-#ifdef VALGRIND
-    if (sz != 0)
-        memset(hypercall_bounce_get(bounce), 0, sz);
-#endif
-
     rc = do_xen_version(xch, cmd, HYPERCALL_BUFFER(arg));
 
     if ( sz != 0 )
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index bd2eb86..670a82d 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -34,22 +34,11 @@
 
 #include <xen/sys/privcmd.h>
 
-/* valgrind cannot see when a hypercall has filled in some values.  For this
-   reason, we must zero the privcmd_hypercall_t or domctl/sysctl instance
-   before a call, if using valgrind.  */
-#ifdef VALGRIND
-#define DECLARE_HYPERCALL privcmd_hypercall_t hypercall = { 0 }
-#define DECLARE_DOMCTL struct xen_domctl domctl = { 0 }
-#define DECLARE_SYSCTL struct xen_sysctl sysctl = { 0 }
-#define DECLARE_PHYSDEV_OP struct physdev_op physdev_op = { 0 }
-#define DECLARE_FLASK_OP struct xen_flask_op op = { 0 }
-#else
 #define DECLARE_HYPERCALL privcmd_hypercall_t hypercall
 #define DECLARE_DOMCTL struct xen_domctl domctl
 #define DECLARE_SYSCTL struct xen_sysctl sysctl
 #define DECLARE_PHYSDEV_OP struct physdev_op physdev_op
 #define DECLARE_FLASK_OP struct xen_flask_op op
-#endif
 
 #undef PAGE_SHIFT
 #undef PAGE_SIZE
diff --git a/tools/libxc/xc_tmem.c b/tools/libxc/xc_tmem.c
index 61e1549..3261e10 100644
--- a/tools/libxc/xc_tmem.c
+++ b/tools/libxc/xc_tmem.c
@@ -70,11 +70,6 @@ int xc_tmem_control(xc_interface *xch,
     op.u.ctrl.oid[1] = 0;
     op.u.ctrl.oid[2] = 0;
 
-#ifdef VALGRIND
-    if (arg1 != 0)
-        memset(buf, 0, arg1);
-#endif
-
     if ( subop == TMEMC_LIST && arg1 != 0 )
     {
         if ( buf == NULL )
@@ -120,11 +115,6 @@ int xc_tmem_control_oid(xc_interface *xch,
     op.u.ctrl.oid[1] = oid.oid[1];
     op.u.ctrl.oid[2] = oid.oid[2];
 
-#ifdef VALGRIND
-    if (arg1 != 0)
-        memset(buf, 0, arg1);
-#endif
-
     if ( subop == TMEMC_LIST && arg1 != 0 )
     {
         if ( buf == NULL )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:01 +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 1Wb4QZ-00063a-BU; Fri, 18 Apr 2014 08:45:43 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QX-00063M-Gw
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:41 +0000
Received: from [193.109.254.147:42533] by server-7.bemta-14.messagelabs.com id
	32/B4-17726-436E0535; Fri, 18 Apr 2014 08:45:40 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-27.messagelabs.com!1397810739!9089003!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 21331 invoked from network); 18 Apr 2014 08:45:40 -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;
	18 Apr 2014 08:45:40 -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 1Wb4QU-0005Ng-T5
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:38 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4QU-0003Qq-R8
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:38 +0000
Date: Fri, 18 Apr 2014 08:45:38 +0000
Message-Id: <E1Wb4QU-0003Qq-R8@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxl: Improvements to
	libxl-save-helper when using valgrind
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 82774acf35575d40bd90606595e8170ae38ded50
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Apr 11 16:46:14 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:08:02 2014 +0100

    tools/libxl: Improvements to libxl-save-helper when using valgrind
    
    Fix two unfree()'d allocations in libxl-save-helper, to get them out of the
    way of other legitimate complaints from valgrind.
    
    The first is easy; close the interface to libxc when done with it.
    
    The second can be fixed by removing the complexity of creating the logging
    instance.  Initialise the global 'logger' in place rather than as an
    allocation, which requires changing the indirection of its use in 5 locations.
    
    struct xentoollog_logger_tellparent and function createlogger_tellparent() are
    now unused and removed.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_save_helper.c |   31 ++++++++++---------------------
 1 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/tools/libxl/libxl_save_helper.c b/tools/libxl/libxl_save_helper.c
index d6fa5dd..c36314c 100644
--- a/tools/libxl/libxl_save_helper.c
+++ b/tools/libxl/libxl_save_helper.c
@@ -79,7 +79,11 @@ static void tellparent_destroy(struct xentoollog_logger *logger_in)
 /*----- globals -----*/
 
 static const char *program = "libxl-save-helper";
-static xentoollog_logger *logger;
+static xentoollog_logger logger = {
+    tellparent_vmessage,
+    tellparent_progress,
+    tellparent_destroy,
+};
 static xc_interface *xch;
 
 /*----- error handling -----*/
@@ -90,7 +94,7 @@ static void fail(int errnoval, const char *fmt, ...)
 {
     va_list al;
     va_start(al,fmt);
-    xtl_logv(logger,XTL_ERROR,errnoval,program,fmt,al);
+    xtl_logv(&logger,XTL_ERROR,errnoval,program,fmt,al);
     exit(-1);
 }
 
@@ -115,16 +119,6 @@ static void *xmalloc(size_t sz)
     return r;
 }
 
-typedef struct {
-    xentoollog_logger vtable;
-} xentoollog_logger_tellparent;
-
-static xentoollog_logger_tellparent *createlogger_tellparent(void)
-{
-    xentoollog_logger_tellparent newlogger;
-    return XTL_NEW_LOGGER(tellparent, newlogger);
-}
-
 /*----- helper functions called by autogenerated stubs -----*/
 
 unsigned char * helper_allocbuf(int len, void *user)
@@ -184,22 +178,17 @@ static int toolstack_save_cb(uint32_t domid, uint8_t **buf,
 }
 
 static void startup(const char *op) {
-    logger = (xentoollog_logger*)createlogger_tellparent();
-    if (!logger) {
-        fprintf(stderr, "%s: cannot initialise logger\n", program);
-        exit(-1);
-    }
-
-    xtl_log(logger,XTL_DEBUG,0,program,"starting %s",op);
+    xtl_log(&logger,XTL_DEBUG,0,program,"starting %s",op);
 
-    xch = xc_interface_open(logger,logger,0);
+    xch = xc_interface_open(&logger,&logger,0);
     if (!xch) fail(errno,"xc_interface_open failed");
 }
 
 static void complete(int retval) {
     int errnoval = retval ? errno : 0; /* suppress irrelevant errnos */
-    xtl_log(logger,XTL_DEBUG,errnoval,program,"complete r=%d",retval);
+    xtl_log(&logger,XTL_DEBUG,errnoval,program,"complete r=%d",retval);
     helper_stub_complete(retval,errnoval,0);
+    xc_interface_close(xch);
     exit(0);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:01 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:01 +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 1Wb4Qj-00064a-E2; Fri, 18 Apr 2014 08:45:53 +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 1Wb4Qh-00064O-If
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:51 +0000
Received: from [85.158.143.35:3192] by server-3.bemta-4.messagelabs.com id
	60/9F-13602-E36E0535; Fri, 18 Apr 2014 08:45:50 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-2.tower-21.messagelabs.com!1397810749!9863122!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 26742 invoked from network); 18 Apr 2014 08:45:50 -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;
	18 Apr 2014 08:45:50 -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 1Wb4Qf-0005Nj-2G
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:49 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Qf-0003Rq-02
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:49 +0000
Date: Fri, 18 Apr 2014 08:45:49 +0000
Message-Id: <E1Wb4Qf-0003Rq-02@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] tools/libxc: Remove valgrind
	conditional sections from libxc
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 b1dfc531d8adbb6a1dfe541b398cb30bf143316f
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 15 19:18:42 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:08:54 2014 +0100

    tools/libxc: Remove valgrind conditional sections from libxc
    
    The ifdef sections are not enabled at all in tree, and their justification is
    out of date now that Xen hypercall support exists upstream in valgrind.
    
    This also removes a commented-out tweak to CFLAGS in the libxc Makefile which
    is not being used, and becomes stale given this patch.  In the unlikely event
    that any developers were using the line, the results can be more easily
    achieved by tweaking APPEND_CFLAGS in the environment.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/Makefile     |    4 ----
 tools/libxc/xc_private.c |    9 ---------
 tools/libxc/xc_private.h |   11 -----------
 tools/libxc/xc_tmem.c    |   10 ----------
 4 files changed, 0 insertions(+), 34 deletions(-)

diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 2cca2b2..a74b19e 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -95,10 +95,6 @@ CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE
 
 CFLAGS	+= $(PTHREAD_CFLAGS)
 
-# Define this to make it possible to run valgrind on code linked with these
-# libraries.
-#CFLAGS   += -DVALGRIND -O0 -ggdb3
-
 CTRL_LIB_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS-y))
 CTRL_PIC_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS-y))
 
diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
index 33ed15b..0e18892 100644
--- a/tools/libxc/xc_private.c
+++ b/tools/libxc/xc_private.c
@@ -588,10 +588,6 @@ int xc_get_pfn_list(xc_interface *xch,
     DECLARE_HYPERCALL_BOUNCE(pfn_buf, max_pfns * sizeof(*pfn_buf), XC_HYPERCALL_BUFFER_BOUNCE_OUT);
     int ret;
 
-#ifdef VALGRIND
-    memset(pfn_buf, 0, max_pfns * sizeof(*pfn_buf));
-#endif
-
     if ( xc_hypercall_bounce_pre(xch, pfn_buf) )
     {
         PERROR("xc_get_pfn_list: pfn_buf bounce failed");
@@ -707,11 +703,6 @@ int xc_version(xc_interface *xch, int cmd, void *arg)
         return -ENOMEM;
     }
 
-#ifdef VALGRIND
-    if (sz != 0)
-        memset(hypercall_bounce_get(bounce), 0, sz);
-#endif
-
     rc = do_xen_version(xch, cmd, HYPERCALL_BUFFER(arg));
 
     if ( sz != 0 )
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index bd2eb86..670a82d 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -34,22 +34,11 @@
 
 #include <xen/sys/privcmd.h>
 
-/* valgrind cannot see when a hypercall has filled in some values.  For this
-   reason, we must zero the privcmd_hypercall_t or domctl/sysctl instance
-   before a call, if using valgrind.  */
-#ifdef VALGRIND
-#define DECLARE_HYPERCALL privcmd_hypercall_t hypercall = { 0 }
-#define DECLARE_DOMCTL struct xen_domctl domctl = { 0 }
-#define DECLARE_SYSCTL struct xen_sysctl sysctl = { 0 }
-#define DECLARE_PHYSDEV_OP struct physdev_op physdev_op = { 0 }
-#define DECLARE_FLASK_OP struct xen_flask_op op = { 0 }
-#else
 #define DECLARE_HYPERCALL privcmd_hypercall_t hypercall
 #define DECLARE_DOMCTL struct xen_domctl domctl
 #define DECLARE_SYSCTL struct xen_sysctl sysctl
 #define DECLARE_PHYSDEV_OP struct physdev_op physdev_op
 #define DECLARE_FLASK_OP struct xen_flask_op op
-#endif
 
 #undef PAGE_SHIFT
 #undef PAGE_SIZE
diff --git a/tools/libxc/xc_tmem.c b/tools/libxc/xc_tmem.c
index 61e1549..3261e10 100644
--- a/tools/libxc/xc_tmem.c
+++ b/tools/libxc/xc_tmem.c
@@ -70,11 +70,6 @@ int xc_tmem_control(xc_interface *xch,
     op.u.ctrl.oid[1] = 0;
     op.u.ctrl.oid[2] = 0;
 
-#ifdef VALGRIND
-    if (arg1 != 0)
-        memset(buf, 0, arg1);
-#endif
-
     if ( subop == TMEMC_LIST && arg1 != 0 )
     {
         if ( buf == NULL )
@@ -120,11 +115,6 @@ int xc_tmem_control_oid(xc_interface *xch,
     op.u.ctrl.oid[1] = oid.oid[1];
     op.u.ctrl.oid[2] = oid.oid[2];
 
-#ifdef VALGRIND
-    if (arg1 != 0)
-        memset(buf, 0, arg1);
-#endif
-
     if ( subop == TMEMC_LIST && arg1 != 0 )
     {
         if ( buf == NULL )
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:03 +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 1Wb4Qt-00066p-Gj; Fri, 18 Apr 2014 08:46:03 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Qs-00065s-11
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:02 +0000
Received: from [193.109.254.147:43541] by server-16.bemta-14.messagelabs.com
	id 95/A8-16986-946E0535; Fri, 18 Apr 2014 08:46:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1397810759!9097286!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25758 invoked from network); 18 Apr 2014 08:46:00 -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;
	18 Apr 2014 08:46:00 -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 1Wb4Qp-0005Ns-77
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:59 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Qp-0003SD-4r
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:59 +0000
Date: Fri, 18 Apr 2014 08:45:59 +0000
Message-Id: <E1Wb4Qp-0003SD-4r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Pass the timer
	"clock-frequency" to DOM0 in make_timer_node()
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 94191dcee8ff9f8b925824e54741f28b954bf95e
Author:     Suriyan Ramasami <suriyan.r@gmail.com>
AuthorDate: Mon Apr 14 01:14:00 2014 -0700
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:10:57 2014 +0100

    xen/arm: Pass the timer "clock-frequency" to DOM0 in make_timer_node()
    
    If the DT representing the ARM generic timer mentions a clock-frequency,
    propragate it to the DT that is built for DOM0.
    
    This is necessary as a workaround for boards (Odroid-XU) where CNTFRQ is not
    set or returns a wrong value.
    
    Ideally CNTFRQ should be set by the boot loader. The bootloader should respect
    the ARM ARM (see B.8.1.1):
        "The CNTFRQ register is UNKNOWN at reset, and therefore the counter
        frequency must written to CNTFRQ as part of the system boot process."
    
    For the Odroid-XU the SPL BL2 code is entered in NS HYP mode which prevents
    the execution of the mcr call to set CNTFRQ.
    
    Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com>
    Reviewed-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain_build.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index df34c6d..187e071 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -618,6 +618,8 @@ static int make_timer_node(const struct domain *d, void *fdt,
     int res;
     const struct dt_irq *irq;
     gic_interrupt_t intrs[3];
+    u32 clock_frequency;
+    bool_t clock_valid;
 
     DPRINT("Create timer node\n");
 
@@ -659,6 +661,15 @@ static int make_timer_node(const struct domain *d, void *fdt,
     if ( res )
         return res;
 
+    clock_valid = dt_property_read_u32(dev, "clock-frequency",
+                                       &clock_frequency);
+    if ( clock_valid )
+    {
+        res = fdt_property_cell(fdt, "clock-frequency", clock_frequency);
+        if ( res )
+            return res;
+    }
+
     res = fdt_end_node(fdt);
 
     return res;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:03 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:03 +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 1Wb4Qt-00066p-Gj; Fri, 18 Apr 2014 08:46:03 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Qs-00065s-11
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:02 +0000
Received: from [193.109.254.147:43541] by server-16.bemta-14.messagelabs.com
	id 95/A8-16986-946E0535; Fri, 18 Apr 2014 08:46:01 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-27.messagelabs.com!1397810759!9097286!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 25758 invoked from network); 18 Apr 2014 08:46:00 -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;
	18 Apr 2014 08:46:00 -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 1Wb4Qp-0005Ns-77
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:59 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Qp-0003SD-4r
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:45:59 +0000
Date: Fri, 18 Apr 2014 08:45:59 +0000
Message-Id: <E1Wb4Qp-0003SD-4r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] xen/arm: Pass the timer
	"clock-frequency" to DOM0 in make_timer_node()
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 94191dcee8ff9f8b925824e54741f28b954bf95e
Author:     Suriyan Ramasami <suriyan.r@gmail.com>
AuthorDate: Mon Apr 14 01:14:00 2014 -0700
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:10:57 2014 +0100

    xen/arm: Pass the timer "clock-frequency" to DOM0 in make_timer_node()
    
    If the DT representing the ARM generic timer mentions a clock-frequency,
    propragate it to the DT that is built for DOM0.
    
    This is necessary as a workaround for boards (Odroid-XU) where CNTFRQ is not
    set or returns a wrong value.
    
    Ideally CNTFRQ should be set by the boot loader. The bootloader should respect
    the ARM ARM (see B.8.1.1):
        "The CNTFRQ register is UNKNOWN at reset, and therefore the counter
        frequency must written to CNTFRQ as part of the system boot process."
    
    For the Odroid-XU the SPL BL2 code is entered in NS HYP mode which prevents
    the execution of the mcr call to set CNTFRQ.
    
    Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com>
    Reviewed-by: Julien Grall <julien.grall@linaro.org>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/domain_build.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index df34c6d..187e071 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -618,6 +618,8 @@ static int make_timer_node(const struct domain *d, void *fdt,
     int res;
     const struct dt_irq *irq;
     gic_interrupt_t intrs[3];
+    u32 clock_frequency;
+    bool_t clock_valid;
 
     DPRINT("Create timer node\n");
 
@@ -659,6 +661,15 @@ static int make_timer_node(const struct domain *d, void *fdt,
     if ( res )
         return res;
 
+    clock_valid = dt_property_read_u32(dev, "clock-frequency",
+                                       &clock_frequency);
+    if ( clock_valid )
+    {
+        res = fdt_property_cell(fdt, "clock-frequency", clock_frequency);
+        if ( res )
+            return res;
+    }
+
     res = fdt_end_node(fdt);
 
     return res;
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:13 +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 1Wb4R3-00068m-JQ; Fri, 18 Apr 2014 08:46:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4R2-00068V-7c
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:12 +0000
Received: from [85.158.137.68:7735] by server-9.bemta-3.messagelabs.com id
	DA/62-30063-356E0535; Fri, 18 Apr 2014 08:46:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1397810769!7750860!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4699 invoked from network); 18 Apr 2014 08:46:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:46:10 -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 1Wb4Qz-0005Oa-JU
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Qz-0003Sy-I4
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:09 +0000
Date: Fri, 18 Apr 2014 08:46:09 +0000
Message-Id: <E1Wb4Qz-0003Sy-I4@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: fix instruction emulator test's
	xgetbv 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

commit 09c856316d67045d170679b6980f34348e4c402f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 16 18:18:35 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 16 18:18:35 2014 +0200

    x86: fix instruction emulator test's xgetbv constraints
    
    The "A" constraint, while documented up to gcc 4.5 as "The a and d
    registers, as a pair (for instructions that return half the result in
    one and half in the other)," never really behaved that (natural) way,
    but always meant (and is now also documented so) %eax _or_ %edx (%rax
    _or_ %rdx on x86-64) unless the operand was wide enough to require both
    (i.e. more than 32 bits on ix86 and more than 64 bits on x86-64).
    
    Interestingly something internal to the compiler changed between 4.4
    and 4.5 to actually expose the difference - up to gcc 4.4 I was unable
    to construct a case where, when only the low half of the result is
    actually looked at, the result would be considered to be in %edx/%rdx
    (and %eax/%rax would be treated as unmodified by the instruction).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    Tested-by: Don Slutz <dslutz@verizon.com>
---
 tools/tests/x86_emulator/test_x86_emulator.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/tests/x86_emulator/test_x86_emulator.c b/tools/tests/x86_emulator/test_x86_emulator.c
index 17b674b..0a00d5a 100644
--- a/tools/tests/x86_emulator/test_x86_emulator.c
+++ b/tools/tests/x86_emulator/test_x86_emulator.c
@@ -102,11 +102,11 @@ static int cpuid(
 
 static inline uint64_t xgetbv(uint32_t xcr)
 {
-    uint64_t res;
+    uint32_t lo, hi;
 
-    asm ( ".byte 0x0f, 0x01, 0xd0" : "=A" (res) : "c" (xcr) );
+    asm ( ".byte 0x0f, 0x01, 0xd0" : "=a" (lo), "=d" (hi) : "c" (xcr) );
 
-    return res;
+    return ((uint64_t)hi << 32) | lo;
 }
 
 #define cpu_has_avx ({ \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:13 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46:13 +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 1Wb4R3-00068m-JQ; Fri, 18 Apr 2014 08:46:13 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4R2-00068V-7c
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:12 +0000
Received: from [85.158.137.68:7735] by server-9.bemta-3.messagelabs.com id
	DA/62-30063-356E0535; Fri, 18 Apr 2014 08:46:11 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1397810769!7750860!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4699 invoked from network); 18 Apr 2014 08:46:10 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:46:10 -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 1Wb4Qz-0005Oa-JU
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:09 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Qz-0003Sy-I4
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:09 +0000
Date: Fri, 18 Apr 2014 08:46:09 +0000
Message-Id: <E1Wb4Qz-0003Sy-I4@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: fix instruction emulator test's
	xgetbv 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

commit 09c856316d67045d170679b6980f34348e4c402f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Apr 16 18:18:35 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Apr 16 18:18:35 2014 +0200

    x86: fix instruction emulator test's xgetbv constraints
    
    The "A" constraint, while documented up to gcc 4.5 as "The a and d
    registers, as a pair (for instructions that return half the result in
    one and half in the other)," never really behaved that (natural) way,
    but always meant (and is now also documented so) %eax _or_ %edx (%rax
    _or_ %rdx on x86-64) unless the operand was wide enough to require both
    (i.e. more than 32 bits on ix86 and more than 64 bits on x86-64).
    
    Interestingly something internal to the compiler changed between 4.4
    and 4.5 to actually expose the difference - up to gcc 4.4 I was unable
    to construct a case where, when only the low half of the result is
    actually looked at, the result would be considered to be in %edx/%rdx
    (and %eax/%rax would be treated as unmodified by the instruction).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Keir Fraser <keir@xen.org>
    Tested-by: Don Slutz <dslutz@verizon.com>
---
 tools/tests/x86_emulator/test_x86_emulator.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/tests/x86_emulator/test_x86_emulator.c b/tools/tests/x86_emulator/test_x86_emulator.c
index 17b674b..0a00d5a 100644
--- a/tools/tests/x86_emulator/test_x86_emulator.c
+++ b/tools/tests/x86_emulator/test_x86_emulator.c
@@ -102,11 +102,11 @@ static int cpuid(
 
 static inline uint64_t xgetbv(uint32_t xcr)
 {
-    uint64_t res;
+    uint32_t lo, hi;
 
-    asm ( ".byte 0x0f, 0x01, 0xd0" : "=A" (res) : "c" (xcr) );
+    asm ( ".byte 0x0f, 0x01, 0xd0" : "=a" (lo), "=d" (hi) : "c" (xcr) );
 
-    return res;
+    return ((uint64_t)hi << 32) | lo;
 }
 
 #define cpu_has_avx ({ \
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:25 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46: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 1Wb4RE-0006Au-Nl; Fri, 18 Apr 2014 08:46:24 +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 1Wb4RC-0006AS-OD
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:22 +0000
Received: from [85.158.143.35:48657] by server-1.bemta-4.messagelabs.com id
	BB/0E-09853-D56E0535; Fri, 18 Apr 2014 08:46:21 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-21.messagelabs.com!1397810780!1886146!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27058 invoked from network); 18 Apr 2014 08:46:20 -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;
	18 Apr 2014 08:46:20 -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 1Wb4R9-0005Og-Nl
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4R9-0003TQ-MN
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:19 +0000
Date: Fri, 18 Apr 2014 08:46:19 +0000
Message-Id: <E1Wb4R9-0003TQ-MN@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Merge branch 'staging' of
	ssh://xenbits.xen.org/home/xen/git/xen into staging
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 7100ee71b874f8bcb40ac7afc4707e3206380758
Merge: 94191dcee8ff9f8b925824e54741f28b954bf95e 09c856316d67045d170679b6980f34348e4c402f
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 16 17:28:23 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:28:23 2014 +0100

    Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into staging

 tools/tests/x86_emulator/test_x86_emulator.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:25 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46: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 1Wb4RE-0006Au-Nl; Fri, 18 Apr 2014 08:46:24 +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 1Wb4RC-0006AS-OD
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:22 +0000
Received: from [85.158.143.35:48657] by server-1.bemta-4.messagelabs.com id
	BB/0E-09853-D56E0535; Fri, 18 Apr 2014 08:46:21 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-21.messagelabs.com!1397810780!1886146!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 27058 invoked from network); 18 Apr 2014 08:46:20 -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;
	18 Apr 2014 08:46:20 -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 1Wb4R9-0005Og-Nl
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:19 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4R9-0003TQ-MN
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:19 +0000
Date: Fri, 18 Apr 2014 08:46:19 +0000
Message-Id: <E1Wb4R9-0003TQ-MN@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] Merge branch 'staging' of
	ssh://xenbits.xen.org/home/xen/git/xen into staging
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 7100ee71b874f8bcb40ac7afc4707e3206380758
Merge: 94191dcee8ff9f8b925824e54741f28b954bf95e 09c856316d67045d170679b6980f34348e4c402f
Author:     Ian Campbell <ian.campbell@citrix.com>
AuthorDate: Wed Apr 16 17:28:23 2014 +0100
Commit:     Ian Campbell <ian.campbell@citrix.com>
CommitDate: Wed Apr 16 17:28:23 2014 +0100

    Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into staging

 tools/tests/x86_emulator/test_x86_emulator.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:35 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46: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 1Wb4RP-0006Ch-QR; Fri, 18 Apr 2014 08:46:35 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4RN-0006CN-IG
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:33 +0000
Received: from [85.158.137.68:27777] by server-13.bemta-3.messagelabs.com id
	48/30-18692-866E0535; Fri, 18 Apr 2014 08:46:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1397810790!2659141!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11477 invoked from network); 18 Apr 2014 08:46:31 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:46:31 -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 1Wb4RJ-0005Or-UM
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:29 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4RJ-0003Tn-QO
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:29 +0000
Date: Fri, 18 Apr 2014 08:46:29 +0000
Message-Id: <E1Wb4RJ-0003Tn-QO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] pvh dom0: move some pv specific code
	to static functions
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 6fdf4fa9152af7ed2ae3156d521c325692efdfbc
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Thu Apr 17 10:03:41 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 17 10:03:41 2014 +0200

    pvh dom0: move some pv specific code to static functions
    
    In this preparatory patch, some pv specific code is
    carved out into static functions. No functionality change.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/domain_build.c |  347 +++++++++++++++++++++++--------------------
 1 files changed, 188 insertions(+), 159 deletions(-)

diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index f75f6e7..9b462fe 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -307,6 +307,187 @@ static void __init process_dom0_ioports_disable(void)
     }
 }
 
+static __init void mark_pv_pt_pages_rdonly(struct domain *d,
+                                           l4_pgentry_t *l4start,
+                                           unsigned long vpt_start,
+                                           unsigned long nr_pt_pages)
+{
+    unsigned long count;
+    struct page_info *page;
+    l4_pgentry_t *pl4e;
+    l3_pgentry_t *pl3e;
+    l2_pgentry_t *pl2e;
+    l1_pgentry_t *pl1e;
+
+    pl4e = l4start + l4_table_offset(vpt_start);
+    pl3e = l4e_to_l3e(*pl4e);
+    pl3e += l3_table_offset(vpt_start);
+    pl2e = l3e_to_l2e(*pl3e);
+    pl2e += l2_table_offset(vpt_start);
+    pl1e = l2e_to_l1e(*pl2e);
+    pl1e += l1_table_offset(vpt_start);
+    for ( count = 0; count < nr_pt_pages; count++ )
+    {
+        l1e_remove_flags(*pl1e, _PAGE_RW);
+        page = mfn_to_page(l1e_get_pfn(*pl1e));
+
+        /* Read-only mapping + PGC_allocated + page-table page. */
+        page->count_info         = PGC_allocated | 3;
+        page->u.inuse.type_info |= PGT_validated | 1;
+
+        /* Top-level p.t. is pinned. */
+        if ( (page->u.inuse.type_info & PGT_type_mask) ==
+             (!is_pv_32on64_domain(d) ?
+              PGT_l4_page_table : PGT_l3_page_table) )
+        {
+            page->count_info        += 1;
+            page->u.inuse.type_info += 1 | PGT_pinned;
+        }
+
+        /* Iterate. */
+        if ( !((unsigned long)++pl1e & (PAGE_SIZE - 1)) )
+        {
+            if ( !((unsigned long)++pl2e & (PAGE_SIZE - 1)) )
+            {
+                if ( !((unsigned long)++pl3e & (PAGE_SIZE - 1)) )
+                    pl3e = l4e_to_l3e(*++pl4e);
+                pl2e = l3e_to_l2e(*pl3e);
+            }
+            pl1e = l2e_to_l1e(*pl2e);
+        }
+    }
+}
+
+static __init void setup_pv_physmap(struct domain *d, unsigned long pgtbl_pfn,
+                                    unsigned long v_start, unsigned long v_end,
+                                    unsigned long vphysmap_start,
+                                    unsigned long vphysmap_end,
+                                    unsigned long nr_pages)
+{
+    struct page_info *page = NULL;
+    l4_pgentry_t *pl4e, *l4start = map_domain_page(pgtbl_pfn);
+    l3_pgentry_t *pl3e = NULL;
+    l2_pgentry_t *pl2e = NULL;
+    l1_pgentry_t *pl1e = NULL;
+
+    if ( v_start <= vphysmap_end && vphysmap_start <= v_end )
+        panic("DOM0 P->M table overlaps initial mapping");
+
+    while ( vphysmap_start < vphysmap_end )
+    {
+        if ( d->tot_pages + ((round_pgup(vphysmap_end) - vphysmap_start)
+                             >> PAGE_SHIFT) + 3 > nr_pages )
+            panic("Dom0 allocation too small for initial P->M table");
+
+        if ( pl1e )
+        {
+            unmap_domain_page(pl1e);
+            pl1e = NULL;
+        }
+        if ( pl2e )
+        {
+            unmap_domain_page(pl2e);
+            pl2e = NULL;
+        }
+        if ( pl3e )
+        {
+            unmap_domain_page(pl3e);
+            pl3e = NULL;
+        }
+        pl4e = l4start + l4_table_offset(vphysmap_start);
+        if ( !l4e_get_intpte(*pl4e) )
+        {
+            page = alloc_domheap_page(d, 0);
+            if ( !page )
+                break;
+
+            /* No mapping, PGC_allocated + page-table page. */
+            page->count_info = PGC_allocated | 2;
+            page->u.inuse.type_info = PGT_l3_page_table | PGT_validated | 1;
+            pl3e = __map_domain_page(page);
+            clear_page(pl3e);
+            *pl4e = l4e_from_page(page, L4_PROT);
+        } else
+            pl3e = map_domain_page(l4e_get_pfn(*pl4e));
+
+        pl3e += l3_table_offset(vphysmap_start);
+        if ( !l3e_get_intpte(*pl3e) )
+        {
+            if ( cpu_has_page1gb &&
+                 !(vphysmap_start & ((1UL << L3_PAGETABLE_SHIFT) - 1)) &&
+                 vphysmap_end >= vphysmap_start + (1UL << L3_PAGETABLE_SHIFT) &&
+                 (page = alloc_domheap_pages(d,
+                                             L3_PAGETABLE_SHIFT - PAGE_SHIFT,
+                                             0)) != NULL )
+            {
+                *pl3e = l3e_from_page(page, L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
+                vphysmap_start += 1UL << L3_PAGETABLE_SHIFT;
+                continue;
+            }
+            if ( (page = alloc_domheap_page(d, 0)) == NULL )
+                break;
+
+            /* No mapping, PGC_allocated + page-table page. */
+            page->count_info = PGC_allocated | 2;
+            page->u.inuse.type_info = PGT_l2_page_table | PGT_validated | 1;
+            pl2e = __map_domain_page(page);
+            clear_page(pl2e);
+            *pl3e = l3e_from_page(page, L3_PROT);
+        }
+        else
+           pl2e = map_domain_page(l3e_get_pfn(*pl3e));
+
+        pl2e += l2_table_offset(vphysmap_start);
+        if ( !l2e_get_intpte(*pl2e) )
+        {
+            if ( !(vphysmap_start & ((1UL << L2_PAGETABLE_SHIFT) - 1)) &&
+                 vphysmap_end >= vphysmap_start + (1UL << L2_PAGETABLE_SHIFT) &&
+                 (page = alloc_domheap_pages(d,
+                                             L2_PAGETABLE_SHIFT - PAGE_SHIFT,
+                                             0)) != NULL )
+            {
+                *pl2e = l2e_from_page(page, L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
+                if ( opt_allow_superpage )
+                    get_superpage(page_to_mfn(page), d);
+                vphysmap_start += 1UL << L2_PAGETABLE_SHIFT;
+                continue;
+            }
+            if ( (page = alloc_domheap_page(d, 0)) == NULL )
+                break;
+
+            /* No mapping, PGC_allocated + page-table page. */
+            page->count_info = PGC_allocated | 2;
+            page->u.inuse.type_info = PGT_l1_page_table | PGT_validated | 1;
+            pl1e = __map_domain_page(page);
+            clear_page(pl1e);
+            *pl2e = l2e_from_page(page, L2_PROT);
+        }
+        else
+            pl1e = map_domain_page(l2e_get_pfn(*pl2e));
+
+        pl1e += l1_table_offset(vphysmap_start);
+        BUG_ON(l1e_get_intpte(*pl1e));
+        page = alloc_domheap_page(d, 0);
+        if ( !page )
+            break;
+
+        *pl1e = l1e_from_page(page, L1_PROT|_PAGE_DIRTY);
+        vphysmap_start += PAGE_SIZE;
+        vphysmap_start &= PAGE_MASK;
+    }
+    if ( !page )
+        panic("Not enough RAM for DOM0 P->M table");
+
+    if ( pl1e )
+        unmap_domain_page(pl1e);
+    if ( pl2e )
+        unmap_domain_page(pl2e);
+    if ( pl3e )
+        unmap_domain_page(pl3e);
+
+    unmap_domain_page(l4start);
+}
+
 int __init construct_dom0(
     struct domain *d,
     const module_t *image, unsigned long image_headroom,
@@ -706,43 +887,8 @@ int __init construct_dom0(
     }
 
     /* Pages that are part of page tables must be read only. */
-    l4tab = l4start + l4_table_offset(vpt_start);
-    l3start = l3tab = l4e_to_l3e(*l4tab);
-    l3tab += l3_table_offset(vpt_start);
-    l2start = l2tab = l3e_to_l2e(*l3tab);
-    l2tab += l2_table_offset(vpt_start);
-    l1start = l1tab = l2e_to_l1e(*l2tab);
-    l1tab += l1_table_offset(vpt_start);
-    for ( count = 0; count < nr_pt_pages; count++ ) 
-    {
-        l1e_remove_flags(*l1tab, _PAGE_RW);
-        page = mfn_to_page(l1e_get_pfn(*l1tab));
-
-        /* Read-only mapping + PGC_allocated + page-table page. */
-        page->count_info         = PGC_allocated | 3;
-        page->u.inuse.type_info |= PGT_validated | 1;
-
-        /* Top-level p.t. is pinned. */
-        if ( (page->u.inuse.type_info & PGT_type_mask) ==
-             (!is_pv_32on64_domain(d) ?
-              PGT_l4_page_table : PGT_l3_page_table) )
-        {
-            page->count_info        += 1;
-            page->u.inuse.type_info += 1 | PGT_pinned;
-        }
-
-        /* Iterate. */
-        if ( !((unsigned long)++l1tab & (PAGE_SIZE - 1)) )
-        {
-            if ( !((unsigned long)++l2tab & (PAGE_SIZE - 1)) )
-            {
-                if ( !((unsigned long)++l3tab & (PAGE_SIZE - 1)) )
-                    l3start = l3tab = l4e_to_l3e(*++l4tab);
-                l2start = l2tab = l3e_to_l2e(*l3tab);
-            }
-            l1start = l1tab = l2e_to_l1e(*l2tab);
-        }
-    }
+    if  ( is_pv_domain(d) )
+        mark_pv_pt_pages_rdonly(d, l4start, vpt_start, nr_pt_pages);
 
     /* Mask all upcalls... */
     for ( i = 0; i < XEN_LEGACY_MAX_VCPUS; i++ )
@@ -814,132 +960,15 @@ int __init construct_dom0(
              elf_64bit(&elf) ? 64 : 32, parms.pae ? "p" : "");
 
     count = d->tot_pages;
-    l4start = map_domain_page(pagetable_get_pfn(v->arch.guest_table));
-    l3tab = NULL;
-    l2tab = NULL;
-    l1tab = NULL;
+
     /* Set up the phys->machine table if not part of the initial mapping. */
-    if ( parms.p2m_base != UNSET_ADDR )
+    if ( is_pv_domain(d) && parms.p2m_base != UNSET_ADDR )
     {
-        unsigned long va = vphysmap_start;
-
-        if ( v_start <= vphysmap_end && vphysmap_start <= v_end )
-            panic("DOM0 P->M table overlaps initial mapping");
-
-        while ( va < vphysmap_end )
-        {
-            if ( d->tot_pages + ((round_pgup(vphysmap_end) - va)
-                                 >> PAGE_SHIFT) + 3 > nr_pages )
-                panic("Dom0 allocation too small for initial P->M table");
-
-            if ( l1tab )
-            {
-                unmap_domain_page(l1tab);
-                l1tab = NULL;
-            }
-            if ( l2tab )
-            {
-                unmap_domain_page(l2tab);
-                l2tab = NULL;
-            }
-            if ( l3tab )
-            {
-                unmap_domain_page(l3tab);
-                l3tab = NULL;
-            }
-            l4tab = l4start + l4_table_offset(va);
-            if ( !l4e_get_intpte(*l4tab) )
-            {
-                page = alloc_domheap_page(d, 0);
-                if ( !page )
-                    break;
-                /* No mapping, PGC_allocated + page-table page. */
-                page->count_info = PGC_allocated | 2;
-                page->u.inuse.type_info =
-                    PGT_l3_page_table | PGT_validated | 1;
-                l3tab = __map_domain_page(page);
-                clear_page(l3tab);
-                *l4tab = l4e_from_page(page, L4_PROT);
-            } else
-                l3tab = map_domain_page(l4e_get_pfn(*l4tab));
-            l3tab += l3_table_offset(va);
-            if ( !l3e_get_intpte(*l3tab) )
-            {
-                if ( cpu_has_page1gb &&
-                     !(va & ((1UL << L3_PAGETABLE_SHIFT) - 1)) &&
-                     vphysmap_end >= va + (1UL << L3_PAGETABLE_SHIFT) &&
-                     (page = alloc_domheap_pages(d,
-                                                 L3_PAGETABLE_SHIFT -
-                                                     PAGE_SHIFT,
-                                                 0)) != NULL )
-                {
-                    *l3tab = l3e_from_page(page,
-                                           L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
-                    va += 1UL << L3_PAGETABLE_SHIFT;
-                    continue;
-                }
-                if ( (page = alloc_domheap_page(d, 0)) == NULL )
-                    break;
-                /* No mapping, PGC_allocated + page-table page. */
-                page->count_info = PGC_allocated | 2;
-                page->u.inuse.type_info =
-                    PGT_l2_page_table | PGT_validated | 1;
-                l2tab = __map_domain_page(page);
-                clear_page(l2tab);
-                *l3tab = l3e_from_page(page, L3_PROT);
-            }
-            else
-               l2tab = map_domain_page(l3e_get_pfn(*l3tab));
-            l2tab += l2_table_offset(va);
-            if ( !l2e_get_intpte(*l2tab) )
-            {
-                if ( !(va & ((1UL << L2_PAGETABLE_SHIFT) - 1)) &&
-                     vphysmap_end >= va + (1UL << L2_PAGETABLE_SHIFT) &&
-                     (page = alloc_domheap_pages(d,
-                                                 L2_PAGETABLE_SHIFT -
-                                                     PAGE_SHIFT,
-                                                 0)) != NULL )
-                {
-                    *l2tab = l2e_from_page(page,
-                                           L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
-                    if ( opt_allow_superpage )
-                        get_superpage(page_to_mfn(page), d);
-                    va += 1UL << L2_PAGETABLE_SHIFT;
-                    continue;
-                }
-                if ( (page = alloc_domheap_page(d, 0)) == NULL )
-                    break;
-                /* No mapping, PGC_allocated + page-table page. */
-                page->count_info = PGC_allocated | 2;
-                page->u.inuse.type_info =
-                    PGT_l1_page_table | PGT_validated | 1;
-                l1tab = __map_domain_page(page);
-                clear_page(l1tab);
-                *l2tab = l2e_from_page(page, L2_PROT);
-            }
-            else
-                l1tab = map_domain_page(l2e_get_pfn(*l2tab));
-            l1tab += l1_table_offset(va);
-            BUG_ON(l1e_get_intpte(*l1tab));
-            page = alloc_domheap_page(d, 0);
-            if ( !page )
-                break;
-            *l1tab = l1e_from_page(page, L1_PROT|_PAGE_DIRTY);
-            va += PAGE_SIZE;
-            va &= PAGE_MASK;
-        }
-        if ( !page )
-            panic("Not enough RAM for DOM0 P->M table");
+        pfn = pagetable_get_pfn(v->arch.guest_table);
+        setup_pv_physmap(d, pfn, v_start, v_end, vphysmap_start, vphysmap_end,
+                         nr_pages);
     }
 
-    if ( l1tab )
-        unmap_domain_page(l1tab);
-    if ( l2tab )
-        unmap_domain_page(l2tab);
-    if ( l3tab )
-        unmap_domain_page(l3tab);
-    unmap_domain_page(l4start);
-
     /* Write the phys->machine and machine->phys table entries. */
     for ( pfn = 0; pfn < count; pfn++ )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:35 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46: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 1Wb4RP-0006Ch-QR; Fri, 18 Apr 2014 08:46:35 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4RN-0006CN-IG
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:33 +0000
Received: from [85.158.137.68:27777] by server-13.bemta-3.messagelabs.com id
	48/30-18692-866E0535; Fri, 18 Apr 2014 08:46:32 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1397810790!2659141!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 11477 invoked from network); 18 Apr 2014 08:46:31 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:46:31 -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 1Wb4RJ-0005Or-UM
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:29 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4RJ-0003Tn-QO
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:29 +0000
Date: Fri, 18 Apr 2014 08:46:29 +0000
Message-Id: <E1Wb4RJ-0003Tn-QO@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] pvh dom0: move some pv specific code
	to static functions
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 6fdf4fa9152af7ed2ae3156d521c325692efdfbc
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Thu Apr 17 10:03:41 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 17 10:03:41 2014 +0200

    pvh dom0: move some pv specific code to static functions
    
    In this preparatory patch, some pv specific code is
    carved out into static functions. No functionality change.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/domain_build.c |  347 +++++++++++++++++++++++--------------------
 1 files changed, 188 insertions(+), 159 deletions(-)

diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index f75f6e7..9b462fe 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -307,6 +307,187 @@ static void __init process_dom0_ioports_disable(void)
     }
 }
 
+static __init void mark_pv_pt_pages_rdonly(struct domain *d,
+                                           l4_pgentry_t *l4start,
+                                           unsigned long vpt_start,
+                                           unsigned long nr_pt_pages)
+{
+    unsigned long count;
+    struct page_info *page;
+    l4_pgentry_t *pl4e;
+    l3_pgentry_t *pl3e;
+    l2_pgentry_t *pl2e;
+    l1_pgentry_t *pl1e;
+
+    pl4e = l4start + l4_table_offset(vpt_start);
+    pl3e = l4e_to_l3e(*pl4e);
+    pl3e += l3_table_offset(vpt_start);
+    pl2e = l3e_to_l2e(*pl3e);
+    pl2e += l2_table_offset(vpt_start);
+    pl1e = l2e_to_l1e(*pl2e);
+    pl1e += l1_table_offset(vpt_start);
+    for ( count = 0; count < nr_pt_pages; count++ )
+    {
+        l1e_remove_flags(*pl1e, _PAGE_RW);
+        page = mfn_to_page(l1e_get_pfn(*pl1e));
+
+        /* Read-only mapping + PGC_allocated + page-table page. */
+        page->count_info         = PGC_allocated | 3;
+        page->u.inuse.type_info |= PGT_validated | 1;
+
+        /* Top-level p.t. is pinned. */
+        if ( (page->u.inuse.type_info & PGT_type_mask) ==
+             (!is_pv_32on64_domain(d) ?
+              PGT_l4_page_table : PGT_l3_page_table) )
+        {
+            page->count_info        += 1;
+            page->u.inuse.type_info += 1 | PGT_pinned;
+        }
+
+        /* Iterate. */
+        if ( !((unsigned long)++pl1e & (PAGE_SIZE - 1)) )
+        {
+            if ( !((unsigned long)++pl2e & (PAGE_SIZE - 1)) )
+            {
+                if ( !((unsigned long)++pl3e & (PAGE_SIZE - 1)) )
+                    pl3e = l4e_to_l3e(*++pl4e);
+                pl2e = l3e_to_l2e(*pl3e);
+            }
+            pl1e = l2e_to_l1e(*pl2e);
+        }
+    }
+}
+
+static __init void setup_pv_physmap(struct domain *d, unsigned long pgtbl_pfn,
+                                    unsigned long v_start, unsigned long v_end,
+                                    unsigned long vphysmap_start,
+                                    unsigned long vphysmap_end,
+                                    unsigned long nr_pages)
+{
+    struct page_info *page = NULL;
+    l4_pgentry_t *pl4e, *l4start = map_domain_page(pgtbl_pfn);
+    l3_pgentry_t *pl3e = NULL;
+    l2_pgentry_t *pl2e = NULL;
+    l1_pgentry_t *pl1e = NULL;
+
+    if ( v_start <= vphysmap_end && vphysmap_start <= v_end )
+        panic("DOM0 P->M table overlaps initial mapping");
+
+    while ( vphysmap_start < vphysmap_end )
+    {
+        if ( d->tot_pages + ((round_pgup(vphysmap_end) - vphysmap_start)
+                             >> PAGE_SHIFT) + 3 > nr_pages )
+            panic("Dom0 allocation too small for initial P->M table");
+
+        if ( pl1e )
+        {
+            unmap_domain_page(pl1e);
+            pl1e = NULL;
+        }
+        if ( pl2e )
+        {
+            unmap_domain_page(pl2e);
+            pl2e = NULL;
+        }
+        if ( pl3e )
+        {
+            unmap_domain_page(pl3e);
+            pl3e = NULL;
+        }
+        pl4e = l4start + l4_table_offset(vphysmap_start);
+        if ( !l4e_get_intpte(*pl4e) )
+        {
+            page = alloc_domheap_page(d, 0);
+            if ( !page )
+                break;
+
+            /* No mapping, PGC_allocated + page-table page. */
+            page->count_info = PGC_allocated | 2;
+            page->u.inuse.type_info = PGT_l3_page_table | PGT_validated | 1;
+            pl3e = __map_domain_page(page);
+            clear_page(pl3e);
+            *pl4e = l4e_from_page(page, L4_PROT);
+        } else
+            pl3e = map_domain_page(l4e_get_pfn(*pl4e));
+
+        pl3e += l3_table_offset(vphysmap_start);
+        if ( !l3e_get_intpte(*pl3e) )
+        {
+            if ( cpu_has_page1gb &&
+                 !(vphysmap_start & ((1UL << L3_PAGETABLE_SHIFT) - 1)) &&
+                 vphysmap_end >= vphysmap_start + (1UL << L3_PAGETABLE_SHIFT) &&
+                 (page = alloc_domheap_pages(d,
+                                             L3_PAGETABLE_SHIFT - PAGE_SHIFT,
+                                             0)) != NULL )
+            {
+                *pl3e = l3e_from_page(page, L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
+                vphysmap_start += 1UL << L3_PAGETABLE_SHIFT;
+                continue;
+            }
+            if ( (page = alloc_domheap_page(d, 0)) == NULL )
+                break;
+
+            /* No mapping, PGC_allocated + page-table page. */
+            page->count_info = PGC_allocated | 2;
+            page->u.inuse.type_info = PGT_l2_page_table | PGT_validated | 1;
+            pl2e = __map_domain_page(page);
+            clear_page(pl2e);
+            *pl3e = l3e_from_page(page, L3_PROT);
+        }
+        else
+           pl2e = map_domain_page(l3e_get_pfn(*pl3e));
+
+        pl2e += l2_table_offset(vphysmap_start);
+        if ( !l2e_get_intpte(*pl2e) )
+        {
+            if ( !(vphysmap_start & ((1UL << L2_PAGETABLE_SHIFT) - 1)) &&
+                 vphysmap_end >= vphysmap_start + (1UL << L2_PAGETABLE_SHIFT) &&
+                 (page = alloc_domheap_pages(d,
+                                             L2_PAGETABLE_SHIFT - PAGE_SHIFT,
+                                             0)) != NULL )
+            {
+                *pl2e = l2e_from_page(page, L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
+                if ( opt_allow_superpage )
+                    get_superpage(page_to_mfn(page), d);
+                vphysmap_start += 1UL << L2_PAGETABLE_SHIFT;
+                continue;
+            }
+            if ( (page = alloc_domheap_page(d, 0)) == NULL )
+                break;
+
+            /* No mapping, PGC_allocated + page-table page. */
+            page->count_info = PGC_allocated | 2;
+            page->u.inuse.type_info = PGT_l1_page_table | PGT_validated | 1;
+            pl1e = __map_domain_page(page);
+            clear_page(pl1e);
+            *pl2e = l2e_from_page(page, L2_PROT);
+        }
+        else
+            pl1e = map_domain_page(l2e_get_pfn(*pl2e));
+
+        pl1e += l1_table_offset(vphysmap_start);
+        BUG_ON(l1e_get_intpte(*pl1e));
+        page = alloc_domheap_page(d, 0);
+        if ( !page )
+            break;
+
+        *pl1e = l1e_from_page(page, L1_PROT|_PAGE_DIRTY);
+        vphysmap_start += PAGE_SIZE;
+        vphysmap_start &= PAGE_MASK;
+    }
+    if ( !page )
+        panic("Not enough RAM for DOM0 P->M table");
+
+    if ( pl1e )
+        unmap_domain_page(pl1e);
+    if ( pl2e )
+        unmap_domain_page(pl2e);
+    if ( pl3e )
+        unmap_domain_page(pl3e);
+
+    unmap_domain_page(l4start);
+}
+
 int __init construct_dom0(
     struct domain *d,
     const module_t *image, unsigned long image_headroom,
@@ -706,43 +887,8 @@ int __init construct_dom0(
     }
 
     /* Pages that are part of page tables must be read only. */
-    l4tab = l4start + l4_table_offset(vpt_start);
-    l3start = l3tab = l4e_to_l3e(*l4tab);
-    l3tab += l3_table_offset(vpt_start);
-    l2start = l2tab = l3e_to_l2e(*l3tab);
-    l2tab += l2_table_offset(vpt_start);
-    l1start = l1tab = l2e_to_l1e(*l2tab);
-    l1tab += l1_table_offset(vpt_start);
-    for ( count = 0; count < nr_pt_pages; count++ ) 
-    {
-        l1e_remove_flags(*l1tab, _PAGE_RW);
-        page = mfn_to_page(l1e_get_pfn(*l1tab));
-
-        /* Read-only mapping + PGC_allocated + page-table page. */
-        page->count_info         = PGC_allocated | 3;
-        page->u.inuse.type_info |= PGT_validated | 1;
-
-        /* Top-level p.t. is pinned. */
-        if ( (page->u.inuse.type_info & PGT_type_mask) ==
-             (!is_pv_32on64_domain(d) ?
-              PGT_l4_page_table : PGT_l3_page_table) )
-        {
-            page->count_info        += 1;
-            page->u.inuse.type_info += 1 | PGT_pinned;
-        }
-
-        /* Iterate. */
-        if ( !((unsigned long)++l1tab & (PAGE_SIZE - 1)) )
-        {
-            if ( !((unsigned long)++l2tab & (PAGE_SIZE - 1)) )
-            {
-                if ( !((unsigned long)++l3tab & (PAGE_SIZE - 1)) )
-                    l3start = l3tab = l4e_to_l3e(*++l4tab);
-                l2start = l2tab = l3e_to_l2e(*l3tab);
-            }
-            l1start = l1tab = l2e_to_l1e(*l2tab);
-        }
-    }
+    if  ( is_pv_domain(d) )
+        mark_pv_pt_pages_rdonly(d, l4start, vpt_start, nr_pt_pages);
 
     /* Mask all upcalls... */
     for ( i = 0; i < XEN_LEGACY_MAX_VCPUS; i++ )
@@ -814,132 +960,15 @@ int __init construct_dom0(
              elf_64bit(&elf) ? 64 : 32, parms.pae ? "p" : "");
 
     count = d->tot_pages;
-    l4start = map_domain_page(pagetable_get_pfn(v->arch.guest_table));
-    l3tab = NULL;
-    l2tab = NULL;
-    l1tab = NULL;
+
     /* Set up the phys->machine table if not part of the initial mapping. */
-    if ( parms.p2m_base != UNSET_ADDR )
+    if ( is_pv_domain(d) && parms.p2m_base != UNSET_ADDR )
     {
-        unsigned long va = vphysmap_start;
-
-        if ( v_start <= vphysmap_end && vphysmap_start <= v_end )
-            panic("DOM0 P->M table overlaps initial mapping");
-
-        while ( va < vphysmap_end )
-        {
-            if ( d->tot_pages + ((round_pgup(vphysmap_end) - va)
-                                 >> PAGE_SHIFT) + 3 > nr_pages )
-                panic("Dom0 allocation too small for initial P->M table");
-
-            if ( l1tab )
-            {
-                unmap_domain_page(l1tab);
-                l1tab = NULL;
-            }
-            if ( l2tab )
-            {
-                unmap_domain_page(l2tab);
-                l2tab = NULL;
-            }
-            if ( l3tab )
-            {
-                unmap_domain_page(l3tab);
-                l3tab = NULL;
-            }
-            l4tab = l4start + l4_table_offset(va);
-            if ( !l4e_get_intpte(*l4tab) )
-            {
-                page = alloc_domheap_page(d, 0);
-                if ( !page )
-                    break;
-                /* No mapping, PGC_allocated + page-table page. */
-                page->count_info = PGC_allocated | 2;
-                page->u.inuse.type_info =
-                    PGT_l3_page_table | PGT_validated | 1;
-                l3tab = __map_domain_page(page);
-                clear_page(l3tab);
-                *l4tab = l4e_from_page(page, L4_PROT);
-            } else
-                l3tab = map_domain_page(l4e_get_pfn(*l4tab));
-            l3tab += l3_table_offset(va);
-            if ( !l3e_get_intpte(*l3tab) )
-            {
-                if ( cpu_has_page1gb &&
-                     !(va & ((1UL << L3_PAGETABLE_SHIFT) - 1)) &&
-                     vphysmap_end >= va + (1UL << L3_PAGETABLE_SHIFT) &&
-                     (page = alloc_domheap_pages(d,
-                                                 L3_PAGETABLE_SHIFT -
-                                                     PAGE_SHIFT,
-                                                 0)) != NULL )
-                {
-                    *l3tab = l3e_from_page(page,
-                                           L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
-                    va += 1UL << L3_PAGETABLE_SHIFT;
-                    continue;
-                }
-                if ( (page = alloc_domheap_page(d, 0)) == NULL )
-                    break;
-                /* No mapping, PGC_allocated + page-table page. */
-                page->count_info = PGC_allocated | 2;
-                page->u.inuse.type_info =
-                    PGT_l2_page_table | PGT_validated | 1;
-                l2tab = __map_domain_page(page);
-                clear_page(l2tab);
-                *l3tab = l3e_from_page(page, L3_PROT);
-            }
-            else
-               l2tab = map_domain_page(l3e_get_pfn(*l3tab));
-            l2tab += l2_table_offset(va);
-            if ( !l2e_get_intpte(*l2tab) )
-            {
-                if ( !(va & ((1UL << L2_PAGETABLE_SHIFT) - 1)) &&
-                     vphysmap_end >= va + (1UL << L2_PAGETABLE_SHIFT) &&
-                     (page = alloc_domheap_pages(d,
-                                                 L2_PAGETABLE_SHIFT -
-                                                     PAGE_SHIFT,
-                                                 0)) != NULL )
-                {
-                    *l2tab = l2e_from_page(page,
-                                           L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
-                    if ( opt_allow_superpage )
-                        get_superpage(page_to_mfn(page), d);
-                    va += 1UL << L2_PAGETABLE_SHIFT;
-                    continue;
-                }
-                if ( (page = alloc_domheap_page(d, 0)) == NULL )
-                    break;
-                /* No mapping, PGC_allocated + page-table page. */
-                page->count_info = PGC_allocated | 2;
-                page->u.inuse.type_info =
-                    PGT_l1_page_table | PGT_validated | 1;
-                l1tab = __map_domain_page(page);
-                clear_page(l1tab);
-                *l2tab = l2e_from_page(page, L2_PROT);
-            }
-            else
-                l1tab = map_domain_page(l2e_get_pfn(*l2tab));
-            l1tab += l1_table_offset(va);
-            BUG_ON(l1e_get_intpte(*l1tab));
-            page = alloc_domheap_page(d, 0);
-            if ( !page )
-                break;
-            *l1tab = l1e_from_page(page, L1_PROT|_PAGE_DIRTY);
-            va += PAGE_SIZE;
-            va &= PAGE_MASK;
-        }
-        if ( !page )
-            panic("Not enough RAM for DOM0 P->M table");
+        pfn = pagetable_get_pfn(v->arch.guest_table);
+        setup_pv_physmap(d, pfn, v_start, v_end, vphysmap_start, vphysmap_end,
+                         nr_pages);
     }
 
-    if ( l1tab )
-        unmap_domain_page(l1tab);
-    if ( l2tab )
-        unmap_domain_page(l2tab);
-    if ( l3tab )
-        unmap_domain_page(l3tab);
-    unmap_domain_page(l4start);
-
     /* Write the phys->machine and machine->phys table entries. */
     for ( pfn = 0; pfn < count; pfn++ )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46: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 1Wb4RY-0006E5-TM; Fri, 18 Apr 2014 08:46:44 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4RX-0006Dm-1I
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:43 +0000
Received: from [85.158.137.68:13060] by server-8.bemta-3.messagelabs.com id
	70/8B-21547-276E0535; Fri, 18 Apr 2014 08:46:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1397810800!6211207!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10333 invoked from network); 18 Apr 2014 08:46:41 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:46:41 -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 1Wb4RU-0005Ox-27
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4RU-0003UC-19
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:40 +0000
Date: Fri, 18 Apr 2014 08:46:40 +0000
Message-Id: <E1Wb4RU-0003UC-19@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] pvh dom0: introduce p2m_map_foreign
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 243cebb3dfa1f94ec7c2b040e8fd15ae4d81cc5a
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Thu Apr 17 10:05:07 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 17 10:05:07 2014 +0200

    pvh dom0: introduce p2m_map_foreign
    
    In this patch, a new type p2m_map_foreign is introduced for pages
    that toolstack on an auto translated dom0 or a control domain maps
    from foreign domains that its creating or supporting during its
    run time.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m-ept.c |    1 +
 xen/arch/x86/mm/p2m-pt.c  |    1 +
 xen/arch/x86/mm/p2m.c     |   22 +++++++++++++++++-----
 xen/include/asm-x86/p2m.h |    2 ++
 4 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index eeb95bb..76fb654 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -75,6 +75,7 @@ static void ept_p2m_type_to_flags(ept_entry_t *entry, p2m_type_t type, p2m_acces
             entry->w = 0;
             break;
         case p2m_grant_map_rw:
+        case p2m_map_foreign:
             entry->r = entry->w = 1;
             entry->x = 0;
             break;
diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c
index 7b07240..b53db70 100644
--- a/xen/arch/x86/mm/p2m-pt.c
+++ b/xen/arch/x86/mm/p2m-pt.c
@@ -89,6 +89,7 @@ static unsigned long p2m_type_to_flags(p2m_type_t t, mfn_t mfn)
     case p2m_ram_rw:
         return flags | P2M_BASE_FLAGS | _PAGE_RW;
     case p2m_grant_map_rw:
+    case p2m_map_foreign:
         return flags | P2M_BASE_FLAGS | _PAGE_RW | _PAGE_NX_BIT;
     case p2m_mmio_direct:
         if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn_x(mfn)) )
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 8440844..365e37a 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -508,7 +508,7 @@ p2m_remove_page(struct p2m_domain *p2m, unsigned long gfn, unsigned long mfn,
         for ( i = 0; i < (1UL << page_order); i++ )
         {
             mfn_return = p2m->get_entry(p2m, gfn + i, &t, &a, 0, NULL);
-            if ( !p2m_is_grant(t) && !p2m_is_shared(t) )
+            if ( !p2m_is_grant(t) && !p2m_is_shared(t) && !p2m_is_foreign(t) )
                 set_gpfn_from_mfn(mfn+i, INVALID_M2P_ENTRY);
             ASSERT( !p2m_is_valid(t) || mfn + i == mfn_x(mfn_return) );
         }
@@ -756,9 +756,9 @@ void p2m_change_type_range(struct domain *d,
     p2m_unlock(p2m);
 }
 
-
 /* Returns: 0 for success, -errno for failure */
-int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+static int set_typed_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn,
+                               p2m_type_t gfn_p2mt)
 {
     int rc = 0;
     p2m_access_t a;
@@ -783,8 +783,8 @@ int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
         set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY);
     }
 
-    P2M_DEBUG("set mmio %lx %lx\n", gfn, mfn_x(mfn));
-    rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_mmio_direct,
+    P2M_DEBUG("set %d %lx %lx\n", gfn_p2mt, gfn, mfn_x(mfn));
+    rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, gfn_p2mt,
                        p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
     if ( rc )
@@ -794,6 +794,18 @@ int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     return rc;
 }
 
+/* Set foreign mfn in the given guest's p2m table. */
+static int __attribute__((unused))
+set_foreign_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+{
+    return set_typed_p2m_entry(d, gfn, mfn, p2m_map_foreign);
+}
+
+int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+{
+    return set_typed_p2m_entry(d, gfn, mfn, p2m_mmio_direct);
+}
+
 /* Returns: 0 for success, -errno for failure */
 int clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
 {
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index 0a87ea6..0308b89 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -70,6 +70,7 @@ typedef enum {
     p2m_ram_paging_in = 11,       /* Memory that is being paged in */
     p2m_ram_shared = 12,          /* Shared or sharable memory */
     p2m_ram_broken = 13,          /* Broken page, access cause domain crash */
+    p2m_map_foreign  = 14,        /* ram pages from foreign domain */
 } p2m_type_t;
 
 /*
@@ -180,6 +181,7 @@ typedef unsigned int p2m_query_t;
 #define p2m_is_sharable(_t) (p2m_to_mask(_t) & P2M_SHARABLE_TYPES)
 #define p2m_is_shared(_t)   (p2m_to_mask(_t) & P2M_SHARED_TYPES)
 #define p2m_is_broken(_t)   (p2m_to_mask(_t) & P2M_BROKEN_TYPES)
+#define p2m_is_foreign(_t)  (p2m_to_mask(_t) & p2m_to_mask(p2m_map_foreign))
 
 /* Per-p2m-table state */
 struct p2m_domain {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:44 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46: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 1Wb4RY-0006E5-TM; Fri, 18 Apr 2014 08:46:44 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4RX-0006Dm-1I
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:43 +0000
Received: from [85.158.137.68:13060] by server-8.bemta-3.messagelabs.com id
	70/8B-21547-276E0535; Fri, 18 Apr 2014 08:46:42 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-12.tower-31.messagelabs.com!1397810800!6211207!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 10333 invoked from network); 18 Apr 2014 08:46:41 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-12.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:46:41 -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 1Wb4RU-0005Ox-27
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:40 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4RU-0003UC-19
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:40 +0000
Date: Fri, 18 Apr 2014 08:46:40 +0000
Message-Id: <E1Wb4RU-0003UC-19@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] pvh dom0: introduce p2m_map_foreign
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 243cebb3dfa1f94ec7c2b040e8fd15ae4d81cc5a
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Thu Apr 17 10:05:07 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 17 10:05:07 2014 +0200

    pvh dom0: introduce p2m_map_foreign
    
    In this patch, a new type p2m_map_foreign is introduced for pages
    that toolstack on an auto translated dom0 or a control domain maps
    from foreign domains that its creating or supporting during its
    run time.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Acked-by: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/mm/p2m-ept.c |    1 +
 xen/arch/x86/mm/p2m-pt.c  |    1 +
 xen/arch/x86/mm/p2m.c     |   22 +++++++++++++++++-----
 xen/include/asm-x86/p2m.h |    2 ++
 4 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index eeb95bb..76fb654 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -75,6 +75,7 @@ static void ept_p2m_type_to_flags(ept_entry_t *entry, p2m_type_t type, p2m_acces
             entry->w = 0;
             break;
         case p2m_grant_map_rw:
+        case p2m_map_foreign:
             entry->r = entry->w = 1;
             entry->x = 0;
             break;
diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c
index 7b07240..b53db70 100644
--- a/xen/arch/x86/mm/p2m-pt.c
+++ b/xen/arch/x86/mm/p2m-pt.c
@@ -89,6 +89,7 @@ static unsigned long p2m_type_to_flags(p2m_type_t t, mfn_t mfn)
     case p2m_ram_rw:
         return flags | P2M_BASE_FLAGS | _PAGE_RW;
     case p2m_grant_map_rw:
+    case p2m_map_foreign:
         return flags | P2M_BASE_FLAGS | _PAGE_RW | _PAGE_NX_BIT;
     case p2m_mmio_direct:
         if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn_x(mfn)) )
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 8440844..365e37a 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -508,7 +508,7 @@ p2m_remove_page(struct p2m_domain *p2m, unsigned long gfn, unsigned long mfn,
         for ( i = 0; i < (1UL << page_order); i++ )
         {
             mfn_return = p2m->get_entry(p2m, gfn + i, &t, &a, 0, NULL);
-            if ( !p2m_is_grant(t) && !p2m_is_shared(t) )
+            if ( !p2m_is_grant(t) && !p2m_is_shared(t) && !p2m_is_foreign(t) )
                 set_gpfn_from_mfn(mfn+i, INVALID_M2P_ENTRY);
             ASSERT( !p2m_is_valid(t) || mfn + i == mfn_x(mfn_return) );
         }
@@ -756,9 +756,9 @@ void p2m_change_type_range(struct domain *d,
     p2m_unlock(p2m);
 }
 
-
 /* Returns: 0 for success, -errno for failure */
-int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+static int set_typed_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn,
+                               p2m_type_t gfn_p2mt)
 {
     int rc = 0;
     p2m_access_t a;
@@ -783,8 +783,8 @@ int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
         set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY);
     }
 
-    P2M_DEBUG("set mmio %lx %lx\n", gfn, mfn_x(mfn));
-    rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_mmio_direct,
+    P2M_DEBUG("set %d %lx %lx\n", gfn_p2mt, gfn, mfn_x(mfn));
+    rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, gfn_p2mt,
                        p2m->default_access);
     gfn_unlock(p2m, gfn, 0);
     if ( rc )
@@ -794,6 +794,18 @@ int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
     return rc;
 }
 
+/* Set foreign mfn in the given guest's p2m table. */
+static int __attribute__((unused))
+set_foreign_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+{
+    return set_typed_p2m_entry(d, gfn, mfn, p2m_map_foreign);
+}
+
+int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn)
+{
+    return set_typed_p2m_entry(d, gfn, mfn, p2m_mmio_direct);
+}
+
 /* Returns: 0 for success, -errno for failure */
 int clear_mmio_p2m_entry(struct domain *d, unsigned long gfn)
 {
diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
index 0a87ea6..0308b89 100644
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -70,6 +70,7 @@ typedef enum {
     p2m_ram_paging_in = 11,       /* Memory that is being paged in */
     p2m_ram_shared = 12,          /* Shared or sharable memory */
     p2m_ram_broken = 13,          /* Broken page, access cause domain crash */
+    p2m_map_foreign  = 14,        /* ram pages from foreign domain */
 } p2m_type_t;
 
 /*
@@ -180,6 +181,7 @@ typedef unsigned int p2m_query_t;
 #define p2m_is_sharable(_t) (p2m_to_mask(_t) & P2M_SHARABLE_TYPES)
 #define p2m_is_shared(_t)   (p2m_to_mask(_t) & P2M_SHARED_TYPES)
 #define p2m_is_broken(_t)   (p2m_to_mask(_t) & P2M_BROKEN_TYPES)
+#define p2m_is_foreign(_t)  (p2m_to_mask(_t) & p2m_to_mask(p2m_map_foreign))
 
 /* Per-p2m-table state */
 struct p2m_domain {
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:55 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46: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 1Wb4Ri-0006Fc-W9; Fri, 18 Apr 2014 08:46:54 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Rh-0006FO-Aw
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:53 +0000
Received: from [85.158.137.68:13500] by server-3.bemta-3.messagelabs.com id
	E6/A6-05289-C76E0535; Fri, 18 Apr 2014 08:46:52 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1397810810!7750956!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6539 invoked from network); 18 Apr 2014 08:46:51 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:46:51 -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 1Wb4Re-0005P3-6F
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:50 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Re-0003VH-4r
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:50 +0000
Date: Fri, 18 Apr 2014 08:46:50 +0000
Message-Id: <E1Wb4Re-0003VH-4r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] pvh dom0: make xsm_map_gmfn_foreign
	available for x86
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 b37bb2bfc24484fd3c4e11557ba98b28408160dc
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Thu Apr 17 10:07:44 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 17 10:07:44 2014 +0200

    pvh dom0: make xsm_map_gmfn_foreign available for x86
    
    In this patch we make xsm_map_gmfn_foreign available for x86 also. This
    is used in the next patch "pvh dom0: Add and remove foreign pages" in
    function p2m_add_foreign.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
 xen/include/xsm/dummy.h |   14 ++++++--------
 xen/include/xsm/xsm.h   |   16 ++++++----------
 xen/xsm/dummy.c         |    4 +---
 xen/xsm/flask/hooks.c   |   18 ++++++------------
 4 files changed, 19 insertions(+), 33 deletions(-)

diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index e722155..c3be99a 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -477,6 +477,12 @@ static XSM_INLINE int xsm_remove_from_physmap(XSM_DEFAULT_ARG struct domain *d1,
     return xsm_default_action(action, d1, d2);
 }
 
+static XSM_INLINE int xsm_map_gmfn_foreign(XSM_DEFAULT_ARG struct domain *d, struct domain *t)
+{
+    XSM_ASSERT_ACTION(XSM_TARGET);
+    return xsm_default_action(action, d, t);
+}
+
 static XSM_INLINE int xsm_hvm_param(XSM_DEFAULT_ARG struct domain *d, unsigned long op)
 {
     XSM_ASSERT_ACTION(XSM_TARGET);
@@ -624,11 +630,3 @@ static XSM_INLINE int xsm_ioport_mapping(XSM_DEFAULT_ARG struct domain *d, uint3
 }
 
 #endif /* CONFIG_X86 */
-
-#ifdef CONFIG_ARM
-static XSM_INLINE int xsm_map_gmfn_foreign(XSM_DEFAULT_ARG struct domain *d, struct domain *t)
-{
-    XSM_ASSERT_ACTION(XSM_TARGET);
-    return xsm_default_action(action, d, t);
-}
-#endif
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 2cd3a3b..330d5d2 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -91,6 +91,7 @@ struct xsm_operations {
     int (*memory_pin_page) (struct domain *d1, struct domain *d2, struct page_info *page);
     int (*add_to_physmap) (struct domain *d1, struct domain *d2);
     int (*remove_from_physmap) (struct domain *d1, struct domain *d2);
+    int (*map_gmfn_foreign) (struct domain *d, struct domain *t);
     int (*claim_pages) (struct domain *d);
 
     int (*console_io) (struct domain *d, int cmd);
@@ -166,9 +167,6 @@ struct xsm_operations {
     int (*ioport_permission) (struct domain *d, uint32_t s, uint32_t e, uint8_t allow);
     int (*ioport_mapping) (struct domain *d, uint32_t s, uint32_t e, uint8_t allow);
 #endif
-#ifdef CONFIG_ARM
-    int (*map_gmfn_foreign) (struct domain *d, struct domain *t);
-#endif
 };
 
 #ifdef XSM_ENABLE
@@ -354,6 +352,11 @@ static inline int xsm_remove_from_physmap(xsm_default_t def, struct domain *d1,
     return xsm_ops->remove_from_physmap(d1, d2);
 }
 
+static inline int xsm_map_gmfn_foreign (xsm_default_t def, struct domain *d, struct domain *t)
+{
+    return xsm_ops->map_gmfn_foreign(d, t);
+}
+
 static inline int xsm_claim_pages(xsm_default_t def, struct domain *d)
 {
     return xsm_ops->claim_pages(d);
@@ -634,13 +637,6 @@ static inline int xsm_ioport_mapping (xsm_default_t def, struct domain *d, uint3
 }
 #endif /* CONFIG_X86 */
 
-#ifdef CONFIG_ARM
-static inline int xsm_map_gmfn_foreign (xsm_default_t def, struct domain *d, struct domain *t)
-{
-    return xsm_ops->map_gmfn_foreign(d, t);
-}
-#endif /* CONFIG_ARM */
-
 #endif /* XSM_NO_WRAPPERS */
 
 #ifdef CONFIG_MULTIBOOT
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index b79e10f..792a7fa 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -112,6 +112,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
 
     set_to_dummy_if_null(ops, add_to_physmap);
     set_to_dummy_if_null(ops, remove_from_physmap);
+    set_to_dummy_if_null(ops, map_gmfn_foreign);
 
 #ifdef CONFIG_X86
     set_to_dummy_if_null(ops, do_mca);
@@ -136,7 +137,4 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, ioport_permission);
     set_to_dummy_if_null(ops, ioport_mapping);
 #endif
-#ifdef CONFIG_ARM
-    set_to_dummy_if_null(ops, map_gmfn_foreign);
-#endif
 }
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 4ce31c9..9a6b199 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1078,6 +1078,11 @@ static int flask_remove_from_physmap(struct domain *d1, struct domain *d2)
     return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__PHYSMAP);
 }
 
+static int flask_map_gmfn_foreign(struct domain *d, struct domain *t)
+{
+    return domain_has_perm(d, t, SECCLASS_MMU, MMU__MAP_READ | MMU__MAP_WRITE);
+}
+
 static int flask_hvm_param(struct domain *d, unsigned long op)
 {
     u32 perm;
@@ -1460,13 +1465,6 @@ static int flask_unbind_pt_irq (struct domain *d, struct xen_domctl_bind_pt_irq
 }
 #endif /* CONFIG_X86 */
 
-#ifdef CONFIG_ARM
-static int flask_map_gmfn_foreign(struct domain *d, struct domain *t)
-{
-    return domain_has_perm(d, t, SECCLASS_MMU, MMU__MAP_READ | MMU__MAP_WRITE);
-}
-#endif
-
 long do_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op);
 int compat_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op);
 
@@ -1548,7 +1546,7 @@ static struct xsm_operations flask_ops = {
 
     .add_to_physmap = flask_add_to_physmap,
     .remove_from_physmap = flask_remove_from_physmap,
-
+    .map_gmfn_foreign = flask_map_gmfn_foreign,
 
 #if defined(HAS_PASSTHROUGH) && defined(HAS_PCI)
     .get_device_group = flask_get_device_group,
@@ -1580,10 +1578,6 @@ static struct xsm_operations flask_ops = {
     .ioport_permission = flask_ioport_permission,
     .ioport_mapping = flask_ioport_mapping,
 #endif
-
-#ifdef CONFIG_ARM
-    .map_gmfn_foreign = flask_map_gmfn_foreign,
-#endif
 };
 
 static __init int flask_init(void)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:46:55 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:46: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 1Wb4Ri-0006Fc-W9; Fri, 18 Apr 2014 08:46:54 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Rh-0006FO-Aw
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:53 +0000
Received: from [85.158.137.68:13500] by server-3.bemta-3.messagelabs.com id
	E6/A6-05289-C76E0535; Fri, 18 Apr 2014 08:46:52 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-31.messagelabs.com!1397810810!7750956!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 6539 invoked from network); 18 Apr 2014 08:46:51 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	18 Apr 2014 08:46:51 -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 1Wb4Re-0005P3-6F
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:50 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Re-0003VH-4r
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:46:50 +0000
Date: Fri, 18 Apr 2014 08:46:50 +0000
Message-Id: <E1Wb4Re-0003VH-4r@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] pvh dom0: make xsm_map_gmfn_foreign
	available for x86
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 b37bb2bfc24484fd3c4e11557ba98b28408160dc
Author:     Mukesh Rathor <mukesh.rathor@oracle.com>
AuthorDate: Thu Apr 17 10:07:44 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 17 10:07:44 2014 +0200

    pvh dom0: make xsm_map_gmfn_foreign available for x86
    
    In this patch we make xsm_map_gmfn_foreign available for x86 also. This
    is used in the next patch "pvh dom0: Add and remove foreign pages" in
    function p2m_add_foreign.
    
    Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
    Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
 xen/include/xsm/dummy.h |   14 ++++++--------
 xen/include/xsm/xsm.h   |   16 ++++++----------
 xen/xsm/dummy.c         |    4 +---
 xen/xsm/flask/hooks.c   |   18 ++++++------------
 4 files changed, 19 insertions(+), 33 deletions(-)

diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index e722155..c3be99a 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -477,6 +477,12 @@ static XSM_INLINE int xsm_remove_from_physmap(XSM_DEFAULT_ARG struct domain *d1,
     return xsm_default_action(action, d1, d2);
 }
 
+static XSM_INLINE int xsm_map_gmfn_foreign(XSM_DEFAULT_ARG struct domain *d, struct domain *t)
+{
+    XSM_ASSERT_ACTION(XSM_TARGET);
+    return xsm_default_action(action, d, t);
+}
+
 static XSM_INLINE int xsm_hvm_param(XSM_DEFAULT_ARG struct domain *d, unsigned long op)
 {
     XSM_ASSERT_ACTION(XSM_TARGET);
@@ -624,11 +630,3 @@ static XSM_INLINE int xsm_ioport_mapping(XSM_DEFAULT_ARG struct domain *d, uint3
 }
 
 #endif /* CONFIG_X86 */
-
-#ifdef CONFIG_ARM
-static XSM_INLINE int xsm_map_gmfn_foreign(XSM_DEFAULT_ARG struct domain *d, struct domain *t)
-{
-    XSM_ASSERT_ACTION(XSM_TARGET);
-    return xsm_default_action(action, d, t);
-}
-#endif
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 2cd3a3b..330d5d2 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -91,6 +91,7 @@ struct xsm_operations {
     int (*memory_pin_page) (struct domain *d1, struct domain *d2, struct page_info *page);
     int (*add_to_physmap) (struct domain *d1, struct domain *d2);
     int (*remove_from_physmap) (struct domain *d1, struct domain *d2);
+    int (*map_gmfn_foreign) (struct domain *d, struct domain *t);
     int (*claim_pages) (struct domain *d);
 
     int (*console_io) (struct domain *d, int cmd);
@@ -166,9 +167,6 @@ struct xsm_operations {
     int (*ioport_permission) (struct domain *d, uint32_t s, uint32_t e, uint8_t allow);
     int (*ioport_mapping) (struct domain *d, uint32_t s, uint32_t e, uint8_t allow);
 #endif
-#ifdef CONFIG_ARM
-    int (*map_gmfn_foreign) (struct domain *d, struct domain *t);
-#endif
 };
 
 #ifdef XSM_ENABLE
@@ -354,6 +352,11 @@ static inline int xsm_remove_from_physmap(xsm_default_t def, struct domain *d1,
     return xsm_ops->remove_from_physmap(d1, d2);
 }
 
+static inline int xsm_map_gmfn_foreign (xsm_default_t def, struct domain *d, struct domain *t)
+{
+    return xsm_ops->map_gmfn_foreign(d, t);
+}
+
 static inline int xsm_claim_pages(xsm_default_t def, struct domain *d)
 {
     return xsm_ops->claim_pages(d);
@@ -634,13 +637,6 @@ static inline int xsm_ioport_mapping (xsm_default_t def, struct domain *d, uint3
 }
 #endif /* CONFIG_X86 */
 
-#ifdef CONFIG_ARM
-static inline int xsm_map_gmfn_foreign (xsm_default_t def, struct domain *d, struct domain *t)
-{
-    return xsm_ops->map_gmfn_foreign(d, t);
-}
-#endif /* CONFIG_ARM */
-
 #endif /* XSM_NO_WRAPPERS */
 
 #ifdef CONFIG_MULTIBOOT
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index b79e10f..792a7fa 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -112,6 +112,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
 
     set_to_dummy_if_null(ops, add_to_physmap);
     set_to_dummy_if_null(ops, remove_from_physmap);
+    set_to_dummy_if_null(ops, map_gmfn_foreign);
 
 #ifdef CONFIG_X86
     set_to_dummy_if_null(ops, do_mca);
@@ -136,7 +137,4 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, ioport_permission);
     set_to_dummy_if_null(ops, ioport_mapping);
 #endif
-#ifdef CONFIG_ARM
-    set_to_dummy_if_null(ops, map_gmfn_foreign);
-#endif
 }
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 4ce31c9..9a6b199 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -1078,6 +1078,11 @@ static int flask_remove_from_physmap(struct domain *d1, struct domain *d2)
     return domain_has_perm(d1, d2, SECCLASS_MMU, MMU__PHYSMAP);
 }
 
+static int flask_map_gmfn_foreign(struct domain *d, struct domain *t)
+{
+    return domain_has_perm(d, t, SECCLASS_MMU, MMU__MAP_READ | MMU__MAP_WRITE);
+}
+
 static int flask_hvm_param(struct domain *d, unsigned long op)
 {
     u32 perm;
@@ -1460,13 +1465,6 @@ static int flask_unbind_pt_irq (struct domain *d, struct xen_domctl_bind_pt_irq
 }
 #endif /* CONFIG_X86 */
 
-#ifdef CONFIG_ARM
-static int flask_map_gmfn_foreign(struct domain *d, struct domain *t)
-{
-    return domain_has_perm(d, t, SECCLASS_MMU, MMU__MAP_READ | MMU__MAP_WRITE);
-}
-#endif
-
 long do_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op);
 int compat_flask_op(XEN_GUEST_HANDLE_PARAM(xsm_op_t) u_flask_op);
 
@@ -1548,7 +1546,7 @@ static struct xsm_operations flask_ops = {
 
     .add_to_physmap = flask_add_to_physmap,
     .remove_from_physmap = flask_remove_from_physmap,
-
+    .map_gmfn_foreign = flask_map_gmfn_foreign,
 
 #if defined(HAS_PASSTHROUGH) && defined(HAS_PCI)
     .get_device_group = flask_get_device_group,
@@ -1580,10 +1578,6 @@ static struct xsm_operations flask_ops = {
     .ioport_permission = flask_ioport_permission,
     .ioport_mapping = flask_ioport_mapping,
 #endif
-
-#ifdef CONFIG_ARM
-    .map_gmfn_foreign = flask_map_gmfn_foreign,
-#endif
 };
 
 static __init int flask_init(void)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:47:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:47:05 +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 1Wb4Rt-0006HS-4p; Fri, 18 Apr 2014 08:47:05 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Rq-0006H6-Ut
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:47:03 +0000
Received: from [193.109.254.147:4404] by server-15.bemta-14.messagelabs.com id
	E0/5F-15813-686E0535; Fri, 18 Apr 2014 08:47:02 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397810820!9034938!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12039 invoked from network); 18 Apr 2014 08:47:01 -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;
	18 Apr 2014 08:47:01 -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 1Wb4Ro-0005PC-AV
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:47:00 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Ro-0003Ve-9R
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:47:00 +0000
Date: Fri, 18 Apr 2014 08:47:00 +0000
Message-Id: <E1Wb4Ro-0003Ve-9R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] implement is_hardware_domain using
	hardware_domain global
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 01feb234d0cb3bff248694d99397fb63a9757490
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Thu Apr 17 10:10:33 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 17 10:10:33 2014 +0200

    implement is_hardware_domain using hardware_domain global
    
    This requires setting the hardware_domain variable earlier in
    domain_create so that functions called from it (primarily in
    arch_domain_create) observe the correct results when they call
    is_hardware_domain.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/arm/setup.c    |    2 +-
 xen/arch/x86/setup.c    |    2 +-
 xen/common/domain.c     |    5 ++++-
 xen/include/xen/sched.h |    4 ++--
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 358eafb..6b77a4c 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -761,7 +761,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     do_initcalls();
 
     /* Create initial domain 0. */
-    hardware_domain = dom0 = domain_create(0, 0, 0);
+    dom0 = domain_create(0, 0, 0);
     if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
             panic("Error creating domain 0");
 
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 11c95fc..2e30701 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1339,7 +1339,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
         panic("Could not protect TXT memory regions");
 
     /* Create initial domain 0. */
-    hardware_domain = dom0 = domain_create(0, DOMCRF_s3_integrity, 0);
+    dom0 = domain_create(0, DOMCRF_s3_integrity, 0);
     if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
         panic("Error creating domain 0");
 
diff --git a/xen/common/domain.c b/xen/common/domain.c
index c4720a9..3c05711 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -237,10 +237,11 @@ struct domain *domain_create(
     else if ( domcr_flags & DOMCRF_pvh )
         d->guest_type = guest_type_pvh;
 
-    if ( is_hardware_domain(d) )
+    if ( domid == 0 )
     {
         d->is_pinned = opt_dom0_vcpus_pin;
         d->disable_migrate = 1;
+        hardware_domain = d;
     }
 
     rangeset_domain_initialise(d);
@@ -319,6 +320,8 @@ struct domain *domain_create(
 
  fail:
     d->is_dying = DOMDYING_dead;
+    if ( hardware_domain == d )
+        hardware_domain = NULL;
     atomic_set(&d->refcnt, DOMAIN_DESTROYED);
     xfree(d->mem_event);
     xfree(d->pbuf);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index b080c9e..734f7a9 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -795,9 +795,9 @@ void watchdog_domain_destroy(struct domain *d);
  * Use this check when the following are both true:
  *  - Using this feature or interface requires full access to the hardware
  *    (that is, this would not be suitable for a driver domain)
- *  - There is never a reason to deny dom0 access to this
+ *  - There is never a reason to deny the hardware domain access to this
  */
-#define is_hardware_domain(_d) ((_d)->domain_id == 0)
+#define is_hardware_domain(_d) ((_d) == hardware_domain)
 
 /* This check is for functionality specific to a control domain */
 #define is_control_domain(_d) ((_d)->is_privileged)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Fri Apr 18 08:47:05 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 18 Apr 2014 08:47:05 +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 1Wb4Rt-0006HS-4p; Fri, 18 Apr 2014 08:47:05 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Rq-0006H6-Ut
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:47:03 +0000
Received: from [193.109.254.147:4404] by server-15.bemta-14.messagelabs.com id
	E0/5F-15813-686E0535; Fri, 18 Apr 2014 08:47:02 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-27.messagelabs.com!1397810820!9034938!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 12039 invoked from network); 18 Apr 2014 08:47:01 -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;
	18 Apr 2014 08:47:01 -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 1Wb4Ro-0005PC-AV
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:47:00 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wb4Ro-0003Ve-9R
	for xen-changelog@lists.xensource.com; Fri, 18 Apr 2014 08:47:00 +0000
Date: Fri, 18 Apr 2014 08:47:00 +0000
Message-Id: <E1Wb4Ro-0003Ve-9R@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] implement is_hardware_domain using
	hardware_domain global
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 01feb234d0cb3bff248694d99397fb63a9757490
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Thu Apr 17 10:10:33 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Apr 17 10:10:33 2014 +0200

    implement is_hardware_domain using hardware_domain global
    
    This requires setting the hardware_domain variable earlier in
    domain_create so that functions called from it (primarily in
    arch_domain_create) observe the correct results when they call
    is_hardware_domain.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/arm/setup.c    |    2 +-
 xen/arch/x86/setup.c    |    2 +-
 xen/common/domain.c     |    5 ++++-
 xen/include/xen/sched.h |    4 ++--
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 358eafb..6b77a4c 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -761,7 +761,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     do_initcalls();
 
     /* Create initial domain 0. */
-    hardware_domain = dom0 = domain_create(0, 0, 0);
+    dom0 = domain_create(0, 0, 0);
     if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
             panic("Error creating domain 0");
 
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 11c95fc..2e30701 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1339,7 +1339,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
         panic("Could not protect TXT memory regions");
 
     /* Create initial domain 0. */
-    hardware_domain = dom0 = domain_create(0, DOMCRF_s3_integrity, 0);
+    dom0 = domain_create(0, DOMCRF_s3_integrity, 0);
     if ( IS_ERR(dom0) || (alloc_dom0_vcpu0(dom0) == NULL) )
         panic("Error creating domain 0");
 
diff --git a/xen/common/domain.c b/xen/common/domain.c
index c4720a9..3c05711 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -237,10 +237,11 @@ struct domain *domain_create(
     else if ( domcr_flags & DOMCRF_pvh )
         d->guest_type = guest_type_pvh;
 
-    if ( is_hardware_domain(d) )
+    if ( domid == 0 )
     {
         d->is_pinned = opt_dom0_vcpus_pin;
         d->disable_migrate = 1;
+        hardware_domain = d;
     }
 
     rangeset_domain_initialise(d);
@@ -319,6 +320,8 @@ struct domain *domain_create(
 
  fail:
     d->is_dying = DOMDYING_dead;
+    if ( hardware_domain == d )
+        hardware_domain = NULL;
     atomic_set(&d->refcnt, DOMAIN_DESTROYED);
     xfree(d->mem_event);
     xfree(d->pbuf);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index b080c9e..734f7a9 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -795,9 +795,9 @@ void watchdog_domain_destroy(struct domain *d);
  * Use this check when the following are both true:
  *  - Using this feature or interface requires full access to the hardware
  *    (that is, this would not be suitable for a driver domain)
- *  - There is never a reason to deny dom0 access to this
+ *  - There is never a reason to deny the hardware domain access to this
  */
-#define is_hardware_domain(_d) ((_d)->domain_id == 0)
+#define is_hardware_domain(_d) ((_d) == hardware_domain)
 
 /* This check is for functionality specific to a control domain */
 #define is_control_domain(_d) ((_d)->is_privileged)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11: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 1Wcv52-0006AL-8h; Wed, 23 Apr 2014 11:11:08 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv50-0006A1-Hv
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:06 +0000
Received: from [85.158.139.211:42285] by server-12.bemta-5.messagelabs.com id
	D1/78-03824-9CF97535; Wed, 23 Apr 2014 11:11:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1398251464!102337!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7689 invoked from network); 23 Apr 2014 11:11:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:05 -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 1Wcv4x-000753-Qy
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv4x-0001UG-Jt
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:03 +0000
Date: Wed, 23 Apr 2014 11:11:03 +0000
Message-Id: <E1Wcv4x-0001UG-Jt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/MSI: drop workaround for insecure
	Dom0 kernels
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 061eebe0e99ad45c9c3b1a778b06140de4a91f25
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 22 12:04:20 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:04:20 2014 +0200

    x86/MSI: drop workaround for insecure Dom0 kernels
    
    Considering that
    - the workaround is expensive (iterating through the entire P2M space
      of a domain),
    - the planned elimination of the expensiveness (by propagating the type
      change step by step to the individual P2M leaves) wouldn't address
      the IOMMU side of things (as for it to obey to the changed
      permissions the adjustments must be pushed down immediately through
      the entire tree)
    - the proper solution (PHYSDEVOP_msix_prepare) should by now be
      implemented by all security conscious Dom0 kernels
    remove the workaround, killing eventual guests that would be known to
    become a security risk instead.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/mm/p2m-ept.c |    2 +-
 xen/arch/x86/msi.c        |   40 +++++++++++++++-------------------------
 2 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 76fb654..b0ab3ce 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -775,7 +775,7 @@ static void ept_change_entry_type_global(struct p2m_domain *p2m,
         return;
 
     BUG_ON(p2m_is_grant(ot) || p2m_is_grant(nt));
-    BUG_ON(ot != nt && (ot == p2m_mmio_direct || nt == p2m_mmio_direct));
+    BUG_ON(p2m_is_mmio(ot) || p2m_is_mmio(nt));
 
     ept_change_entry_type_page(_mfn(ept_get_asr(ept)),
                                ept_get_wl(ept), ot, nt);
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 61d6dd0..7dbb79d 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -825,32 +825,22 @@ static int msix_capability_init(struct pci_dev *dev,
                                 msix->pba.last) )
             WARN();
 
-        if ( dev->domain )
-            p2m_change_entry_type_global(dev->domain,
-                                         p2m_mmio_direct, p2m_mmio_direct);
-        if ( desc && (!dev->domain || !paging_mode_translate(dev->domain)) )
+        if ( desc )
         {
-            struct domain *d = dev->domain;
-
-            if ( !d )
-                for_each_domain(d)
-                    if ( !paging_mode_translate(d) &&
-                         (iomem_access_permitted(d, msix->table.first,
-                                                 msix->table.last) ||
-                          iomem_access_permitted(d, msix->pba.first,
-                                                 msix->pba.last)) )
-                        break;
-            if ( d )
-            {
-                if ( !is_hardware_domain(d) && msix->warned != d->domain_id )
-                {
-                    msix->warned = d->domain_id;
-                    printk(XENLOG_ERR
-                           "Potentially insecure use of MSI-X on %04x:%02x:%02x.%u by Dom%d\n",
-                           seg, bus, slot, func, d->domain_id);
-                }
-                /* XXX How to deal with existing mappings? */
-            }
+            struct domain *currd = current->domain;
+            struct domain *d = dev->domain ?: currd;
+
+            if ( !is_hardware_domain(currd) || d != currd )
+                printk("%s use of MSI-X on %04x:%02x:%02x.%u by Dom%d\n",
+                       is_hardware_domain(currd)
+                       ? XENLOG_WARNING "Potentially insecure"
+                       : XENLOG_ERR "Insecure",
+                       seg, bus, slot, func, d->domain_id);
+            if ( !is_hardware_domain(d) &&
+                 /* Assume a domain without memory has no mappings yet. */
+                 (!is_hardware_domain(currd) || d->tot_pages) )
+                domain_crash(d);
+            /* XXX How to deal with existing mappings? */
         }
     }
     WARN_ON(msix->nr_entries != nr_entries);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11: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 1Wcv52-0006AL-8h; Wed, 23 Apr 2014 11:11:08 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv50-0006A1-Hv
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:06 +0000
Received: from [85.158.139.211:42285] by server-12.bemta-5.messagelabs.com id
	D1/78-03824-9CF97535; Wed, 23 Apr 2014 11:11:05 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-206.messagelabs.com!1398251464!102337!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 7689 invoked from network); 23 Apr 2014 11:11:05 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:05 -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 1Wcv4x-000753-Qy
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:03 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv4x-0001UG-Jt
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:03 +0000
Date: Wed, 23 Apr 2014 11:11:03 +0000
Message-Id: <E1Wcv4x-0001UG-Jt@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/MSI: drop workaround for insecure
	Dom0 kernels
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 061eebe0e99ad45c9c3b1a778b06140de4a91f25
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 22 12:04:20 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:04:20 2014 +0200

    x86/MSI: drop workaround for insecure Dom0 kernels
    
    Considering that
    - the workaround is expensive (iterating through the entire P2M space
      of a domain),
    - the planned elimination of the expensiveness (by propagating the type
      change step by step to the individual P2M leaves) wouldn't address
      the IOMMU side of things (as for it to obey to the changed
      permissions the adjustments must be pushed down immediately through
      the entire tree)
    - the proper solution (PHYSDEVOP_msix_prepare) should by now be
      implemented by all security conscious Dom0 kernels
    remove the workaround, killing eventual guests that would be known to
    become a security risk instead.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/mm/p2m-ept.c |    2 +-
 xen/arch/x86/msi.c        |   40 +++++++++++++++-------------------------
 2 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 76fb654..b0ab3ce 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -775,7 +775,7 @@ static void ept_change_entry_type_global(struct p2m_domain *p2m,
         return;
 
     BUG_ON(p2m_is_grant(ot) || p2m_is_grant(nt));
-    BUG_ON(ot != nt && (ot == p2m_mmio_direct || nt == p2m_mmio_direct));
+    BUG_ON(p2m_is_mmio(ot) || p2m_is_mmio(nt));
 
     ept_change_entry_type_page(_mfn(ept_get_asr(ept)),
                                ept_get_wl(ept), ot, nt);
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 61d6dd0..7dbb79d 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -825,32 +825,22 @@ static int msix_capability_init(struct pci_dev *dev,
                                 msix->pba.last) )
             WARN();
 
-        if ( dev->domain )
-            p2m_change_entry_type_global(dev->domain,
-                                         p2m_mmio_direct, p2m_mmio_direct);
-        if ( desc && (!dev->domain || !paging_mode_translate(dev->domain)) )
+        if ( desc )
         {
-            struct domain *d = dev->domain;
-
-            if ( !d )
-                for_each_domain(d)
-                    if ( !paging_mode_translate(d) &&
-                         (iomem_access_permitted(d, msix->table.first,
-                                                 msix->table.last) ||
-                          iomem_access_permitted(d, msix->pba.first,
-                                                 msix->pba.last)) )
-                        break;
-            if ( d )
-            {
-                if ( !is_hardware_domain(d) && msix->warned != d->domain_id )
-                {
-                    msix->warned = d->domain_id;
-                    printk(XENLOG_ERR
-                           "Potentially insecure use of MSI-X on %04x:%02x:%02x.%u by Dom%d\n",
-                           seg, bus, slot, func, d->domain_id);
-                }
-                /* XXX How to deal with existing mappings? */
-            }
+            struct domain *currd = current->domain;
+            struct domain *d = dev->domain ?: currd;
+
+            if ( !is_hardware_domain(currd) || d != currd )
+                printk("%s use of MSI-X on %04x:%02x:%02x.%u by Dom%d\n",
+                       is_hardware_domain(currd)
+                       ? XENLOG_WARNING "Potentially insecure"
+                       : XENLOG_ERR "Insecure",
+                       seg, bus, slot, func, d->domain_id);
+            if ( !is_hardware_domain(d) &&
+                 /* Assume a domain without memory has no mappings yet. */
+                 (!is_hardware_domain(currd) || d->tot_pages) )
+                domain_crash(d);
+            /* XXX How to deal with existing mappings? */
         }
     }
     WARN_ON(msix->nr_entries != nr_entries);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:11:39 +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 1Wcv5M-0006Dh-C0; Wed, 23 Apr 2014 11:11:28 +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 1Wcv5K-0006DE-RY
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:27 +0000
Received: from [85.158.143.35:61379] by server-3.bemta-4.messagelabs.com id
	E4/31-13602-EDF97535; Wed, 23 Apr 2014 11:11:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-21.messagelabs.com!1398251484!486141!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29216 invoked from network); 23 Apr 2014 11:11:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:25 -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 1Wcv5I-00075D-2t
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5I-0001VM-1G
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:24 +0000
Date: Wed, 23 Apr 2014 11:11:24 +0000
Message-Id: <E1Wcv5I-0001VM-1G@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: use native RDTSC(P) execution
	when guest and host frequencies are the same
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 82713ec8d2b65d17f13e46a131e38bfe5baf8bd6
Author:     Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Tue Apr 22 12:07:37 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:07:37 2014 +0200

    x86: use native RDTSC(P) execution when guest and host frequencies are the same
    
    We should be able to continue using native RDTSC(P) execution on
    HVM/PVH guests after migration if host and guest frequencies are
    equal (this includes the case when the frequencies are made equal
    by TSC scaling feature).
    
    This also allows us to revert main part of commit 4aab59a3 (svm: Do not
    intercept RDTSC(P) when TSC scaling is supported by hardware) which
    was wrong: while RDTSC intercepts were disabled domain's vtsc could
    still be set, leading to inconsistent view of guest's TSC.
    
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/svm/svm.c |    2 +-
 xen/arch/x86/time.c        |   15 +++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 4fd5376..813e775 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -728,7 +728,7 @@ static void svm_set_rdtsc_exiting(struct vcpu *v, bool_t enable)
     general1_intercepts &= ~GENERAL1_INTERCEPT_RDTSC;
     general2_intercepts &= ~GENERAL2_INTERCEPT_RDTSCP;
 
-    if ( enable && !cpu_has_tsc_ratio )
+    if ( enable )
     {
         general1_intercepts |= GENERAL1_INTERCEPT_RDTSC;
         general2_intercepts |= GENERAL2_INTERCEPT_RDTSCP;
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 07bceda..555f7c8 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -37,6 +37,7 @@
 #include <asm/hpet.h>
 #include <io_ports.h>
 #include <asm/setup.h> /* for early_time_init */
+#include <asm/hvm/svm/svm.h> /* for cpu_has_tsc_ratio */
 #include <public/arch-x86/cpuid.h>
 
 /* opt_clocksource: Force clocksource to one of: pit, hpet, acpi. */
@@ -1889,10 +1890,16 @@ void tsc_set_info(struct domain *d,
         d->arch.vtsc_offset = get_s_time() - elapsed_nsec;
         d->arch.tsc_khz = gtsc_khz ? gtsc_khz : cpu_khz;
         set_time_scale(&d->arch.vtsc_to_ns, d->arch.tsc_khz * 1000 );
-        /* use native TSC if initial host has safe TSC, has not migrated
-         * yet and tsc_khz == cpu_khz */
-        if ( host_tsc_is_safe() && incarnation == 0 &&
-                d->arch.tsc_khz == cpu_khz )
+        /*
+         * Use native TSC if the host has safe TSC and:
+         *  HVM/PVH: host and guest frequencies are the same (either
+         *           "naturally" or via TSC scaling)
+         *  PV: guest has not migrated yet (and thus arch.tsc_khz == cpu_khz)
+         */
+        if ( host_tsc_is_safe() &&
+             ((has_hvm_container_domain(d) &&
+               (d->arch.tsc_khz == cpu_khz || cpu_has_tsc_ratio)) ||
+              incarnation == 0) )
             d->arch.vtsc = 0;
         else 
             d->arch.ns_to_vtsc = scale_reciprocal(d->arch.vtsc_to_ns);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:11:39 +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 1Wcv5M-0006Dh-C0; Wed, 23 Apr 2014 11:11:28 +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 1Wcv5K-0006DE-RY
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:27 +0000
Received: from [85.158.143.35:61379] by server-3.bemta-4.messagelabs.com id
	E4/31-13602-EDF97535; Wed, 23 Apr 2014 11:11:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-5.tower-21.messagelabs.com!1398251484!486141!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 29216 invoked from network); 23 Apr 2014 11:11:25 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-5.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:25 -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 1Wcv5I-00075D-2t
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:24 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5I-0001VM-1G
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:24 +0000
Date: Wed, 23 Apr 2014 11:11:24 +0000
Message-Id: <E1Wcv5I-0001VM-1G@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86: use native RDTSC(P) execution
	when guest and host frequencies are the same
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 82713ec8d2b65d17f13e46a131e38bfe5baf8bd6
Author:     Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Tue Apr 22 12:07:37 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:07:37 2014 +0200

    x86: use native RDTSC(P) execution when guest and host frequencies are the same
    
    We should be able to continue using native RDTSC(P) execution on
    HVM/PVH guests after migration if host and guest frequencies are
    equal (this includes the case when the frequencies are made equal
    by TSC scaling feature).
    
    This also allows us to revert main part of commit 4aab59a3 (svm: Do not
    intercept RDTSC(P) when TSC scaling is supported by hardware) which
    was wrong: while RDTSC intercepts were disabled domain's vtsc could
    still be set, leading to inconsistent view of guest's TSC.
    
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/svm/svm.c |    2 +-
 xen/arch/x86/time.c        |   15 +++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 4fd5376..813e775 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -728,7 +728,7 @@ static void svm_set_rdtsc_exiting(struct vcpu *v, bool_t enable)
     general1_intercepts &= ~GENERAL1_INTERCEPT_RDTSC;
     general2_intercepts &= ~GENERAL2_INTERCEPT_RDTSCP;
 
-    if ( enable && !cpu_has_tsc_ratio )
+    if ( enable )
     {
         general1_intercepts |= GENERAL1_INTERCEPT_RDTSC;
         general2_intercepts |= GENERAL2_INTERCEPT_RDTSCP;
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 07bceda..555f7c8 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -37,6 +37,7 @@
 #include <asm/hpet.h>
 #include <io_ports.h>
 #include <asm/setup.h> /* for early_time_init */
+#include <asm/hvm/svm/svm.h> /* for cpu_has_tsc_ratio */
 #include <public/arch-x86/cpuid.h>
 
 /* opt_clocksource: Force clocksource to one of: pit, hpet, acpi. */
@@ -1889,10 +1890,16 @@ void tsc_set_info(struct domain *d,
         d->arch.vtsc_offset = get_s_time() - elapsed_nsec;
         d->arch.tsc_khz = gtsc_khz ? gtsc_khz : cpu_khz;
         set_time_scale(&d->arch.vtsc_to_ns, d->arch.tsc_khz * 1000 );
-        /* use native TSC if initial host has safe TSC, has not migrated
-         * yet and tsc_khz == cpu_khz */
-        if ( host_tsc_is_safe() && incarnation == 0 &&
-                d->arch.tsc_khz == cpu_khz )
+        /*
+         * Use native TSC if the host has safe TSC and:
+         *  HVM/PVH: host and guest frequencies are the same (either
+         *           "naturally" or via TSC scaling)
+         *  PV: guest has not migrated yet (and thus arch.tsc_khz == cpu_khz)
+         */
+        if ( host_tsc_is_safe() &&
+             ((has_hvm_container_domain(d) &&
+               (d->arch.tsc_khz == cpu_khz || cpu_has_tsc_ratio)) ||
+              incarnation == 0) )
             d->arch.vtsc = 0;
         else 
             d->arch.ns_to_vtsc = scale_reciprocal(d->arch.vtsc_to_ns);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11: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 1Wcv5R-0006Ee-ER; Wed, 23 Apr 2014 11:11:33 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5P-0006EF-Mc
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:32 +0000
Received: from [193.109.254.147:8506] by server-1.bemta-14.messagelabs.com id
	D7/11-00839-2EF97535; Wed, 23 Apr 2014 11:11:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1398251488!352255!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4559 invoked from network); 23 Apr 2014 11:11:29 -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;
	23 Apr 2014 11:11:29 -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 1Wcv57-00075A-Ut
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv57-0001V0-Th
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:13 +0000
Date: Wed, 23 Apr 2014 11:11:13 +0000
Message-Id: <E1Wcv57-0001V0-Th@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] ACPI/ERST: fix signed/unsigned type
	conflicts
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 e681c0408564a2c0d1c6d56d3f683f8db079458c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 22 12:05:44 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:05:44 2014 +0200

    ACPI/ERST: fix signed/unsigned type conflicts
    
    Error checks exist in the respective code path that expect negative
    values to indicate errors, yet negative values can't be communicated
    through size_t. Thus ssize_t needs to be introduced (also on ARM for
    consistency, even if the code in question isn't currently being used
    on there).
    
    The bug is theoretical only in so far as all the involved code is
    effectively dead. Reflect this by excluding that code from non-debug
    builds.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Christoph Egger <chegger@amazon.de>
---
 xen/arch/x86/cpu/mcheck/mce-apei.c |   12 ++++++---
 xen/common/lib.c                   |    3 ++
 xen/drivers/acpi/apei/erst.c       |   43 +++++++++++++++++++++++++-----------
 xen/include/acpi/apei.h            |    6 ++--
 xen/include/asm-arm/types.h        |    1 +
 xen/include/asm-x86/types.h        |    1 +
 6 files changed, 46 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/cpu/mcheck/mce-apei.c b/xen/arch/x86/cpu/mcheck/mce-apei.c
index 31f2302..08f6401 100644
--- a/xen/arch/x86/cpu/mcheck/mce-apei.c
+++ b/xen/arch/x86/cpu/mcheck/mce-apei.c
@@ -89,10 +89,12 @@ int apei_write_mce(struct mce *m)
 	return erst_write(&rcd.hdr);
 }
 
-size_t apei_read_mce(struct mce *m, u64 *record_id)
+#ifndef NDEBUG /* currently dead code */
+
+ssize_t apei_read_mce(struct mce *m, u64 *record_id)
 {
 	struct cper_mce_record rcd;
-	size_t len;
+	ssize_t len;
 
 	if (!m || !record_id)
 		return -EINVAL;
@@ -115,12 +117,14 @@ size_t apei_read_mce(struct mce *m, u64 *record_id)
 }
 
 /* Check whether there is record in ERST */
-int apei_check_mce(void)
+bool_t apei_check_mce(void)
 {
-	return erst_get_record_count();
+	return erst_get_record_count() > 0;
 }
 
 int apei_clear_mce(u64 record_id)
 {
 	return erst_clear(record_id);
 }
+
+#endif /* currently dead code */
diff --git a/xen/common/lib.c b/xen/common/lib.c
index e3cb3f4..a758025 100644
--- a/xen/common/lib.c
+++ b/xen/common/lib.c
@@ -487,6 +487,9 @@ void __init init_constructors(void)
     const ctor_func_t *f;
     for ( f = __ctors_start; f < __ctors_end; ++f )
         (*f)();
+
+    /* Putting this here seems as good (or bad) as any other place. */
+    BUILD_BUG_ON(sizeof(size_t) != sizeof(ssize_t));
 }
 
 /*
diff --git a/xen/drivers/acpi/apei/erst.c b/xen/drivers/acpi/apei/erst.c
index 98f73d9..2fafe7f 100644
--- a/xen/drivers/acpi/apei/erst.c
+++ b/xen/drivers/acpi/apei/erst.c
@@ -383,21 +383,24 @@ static int erst_get_erange(struct erst_erange *range)
 	return 0;
 }
 
-static size_t __erst_get_record_count(void)
+static ssize_t __erst_get_record_count(void)
 {
 	struct apei_exec_context ctx;
 	int rc;
+	u64 output;
+	ssize_t count;
 
 	erst_exec_ctx_init(&ctx);
 	rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_COUNT);
 	if (rc)
 		return rc;
-	return apei_exec_ctx_get_output(&ctx);
+	count = output = apei_exec_ctx_get_output(&ctx);
+	return count >= 0 && count == output ? count : -ERANGE;
 }
 
-size_t erst_get_record_count(void)
+ssize_t erst_get_record_count(void)
 {
-	size_t count;
+	ssize_t count;
 	unsigned long flags;
 
 	if (!erst_enabled)
@@ -483,6 +486,8 @@ static int __erst_write_to_storage(u64 offset)
 	return erst_errno(val);
 }
 
+#ifndef NDEBUG /* currently dead code */
+
 static int __erst_read_from_storage(u64 record_id, u64 offset)
 {
 	struct apei_exec_context ctx;
@@ -565,6 +570,8 @@ static int __erst_clear_from_storage(u64 record_id)
 	return erst_errno(val);
 }
 
+#endif /* currently dead code */
+
 /* NVRAM ERST Error Log Address Range is not supported yet */
 static int __erst_write_to_nvram(const struct cper_record_header *record)
 {
@@ -572,6 +579,8 @@ static int __erst_write_to_nvram(const struct cper_record_header *record)
 	return -ENOSYS;
 }
 
+#ifndef NDEBUG /* currently dead code */
+
 static int __erst_read_to_erange_from_nvram(u64 record_id, u64 *offset)
 {
 	printk(KERN_WARNING
@@ -586,6 +595,8 @@ static int __erst_clear_from_nvram(u64 record_id)
 	return -ENOSYS;
 }
 
+#endif /* currently dead code */
+
 int erst_write(const struct cper_record_header *record)
 {
 	int rc;
@@ -625,6 +636,8 @@ int erst_write(const struct cper_record_header *record)
 	return rc;
 }
 
+#ifndef NDEBUG /* currently dead code */
+
 static int __erst_read_to_erange(u64 record_id, u64 *offset)
 {
 	int rc;
@@ -641,22 +654,24 @@ static int __erst_read_to_erange(u64 record_id, u64 *offset)
 	return 0;
 }
 
-static size_t __erst_read(u64 record_id, struct cper_record_header *record,
+static ssize_t __erst_read(u64 record_id, struct cper_record_header *record,
 			   size_t buflen)
 {
 	int rc;
-	u64 offset, len = 0;
+	u64 offset;
+	ssize_t len;
 	struct cper_record_header *rcd_tmp;
 
 	rc = __erst_read_to_erange(record_id, &offset);
 	if (rc)
 		return rc;
 	rcd_tmp = erst_erange.vaddr + offset;
+	if (rcd_tmp->record_length > buflen)
+		return -ENOBUFS;
 	len = rcd_tmp->record_length;
-	if (len <= buflen)
-		memcpy(record, rcd_tmp, len);
+	memcpy(record, rcd_tmp, len);
 
-	return len;
+	return len >= 0 ? len : -ERANGE;
 }
 
 /*
@@ -664,10 +679,10 @@ static size_t __erst_read(u64 record_id, struct cper_record_header *record,
  * else if return value < 0, something goes wrong,
  * else everything is OK, and return value is record length
  */
-size_t erst_read(u64 record_id, struct cper_record_header *record,
+ssize_t erst_read(u64 record_id, struct cper_record_header *record,
 		  size_t buflen)
 {
-	size_t len;
+	ssize_t len;
 	unsigned long flags;
 
 	if (!erst_enabled)
@@ -685,10 +700,10 @@ size_t erst_read(u64 record_id, struct cper_record_header *record,
  * else if return value < 0, something goes wrong,
  * else everything is OK, and return value is record length
  */
-size_t erst_read_next(struct cper_record_header *record, size_t buflen)
+ssize_t erst_read_next(struct cper_record_header *record, size_t buflen)
 {
 	int rc;
-	size_t len;
+	ssize_t len;
 	unsigned long flags;
 	u64 record_id;
 
@@ -731,6 +746,8 @@ int erst_clear(u64 record_id)
 	return rc;
 }
 
+#endif /* currently dead code */
+
 static int __init erst_check_table(struct acpi_table_erst *erst_tab)
 {
 	if (erst_tab->header.length < sizeof(*erst_tab))
diff --git a/xen/include/acpi/apei.h b/xen/include/acpi/apei.h
index 162f616..d228595 100644
--- a/xen/include/acpi/apei.h
+++ b/xen/include/acpi/apei.h
@@ -13,11 +13,11 @@
 #define FIX_APEI_RANGE_MAX 64
 
 int erst_write(const struct cper_record_header *record);
-size_t erst_get_record_count(void);
+ssize_t erst_get_record_count(void);
 int erst_get_next_record_id(u64 *record_id);
-size_t erst_read(u64 record_id, struct cper_record_header *record,
+ssize_t erst_read(u64 record_id, struct cper_record_header *record,
 		  size_t buflen);
-size_t erst_read_next(struct cper_record_header *record, size_t buflen);
+ssize_t erst_read_next(struct cper_record_header *record, size_t buflen);
 int erst_clear(u64 record_id);
 
 void __iomem *apei_pre_map(paddr_t paddr, unsigned long size);
diff --git a/xen/include/asm-arm/types.h b/xen/include/asm-arm/types.h
index 183f3e0..09e5455 100644
--- a/xen/include/asm-arm/types.h
+++ b/xen/include/asm-arm/types.h
@@ -60,6 +60,7 @@ typedef __SIZE_TYPE__ size_t;
 #else
 typedef unsigned long size_t;
 #endif
+typedef signed long ssize_t;
 
 typedef char bool_t;
 #define test_and_set_bool(b)   xchg(&(b), 1)
diff --git a/xen/include/asm-x86/types.h b/xen/include/asm-x86/types.h
index 9da3053..b82fa58 100644
--- a/xen/include/asm-x86/types.h
+++ b/xen/include/asm-x86/types.h
@@ -39,6 +39,7 @@ typedef __SIZE_TYPE__ size_t;
 #else
 typedef unsigned long size_t;
 #endif
+typedef signed long ssize_t;
 
 typedef char bool_t;
 #define test_and_set_bool(b)   xchg(&(b), 1)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:43 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11: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 1Wcv5R-0006Ee-ER; Wed, 23 Apr 2014 11:11:33 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5P-0006EF-Mc
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:32 +0000
Received: from [193.109.254.147:8506] by server-1.bemta-14.messagelabs.com id
	D7/11-00839-2EF97535; Wed, 23 Apr 2014 11:11:30 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1398251488!352255!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 4559 invoked from network); 23 Apr 2014 11:11:29 -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;
	23 Apr 2014 11:11:29 -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 1Wcv57-00075A-Ut
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:13 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv57-0001V0-Th
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:13 +0000
Date: Wed, 23 Apr 2014 11:11:13 +0000
Message-Id: <E1Wcv57-0001V0-Th@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] ACPI/ERST: fix signed/unsigned type
	conflicts
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 e681c0408564a2c0d1c6d56d3f683f8db079458c
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Tue Apr 22 12:05:44 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:05:44 2014 +0200

    ACPI/ERST: fix signed/unsigned type conflicts
    
    Error checks exist in the respective code path that expect negative
    values to indicate errors, yet negative values can't be communicated
    through size_t. Thus ssize_t needs to be introduced (also on ARM for
    consistency, even if the code in question isn't currently being used
    on there).
    
    The bug is theoretical only in so far as all the involved code is
    effectively dead. Reflect this by excluding that code from non-debug
    builds.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Christoph Egger <chegger@amazon.de>
---
 xen/arch/x86/cpu/mcheck/mce-apei.c |   12 ++++++---
 xen/common/lib.c                   |    3 ++
 xen/drivers/acpi/apei/erst.c       |   43 +++++++++++++++++++++++++-----------
 xen/include/acpi/apei.h            |    6 ++--
 xen/include/asm-arm/types.h        |    1 +
 xen/include/asm-x86/types.h        |    1 +
 6 files changed, 46 insertions(+), 20 deletions(-)

diff --git a/xen/arch/x86/cpu/mcheck/mce-apei.c b/xen/arch/x86/cpu/mcheck/mce-apei.c
index 31f2302..08f6401 100644
--- a/xen/arch/x86/cpu/mcheck/mce-apei.c
+++ b/xen/arch/x86/cpu/mcheck/mce-apei.c
@@ -89,10 +89,12 @@ int apei_write_mce(struct mce *m)
 	return erst_write(&rcd.hdr);
 }
 
-size_t apei_read_mce(struct mce *m, u64 *record_id)
+#ifndef NDEBUG /* currently dead code */
+
+ssize_t apei_read_mce(struct mce *m, u64 *record_id)
 {
 	struct cper_mce_record rcd;
-	size_t len;
+	ssize_t len;
 
 	if (!m || !record_id)
 		return -EINVAL;
@@ -115,12 +117,14 @@ size_t apei_read_mce(struct mce *m, u64 *record_id)
 }
 
 /* Check whether there is record in ERST */
-int apei_check_mce(void)
+bool_t apei_check_mce(void)
 {
-	return erst_get_record_count();
+	return erst_get_record_count() > 0;
 }
 
 int apei_clear_mce(u64 record_id)
 {
 	return erst_clear(record_id);
 }
+
+#endif /* currently dead code */
diff --git a/xen/common/lib.c b/xen/common/lib.c
index e3cb3f4..a758025 100644
--- a/xen/common/lib.c
+++ b/xen/common/lib.c
@@ -487,6 +487,9 @@ void __init init_constructors(void)
     const ctor_func_t *f;
     for ( f = __ctors_start; f < __ctors_end; ++f )
         (*f)();
+
+    /* Putting this here seems as good (or bad) as any other place. */
+    BUILD_BUG_ON(sizeof(size_t) != sizeof(ssize_t));
 }
 
 /*
diff --git a/xen/drivers/acpi/apei/erst.c b/xen/drivers/acpi/apei/erst.c
index 98f73d9..2fafe7f 100644
--- a/xen/drivers/acpi/apei/erst.c
+++ b/xen/drivers/acpi/apei/erst.c
@@ -383,21 +383,24 @@ static int erst_get_erange(struct erst_erange *range)
 	return 0;
 }
 
-static size_t __erst_get_record_count(void)
+static ssize_t __erst_get_record_count(void)
 {
 	struct apei_exec_context ctx;
 	int rc;
+	u64 output;
+	ssize_t count;
 
 	erst_exec_ctx_init(&ctx);
 	rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_COUNT);
 	if (rc)
 		return rc;
-	return apei_exec_ctx_get_output(&ctx);
+	count = output = apei_exec_ctx_get_output(&ctx);
+	return count >= 0 && count == output ? count : -ERANGE;
 }
 
-size_t erst_get_record_count(void)
+ssize_t erst_get_record_count(void)
 {
-	size_t count;
+	ssize_t count;
 	unsigned long flags;
 
 	if (!erst_enabled)
@@ -483,6 +486,8 @@ static int __erst_write_to_storage(u64 offset)
 	return erst_errno(val);
 }
 
+#ifndef NDEBUG /* currently dead code */
+
 static int __erst_read_from_storage(u64 record_id, u64 offset)
 {
 	struct apei_exec_context ctx;
@@ -565,6 +570,8 @@ static int __erst_clear_from_storage(u64 record_id)
 	return erst_errno(val);
 }
 
+#endif /* currently dead code */
+
 /* NVRAM ERST Error Log Address Range is not supported yet */
 static int __erst_write_to_nvram(const struct cper_record_header *record)
 {
@@ -572,6 +579,8 @@ static int __erst_write_to_nvram(const struct cper_record_header *record)
 	return -ENOSYS;
 }
 
+#ifndef NDEBUG /* currently dead code */
+
 static int __erst_read_to_erange_from_nvram(u64 record_id, u64 *offset)
 {
 	printk(KERN_WARNING
@@ -586,6 +595,8 @@ static int __erst_clear_from_nvram(u64 record_id)
 	return -ENOSYS;
 }
 
+#endif /* currently dead code */
+
 int erst_write(const struct cper_record_header *record)
 {
 	int rc;
@@ -625,6 +636,8 @@ int erst_write(const struct cper_record_header *record)
 	return rc;
 }
 
+#ifndef NDEBUG /* currently dead code */
+
 static int __erst_read_to_erange(u64 record_id, u64 *offset)
 {
 	int rc;
@@ -641,22 +654,24 @@ static int __erst_read_to_erange(u64 record_id, u64 *offset)
 	return 0;
 }
 
-static size_t __erst_read(u64 record_id, struct cper_record_header *record,
+static ssize_t __erst_read(u64 record_id, struct cper_record_header *record,
 			   size_t buflen)
 {
 	int rc;
-	u64 offset, len = 0;
+	u64 offset;
+	ssize_t len;
 	struct cper_record_header *rcd_tmp;
 
 	rc = __erst_read_to_erange(record_id, &offset);
 	if (rc)
 		return rc;
 	rcd_tmp = erst_erange.vaddr + offset;
+	if (rcd_tmp->record_length > buflen)
+		return -ENOBUFS;
 	len = rcd_tmp->record_length;
-	if (len <= buflen)
-		memcpy(record, rcd_tmp, len);
+	memcpy(record, rcd_tmp, len);
 
-	return len;
+	return len >= 0 ? len : -ERANGE;
 }
 
 /*
@@ -664,10 +679,10 @@ static size_t __erst_read(u64 record_id, struct cper_record_header *record,
  * else if return value < 0, something goes wrong,
  * else everything is OK, and return value is record length
  */
-size_t erst_read(u64 record_id, struct cper_record_header *record,
+ssize_t erst_read(u64 record_id, struct cper_record_header *record,
 		  size_t buflen)
 {
-	size_t len;
+	ssize_t len;
 	unsigned long flags;
 
 	if (!erst_enabled)
@@ -685,10 +700,10 @@ size_t erst_read(u64 record_id, struct cper_record_header *record,
  * else if return value < 0, something goes wrong,
  * else everything is OK, and return value is record length
  */
-size_t erst_read_next(struct cper_record_header *record, size_t buflen)
+ssize_t erst_read_next(struct cper_record_header *record, size_t buflen)
 {
 	int rc;
-	size_t len;
+	ssize_t len;
 	unsigned long flags;
 	u64 record_id;
 
@@ -731,6 +746,8 @@ int erst_clear(u64 record_id)
 	return rc;
 }
 
+#endif /* currently dead code */
+
 static int __init erst_check_table(struct acpi_table_erst *erst_tab)
 {
 	if (erst_tab->header.length < sizeof(*erst_tab))
diff --git a/xen/include/acpi/apei.h b/xen/include/acpi/apei.h
index 162f616..d228595 100644
--- a/xen/include/acpi/apei.h
+++ b/xen/include/acpi/apei.h
@@ -13,11 +13,11 @@
 #define FIX_APEI_RANGE_MAX 64
 
 int erst_write(const struct cper_record_header *record);
-size_t erst_get_record_count(void);
+ssize_t erst_get_record_count(void);
 int erst_get_next_record_id(u64 *record_id);
-size_t erst_read(u64 record_id, struct cper_record_header *record,
+ssize_t erst_read(u64 record_id, struct cper_record_header *record,
 		  size_t buflen);
-size_t erst_read_next(struct cper_record_header *record, size_t buflen);
+ssize_t erst_read_next(struct cper_record_header *record, size_t buflen);
 int erst_clear(u64 record_id);
 
 void __iomem *apei_pre_map(paddr_t paddr, unsigned long size);
diff --git a/xen/include/asm-arm/types.h b/xen/include/asm-arm/types.h
index 183f3e0..09e5455 100644
--- a/xen/include/asm-arm/types.h
+++ b/xen/include/asm-arm/types.h
@@ -60,6 +60,7 @@ typedef __SIZE_TYPE__ size_t;
 #else
 typedef unsigned long size_t;
 #endif
+typedef signed long ssize_t;
 
 typedef char bool_t;
 #define test_and_set_bool(b)   xchg(&(b), 1)
diff --git a/xen/include/asm-x86/types.h b/xen/include/asm-x86/types.h
index 9da3053..b82fa58 100644
--- a/xen/include/asm-x86/types.h
+++ b/xen/include/asm-x86/types.h
@@ -39,6 +39,7 @@ typedef __SIZE_TYPE__ size_t;
 #else
 typedef unsigned long size_t;
 #endif
+typedef signed long ssize_t;
 
 typedef char bool_t;
 #define test_and_set_bool(b)   xchg(&(b), 1)
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:11:49 +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 1Wcv5X-0006GO-H2; Wed, 23 Apr 2014 11:11:39 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5V-0006Fm-LM
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:38 +0000
Received: from [85.158.137.68:40843] by server-13.bemta-3.messagelabs.com id
	DA/E9-18692-8EF97535; Wed, 23 Apr 2014 11:11:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1398251494!3421376!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24853 invoked from network); 23 Apr 2014 11:11:35 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:35 -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 1Wcv5S-00075J-7Z
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5S-0001Vm-6W
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:34 +0000
Date: Wed, 23 Apr 2014 11:11:34 +0000
Message-Id: <E1Wcv5S-0001Vm-6W@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/svm: enable TSC scaling
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 b95fd03b5f0b66384bd7c190d5861ae68eb98c85
Author:     Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Tue Apr 22 12:08:06 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:08:06 2014 +0200

    x86/svm: enable TSC scaling
    
    TSC ratio enabling logic is inverted: we want to use it when we
    are running in native tsc mode, i.e. when d->arch.vtsc is zero.
    
    Also, since now svm_set_tsc_offset()'s calculations depend
    on vtsc's value, we need to call hvm_funcs.set_tsc_offset() after
    vtsc changes in tsc_set_info().
    
    In addition, with TSC ratio enabled, svm_set_tsc_offset() will
    need to do rdtsc. With that we may end up having TSCs on guest's
    processors out of sync. d->arch.hvm_domain.sync_tsc which is set
    by the boot processor can now be used by APs as reference TSC
    value instead of host's current TSC.
    
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/hvm.c           |   15 ++++++++++-----
 xen/arch/x86/hvm/svm/svm.c       |   16 ++++++++++------
 xen/arch/x86/hvm/vmx/vmx.c       |    2 +-
 xen/arch/x86/hvm/vmx/vvmx.c      |    4 ++--
 xen/arch/x86/hvm/vpt.c           |   16 ++++++++++------
 xen/arch/x86/time.c              |   29 +++++++++++++++++++++++++++--
 xen/include/asm-x86/hvm/domain.h |    6 ++++++
 xen/include/asm-x86/hvm/hvm.h    |    8 +++++---
 xen/include/asm-x86/msr.h        |    6 +++---
 xen/include/xen/time.h           |    1 +
 10 files changed, 75 insertions(+), 28 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index ae7a645..15f4b25 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -278,27 +278,31 @@ void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc)
                           - v->arch.hvm_vcpu.cache_tsc_offset;
     v->arch.hvm_vcpu.cache_tsc_offset = delta_tsc;
 
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
 }
 
 void hvm_set_guest_tsc_adjust(struct vcpu *v, u64 tsc_adjust)
 {
     v->arch.hvm_vcpu.cache_tsc_offset += tsc_adjust
                             - v->arch.hvm_vcpu.msr_tsc_adjust;
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
     v->arch.hvm_vcpu.msr_tsc_adjust = tsc_adjust;
 }
 
-u64 hvm_get_guest_tsc(struct vcpu *v)
+u64 hvm_get_guest_tsc_fixed(struct vcpu *v, uint64_t at_tsc)
 {
     uint64_t tsc;
 
     if ( v->domain->arch.vtsc )
     {
-        tsc = hvm_get_guest_time(v);
+        tsc = hvm_get_guest_time_fixed(v, at_tsc);
         tsc = gtime_to_gtsc(v->domain, tsc);
         v->domain->arch.vtsc_kerncount++;
     }
+    else if ( at_tsc )
+    {
+        tsc = at_tsc;
+    }
     else
     {
         rdtscll(tsc);
@@ -3840,7 +3844,8 @@ void hvm_vcpu_reset_state(struct vcpu *v, uint16_t cs, uint16_t ip)
     /* Sync AP's TSC with BSP's. */
     v->arch.hvm_vcpu.cache_tsc_offset =
         v->domain->vcpu[0]->arch.hvm_vcpu.cache_tsc_offset;
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset,
+                             d->arch.hvm_domain.sync_tsc);
 
     v->arch.hvm_vcpu.msr_tsc_adjust = 0;
 
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 813e775..4cc271e 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -680,7 +680,7 @@ static uint64_t svm_get_tsc_offset(uint64_t host_tsc, uint64_t guest_tsc,
     return guest_tsc - offset;
 }
 
-static void svm_set_tsc_offset(struct vcpu *v, u64 offset)
+static void svm_set_tsc_offset(struct vcpu *v, u64 offset, u64 at_tsc)
 {
     struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
     struct vmcb_struct *n1vmcb, *n2vmcb;
@@ -688,11 +688,15 @@ static void svm_set_tsc_offset(struct vcpu *v, u64 offset)
     struct domain *d = v->domain;
     uint64_t host_tsc, guest_tsc;
 
-    guest_tsc = hvm_get_guest_tsc(v);
+    guest_tsc = hvm_get_guest_tsc_fixed(v, at_tsc);
 
     /* Re-adjust the offset value when TSC_RATIO is available */
-    if ( cpu_has_tsc_ratio && d->arch.vtsc ) {
-        rdtscll(host_tsc);
+    if ( cpu_has_tsc_ratio && !d->arch.vtsc )
+    {
+        if ( at_tsc )
+            host_tsc = at_tsc;
+        else
+            rdtscll(host_tsc);
         offset = svm_get_tsc_offset(host_tsc, guest_tsc, vcpu_tsc_ratio(v));
     }
 
@@ -847,13 +851,13 @@ static int svm_update_lwp_cfg(struct vcpu *v, uint64_t msr_content)
 static inline void svm_tsc_ratio_save(struct vcpu *v)
 {
     /* Other vcpus might not have vtsc enabled. So disable TSC_RATIO here. */
-    if ( cpu_has_tsc_ratio && v->domain->arch.vtsc )
+    if ( cpu_has_tsc_ratio && !v->domain->arch.vtsc )
         wrmsrl(MSR_AMD64_TSC_RATIO, DEFAULT_TSC_RATIO);
 }
 
 static inline void svm_tsc_ratio_load(struct vcpu *v)
 {
-    if ( cpu_has_tsc_ratio && v->domain->arch.vtsc ) 
+    if ( cpu_has_tsc_ratio && !v->domain->arch.vtsc ) 
         wrmsrl(MSR_AMD64_TSC_RATIO, vcpu_tsc_ratio(v));
 }
 
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 180cf6c..1c9fa48 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1052,7 +1052,7 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
     }
 }
 
-static void vmx_set_tsc_offset(struct vcpu *v, u64 offset)
+static void vmx_set_tsc_offset(struct vcpu *v, u64 offset, u64 at_tsc)
 {
     vmx_vmcs_enter(v);
 
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 40167d6..e263376 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1058,7 +1058,7 @@ static void load_shadow_guest_state(struct vcpu *v)
     if ( control & VM_ENTRY_LOAD_PERF_GLOBAL_CTRL )
         hvm_msr_write_intercept(MSR_CORE_PERF_GLOBAL_CTRL, __get_vvmcs(vvmcs, GUEST_PERF_GLOBAL_CTRL));
 
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
 
     vvmcs_to_shadow_bulk(v, ARRAY_SIZE(vmentry_fields), vmentry_fields);
 
@@ -1259,7 +1259,7 @@ static void load_vvmcs_host_state(struct vcpu *v)
     if ( control & VM_EXIT_LOAD_PERF_GLOBAL_CTRL )
         hvm_msr_write_intercept(MSR_CORE_PERF_GLOBAL_CTRL, __get_vvmcs(vvmcs, HOST_PERF_GLOBAL_CTRL));
 
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
 
     __set_vvmcs(vvmcs, VM_ENTRY_INTR_INFO, 0);
 }
diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c
index f7af688..38541cf 100644
--- a/xen/arch/x86/hvm/vpt.c
+++ b/xen/arch/x86/hvm/vpt.c
@@ -36,7 +36,7 @@ void hvm_init_guest_time(struct domain *d)
     pl->last_guest_time = 0;
 }
 
-u64 hvm_get_guest_time(struct vcpu *v)
+u64 hvm_get_guest_time_fixed(struct vcpu *v, u64 at_tsc)
 {
     struct pl_time *pl = &v->domain->arch.hvm_domain.pl_time;
     u64 now;
@@ -45,11 +45,15 @@ u64 hvm_get_guest_time(struct vcpu *v)
     ASSERT(is_hvm_vcpu(v));
 
     spin_lock(&pl->pl_time_lock);
-    now = get_s_time() + pl->stime_offset;
-    if ( (int64_t)(now - pl->last_guest_time) > 0 )
-        pl->last_guest_time = now;
-    else
-        now = ++pl->last_guest_time;
+    now = get_s_time_fixed(at_tsc) + pl->stime_offset;
+
+    if ( !at_tsc )
+    {
+        if ( (int64_t)(now - pl->last_guest_time) > 0 )
+            pl->last_guest_time = now;
+        else
+            now = ++pl->last_guest_time;
+    }
     spin_unlock(&pl->pl_time_lock);
 
     return now + v->arch.hvm_vcpu.stime_offset;
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 555f7c8..93bb5b6 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -716,19 +716,27 @@ static unsigned long get_cmos_time(void)
  * System Time
  ***************************************************************************/
 
-s_time_t get_s_time(void)
+s_time_t get_s_time_fixed(u64 at_tsc)
 {
     struct cpu_time *t = &this_cpu(cpu_time);
     u64 tsc, delta;
     s_time_t now;
 
-    rdtscll(tsc);
+    if ( at_tsc )
+        tsc = at_tsc;
+    else
+        rdtscll(tsc);
     delta = tsc - t->local_tsc_stamp;
     now = t->stime_local_stamp + scale_delta(delta, &t->tsc_scale);
 
     return now;
 }
 
+s_time_t get_s_time()
+{
+    return get_s_time_fixed(0);
+}
+
 uint64_t tsc_ticks2ns(uint64_t ticks)
 {
     struct cpu_time *t = &this_cpu(cpu_time);
@@ -1924,7 +1932,24 @@ void tsc_set_info(struct domain *d,
     }
     d->arch.incarnation = incarnation + 1;
     if ( is_hvm_domain(d) )
+    {
         hvm_set_rdtsc_exiting(d, d->arch.vtsc);
+        if ( d->vcpu && d->vcpu[0] && incarnation == 0 )
+        {
+            /*
+             * set_tsc_offset() is called from hvm_vcpu_initialise() before
+             * tsc_set_info(). New vtsc mode may require recomputing TSC
+             * offset.
+             * We only need to do this for BSP during initial boot. APs will
+             * call set_tsc_offset() later from hvm_vcpu_reset_state() and they
+             * will sync their TSC to BSP's sync_tsc.
+             */
+            rdtscll(d->arch.hvm_domain.sync_tsc);
+            hvm_funcs.set_tsc_offset(d->vcpu[0],
+                                     d->vcpu[0]->arch.hvm_vcpu.cache_tsc_offset,
+                                     d->arch.hvm_domain.sync_tsc);
+        }
+    }
 }
 
 /* vtsc may incur measurable performance degradation, diagnose with this */
diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/asm-x86/hvm/domain.h
index b1e3187..460dd94 100644
--- a/xen/include/asm-x86/hvm/domain.h
+++ b/xen/include/asm-x86/hvm/domain.h
@@ -90,6 +90,12 @@ struct hvm_domain {
     bool_t                 qemu_mapcache_invalidate;
     bool_t                 is_s3_suspended;
 
+    /*
+     * TSC value that VCPUs use to calculate their tsc_offset value.
+     * Used during initialization and save/restore.
+     */
+    uint64_t sync_tsc;
+
     union {
         struct vmx_domain vmx;
         struct svm_domain svm;
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index dcc3483..1fb3b99 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -137,7 +137,7 @@ struct hvm_function_table {
     int  (*get_guest_pat)(struct vcpu *v, u64 *);
     int  (*set_guest_pat)(struct vcpu *v, u64);
 
-    void (*set_tsc_offset)(struct vcpu *v, u64 offset);
+    void (*set_tsc_offset)(struct vcpu *v, u64 offset, u64 at_tsc);
 
     void (*inject_trap)(struct hvm_trap *trap);
 
@@ -233,11 +233,13 @@ void hvm_get_guest_pat(struct vcpu *v, u64 *guest_pat);
 int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat);
 
 void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc);
-u64 hvm_get_guest_tsc(struct vcpu *v);
+u64 hvm_get_guest_tsc_fixed(struct vcpu *v, u64 at_tsc);
+#define hvm_get_guest_tsc(v) hvm_get_guest_tsc_fixed(v, 0)
 
 void hvm_init_guest_time(struct domain *d);
 void hvm_set_guest_time(struct vcpu *v, u64 guest_time);
-u64 hvm_get_guest_time(struct vcpu *v);
+u64 hvm_get_guest_time_fixed(struct vcpu *v, u64 at_tsc);
+#define hvm_get_guest_time(v) hvm_get_guest_time_fixed(v, 0)
 
 int vmsi_deliver(
     struct domain *d, int vector,
diff --git a/xen/include/asm-x86/msr.h b/xen/include/asm-x86/msr.h
index 61f579a..52cae4b 100644
--- a/xen/include/asm-x86/msr.h
+++ b/xen/include/asm-x86/msr.h
@@ -78,9 +78,9 @@ static inline int wrmsr_safe(unsigned int msr, uint64_t val)
      __asm__ __volatile__("rdtsc" : "=a" (low) : : "edx")
 
 #define rdtscll(val) do { \
-     unsigned int a,d; \
-     asm volatile("rdtsc" : "=a" (a), "=d" (d)); \
-     (val) = ((unsigned long)a) | (((unsigned long)d)<<32); \
+     unsigned int _eax, _edx; \
+     asm volatile("rdtsc" : "=a" (_eax), "=d" (_edx)); \
+     (val) = ((unsigned long)_eax) | (((unsigned long)_edx)<<32); \
 } while(0)
 
 #define __write_tsc(val) wrmsrl(MSR_IA32_TSC, val)
diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h
index 2703454..709501f 100644
--- a/xen/include/xen/time.h
+++ b/xen/include/xen/time.h
@@ -32,6 +32,7 @@ struct vcpu;
 typedef s64 s_time_t;
 #define PRI_stime PRId64
 
+s_time_t get_s_time_fixed(u64 at_tick);
 s_time_t get_s_time(void);
 unsigned long get_localtime(struct domain *d);
 uint64_t get_localtime_us(struct domain *d);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:49 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:11:49 +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 1Wcv5X-0006GO-H2; Wed, 23 Apr 2014 11:11:39 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5V-0006Fm-LM
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:38 +0000
Received: from [85.158.137.68:40843] by server-13.bemta-3.messagelabs.com id
	DA/E9-18692-8EF97535; Wed, 23 Apr 2014 11:11:36 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-8.tower-31.messagelabs.com!1398251494!3421376!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 24853 invoked from network); 23 Apr 2014 11:11:35 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-8.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:35 -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 1Wcv5S-00075J-7Z
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:34 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5S-0001Vm-6W
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:34 +0000
Date: Wed, 23 Apr 2014 11:11:34 +0000
Message-Id: <E1Wcv5S-0001Vm-6W@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/svm: enable TSC scaling
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 b95fd03b5f0b66384bd7c190d5861ae68eb98c85
Author:     Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Tue Apr 22 12:08:06 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:08:06 2014 +0200

    x86/svm: enable TSC scaling
    
    TSC ratio enabling logic is inverted: we want to use it when we
    are running in native tsc mode, i.e. when d->arch.vtsc is zero.
    
    Also, since now svm_set_tsc_offset()'s calculations depend
    on vtsc's value, we need to call hvm_funcs.set_tsc_offset() after
    vtsc changes in tsc_set_info().
    
    In addition, with TSC ratio enabled, svm_set_tsc_offset() will
    need to do rdtsc. With that we may end up having TSCs on guest's
    processors out of sync. d->arch.hvm_domain.sync_tsc which is set
    by the boot processor can now be used by APs as reference TSC
    value instead of host's current TSC.
    
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/hvm.c           |   15 ++++++++++-----
 xen/arch/x86/hvm/svm/svm.c       |   16 ++++++++++------
 xen/arch/x86/hvm/vmx/vmx.c       |    2 +-
 xen/arch/x86/hvm/vmx/vvmx.c      |    4 ++--
 xen/arch/x86/hvm/vpt.c           |   16 ++++++++++------
 xen/arch/x86/time.c              |   29 +++++++++++++++++++++++++++--
 xen/include/asm-x86/hvm/domain.h |    6 ++++++
 xen/include/asm-x86/hvm/hvm.h    |    8 +++++---
 xen/include/asm-x86/msr.h        |    6 +++---
 xen/include/xen/time.h           |    1 +
 10 files changed, 75 insertions(+), 28 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index ae7a645..15f4b25 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -278,27 +278,31 @@ void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc)
                           - v->arch.hvm_vcpu.cache_tsc_offset;
     v->arch.hvm_vcpu.cache_tsc_offset = delta_tsc;
 
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
 }
 
 void hvm_set_guest_tsc_adjust(struct vcpu *v, u64 tsc_adjust)
 {
     v->arch.hvm_vcpu.cache_tsc_offset += tsc_adjust
                             - v->arch.hvm_vcpu.msr_tsc_adjust;
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
     v->arch.hvm_vcpu.msr_tsc_adjust = tsc_adjust;
 }
 
-u64 hvm_get_guest_tsc(struct vcpu *v)
+u64 hvm_get_guest_tsc_fixed(struct vcpu *v, uint64_t at_tsc)
 {
     uint64_t tsc;
 
     if ( v->domain->arch.vtsc )
     {
-        tsc = hvm_get_guest_time(v);
+        tsc = hvm_get_guest_time_fixed(v, at_tsc);
         tsc = gtime_to_gtsc(v->domain, tsc);
         v->domain->arch.vtsc_kerncount++;
     }
+    else if ( at_tsc )
+    {
+        tsc = at_tsc;
+    }
     else
     {
         rdtscll(tsc);
@@ -3840,7 +3844,8 @@ void hvm_vcpu_reset_state(struct vcpu *v, uint16_t cs, uint16_t ip)
     /* Sync AP's TSC with BSP's. */
     v->arch.hvm_vcpu.cache_tsc_offset =
         v->domain->vcpu[0]->arch.hvm_vcpu.cache_tsc_offset;
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset,
+                             d->arch.hvm_domain.sync_tsc);
 
     v->arch.hvm_vcpu.msr_tsc_adjust = 0;
 
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 813e775..4cc271e 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -680,7 +680,7 @@ static uint64_t svm_get_tsc_offset(uint64_t host_tsc, uint64_t guest_tsc,
     return guest_tsc - offset;
 }
 
-static void svm_set_tsc_offset(struct vcpu *v, u64 offset)
+static void svm_set_tsc_offset(struct vcpu *v, u64 offset, u64 at_tsc)
 {
     struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
     struct vmcb_struct *n1vmcb, *n2vmcb;
@@ -688,11 +688,15 @@ static void svm_set_tsc_offset(struct vcpu *v, u64 offset)
     struct domain *d = v->domain;
     uint64_t host_tsc, guest_tsc;
 
-    guest_tsc = hvm_get_guest_tsc(v);
+    guest_tsc = hvm_get_guest_tsc_fixed(v, at_tsc);
 
     /* Re-adjust the offset value when TSC_RATIO is available */
-    if ( cpu_has_tsc_ratio && d->arch.vtsc ) {
-        rdtscll(host_tsc);
+    if ( cpu_has_tsc_ratio && !d->arch.vtsc )
+    {
+        if ( at_tsc )
+            host_tsc = at_tsc;
+        else
+            rdtscll(host_tsc);
         offset = svm_get_tsc_offset(host_tsc, guest_tsc, vcpu_tsc_ratio(v));
     }
 
@@ -847,13 +851,13 @@ static int svm_update_lwp_cfg(struct vcpu *v, uint64_t msr_content)
 static inline void svm_tsc_ratio_save(struct vcpu *v)
 {
     /* Other vcpus might not have vtsc enabled. So disable TSC_RATIO here. */
-    if ( cpu_has_tsc_ratio && v->domain->arch.vtsc )
+    if ( cpu_has_tsc_ratio && !v->domain->arch.vtsc )
         wrmsrl(MSR_AMD64_TSC_RATIO, DEFAULT_TSC_RATIO);
 }
 
 static inline void svm_tsc_ratio_load(struct vcpu *v)
 {
-    if ( cpu_has_tsc_ratio && v->domain->arch.vtsc ) 
+    if ( cpu_has_tsc_ratio && !v->domain->arch.vtsc ) 
         wrmsrl(MSR_AMD64_TSC_RATIO, vcpu_tsc_ratio(v));
 }
 
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 180cf6c..1c9fa48 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1052,7 +1052,7 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value)
     }
 }
 
-static void vmx_set_tsc_offset(struct vcpu *v, u64 offset)
+static void vmx_set_tsc_offset(struct vcpu *v, u64 offset, u64 at_tsc)
 {
     vmx_vmcs_enter(v);
 
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 40167d6..e263376 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1058,7 +1058,7 @@ static void load_shadow_guest_state(struct vcpu *v)
     if ( control & VM_ENTRY_LOAD_PERF_GLOBAL_CTRL )
         hvm_msr_write_intercept(MSR_CORE_PERF_GLOBAL_CTRL, __get_vvmcs(vvmcs, GUEST_PERF_GLOBAL_CTRL));
 
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
 
     vvmcs_to_shadow_bulk(v, ARRAY_SIZE(vmentry_fields), vmentry_fields);
 
@@ -1259,7 +1259,7 @@ static void load_vvmcs_host_state(struct vcpu *v)
     if ( control & VM_EXIT_LOAD_PERF_GLOBAL_CTRL )
         hvm_msr_write_intercept(MSR_CORE_PERF_GLOBAL_CTRL, __get_vvmcs(vvmcs, HOST_PERF_GLOBAL_CTRL));
 
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
 
     __set_vvmcs(vvmcs, VM_ENTRY_INTR_INFO, 0);
 }
diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c
index f7af688..38541cf 100644
--- a/xen/arch/x86/hvm/vpt.c
+++ b/xen/arch/x86/hvm/vpt.c
@@ -36,7 +36,7 @@ void hvm_init_guest_time(struct domain *d)
     pl->last_guest_time = 0;
 }
 
-u64 hvm_get_guest_time(struct vcpu *v)
+u64 hvm_get_guest_time_fixed(struct vcpu *v, u64 at_tsc)
 {
     struct pl_time *pl = &v->domain->arch.hvm_domain.pl_time;
     u64 now;
@@ -45,11 +45,15 @@ u64 hvm_get_guest_time(struct vcpu *v)
     ASSERT(is_hvm_vcpu(v));
 
     spin_lock(&pl->pl_time_lock);
-    now = get_s_time() + pl->stime_offset;
-    if ( (int64_t)(now - pl->last_guest_time) > 0 )
-        pl->last_guest_time = now;
-    else
-        now = ++pl->last_guest_time;
+    now = get_s_time_fixed(at_tsc) + pl->stime_offset;
+
+    if ( !at_tsc )
+    {
+        if ( (int64_t)(now - pl->last_guest_time) > 0 )
+            pl->last_guest_time = now;
+        else
+            now = ++pl->last_guest_time;
+    }
     spin_unlock(&pl->pl_time_lock);
 
     return now + v->arch.hvm_vcpu.stime_offset;
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 555f7c8..93bb5b6 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -716,19 +716,27 @@ static unsigned long get_cmos_time(void)
  * System Time
  ***************************************************************************/
 
-s_time_t get_s_time(void)
+s_time_t get_s_time_fixed(u64 at_tsc)
 {
     struct cpu_time *t = &this_cpu(cpu_time);
     u64 tsc, delta;
     s_time_t now;
 
-    rdtscll(tsc);
+    if ( at_tsc )
+        tsc = at_tsc;
+    else
+        rdtscll(tsc);
     delta = tsc - t->local_tsc_stamp;
     now = t->stime_local_stamp + scale_delta(delta, &t->tsc_scale);
 
     return now;
 }
 
+s_time_t get_s_time()
+{
+    return get_s_time_fixed(0);
+}
+
 uint64_t tsc_ticks2ns(uint64_t ticks)
 {
     struct cpu_time *t = &this_cpu(cpu_time);
@@ -1924,7 +1932,24 @@ void tsc_set_info(struct domain *d,
     }
     d->arch.incarnation = incarnation + 1;
     if ( is_hvm_domain(d) )
+    {
         hvm_set_rdtsc_exiting(d, d->arch.vtsc);
+        if ( d->vcpu && d->vcpu[0] && incarnation == 0 )
+        {
+            /*
+             * set_tsc_offset() is called from hvm_vcpu_initialise() before
+             * tsc_set_info(). New vtsc mode may require recomputing TSC
+             * offset.
+             * We only need to do this for BSP during initial boot. APs will
+             * call set_tsc_offset() later from hvm_vcpu_reset_state() and they
+             * will sync their TSC to BSP's sync_tsc.
+             */
+            rdtscll(d->arch.hvm_domain.sync_tsc);
+            hvm_funcs.set_tsc_offset(d->vcpu[0],
+                                     d->vcpu[0]->arch.hvm_vcpu.cache_tsc_offset,
+                                     d->arch.hvm_domain.sync_tsc);
+        }
+    }
 }
 
 /* vtsc may incur measurable performance degradation, diagnose with this */
diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/asm-x86/hvm/domain.h
index b1e3187..460dd94 100644
--- a/xen/include/asm-x86/hvm/domain.h
+++ b/xen/include/asm-x86/hvm/domain.h
@@ -90,6 +90,12 @@ struct hvm_domain {
     bool_t                 qemu_mapcache_invalidate;
     bool_t                 is_s3_suspended;
 
+    /*
+     * TSC value that VCPUs use to calculate their tsc_offset value.
+     * Used during initialization and save/restore.
+     */
+    uint64_t sync_tsc;
+
     union {
         struct vmx_domain vmx;
         struct svm_domain svm;
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index dcc3483..1fb3b99 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -137,7 +137,7 @@ struct hvm_function_table {
     int  (*get_guest_pat)(struct vcpu *v, u64 *);
     int  (*set_guest_pat)(struct vcpu *v, u64);
 
-    void (*set_tsc_offset)(struct vcpu *v, u64 offset);
+    void (*set_tsc_offset)(struct vcpu *v, u64 offset, u64 at_tsc);
 
     void (*inject_trap)(struct hvm_trap *trap);
 
@@ -233,11 +233,13 @@ void hvm_get_guest_pat(struct vcpu *v, u64 *guest_pat);
 int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat);
 
 void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc);
-u64 hvm_get_guest_tsc(struct vcpu *v);
+u64 hvm_get_guest_tsc_fixed(struct vcpu *v, u64 at_tsc);
+#define hvm_get_guest_tsc(v) hvm_get_guest_tsc_fixed(v, 0)
 
 void hvm_init_guest_time(struct domain *d);
 void hvm_set_guest_time(struct vcpu *v, u64 guest_time);
-u64 hvm_get_guest_time(struct vcpu *v);
+u64 hvm_get_guest_time_fixed(struct vcpu *v, u64 at_tsc);
+#define hvm_get_guest_time(v) hvm_get_guest_time_fixed(v, 0)
 
 int vmsi_deliver(
     struct domain *d, int vector,
diff --git a/xen/include/asm-x86/msr.h b/xen/include/asm-x86/msr.h
index 61f579a..52cae4b 100644
--- a/xen/include/asm-x86/msr.h
+++ b/xen/include/asm-x86/msr.h
@@ -78,9 +78,9 @@ static inline int wrmsr_safe(unsigned int msr, uint64_t val)
      __asm__ __volatile__("rdtsc" : "=a" (low) : : "edx")
 
 #define rdtscll(val) do { \
-     unsigned int a,d; \
-     asm volatile("rdtsc" : "=a" (a), "=d" (d)); \
-     (val) = ((unsigned long)a) | (((unsigned long)d)<<32); \
+     unsigned int _eax, _edx; \
+     asm volatile("rdtsc" : "=a" (_eax), "=d" (_edx)); \
+     (val) = ((unsigned long)_eax) | (((unsigned long)_edx)<<32); \
 } while(0)
 
 #define __write_tsc(val) wrmsrl(MSR_IA32_TSC, val)
diff --git a/xen/include/xen/time.h b/xen/include/xen/time.h
index 2703454..709501f 100644
--- a/xen/include/xen/time.h
+++ b/xen/include/xen/time.h
@@ -32,6 +32,7 @@ struct vcpu;
 typedef s64 s_time_t;
 #define PRI_stime PRId64
 
+s_time_t get_s_time_fixed(u64 at_tick);
 s_time_t get_s_time(void);
 unsigned long get_localtime(struct domain *d);
 uint64_t get_localtime_us(struct domain *d);
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:11:59 +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 1Wcv5h-0006JY-Lz; Wed, 23 Apr 2014 11:11:49 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5f-0006Il-Hy
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:47 +0000
Received: from [85.158.139.211:58945] by server-4.bemta-5.messagelabs.com id
	86/7C-30750-2FF97535; Wed, 23 Apr 2014 11:11:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1398251504!98947!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31409 invoked from network); 23 Apr 2014 11:11:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:45 -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 1Wcv5c-00075V-Ea
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5c-0001WF-Bw
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:44 +0000
Date: Wed, 23 Apr 2014 11:11:44 +0000
Message-Id: <E1Wcv5c-0001WF-Bw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: use fixed TSC value when
	saving or restoring domain
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 88e64cb785c1de4f686c1aa1993a0003b7db9e1a
Author:     Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Tue Apr 22 12:08:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:08:56 2014 +0200

    x86/HVM: use fixed TSC value when saving or restoring domain
    
    When a domain is saved each VCPU's TSC value needs to be preserved. To get it we
    use hvm_get_guest_tsc(). This routine (either itself or via get_s_time() which
    it may call) calculates VCPU's TSC based on current host's TSC value (by doing a
    rdtscll()). Since this is performed for each VCPU separately we end up with
    un-synchronized TSCs.
    
    Similarly, during a restore each VCPU is assigned its TSC based on host's current
    tick, causing virtual TSCs to diverge further.
    
    With this, we can easily get into situation where a guest may see time going
    backwards.
    
    Instead of reading new TSC value for each VCPU when saving/restoring it we should
    use the same value across all VCPUs.
    
    Reported-by: Philippe Coquard <philippe.coquard@mpsa.com>
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/hvm.c        |   10 +++++++---
 xen/arch/x86/hvm/save.c       |    6 ++++++
 xen/arch/x86/hvm/svm/svm.c    |    5 +++--
 xen/arch/x86/hvm/vmx/vmx.c    |    5 +++--
 xen/include/asm-x86/hvm/hvm.h |    3 ++-
 5 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 15f4b25..44fbb69 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -258,16 +258,20 @@ int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat)
     return 1;
 }
 
-void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc)
+void hvm_set_guest_tsc_fixed(struct vcpu *v, u64 guest_tsc, u64 at_tsc)
 {
     uint64_t tsc;
     uint64_t delta_tsc;
 
     if ( v->domain->arch.vtsc )
     {
-        tsc = hvm_get_guest_time(v);
+        tsc = hvm_get_guest_time_fixed(v, at_tsc);
         tsc = gtime_to_gtsc(v->domain, tsc);
     }
+    else if ( at_tsc )
+    {
+        tsc = at_tsc;
+    }
     else
     {
         rdtscll(tsc);
@@ -278,7 +282,7 @@ void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc)
                           - v->arch.hvm_vcpu.cache_tsc_offset;
     v->arch.hvm_vcpu.cache_tsc_offset = delta_tsc;
 
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, at_tsc);
 }
 
 void hvm_set_guest_tsc_adjust(struct vcpu *v, u64 tsc_adjust)
diff --git a/xen/arch/x86/hvm/save.c b/xen/arch/x86/hvm/save.c
index 066fdb2..6af19be 100644
--- a/xen/arch/x86/hvm/save.c
+++ b/xen/arch/x86/hvm/save.c
@@ -34,6 +34,9 @@ void arch_hvm_save(struct domain *d, struct hvm_save_header *hdr)
 
     /* Save guest's preferred TSC. */
     hdr->gtsc_khz = d->arch.tsc_khz;
+
+    /* Time when saving started */
+    rdtscll(d->arch.hvm_domain.sync_tsc);
 }
 
 int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr)
@@ -67,6 +70,9 @@ int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr)
     if ( d->arch.vtsc )
         hvm_set_rdtsc_exiting(d, 1);
 
+    /* Time when restore started  */
+    rdtscll(d->arch.hvm_domain.sync_tsc);
+
     /* VGA state is not saved/restored, so we nobble the cache. */
     d->arch.hvm_domain.stdvga.cache = 0;
 
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 4cc271e..3fe4b9c 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -318,7 +318,8 @@ static void svm_save_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
     data->msr_efer         = v->arch.hvm_vcpu.guest_efer;
     data->msr_flags        = -1ULL;
 
-    data->tsc = hvm_get_guest_tsc(v);
+    data->tsc = hvm_get_guest_tsc_fixed(v,
+                                        v->domain->arch.hvm_domain.sync_tsc);
 }
 
 
@@ -334,7 +335,7 @@ static void svm_load_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
     v->arch.hvm_vcpu.guest_efer = data->msr_efer;
     svm_update_guest_efer(v);
 
-    hvm_set_guest_tsc(v, data->tsc);
+    hvm_set_guest_tsc_fixed(v, data->tsc, v->domain->arch.hvm_domain.sync_tsc);
 }
 
 static void svm_save_vmcb_ctxt(struct vcpu *v, struct hvm_hw_cpu *ctxt)
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 1c9fa48..104e6e4 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -540,7 +540,8 @@ static void vmx_save_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
     data->msr_star         = guest_state->msrs[VMX_INDEX_MSR_STAR];
     data->msr_syscall_mask = guest_state->msrs[VMX_INDEX_MSR_SYSCALL_MASK];
 
-    data->tsc = hvm_get_guest_tsc(v);
+    data->tsc = hvm_get_guest_tsc_fixed(v,
+                                        v->domain->arch.hvm_domain.sync_tsc);
 }
 
 static void vmx_load_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
@@ -556,7 +557,7 @@ static void vmx_load_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
     v->arch.hvm_vmx.cstar     = data->msr_cstar;
     v->arch.hvm_vmx.shadow_gs = data->shadow_gs;
 
-    hvm_set_guest_tsc(v, data->tsc);
+    hvm_set_guest_tsc_fixed(v, data->tsc, v->domain->arch.hvm_domain.sync_tsc);
 }
 
 
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index 1fb3b99..31043b2 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -232,7 +232,8 @@ bool_t hvm_send_assist_req(struct vcpu *v);
 void hvm_get_guest_pat(struct vcpu *v, u64 *guest_pat);
 int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat);
 
-void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc);
+void hvm_set_guest_tsc_fixed(struct vcpu *v, u64 guest_tsc, u64 at_tsc);
+#define hvm_set_guest_tsc(v, t) hvm_set_guest_tsc_fixed(v, t, 0)
 u64 hvm_get_guest_tsc_fixed(struct vcpu *v, u64 at_tsc);
 #define hvm_get_guest_tsc(v) hvm_get_guest_tsc_fixed(v, 0)
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:11:59 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:11:59 +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 1Wcv5h-0006JY-Lz; Wed, 23 Apr 2014 11:11:49 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5f-0006Il-Hy
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:47 +0000
Received: from [85.158.139.211:58945] by server-4.bemta-5.messagelabs.com id
	86/7C-30750-2FF97535; Wed, 23 Apr 2014 11:11:46 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-7.tower-206.messagelabs.com!1398251504!98947!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31409 invoked from network); 23 Apr 2014 11:11:45 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-7.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:45 -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 1Wcv5c-00075V-Ea
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:44 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5c-0001WF-Bw
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:44 +0000
Date: Wed, 23 Apr 2014 11:11:44 +0000
Message-Id: <E1Wcv5c-0001WF-Bw@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/HVM: use fixed TSC value when
	saving or restoring domain
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 88e64cb785c1de4f686c1aa1993a0003b7db9e1a
Author:     Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Tue Apr 22 12:08:56 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:08:56 2014 +0200

    x86/HVM: use fixed TSC value when saving or restoring domain
    
    When a domain is saved each VCPU's TSC value needs to be preserved. To get it we
    use hvm_get_guest_tsc(). This routine (either itself or via get_s_time() which
    it may call) calculates VCPU's TSC based on current host's TSC value (by doing a
    rdtscll()). Since this is performed for each VCPU separately we end up with
    un-synchronized TSCs.
    
    Similarly, during a restore each VCPU is assigned its TSC based on host's current
    tick, causing virtual TSCs to diverge further.
    
    With this, we can easily get into situation where a guest may see time going
    backwards.
    
    Instead of reading new TSC value for each VCPU when saving/restoring it we should
    use the same value across all VCPUs.
    
    Reported-by: Philippe Coquard <philippe.coquard@mpsa.com>
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/hvm/hvm.c        |   10 +++++++---
 xen/arch/x86/hvm/save.c       |    6 ++++++
 xen/arch/x86/hvm/svm/svm.c    |    5 +++--
 xen/arch/x86/hvm/vmx/vmx.c    |    5 +++--
 xen/include/asm-x86/hvm/hvm.h |    3 ++-
 5 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 15f4b25..44fbb69 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -258,16 +258,20 @@ int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat)
     return 1;
 }
 
-void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc)
+void hvm_set_guest_tsc_fixed(struct vcpu *v, u64 guest_tsc, u64 at_tsc)
 {
     uint64_t tsc;
     uint64_t delta_tsc;
 
     if ( v->domain->arch.vtsc )
     {
-        tsc = hvm_get_guest_time(v);
+        tsc = hvm_get_guest_time_fixed(v, at_tsc);
         tsc = gtime_to_gtsc(v->domain, tsc);
     }
+    else if ( at_tsc )
+    {
+        tsc = at_tsc;
+    }
     else
     {
         rdtscll(tsc);
@@ -278,7 +282,7 @@ void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc)
                           - v->arch.hvm_vcpu.cache_tsc_offset;
     v->arch.hvm_vcpu.cache_tsc_offset = delta_tsc;
 
-    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, 0);
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset, at_tsc);
 }
 
 void hvm_set_guest_tsc_adjust(struct vcpu *v, u64 tsc_adjust)
diff --git a/xen/arch/x86/hvm/save.c b/xen/arch/x86/hvm/save.c
index 066fdb2..6af19be 100644
--- a/xen/arch/x86/hvm/save.c
+++ b/xen/arch/x86/hvm/save.c
@@ -34,6 +34,9 @@ void arch_hvm_save(struct domain *d, struct hvm_save_header *hdr)
 
     /* Save guest's preferred TSC. */
     hdr->gtsc_khz = d->arch.tsc_khz;
+
+    /* Time when saving started */
+    rdtscll(d->arch.hvm_domain.sync_tsc);
 }
 
 int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr)
@@ -67,6 +70,9 @@ int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr)
     if ( d->arch.vtsc )
         hvm_set_rdtsc_exiting(d, 1);
 
+    /* Time when restore started  */
+    rdtscll(d->arch.hvm_domain.sync_tsc);
+
     /* VGA state is not saved/restored, so we nobble the cache. */
     d->arch.hvm_domain.stdvga.cache = 0;
 
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 4cc271e..3fe4b9c 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -318,7 +318,8 @@ static void svm_save_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
     data->msr_efer         = v->arch.hvm_vcpu.guest_efer;
     data->msr_flags        = -1ULL;
 
-    data->tsc = hvm_get_guest_tsc(v);
+    data->tsc = hvm_get_guest_tsc_fixed(v,
+                                        v->domain->arch.hvm_domain.sync_tsc);
 }
 
 
@@ -334,7 +335,7 @@ static void svm_load_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
     v->arch.hvm_vcpu.guest_efer = data->msr_efer;
     svm_update_guest_efer(v);
 
-    hvm_set_guest_tsc(v, data->tsc);
+    hvm_set_guest_tsc_fixed(v, data->tsc, v->domain->arch.hvm_domain.sync_tsc);
 }
 
 static void svm_save_vmcb_ctxt(struct vcpu *v, struct hvm_hw_cpu *ctxt)
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 1c9fa48..104e6e4 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -540,7 +540,8 @@ static void vmx_save_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
     data->msr_star         = guest_state->msrs[VMX_INDEX_MSR_STAR];
     data->msr_syscall_mask = guest_state->msrs[VMX_INDEX_MSR_SYSCALL_MASK];
 
-    data->tsc = hvm_get_guest_tsc(v);
+    data->tsc = hvm_get_guest_tsc_fixed(v,
+                                        v->domain->arch.hvm_domain.sync_tsc);
 }
 
 static void vmx_load_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
@@ -556,7 +557,7 @@ static void vmx_load_cpu_state(struct vcpu *v, struct hvm_hw_cpu *data)
     v->arch.hvm_vmx.cstar     = data->msr_cstar;
     v->arch.hvm_vmx.shadow_gs = data->shadow_gs;
 
-    hvm_set_guest_tsc(v, data->tsc);
+    hvm_set_guest_tsc_fixed(v, data->tsc, v->domain->arch.hvm_domain.sync_tsc);
 }
 
 
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index 1fb3b99..31043b2 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -232,7 +232,8 @@ bool_t hvm_send_assist_req(struct vcpu *v);
 void hvm_get_guest_pat(struct vcpu *v, u64 *guest_pat);
 int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat);
 
-void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc);
+void hvm_set_guest_tsc_fixed(struct vcpu *v, u64 guest_tsc, u64 at_tsc);
+#define hvm_set_guest_tsc(v, t) hvm_set_guest_tsc_fixed(v, t, 0)
 u64 hvm_get_guest_tsc_fixed(struct vcpu *v, u64 at_tsc);
 #define hvm_get_guest_tsc(v) hvm_get_guest_tsc_fixed(v, 0)
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:12:08 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:12:08 +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 1Wcv5q-0006M8-Oc; Wed, 23 Apr 2014 11:11:58 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5p-0006Lc-72
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:57 +0000
Received: from [85.158.139.211:2493] by server-5.bemta-5.messagelabs.com id
	56/DB-06049-CFF97535; Wed, 23 Apr 2014 11:11:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1398251514!104986!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22896 invoked from network); 23 Apr 2014 11:11:55 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:55 -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 1Wcv5m-00075h-JY
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5m-0001Wb-H1
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:54 +0000
Date: Wed, 23 Apr 2014 11:11:54 +0000
Message-Id: <E1Wcv5m-0001Wb-H1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/hap: fix lack of newline in error
	message
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 4d21a95558b9c9007d8b70e63d1449a4a10f535c
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 22 12:09:36 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:09:36 2014 +0200

    x86/hap: fix lack of newline in error message
    
    to avoid corrupting the following line.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <JBeulich@suse.com>
---
 xen/arch/x86/mm/hap/hap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index 71227ef..60806bb 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -269,7 +269,7 @@ static struct page_info *hap_alloc_p2m_page(struct domain *d)
     else if ( !d->arch.paging.p2m_alloc_failed )
     {
         d->arch.paging.p2m_alloc_failed = 1;
-        dprintk(XENLOG_ERR, "d%i failed to allocate from HAP pool",
+        dprintk(XENLOG_ERR, "d%i failed to allocate from HAP pool\n",
                 d->domain_id);
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:12:08 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:12:08 +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 1Wcv5q-0006M8-Oc; Wed, 23 Apr 2014 11:11:58 +0000
Received: from mail6.bemta5.messagelabs.com ([195.245.231.135])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5p-0006Lc-72
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:57 +0000
Received: from [85.158.139.211:2493] by server-5.bemta-5.messagelabs.com id
	56/DB-06049-CFF97535; Wed, 23 Apr 2014 11:11:56 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-11.tower-206.messagelabs.com!1398251514!104986!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 22896 invoked from network); 23 Apr 2014 11:11:55 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-11.tower-206.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:11:55 -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 1Wcv5m-00075h-JY
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:54 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5m-0001Wb-H1
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:11:54 +0000
Date: Wed, 23 Apr 2014 11:11:54 +0000
Message-Id: <E1Wcv5m-0001Wb-H1@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/hap: fix lack of newline in error
	message
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 4d21a95558b9c9007d8b70e63d1449a4a10f535c
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 22 12:09:36 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:09:36 2014 +0200

    x86/hap: fix lack of newline in error message
    
    to avoid corrupting the following line.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Jan Beulich <JBeulich@suse.com>
---
 xen/arch/x86/mm/hap/hap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index 71227ef..60806bb 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -269,7 +269,7 @@ static struct page_info *hap_alloc_p2m_page(struct domain *d)
     else if ( !d->arch.paging.p2m_alloc_failed )
     {
         d->arch.paging.p2m_alloc_failed = 1;
-        dprintk(XENLOG_ERR, "d%i failed to allocate from HAP pool",
+        dprintk(XENLOG_ERR, "d%i failed to allocate from HAP pool\n",
                 d->domain_id);
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:12:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:12: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 1Wcv61-0006P6-Rh; Wed, 23 Apr 2014 11:12:09 +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 1Wcv60-0006OH-0g
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:08 +0000
Received: from [85.158.143.35:45616] by server-1.bemta-4.messagelabs.com id
	2A/97-09853-700A7535; Wed, 23 Apr 2014 11:12:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1398251524!485644!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23737 invoked from network); 23 Apr 2014 11:12:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:12: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 1Wcv5w-00076G-Om
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5w-0001Xq-Mk
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:04 +0000
Date: Wed, 23 Apr 2014 11:12:04 +0000
Message-Id: <E1Wcv5w-0001Xq-Mk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] allow hardware domain != dom0
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 816f6224823320c8452fd3af5d873a2b82f5e1c3
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Tue Apr 22 12:10:13 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:10:13 2014 +0200

    allow hardware domain != dom0
    
    This adds a hypervisor command line option "hardware_dom=" which takes a
    domain ID.  When the domain with this ID is created, it will be used
    as the hardware domain.
    
    This is intended to be used when domain 0 is a dedicated stub domain for
    domain building, allowing the hardware domain to be de-privileged and
    act only as a driver domain.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 docs/misc/xen-command-line.markdown |   10 ++++++
 xen/arch/x86/domain_build.c         |    4 ++-
 xen/common/domain.c                 |   62 +++++++++++++++++++++++++++++++++--
 xen/common/rangeset.c               |   23 +++++++++++++
 xen/include/xen/rangeset.h          |    3 ++
 xen/include/xen/sched.h             |    6 +++
 xen/include/xsm/dummy.h             |    6 +++
 xen/include/xsm/xsm.h               |    6 +++
 xen/xsm/dummy.c                     |    2 +
 xen/xsm/flask/hooks.c               |    6 +++
 xen/xsm/flask/policy/access_vectors |    2 +
 11 files changed, 126 insertions(+), 4 deletions(-)

diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
index 87de2dc..e8d23b4 100644
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -590,6 +590,16 @@ Paging (HAP).
 Flag to enable 2 MB host page table support for Hardware Assisted
 Paging (HAP).
 
+### hardware\_dom
+> `= <domid>`
+
+> Default: `0`
+
+Enable late hardware domain creation using the specified domain ID.  This is
+intended to be used when domain 0 is a stub domain which builds a disaggregated
+system including a hardware domain with the specified domain ID.  This option is
+supported only when compiled with XSM\_ENABLE=y on x86.
+
 ### hpetbroadcast
 > `= <boolean>`
 
diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index 9b462fe..1eccead 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -1179,7 +1179,9 @@ int __init construct_dom0(
         printk(" Xen warning: dom0 kernel broken ELF: %s\n",
                elf_check_broken(&elf));
 
-    iommu_hwdom_init(hardware_domain);
+    if ( d->domain_id == hardware_domid )
+        iommu_hwdom_init(d);
+
     return 0;
 
 out:
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 3c05711..4291e29 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -61,6 +61,11 @@ struct domain *domain_list;
 
 struct domain *hardware_domain __read_mostly;
 
+#ifdef CONFIG_LATE_HWDOM
+domid_t hardware_domid __read_mostly;
+integer_param("hardware_dom", hardware_domid);
+#endif
+
 struct vcpu *idle_vcpu[NR_CPUS] __read_mostly;
 
 vcpu_info_t dummy_vcpu_info;
@@ -178,6 +183,51 @@ struct vcpu *alloc_vcpu(
     return v;
 }
 
+static int late_hwdom_init(struct domain *d)
+{
+#ifdef CONFIG_LATE_HWDOM
+    struct domain *dom0;
+    int rv;
+
+    if ( d != hardware_domain || d->domain_id == 0 )
+        return 0;
+
+    rv = xsm_init_hardware_domain(XSM_HOOK, d);
+    if ( rv )
+        return rv;
+
+    printk("Initialising hardware domain %d\n", hardware_domid);
+
+    dom0 = rcu_lock_domain_by_id(0);
+    ASSERT(dom0 != NULL);
+    /*
+     * Hardware resource ranges for domain 0 have been set up from
+     * various sources intended to restrict the hardware domain's
+     * access.  Apply these ranges to the actual hardware domain.
+     *
+     * Because the lists are being swapped, a side effect of this
+     * operation is that Domain 0's rangesets are cleared.  Since
+     * domain 0 should not be accessing the hardware when it constructs
+     * a hardware domain, this should not be a problem.  Both lists
+     * may be modified after this hypercall returns if a more complex
+     * device model is desired.
+     */
+    rangeset_swap(d->irq_caps, dom0->irq_caps);
+    rangeset_swap(d->iomem_caps, dom0->iomem_caps);
+#ifdef CONFIG_X86
+    rangeset_swap(d->arch.ioport_caps, dom0->arch.ioport_caps);
+#endif
+
+    rcu_unlock_domain(dom0);
+
+    iommu_hwdom_init(d);
+
+    return rv;
+#else
+    return 0;
+#endif
+}
+
 static unsigned int __read_mostly extra_dom0_irqs = 256;
 static unsigned int __read_mostly extra_domU_irqs = 32;
 static void __init parse_extra_guest_irqs(const char *s)
@@ -192,7 +242,7 @@ custom_param("extra_guest_irqs", parse_extra_guest_irqs);
 struct domain *domain_create(
     domid_t domid, unsigned int domcr_flags, uint32_t ssidref)
 {
-    struct domain *d, **pd;
+    struct domain *d, **pd, *old_hwdom = NULL;
     enum { INIT_xsm = 1u<<0, INIT_watchdog = 1u<<1, INIT_rangeset = 1u<<2,
            INIT_evtchn = 1u<<3, INIT_gnttab = 1u<<4, INIT_arch = 1u<<5 };
     int err, init_status = 0;
@@ -237,10 +287,13 @@ struct domain *domain_create(
     else if ( domcr_flags & DOMCRF_pvh )
         d->guest_type = guest_type_pvh;
 
-    if ( domid == 0 )
+    if ( domid == 0 || domid == hardware_domid )
     {
+        if ( hardware_domid < 0 || hardware_domid >= DOMID_FIRST_RESERVED )
+            panic("The value of hardware_dom must be a valid domain ID");
         d->is_pinned = opt_dom0_vcpus_pin;
         d->disable_migrate = 1;
+        old_hwdom = hardware_domain;
         hardware_domain = d;
     }
 
@@ -302,6 +355,9 @@ struct domain *domain_create(
     if ( (err = sched_init_domain(d)) != 0 )
         goto fail;
 
+    if ( (err = late_hwdom_init(d)) != 0 )
+        goto fail;
+
     if ( !is_idle_domain(d) )
     {
         spin_lock(&domlist_update_lock);
@@ -321,7 +377,7 @@ struct domain *domain_create(
  fail:
     d->is_dying = DOMDYING_dead;
     if ( hardware_domain == d )
-        hardware_domain = NULL;
+        hardware_domain = old_hwdom;
     atomic_set(&d->refcnt, DOMAIN_DESTROYED);
     xfree(d->mem_event);
     xfree(d->pbuf);
diff --git a/xen/common/rangeset.c b/xen/common/rangeset.c
index f09c0c4..2b986fb 100644
--- a/xen/common/rangeset.c
+++ b/xen/common/rangeset.c
@@ -380,6 +380,29 @@ void rangeset_domain_destroy(
     }
 }
 
+void rangeset_swap(struct rangeset *a, struct rangeset *b)
+{
+    LIST_HEAD(tmp);
+
+    if ( a < b )
+    {
+        spin_lock(&a->lock);
+        spin_lock(&b->lock);
+    }
+    else
+    {
+        spin_lock(&b->lock);
+        spin_lock(&a->lock);
+    }
+
+    list_splice_init(&a->range_list, &tmp);
+    list_splice_init(&b->range_list, &a->range_list);
+    list_splice(&tmp, &b->range_list);
+
+    spin_unlock(&a->lock);
+    spin_unlock(&b->lock);
+}
+
 /*****************************
  * Pretty-printing functions
  */
diff --git a/xen/include/xen/rangeset.h b/xen/include/xen/rangeset.h
index 1e16a6b..2c122c1 100644
--- a/xen/include/xen/rangeset.h
+++ b/xen/include/xen/rangeset.h
@@ -67,6 +67,9 @@ int __must_check rangeset_remove_singleton(
 int __must_check rangeset_contains_singleton(
     struct rangeset *r, unsigned long s);
 
+/* swap contents */
+void rangeset_swap(struct rangeset *a, struct rangeset *b);
+
 /* Rangeset pretty printing. */
 void rangeset_printk(
     struct rangeset *r);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 734f7a9..44851ae 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -46,6 +46,12 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t);
 /* A global pointer to the hardware domain (usually DOM0). */
 extern struct domain *hardware_domain;
 
+#ifdef CONFIG_LATE_HWDOM
+extern domid_t hardware_domid;
+#else
+#define hardware_domid 0
+#endif
+
 #ifndef CONFIG_COMPAT
 #define BITS_PER_EVTCHN_WORD(d) BITS_PER_XEN_ULONG
 #else
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index c3be99a..5de4ad4 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -299,6 +299,12 @@ static XSM_INLINE char *xsm_show_security_evtchn(struct domain *d, const struct
     return NULL;
 }
 
+static XSM_INLINE int xsm_init_hardware_domain(XSM_DEFAULT_ARG struct domain *d)
+{
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, current->domain, d);
+}
+
 static XSM_INLINE int xsm_get_pod_target(XSM_DEFAULT_ARG struct domain *d)
 {
     XSM_ASSERT_ACTION(XSM_PRIV);
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 330d5d2..0c85ca6 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -82,6 +82,7 @@ struct xsm_operations {
     int (*alloc_security_evtchn) (struct evtchn *chn);
     void (*free_security_evtchn) (struct evtchn *chn);
     char *(*show_security_evtchn) (struct domain *d, const struct evtchn *chn);
+    int (*init_hardware_domain) (struct domain *d);
 
     int (*get_pod_target) (struct domain *d);
     int (*set_pod_target) (struct domain *d);
@@ -309,6 +310,11 @@ static inline char *xsm_show_security_evtchn (struct domain *d, const struct evt
     return xsm_ops->show_security_evtchn(d, chn);
 }
 
+static inline int xsm_init_hardware_domain (xsm_default_t def, struct domain *d)
+{
+    return xsm_ops->init_hardware_domain(d);
+}
+
 static inline int xsm_get_pod_target (xsm_default_t def, struct domain *d)
 {
     return xsm_ops->get_pod_target(d);
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 792a7fa..80015b1 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -58,6 +58,8 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     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, init_hardware_domain);
+
     set_to_dummy_if_null(ops, get_pod_target);
     set_to_dummy_if_null(ops, set_pod_target);
 
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 9a6b199..3eb6c1e 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -327,6 +327,11 @@ static char *flask_show_security_evtchn(struct domain *d, const struct evtchn *c
     return ctx;
 }
 
+static int flask_init_hardware_domain(struct domain *d)
+{
+    return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__CREATE_HARDWARE_DOMAIN);
+}
+
 static int flask_grant_mapref(struct domain *d1, struct domain *d2, 
                               uint32_t flags)
 {
@@ -1498,6 +1503,7 @@ static struct xsm_operations flask_ops = {
     .alloc_security_evtchn = flask_alloc_security_evtchn,
     .free_security_evtchn = flask_free_security_evtchn,
     .show_security_evtchn = flask_show_security_evtchn,
+    .init_hardware_domain = flask_init_hardware_domain,
 
     .get_pod_target = flask_get_pod_target,
     .set_pod_target = flask_set_pod_target,
diff --git a/xen/xsm/flask/policy/access_vectors b/xen/xsm/flask/policy/access_vectors
index a0ed13d..32371a9 100644
--- a/xen/xsm/flask/policy/access_vectors
+++ b/xen/xsm/flask/policy/access_vectors
@@ -198,6 +198,8 @@ class domain2
     set_max_evtchn
 # XEN_DOMCTL_cacheflush
     cacheflush
+# Creation of the hardware domain when it is not dom0
+    create_hardware_domain
 }
 
 # Similar to class domain, but primarily contains domctls related to HVM domains
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:12:20 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:12: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 1Wcv61-0006P6-Rh; Wed, 23 Apr 2014 11:12:09 +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 1Wcv60-0006OH-0g
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:08 +0000
Received: from [85.158.143.35:45616] by server-1.bemta-4.messagelabs.com id
	2A/97-09853-700A7535; Wed, 23 Apr 2014 11:12:07 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-13.tower-21.messagelabs.com!1398251524!485644!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 23737 invoked from network); 23 Apr 2014 11:12:06 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-13.tower-21.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:12: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 1Wcv5w-00076G-Om
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:04 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv5w-0001Xq-Mk
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:04 +0000
Date: Wed, 23 Apr 2014 11:12:04 +0000
Message-Id: <E1Wcv5w-0001Xq-Mk@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] allow hardware domain != dom0
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 816f6224823320c8452fd3af5d873a2b82f5e1c3
Author:     Daniel De Graaf <dgdegra@tycho.nsa.gov>
AuthorDate: Tue Apr 22 12:10:13 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 12:10:13 2014 +0200

    allow hardware domain != dom0
    
    This adds a hypervisor command line option "hardware_dom=" which takes a
    domain ID.  When the domain with this ID is created, it will be used
    as the hardware domain.
    
    This is intended to be used when domain 0 is a dedicated stub domain for
    domain building, allowing the hardware domain to be de-privileged and
    act only as a driver domain.
    
    Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 docs/misc/xen-command-line.markdown |   10 ++++++
 xen/arch/x86/domain_build.c         |    4 ++-
 xen/common/domain.c                 |   62 +++++++++++++++++++++++++++++++++--
 xen/common/rangeset.c               |   23 +++++++++++++
 xen/include/xen/rangeset.h          |    3 ++
 xen/include/xen/sched.h             |    6 +++
 xen/include/xsm/dummy.h             |    6 +++
 xen/include/xsm/xsm.h               |    6 +++
 xen/xsm/dummy.c                     |    2 +
 xen/xsm/flask/hooks.c               |    6 +++
 xen/xsm/flask/policy/access_vectors |    2 +
 11 files changed, 126 insertions(+), 4 deletions(-)

diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
index 87de2dc..e8d23b4 100644
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -590,6 +590,16 @@ Paging (HAP).
 Flag to enable 2 MB host page table support for Hardware Assisted
 Paging (HAP).
 
+### hardware\_dom
+> `= <domid>`
+
+> Default: `0`
+
+Enable late hardware domain creation using the specified domain ID.  This is
+intended to be used when domain 0 is a stub domain which builds a disaggregated
+system including a hardware domain with the specified domain ID.  This option is
+supported only when compiled with XSM\_ENABLE=y on x86.
+
 ### hpetbroadcast
 > `= <boolean>`
 
diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index 9b462fe..1eccead 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -1179,7 +1179,9 @@ int __init construct_dom0(
         printk(" Xen warning: dom0 kernel broken ELF: %s\n",
                elf_check_broken(&elf));
 
-    iommu_hwdom_init(hardware_domain);
+    if ( d->domain_id == hardware_domid )
+        iommu_hwdom_init(d);
+
     return 0;
 
 out:
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 3c05711..4291e29 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -61,6 +61,11 @@ struct domain *domain_list;
 
 struct domain *hardware_domain __read_mostly;
 
+#ifdef CONFIG_LATE_HWDOM
+domid_t hardware_domid __read_mostly;
+integer_param("hardware_dom", hardware_domid);
+#endif
+
 struct vcpu *idle_vcpu[NR_CPUS] __read_mostly;
 
 vcpu_info_t dummy_vcpu_info;
@@ -178,6 +183,51 @@ struct vcpu *alloc_vcpu(
     return v;
 }
 
+static int late_hwdom_init(struct domain *d)
+{
+#ifdef CONFIG_LATE_HWDOM
+    struct domain *dom0;
+    int rv;
+
+    if ( d != hardware_domain || d->domain_id == 0 )
+        return 0;
+
+    rv = xsm_init_hardware_domain(XSM_HOOK, d);
+    if ( rv )
+        return rv;
+
+    printk("Initialising hardware domain %d\n", hardware_domid);
+
+    dom0 = rcu_lock_domain_by_id(0);
+    ASSERT(dom0 != NULL);
+    /*
+     * Hardware resource ranges for domain 0 have been set up from
+     * various sources intended to restrict the hardware domain's
+     * access.  Apply these ranges to the actual hardware domain.
+     *
+     * Because the lists are being swapped, a side effect of this
+     * operation is that Domain 0's rangesets are cleared.  Since
+     * domain 0 should not be accessing the hardware when it constructs
+     * a hardware domain, this should not be a problem.  Both lists
+     * may be modified after this hypercall returns if a more complex
+     * device model is desired.
+     */
+    rangeset_swap(d->irq_caps, dom0->irq_caps);
+    rangeset_swap(d->iomem_caps, dom0->iomem_caps);
+#ifdef CONFIG_X86
+    rangeset_swap(d->arch.ioport_caps, dom0->arch.ioport_caps);
+#endif
+
+    rcu_unlock_domain(dom0);
+
+    iommu_hwdom_init(d);
+
+    return rv;
+#else
+    return 0;
+#endif
+}
+
 static unsigned int __read_mostly extra_dom0_irqs = 256;
 static unsigned int __read_mostly extra_domU_irqs = 32;
 static void __init parse_extra_guest_irqs(const char *s)
@@ -192,7 +242,7 @@ custom_param("extra_guest_irqs", parse_extra_guest_irqs);
 struct domain *domain_create(
     domid_t domid, unsigned int domcr_flags, uint32_t ssidref)
 {
-    struct domain *d, **pd;
+    struct domain *d, **pd, *old_hwdom = NULL;
     enum { INIT_xsm = 1u<<0, INIT_watchdog = 1u<<1, INIT_rangeset = 1u<<2,
            INIT_evtchn = 1u<<3, INIT_gnttab = 1u<<4, INIT_arch = 1u<<5 };
     int err, init_status = 0;
@@ -237,10 +287,13 @@ struct domain *domain_create(
     else if ( domcr_flags & DOMCRF_pvh )
         d->guest_type = guest_type_pvh;
 
-    if ( domid == 0 )
+    if ( domid == 0 || domid == hardware_domid )
     {
+        if ( hardware_domid < 0 || hardware_domid >= DOMID_FIRST_RESERVED )
+            panic("The value of hardware_dom must be a valid domain ID");
         d->is_pinned = opt_dom0_vcpus_pin;
         d->disable_migrate = 1;
+        old_hwdom = hardware_domain;
         hardware_domain = d;
     }
 
@@ -302,6 +355,9 @@ struct domain *domain_create(
     if ( (err = sched_init_domain(d)) != 0 )
         goto fail;
 
+    if ( (err = late_hwdom_init(d)) != 0 )
+        goto fail;
+
     if ( !is_idle_domain(d) )
     {
         spin_lock(&domlist_update_lock);
@@ -321,7 +377,7 @@ struct domain *domain_create(
  fail:
     d->is_dying = DOMDYING_dead;
     if ( hardware_domain == d )
-        hardware_domain = NULL;
+        hardware_domain = old_hwdom;
     atomic_set(&d->refcnt, DOMAIN_DESTROYED);
     xfree(d->mem_event);
     xfree(d->pbuf);
diff --git a/xen/common/rangeset.c b/xen/common/rangeset.c
index f09c0c4..2b986fb 100644
--- a/xen/common/rangeset.c
+++ b/xen/common/rangeset.c
@@ -380,6 +380,29 @@ void rangeset_domain_destroy(
     }
 }
 
+void rangeset_swap(struct rangeset *a, struct rangeset *b)
+{
+    LIST_HEAD(tmp);
+
+    if ( a < b )
+    {
+        spin_lock(&a->lock);
+        spin_lock(&b->lock);
+    }
+    else
+    {
+        spin_lock(&b->lock);
+        spin_lock(&a->lock);
+    }
+
+    list_splice_init(&a->range_list, &tmp);
+    list_splice_init(&b->range_list, &a->range_list);
+    list_splice(&tmp, &b->range_list);
+
+    spin_unlock(&a->lock);
+    spin_unlock(&b->lock);
+}
+
 /*****************************
  * Pretty-printing functions
  */
diff --git a/xen/include/xen/rangeset.h b/xen/include/xen/rangeset.h
index 1e16a6b..2c122c1 100644
--- a/xen/include/xen/rangeset.h
+++ b/xen/include/xen/rangeset.h
@@ -67,6 +67,9 @@ int __must_check rangeset_remove_singleton(
 int __must_check rangeset_contains_singleton(
     struct rangeset *r, unsigned long s);
 
+/* swap contents */
+void rangeset_swap(struct rangeset *a, struct rangeset *b);
+
 /* Rangeset pretty printing. */
 void rangeset_printk(
     struct rangeset *r);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 734f7a9..44851ae 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -46,6 +46,12 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_runstate_info_compat_t);
 /* A global pointer to the hardware domain (usually DOM0). */
 extern struct domain *hardware_domain;
 
+#ifdef CONFIG_LATE_HWDOM
+extern domid_t hardware_domid;
+#else
+#define hardware_domid 0
+#endif
+
 #ifndef CONFIG_COMPAT
 #define BITS_PER_EVTCHN_WORD(d) BITS_PER_XEN_ULONG
 #else
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h
index c3be99a..5de4ad4 100644
--- a/xen/include/xsm/dummy.h
+++ b/xen/include/xsm/dummy.h
@@ -299,6 +299,12 @@ static XSM_INLINE char *xsm_show_security_evtchn(struct domain *d, const struct
     return NULL;
 }
 
+static XSM_INLINE int xsm_init_hardware_domain(XSM_DEFAULT_ARG struct domain *d)
+{
+    XSM_ASSERT_ACTION(XSM_HOOK);
+    return xsm_default_action(action, current->domain, d);
+}
+
 static XSM_INLINE int xsm_get_pod_target(XSM_DEFAULT_ARG struct domain *d)
 {
     XSM_ASSERT_ACTION(XSM_PRIV);
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 330d5d2..0c85ca6 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -82,6 +82,7 @@ struct xsm_operations {
     int (*alloc_security_evtchn) (struct evtchn *chn);
     void (*free_security_evtchn) (struct evtchn *chn);
     char *(*show_security_evtchn) (struct domain *d, const struct evtchn *chn);
+    int (*init_hardware_domain) (struct domain *d);
 
     int (*get_pod_target) (struct domain *d);
     int (*set_pod_target) (struct domain *d);
@@ -309,6 +310,11 @@ static inline char *xsm_show_security_evtchn (struct domain *d, const struct evt
     return xsm_ops->show_security_evtchn(d, chn);
 }
 
+static inline int xsm_init_hardware_domain (xsm_default_t def, struct domain *d)
+{
+    return xsm_ops->init_hardware_domain(d);
+}
+
 static inline int xsm_get_pod_target (xsm_default_t def, struct domain *d)
 {
     return xsm_ops->get_pod_target(d);
diff --git a/xen/xsm/dummy.c b/xen/xsm/dummy.c
index 792a7fa..80015b1 100644
--- a/xen/xsm/dummy.c
+++ b/xen/xsm/dummy.c
@@ -58,6 +58,8 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     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, init_hardware_domain);
+
     set_to_dummy_if_null(ops, get_pod_target);
     set_to_dummy_if_null(ops, set_pod_target);
 
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 9a6b199..3eb6c1e 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -327,6 +327,11 @@ static char *flask_show_security_evtchn(struct domain *d, const struct evtchn *c
     return ctx;
 }
 
+static int flask_init_hardware_domain(struct domain *d)
+{
+    return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__CREATE_HARDWARE_DOMAIN);
+}
+
 static int flask_grant_mapref(struct domain *d1, struct domain *d2, 
                               uint32_t flags)
 {
@@ -1498,6 +1503,7 @@ static struct xsm_operations flask_ops = {
     .alloc_security_evtchn = flask_alloc_security_evtchn,
     .free_security_evtchn = flask_free_security_evtchn,
     .show_security_evtchn = flask_show_security_evtchn,
+    .init_hardware_domain = flask_init_hardware_domain,
 
     .get_pod_target = flask_get_pod_target,
     .set_pod_target = flask_set_pod_target,
diff --git a/xen/xsm/flask/policy/access_vectors b/xen/xsm/flask/policy/access_vectors
index a0ed13d..32371a9 100644
--- a/xen/xsm/flask/policy/access_vectors
+++ b/xen/xsm/flask/policy/access_vectors
@@ -198,6 +198,8 @@ class domain2
     set_max_evtchn
 # XEN_DOMCTL_cacheflush
     cacheflush
+# Creation of the hardware domain when it is not dom0
+    create_hardware_domain
 }
 
 # Similar to class domain, but primarily contains domctls related to HVM domains
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:12:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:12: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 1Wcv6A-0006RN-UW; Wed, 23 Apr 2014 11:12:18 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv69-0006Qv-GZ
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:17 +0000
Received: from [85.158.137.68:49422] by server-10.bemta-3.messagelabs.com id
	A1/71-16608-010A7535; Wed, 23 Apr 2014 11:12:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1398251535!8475029!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31346 invoked from network); 23 Apr 2014 11:12:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:12:16 -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 1Wcv66-00076M-Sw
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv66-0001YF-RG
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:14 +0000
Date: Wed, 23 Apr 2014 11:12:14 +0000
Message-Id: <E1Wcv66-0001YF-RG@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: correct double
	unmap_domain_page() on error path
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 75e253bb78f2b7905c20a0caddd8eb2fb77e5eab
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 22 14:45:10 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 14:45:10 2014 +0200

    x86/EPT: correct double unmap_domain_page() on error path
    
    c/s 3d90d6e6 "x86/EPT: split super pages upon mismatching memory types"
    accidentally introduced an error path where the epte domain page would be
    unmapped twice if splitting the superpage failed.
    
    Only unmap the page if the loop is to be continued.  When breaking from the
    loop, the page will be unmapped by the subsequent code.
    
    Coverity-ID: 1203047
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/mm/p2m-ept.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index b0ab3ce..8d3051b 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -351,9 +351,9 @@ bool_t ept_handle_misconfig(uint64_t gpa)
                                              e.sa_p2mt == p2m_mmio_direct);
                 if ( unlikely(emt < 0) )
                 {
-                    unmap_domain_page(epte);
                     if ( ept_split_super_page(p2m, &e, level, level - 1) )
                     {
+                        unmap_domain_page(epte);
                         mfn = e.mfn;
                         continue;
                     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:12:28 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:12: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 1Wcv6A-0006RN-UW; Wed, 23 Apr 2014 11:12:18 +0000
Received: from mail6.bemta3.messagelabs.com ([195.245.230.39])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv69-0006Qv-GZ
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:17 +0000
Received: from [85.158.137.68:49422] by server-10.bemta-3.messagelabs.com id
	A1/71-16608-010A7535; Wed, 23 Apr 2014 11:12:16 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-31.messagelabs.com!1398251535!8475029!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.11.1; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 31346 invoked from network); 23 Apr 2014 11:12:16 -0000
Received: from mail.xen.org (HELO mail.xen.org) (50.57.168.107)
	by server-10.tower-31.messagelabs.com with AES256-SHA encrypted SMTP;
	23 Apr 2014 11:12:16 -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 1Wcv66-00076M-Sw
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:14 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv66-0001YF-RG
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:14 +0000
Date: Wed, 23 Apr 2014 11:12:14 +0000
Message-Id: <E1Wcv66-0001YF-RG@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] x86/EPT: correct double
	unmap_domain_page() on error path
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 75e253bb78f2b7905c20a0caddd8eb2fb77e5eab
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Apr 22 14:45:10 2014 +0200
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Tue Apr 22 14:45:10 2014 +0200

    x86/EPT: correct double unmap_domain_page() on error path
    
    c/s 3d90d6e6 "x86/EPT: split super pages upon mismatching memory types"
    accidentally introduced an error path where the epte domain page would be
    unmapped twice if splitting the superpage failed.
    
    Only unmap the page if the loop is to be continued.  When breaking from the
    loop, the page will be unmapped by the subsequent code.
    
    Coverity-ID: 1203047
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/mm/p2m-ept.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index b0ab3ce..8d3051b 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -351,9 +351,9 @@ bool_t ept_handle_misconfig(uint64_t gpa)
                                              e.sa_p2mt == p2m_mmio_direct);
                 if ( unlikely(emt < 0) )
                 {
-                    unmap_domain_page(epte);
                     if ( ept_split_super_page(p2m, &e, level, level - 1) )
                     {
+                        unmap_domain_page(epte);
                         mfn = e.mfn;
                         continue;
                     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:12:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:12:39 +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 1Wcv6L-0006Tu-2b; Wed, 23 Apr 2014 11:12:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv6J-0006Sy-N2
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:27 +0000
Received: from [193.109.254.147:40655] by server-16.bemta-14.messagelabs.com
	id 63/8A-16986-A10A7535; Wed, 23 Apr 2014 11:12:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1398251545!352778!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16376 invoked from network); 23 Apr 2014 11:12:26 -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;
	23 Apr 2014 11:12:26 -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 1Wcv6H-00076S-0i
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv6G-0001Yi-Vj
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:24 +0000
Date: Wed, 23 Apr 2014 11:12:24 +0000
Message-Id: <E1Wcv6G-0001Yi-Vj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] gitignore: ignore OVMF directories
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 8cfc8e520679e029bed51ccc2540a136fc0fbd9b
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Mon Apr 21 11:16:16 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Tue Apr 22 14:15:15 2014 +0100

    gitignore: ignore OVMF directories
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index e8442c9..562c262 100644
--- a/.gitignore
+++ b/.gitignore
@@ -326,6 +326,9 @@ tools/qemu-xen-traditional-dir
 tools/firmware/seabios-dir-remote
 tools/firmware/seabios-dir
 
+tools/firmware/ovmf-dir-remote
+tools/firmware/ovmf-dir
+
 tools/firmware/rombios/_rombios_.c
 tools/firmware/rombios/rombios.s
 tools/firmware/rombios/rombios.sym
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

From xen-changelog-bounces@lists.xen.org Wed Apr 23 11:12:39 2014
Return-path: <xen-changelog-bounces@lists.xen.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 23 Apr 2014 11:12:39 +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 1Wcv6L-0006Tu-2b; Wed, 23 Apr 2014 11:12:29 +0000
Received: from mail6.bemta14.messagelabs.com ([193.109.254.103])
	by lists.xen.org with esmtp (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv6J-0006Sy-N2
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:27 +0000
Received: from [193.109.254.147:40655] by server-16.bemta-14.messagelabs.com
	id 63/8A-16986-A10A7535; Wed, 23 Apr 2014 11:12:26 +0000
X-Env-Sender: ian.jackson@eu.citrix.com
X-Msg-Ref: server-10.tower-27.messagelabs.com!1398251545!352778!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.11.3; banners=-,-,-
X-VirusChecked: Checked
Received: (qmail 16376 invoked from network); 23 Apr 2014 11:12:26 -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;
	23 Apr 2014 11:12:26 -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 1Wcv6H-00076S-0i
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:25 +0000
Received: from xen by xenbits.xen.org with local (Exim 4.72)
	(envelope-from <ian.jackson@eu.citrix.com>) id 1Wcv6G-0001Yi-Vj
	for xen-changelog@lists.xensource.com; Wed, 23 Apr 2014 11:12:24 +0000
Date: Wed, 23 Apr 2014 11:12:24 +0000
Message-Id: <E1Wcv6G-0001Yi-Vj@xenbits.xen.org>
From: patchbot@xen.org
To: xen-changelog@lists.xensource.com
Subject: [Xen-changelog] [xen master] gitignore: ignore OVMF directories
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 8cfc8e520679e029bed51ccc2540a136fc0fbd9b
Author:     Wei Liu <wei.liu2@citrix.com>
AuthorDate: Mon Apr 21 11:16:16 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@eu.citrix.com>
CommitDate: Tue Apr 22 14:15:15 2014 +0100

    gitignore: ignore OVMF directories
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index e8442c9..562c262 100644
--- a/.gitignore
+++ b/.gitignore
@@ -326,6 +326,9 @@ tools/qemu-xen-traditional-dir
 tools/firmware/seabios-dir-remote
 tools/firmware/seabios-dir
 
+tools/firmware/ovmf-dir-remote
+tools/firmware/ovmf-dir
+
 tools/firmware/rombios/_rombios_.c
 tools/firmware/rombios/rombios.s
 tools/firmware/rombios/rombios.sym
--
generated by git-patchbot for /home/xen/git/xen.git#master

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

